on-internet

Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx

I am getting an exception, but it isn't a code problem, it is a settings/dependencies problem. I have a work and home computer. The project files are synced via OneDrive. Both computers are running Mac OSX 10.11.4, jdk1.8.0_66.jdk and IntelliJ IDEA 2016.1.1 The code works at my work but at home I get the exception: Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/staxex/XMLStreamReaderEx at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.storeElementAndChildren(StreamReaderBufferCreator.java:195) at com.sun.xml.stream.buffer.stax.StreamReaderBufferCreator.storeDocu

Join the discussion →

How to check if column header is clicked in datagridview using SelectionChanged event

I'm using SelectionChanged event of a DataGridView. I have a code that will display the value of a DataGridView's cell to a TextBox. However, when I click the column header, this also triggers the code (I assume because of the SelectionChanged event) and will display an error. What I want to achieve is to enclose my codes in the datagridview1_SelectionChanged in an if statement. Wherein: if(column header is clicked) //don't do anything` else //do the display of data to textbox` I just want to know the code for checking if you clicked a header or not.

Join the discussion →

micromedia flash error 1120, 1180

please can you help me solve this ... thanks Scene 1, Layer 'Action Layer', Frame 1, Line 1, Column 1 1120: Access of undefined property url. Scene 1, Layer 'Action Layer', Frame 1, Line 2, Column 1 1180: Call to a possibly undefined method loadVariablesNum. Scene 1, Layer 'Action Layer', Frame 1, Line 2, Column 18 1120: Access of undefined property url. Scene 1, Layer 'Action Layer', Frame 1, Line 3, Column 1 1120: Access of undefined property _root. Scene 1, Layer 'Action Layer', Frame 243, Line 1, Column 19 1120: Access of undefined property _root. url = "xxx"; loadVariablesNum(url + "_main

Join the discussion →

Using libclang to parse C++ in Python

After some research and a few questions, I ended up exploring libclang library in order to parse C++ source files in Python. Given a C++ source int fac(int n) { return (n>1) ? n∗fac(n−1) : 1; } for (int i = 0; i < linecount; i++) { sum += array[i]; } double mean = sum/linecount; I am trying to identify the tokens fac as a function name, n as variable name, i as a variable name, mean as variable name, along with each ones position. I interested in eventually tokenizing them. I have read some very useful articles (eli's, Gaetan's) as well as some stack overflow questions 35113197, 13236500. Howe

Join the discussion →

Exception "Resolution of the dependency failed"

My application has a 10 WCFService (WCFService Application on platform .NET Framework 3.5) with same software and hardware but only 1 takes this exception: When user is logged in invoke this method: public IService Select(SelectServiceRequest request) { IAxxxService anagServ = IoC.Container.Resolve<IAxxxService>(request.GetRegisteredService().ToString()); return xxxServ; } with GetRegisteredService() implementation with ClientIdentifier = 0 for first execution public RegisteredServices GetRegisteredService() { RegisteredServices res = RegisteredServices.Estxxx; if (ClientIdentifier == 0) { res

Join the discussion →

"Resolution of the dependency failed"

My application has a 10 WCFService (WCFService Application on platform .NET Framework 3.5) with same software and hardware but only 1 takes this exception: When user is logged in invoke this method: public IService Select(SelectServiceRequest request) { IAxxxService anagServ = IoC.Container.Resolve<IAxxxService>(request.GetRegisteredService().ToString()); return xxxServ; } with GetRegisteredService() implementation with ClientIdentifier = 0 for first execution public RegisteredServices GetRegisteredService() { RegisteredServices res = RegisteredServices.Estxxx; if (ClientIdentifier == 0) { res

Join the discussion →

Unity + C# - "Resolution of the dependency failed"

My application have a 10 WCFService ( WCFService Application on platform .NET Framework 3.5) with same software and hardware but only 1 takes this exception: When user is logged in invoke this method: public IService Select(SelectServiceRequest request) { IAxxxService anagServ = IoC.Container.Resolve<IAxxxService>(request.GetRegisteredService().ToString()); return xxxServ; } with GetRegisteredService() implementation with ClientIdentifier = 0 for first execution public RegisteredServices GetRegisteredService() { RegisteredServices res = RegisteredServices.Estxxx; if (ClientIdentifier == 0) { r

Join the discussion →

journalctl - remove logs of a specific unit [closed]

With journalctl, it is possible to remove the old logs, by specifying either the maximum disk space they can use, or the maximum age they can have, or the maximum number of separate journal files (using the options --vacuum-size, --vacuum-time or --vacuum-files). Is there a way to restrain this deletion to a specific systemd unit ? journalctl -u <unit> --vacuum-time=2d seems not to work as desired: according to the documentation, -u only works when displaying logs.

Join the discussion →

How to upload multiple files using multiple fileupload controls in asp.net?

I have a webpage(.aspx) which contains MULTIPLE FileUpload controls. Default.aspx <asp:FileUpload ID="FileUploadPort" runat="server" CssClass="Upload" Multiple="Multiple"/> <asp:FileUpload ID="FileUploadSearchImages" runat="server" CssClass="Upload" Multiple="Multiple"/> Default.aspx.cs protected void btnSubmit_Click(object sender, EventArgs e) { string filenm = string.Empty; HttpFileCollection fileCollection = Request.Files; for (int i = 0; i < fileCollection.Count; i++) { HttpPostedFile uploadfile = fileCollection[i]; if (uploadfile.ContentLength > 0) { string filename = uploadfile.FileName;

Join the discussion →

Fragmented line fitting

I want to fit a line to line fragments, i.e. a small number (often less than 10) of line segments that approximately belong to the line. The line has a small slope. But there are outliers: segments (usually smaller) outside the line. The figure below shows a typical case. There isn't any horizontal overlap between the pieces. I would prefer to avoid trying a fit on all subsets of segments and keeping the best. I also wouldn't rely on RANSAC as the sample is too small. Any suggestion? I now plan to recast the problem as that of fitting a line on points, namely the infinities of points on the in

Join the discussion →

Terraforming Mars with a comet

A few days ago, I was roaming around Wikipedia and came across something, this comet came extremely close to Mars for astronomical standards recently. I'm also working on a science fiction universe and was wondering what would happen if this comet collided with Mars. From Wikipedia, it would have released 24 billion megatons of TNT. Would this be enough to release the carbon dioxide on Mars and start a runaway greenhouse effect? Also, how would this comet be tweaked to collide with Mars, if even possible?

Join the discussion →

Unsafe State and Safe State

I have learned a little about Unsafe State and Safe State. Safe State is when there is no chance of deadlock occuring, while unsafe state doesn't mean a deadlock has occurred yet, but means that a deadlock could happen. What I'm trying to figure out is if a system is in an UNSAFE state, can it ever return to a safe state? Thanks for your time!

Join the discussion →

Mounting a single file from a Docker data volume in a Docker

I'm trying to mount a single file from a Docker volume in a container when using "docker run". I've been able to mount an entire volume as a directory, e.g: docker run -v my_volume:/root/volume my_container I've also mounted single files from the physical machine, e.g: docker run -v /usr/local/bin/docker:/usr/local/bin/docker Is there a way?

Join the discussion →

How to pass a range into a custom function in Google Spreadsheets?

I am trying to compare two google sheets (for duplicate values) over a predefined range.. I am aware that google lets you compare sheets via tools, but i need a more customized comparison hence the function. I want to create a function which takes in a range... something like: function myFunction(range) { var firstColumn = range.getColumn(); // loop over the range } The problem is that when I try doing this, the parameter seems like it is only passing the values to the function. Thus, I cannot use any of the Range methods such as getColumn(). When I attempt to do so, it gives the following err

Join the discussion →

How to split records evenly into 4 tables from one table?

I have to design a solution that will help me out to load data into 4 tables from 1 master table. All that the function or package is supposed to do is following : Count total number of rows in a master table Divide by 4 Load into table 1,2,3 and 4. Every time we run the program, this function wipes out 4 tables and do the above process again and the name of the main table and of the destination tables will be always same. For example, if the Master Table has 4200 records then : Table A will get 1-1000 Table B will get 1001-2000 Table C will get 2001-3000 Table D will get 3001-4200. Can anyone

Join the discussion →

File.Copy from remote computer to local

When I try to copy an existing file from a remote computer to local with File.Copy( string.Format(@"\\{0}\e$\{1}", computerName, fileName), string.Format(@"{0}\{1}\{2}", localPath, computerName, fileName), true); I get the exception Could not find part of the path "\computername\e$\filename". I checked the path and it's correct. I don't think that is a permission problem because I can reach the file with Directory.GetFiles and I can obtain info like file size or last writing date with FileInfo, moreover when I execute xcopy command from cmd with the same paths in the code he copies the file su

Join the discussion →

Cannot change colour of DataGridView or set to ReadOnly

I have a datagridview where i need to disable rows where the checkbox value on that row isn't checked, here's the code: foreach (DataGridViewRow row in catView.Rows) { if (row.Cells[1].FormattedValue.ToString() != "true") { for (int i = 0; i < row.Cells.Count; i++) { row.Cells[i].Style.ForeColor = Color.Gray; row.Cells[i].ReadOnly = true; } } } Problem is that this doesn't set the colour or disable the checkbox, what am i getting wrong? More info: cells[1] is the checkbox column.

Join the discussion →

get tweets with specific status ids using tweepy

I have a list of the specific status ids of tweets that I need to obtain. The tweepy documentation provides the following: API.get_status(id) Returns a single status specified by the ID parameter. Parameters: id – The numerical ID of the status. Return type: Status object I can't work out how to use this or find any examples. Is this even the right thing? My list of ids is 2240 items long and looks something like this: response_ids = [717289507981107201, 717289501337509888, ..., 716684885411237888] These ids were obtained from the 'in_response_to_status_id' field of tweets that I already have

Join the discussion →

How to use relative paths in the edg compiler

I use the compiler edg for front-end compilation. Let's assume I have two files /build/src/a.c /build/include/a.h I am able to compile the file a.c by specifying -I /build/include, but not using -I../include. How can I use a relative path using edg? Note: I am compiling all the source files using XML files, not from a command-line interface.

Join the discussion →

How to use relative paths in the edg compiler edg

I use the compiler edg for front-end compilation.Let's assume I have two files /build/src/a.c /build/include/a.h I am able to compile the file a.c by specifying -I /build/include, but not using -I../include. How can I use a relative path using edg? Note: I am compiling all the source files using XML files, not from a command-line interface.

Join the discussion →

Is user in dialout group?

In my script I need to find out whether user is in dialout group and if he is not, add him to the group. I have found out how to add him but is there a way how to know if he is in the group ?

Join the discussion →

Validation on click in contact form 7

I am building custom step-by-step form based on Contact Form 7 and i need to validate field before going to next section. how i can call validate function on click? I can't find it in documentation. $( "#next-section" ).click(function() { //call validate function (how to do this)?? if('validate function no errors') { //call my scripts } });

Join the discussion →

Docker Compose NGINX Proxy and Static Files

For some reason, my docker-compose/node/nginx stack is having trouble serving static files. The reverse proxy side works but serving my css and javascript fails. For every static file requested, I get an error like this: customnginx_1 | 2016/03/29 22:42:13 [error] 6#6: *1 open() "/var/www/static/styles/normalize.css" failed (2: No such file or directory), client: 192.168.99.1, server: , request: "GET /styles/normalize.css HTTP/1.1", host: "192.168.99.100", referrer: "http://192.168.99.100/" How do I properly link my "static" directory to my nginx container so these files are served correctly?

Join the discussion →

Clickable hyperlink on PowerShell's console output

I'm having some issues with the following PowerShell script, could you please help me with that? What I'm trying to accomplish is create a clickable hyperlink in PowerShell's console output. Something like that: $testOutPut = "http://something.com" Write-Host $OutputConvertedIntoHYPERLINK Where the desired console response would be: clickable link to external app http://something.com My goal with it is to show this clickable information on build console into TFS 2015.

Join the discussion →

C program for calculating factorial

i have written a small function which calculates factorial for a number in C as follows: int factNnumbers(int n) { if(n == 1) return 1; else return (n*factNnumbers(--n)); } I call the function shown above as: factNnumbers(takeInputN()); where the function to take the input (takeInputN) is defined as: int takeInputN() { int n; printf("\n\nHow many numbers ?? \n "); scanf("%d", &n); return n; } If I change one line in my factorial code as shown below , my program works perfectly. Otherwise with the above code it prints the factorial of the number input -1 (example if number input is 5, it will p

Join the discussion →

How to test time-based functionality without implementing it within the test?

I'm trying out TDD on some side project and already encountered this a couple of times. As an example, my program needs to take a number X, and find out the date string that was X days ago, in order to perform certain date-based queries. So I figured I need a test that validates the date computation is correct. But, since the test depends on the current date, how can create such a test? I can have the test method implement this exact functionality by itself, but that would just make it redundant... Edit: I've seen Setting time and date in JUnit test fixture but the answers there seem quite an

Join the discussion →

running a spark submit job as cluster deploy mode fails but passes with client

EDITI: by removing the conf setting in the app for 'setMaster' I'm able to run yarn-cluster successfully - if anyone coudl help with spark master as cluster deploy - that'd be fantastic I'm trying to set up spark on a local testmachine so that I can read from an s3 bucket and then write back to it. Running the jar/application using client works fine, well, fine in that it goes off to the bucket and creates a file and comes back again. However I need this to work in cluster mode so that it more closely resembles our prod environment yet it's constantly failing - no real sensible messages in the

Join the discussion →

Referencing this in .querySelector

If I use the following to select a certain node var Link = document.querySelector('table .ctrlcLink'); I get the first column value for the column with class ctrlLink, which is what I expected. However, since I have an onclick event set to an other column in the same table, I would like to get the value of the .ctrlLink column that is on the same row as my clicked element. So I tried something like this: var Link = document.querySelector($(this).closest('tr').children('td.ctrlcLink')); But then I get "Failed to execute 'querySelector' on 'Document': '[object Object]' is not a valid selector."

Join the discussion →

Cannot add task 'X' as a task with that name already exists

I have this gradle.build apply plugin: 'java' apply plugin: 'war' apply plugin: 'maven-publish' apply from: ext.gradleDir + '/common.gradle' apply from: ext.gradleDir +'/base.gradle' apply from: ext.gradleDir + '/integration_test.gradle' sourceCompatibility = 1.8 targetCompatibility = 1.8 version = '1.0' project.archivesBaseName = 'client-services-lib' uploadArchives.repositories.mavenDeployer.pom.groupId="com.waze.automation" dependencies { compile('com.waze.automation:common:1.0.58') compile('com.sun.jersey:jersey-bundle:1.19') compile('com.sun.jersey:jersey-json:1.19') compile group: 'org.c

Join the discussion →
Older stories