user994165

1

votes
1

answer
1.1k

views

Custom Constraint Validator Annotation

I'm trying to create a custom constraint validator annotation. This is my annotation definition below. Eclipse complains that the 'Target annotation is disallowed for this location.' The same goes for Retention and Constraint. I'm using Java 1.7 package com.test; import static java.lang.annotati...
user994165
1

votes
0

answer
118

views

Integrating React with Other Libraries

In the React documentation for 'Integrating with Other Libraries', it mentions at least two ways to integrate other libraries. One involves wrapping the code with a React component (example at the bottom). If I use this approach, would I basically not be able to pass in properties to the component?...
user994165
1

votes
0

answer
43

views

Separate environments for BigQuery

What's the best way to create separate environments for BigQuery? This will eventually be a multi-tenant system with multiple datasets for each tenant.
user994165
1

votes
1

answer
392

views

ModuleNotFoundError: No module named 'pandas' when importing module

When running my module directly with as a flask app through Docker with Python 3, which installs pandas based on the requirements.txt file, it runs fine. When I import this module from another app, it doesn't find pandas. The following is my setup.py file. from setuptools import setup, find_packag...
user994165
1

votes
0

answer
82

views

Jest not using manual mock

I'm using Create React App. I created a Jest test that uses a manual mock. The test renders my App component and I'm trying to mock a nested component. It's still picking up the original BarChart component. containers/__tests__/App.js import React from 'react'; import { shallow, mount } from 'enz...
user994165
1

votes
1

answer
379

views

C: Eclipse / gdb and Null Terminated Strings

How can I tell if a string is null terminated in Eclipse and gdb? Under Debug for 'Default', if I just see the text I want to store in quotes I can assume it is properly null terminated? Also, what's the best way to copy a string to make sure that it is properly terminated?
user994165
1

votes
1

answer
1.7k

views

JSP parse error

This the first time I've tried using JSP and I'm getting a parse error at the link in the last line. I already have a ';'. 1 2012-04-23T15:49:17Z in Weblogic: feed.jsp:69:16: Syntax error, insert ';' to complete Statement The rest of the feed: good_subjectdoc_absoluteurl_samebase_singledocname.xml...
user994165
1

votes
1

answer
100

views

Restrict Element to URL

I have this existing XSD and it's trying to restrict a value to a URL but it's not working. The id is blank and the document still validates. It also validates when I enter in any text. ... ... The Atom id construct is defined in section 4.2.6 of the format spec. ............ https://mydomain.com
user994165
1

votes
1

answer
70

views

Add Regular Expression to Text Element

Is there a way to take an element that is an 'anyURI' and add additional constraints such as require '://'? Or would I have to define a new data type and how would I actually keep the rules for 'xsd:anyURI' in that new data type?
user994165
1

votes
2

answer
5.2k

views

Errors after importing Maven project into Eclipse

I imported a Maven project into Eclipse. I was able to deploy it from the command line. In Eclipse it is full of red Xs. I have cleaned the project, updated the configuration and I ran the following command: mvn -Declipse.workspace= eclipse:add-maven-repo and I still have the same problem. The p...
user994165
1

votes
2

answer
11.5k

views

Extracting whole SOAP message with JAX-WS

I have an EJB stateless bean web service and would like to get access to the whole SOAP message, not just the SOAP Body as I'm currently getting in the parameter. I want to submit the message to a different component. I'm using Spring configuration but not Spring-WS. I followed this tutorial: http:/...
user994165
1

votes
1

answer
1.7k

views

Soap Handler org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR:

I'm using JAX-WS in a stateless bean exposed as a web service using Spring configuration (not Spring-WS). I've added a SOAP Handler and in handler, when I try to getMessage() on the SOAPMessageContext, I get a An attempt was made to insert a node where it is not permitted. at org.apache.axiom.om.im...
user994165
1

votes
1

answer
1.8k

views

Convert an XML String to a JSON Object Object

I'm trying to convert an XML string to a JSON object. I used net.sf.json, but it strips away the root element. XMLSerializer xmlSerializer = new XMLSerializer(); net.sf.json.JSON netsfJSON = xmlSerializer.read(xml); I also tried org.json.XML JSONObject jsonObject=XML.toJSONObject(xml); but it doesn...
user994165
1

votes
1

answer
36

views

Access Element using D3

I have the following element on the page: If I want to change the text using D3, I know I can use: d3.select('#chart_title').html('title'); Is there a way I can use the D3 selector, but then just get access to the div itself? I tried: d3.select('#chart_title')[0] but I just end up seeing the div in...
user994165
0

votes
0

answer
9

views

Promisify mkdir on a recursive directory

I've promisified fs.mkdir(). When I try to create a single directory in /tmp, it works, but tI receive a ENOENT error when I try to create a nested directory, even though I sent in the { recursive: true } option. const mkdirAsync = util.promisify(fs.mkdir); ... const ensureDir = ({ logger, createE...
user994165
1

votes
1

answer
56

views

JavaScript exception thrown is not of type “Error”

I'm using Restify and somewhere in the Restify library, an exception is being thrown due to some bad inputs on the user side. I have some simplified code below that recreates the issue. The problem in the example below is in an asynchronous function that tries to execute doesntexist.nofunction....
user994165
1

votes
1

answer
54

views

Why does the React tutorial recommend that child Component states be stored in the parent Component?

According to the React tutorial at https://facebook.github.io/react/tutorial/tutorial.html: When you want to aggregate data from multiple children or to have two child components communicate with each other, move the state upwards so that it lives in the parent component. The parent can then pass th...
user994165
1

votes
1

answer
50

views

SQLAlchemy / PostgreSQL not creating column with the correct timestamp format

I have the following table I'm creating. After running this in a script to populate a database, the created_at columns come back with a value of '2018-10-24 19:47:22.60331'. I'm not getting the time zone offset even though https://www.postgresql.org/docs/9.2/static/functions-datetime.html#FUNCTIONS...
user994165
1

votes
1

answer
38

views

Unable to find module after import

I'm runnin Python 3.6.3 and I have the following module in a subdirectory that I'm trying to install through pip. /g_plotter setup.py /g_plotter __init__.py g_plotter.py Gparser.py setup.py from setuptools import setup setup( name='g_plotter', packages=['g_plotter'], include_package_data=True, insta...
user994165
1

votes
1

answer
0

views

Validate XML without root schema

Is there an easy way to validate an XML file without a schema in the root node but which has a schema in on of the child tags? Would I just have to parse through the XML file, build a new Document from a child node and perform a validation on that 'sub' document? ... ...
user994165
1

votes
1

answer
0

views

Hex Code Differences

I'm working on an assignment to write a program mirroring ac(1). The output of ac and my aac are both: ' total 5.80\n' I ran aac -file xyz > out1 and ac -file xyz > out2 However, when using diff out1 and out2 I get: 1c1 < total 5.80 --- > total 5.80 Getting t...
user994165
1

votes
1

answer
0

views

Unable to copy string

I have these variables set in my debugger: //Debugger values not code relative_path = './bin/Debug' strlen(relative_path)=11 relative_path[11] = 0 '\000' //As shown in Eclipse debugger In my code I then do: //**My Code** struct dirs_later { const char *findme; struct dirent *dptr; struct stat this_l...
user994165
1

votes
1

answer
3.9k

views

Cannot access memory at address 0x0 when returning an array of strings from a function

I send a pointer to an array of char* to a function (args). In that function I set the value to the first two postions in the array to malloc'd strings. When I return to the orignal calling function where the array itself was malloc'd, the last position of the array gives me a 'Cannot access memor...
user994165
1

votes
1

answer
448

views

Assigning structs to static array

I have a static array and in a function I create a new struct in a loop and assign it to each index in an array. In the function I can see the values but in a different function I see junk for the array values. Do I have to use malloc for something like this? struct file_types { char * typename; c...
user994165
1

votes
4

answer
1.1k

views

Converting Java Desktop Application to Web using Applet or Java Web Start

I know that I can convert a Swing application to an Applet or a Java Web Start application. Is it possible to do the same with an application that's not Swing, say Qt using Java? What I'm really looking for is a UI framework using Java that's as cross-platform as possible and also has a rich set of...
user994165
1

votes
1

answer
3.3k

views

Eclipse WebLogic debugging

I know you can debug by just clicking the debug icon in Eclipse. Is it possible to start WebLogic from the command line with debugging and still debug? When I do that, in Eclipse under server I see that the status is 'Started', not 'Debugging'. Can this only be done by setting up remote debugging?
user994165
1

votes
1

answer
94

views

Lost a git commit

I have the hash for a git commit I made a few weeks ago. I tried checking it out but it says that the hash 'did not match any file(s) known to git'. I also looked for it in git reflog, but don't see it there. I don't see the earliest commits I made in reflog either. I couldn't find the missing co...
user994165
1

votes
1

answer
661

views

JVM Loading duplicate libraries

If my Java application uses two JARS that each have the same version of a library, does the JVM only load the library once?
user994165
1

votes
1

answer
932

views

Node.js: Call to 'node findJavaHome.js' returned exit status 127. while trying to load binding.gyp

I've cloned node-java and when I run node-gyp configure build or npm install, I get the error below. My JAVA_HOME is set to: /opt/java/jdk1.7/latest and works fine for some Java applications. I'm using Ubuntu 14.04.2 LTS gyp: Call to 'node findJavaHome.js' returned exit status 127. while trying to...
user994165
1

votes
2

answer
497

views

What's the difference between a reverse proxy and a gateway?

I know the difference between a forward and reverse proxy, but am not clear on how a reverse proxy is different from a gateway.
user994165
1

votes
2

answer
490

views

setTimeOut() and setInterval() in Node [duplicate]

This question already has an answer here: How does setTimeout work in Node.JS? 5 answers If I call setTimeOut() for say, 10 seconds from now, then execute a set of long running commands, does Node.js/JavaScript wait until those commands finish executing the function set up in setTimeOut? Is the sa...
user994165
1

votes
1

answer
2.9k

views

lstat: Bad Address

When I run this code through several entries of a directory, it usually returns 0, but in two directories (one Windows one in Unix) I keep getting a 'Bad Address' error message. lstat and relative_path are not null and relative_path does point to a valid directory. This code worked on other directo...
user994165
1

votes
1

answer
620

views

Segmentation fault: concatenating string

I'm trying to concatenate two chars and get a segmentation error on the line above return. When I used char instead of char*, the (onechar-a + 'A') worked although I wasn't trying to concatenate. If I leave this as char instead of char* I get warnings about casting. char *carat; carat = test_carat(...
user994165
1

votes
2

answer
89

views

Newlines and blank lines formatting in eclipse

Is there a way to prevent the autoformatter from removing newlines in the comments and blank lines in the code?
user994165
1

votes
4

answer
1.3k

views

“zip file is empty” when installing RTC Eclipse plugin

I'm trying to install the RTC-Client-p2Repo-4.0.5.zip (290.9 MB) eclipse plugin in Eclipse Luna version 32 bit on Linux. After selection the jar file and hitting finish, I get the error at the bottom. The jar file size is 290.9 MiB (305,030,442 bytes) and I am able to extract it. An error occurred...
user994165
1

votes
1

answer
28

views

Cannot cast from XPathExpression<Object> to XPathExpression<Content>

I'm trying to write a method to execute a JDOM2 XPath. I would like to be able to pass in any type of filter (e.g. Filter or Filter. I'm passing in an Element. Element is an interface that extends the Content filter. The compiler warns 'The method executeXPath(Document, String, String, Filter) i...
user994165
1

votes
1

answer
1.4k

views

Printing Assembly Variable in GDB

I don't have the full source code but an object file with symbols. There's a read line: => 0x080489cd : call 0x8049275 0x080489d2 : mov %eax,(%esp) 0x080489d5 : call 0x8048d59 in the function: 8048d59: 55 push %ebp 8048d5a: 89 e5 mov %es...
user994165
19

votes
3

answer
58.6k

views

Java Runtime.exec()

I can run this command from the command line without any problem (the validation script executes): c:/Python27/python ../feedvalidator/feedvalidator/src/demo.py https://das.dynalias.org:8080/das_core/das/2.16.840.1.113883.4.349/1012581676V377802/otherAdminData/careCoordinators and from java if I le...
user994165
1

votes
1

answer
5.6k

views

Invalid Read in Valgrind

I keep seeing these errors in Valgrind. My program also segfaults, but I'm trying to work out the errors in Valgrind first. 81 char *ptr = NULL; 82 if (addition_is_safe(sz, TRAILER_SZ)) 83 ptr = malloc(sz + TRAILER_SZ); 84 syslog(LOG_NOTICE, 'Calling set trailer value, ptr=%p', ptr);...
user994165
5

votes
3

answer
6.2k

views

XML Elements in Any Order, Some Required and Others Aren't

I'm trying to have a list of elements that are allowed in any order. Some of the elements are required (min of 1, max of 1), some are optional with a maximum of one and some are optional with any number. This is what I have and the XSD is valid, but when I go to validate an XML, the rules that I'm...
user994165

View additional