Posts

Showing posts from January, 2011

d3.js - how to visualize data from mysql database in force layout of d3 tool -

d3.js - how to visualize data from mysql database in force layout of d3 tool - i need help d3 , mysql. below question: i using d3 forcefulness directed layout visualize info stored in mysql. want visualize using d3. far knowledge of d3 goes, requires json file input contain nodes , links. question is: how access mysql database d3 script in specified format? want kind of input d3 tool. please help me. {"nodes":[{"name":"myriel","group":1}, {"name":"mlle.baptistine","group":1}, {"name":"mme.hucheloup","group":1}], "links":[{"source":1,"target":0,"value":1}, {"source":2,"target":0,"value":8}, {"source":3,"target":0,"value":10}]} ...

javascript - SignalR upgrade 0.5.3 to 1.0.x issues -

javascript - SignalR upgrade 0.5.3 to 1.0.x issues - i have/am upgraded/upgrading signalr 0.5.3 1.0.x rc2 , having problems creating connection. the issue hitting exception: typeerror: res null connection.apprelativeurl = res.url; my script create connection has been stripped right default demo code: var connection = $.connection('/signalr'); connection.start(function () { console.log("connection started!"); }); still error. when step jquery.signalr.js file, , nail connection code: var url = connection.url + "/negotiate"; connection.log("negotiating '" + url + "'."); $.ajax({ url: url, global: false, cache: false, type: "get", data: {}, datatype: connection.ajaxdatatype, error: function (error) { $(connection).triggerhandler(events.onerror, [error.responsetext]); defer...

database - Import a Simple Graph into Neo4j -

database - Import a Simple Graph into Neo4j - i have simple graph in graphml or gexf format , import neo4j graph database able query on such graph using cypher. graph in not much big , can in middle size seek simple way import such info neo4j. know question simple, i'm stuck it! you can gremlin plugin documented @ http://docs.neo4j.org/chunked/snapshot/gremlin-plugin.html#rest-api-load-a-sample-graph database graph import neo4j cypher

continuous integration - Is there a way to prevent a project from not having access to another project files in Jenkins CI? -

continuous integration - Is there a way to prevent a project from not having access to another project files in Jenkins CI? - i trying setup jenkins/hudson ci in distributed environment. curious next questions: 1) slave business relationship need root/administrator account? if lower privilege can run whats minimum access? 2) on slave node, 1 projects jobs have access project files built on same node? how prevent this? 3) how secure not beingness able format disk bat file running in pre or post build script? 1) slave business relationship not have root or administrator. needs total access folder give in "remote fs root" field of slave configuration. 2) yes does. each project folder owned user used run slave. can access other project folders using relative paths: $workspace/../other_project/. i'm not sure if there default way prevent this. however, have 2 options: delete workspace after build (use plugin workspace cleanup plugin) create separate...

Ruby regex to match all subdomains for my website? -

Ruby regex to match all subdomains for my website? - i'm new using regex expressions. need take subdomains like: something.mysite.com something2.mysite.com anotherthing.mysite.com what kind of regex can set there if want like: rack_env['server_name'].match <regex> you shouldn't using regex here. way go is: rack_env['server_name'].end_with?(".mysite.com") ruby regex

cordova - jQuery Mobile loading gif not animating in Windows 7 PhoneGap application -

cordova - jQuery Mobile loading gif not animating in Windows 7 PhoneGap application - i developing windows phone application using phonegap , jquery mobile.everything works fine except loading image.the loading gif doesn't animate.are there workarounds jquery mobile loading image animates in windows phone 7 application? jquery cordova jquery-mobile windows-phone-7.1

javascript - Why does jQuery store an element as a function? -

javascript - Why does jQuery store an element as a function? - i calling div id of auto this: var auto = $('#car'); console.log(car); when log it, comes in console: [div#car, context: document, selector: "#car", jquery: "1.9.0", constructor: function, init: function…] is "constructor: function" part of log telling me has been stored function, , if why , how store object? jquery creates instances of functions when accepts argument. in case, sent in selector id of element. upon receiving selector, jquery uses new keyword on "internal" jquery function. result function object. every time utilize $ or jquery asking jquery object result of new beingness issued jquery function. object has many things attached it, including element array matching selector, , jquery's prototype allows access api. so, clarify. object. constructed function. edit here sample code help see how can happen. first, demo simpl...

r - Capitalize the first letter of both words in a two word string -

r - Capitalize the first letter of both words in a two word string - let's have 2 word string , want capitalize both of them. name <- c("zip code", "state", "final count") the hmisc bundle has function capitalize capitalized first word, i'm not sure how sec word capitalized. help page capitalize doesn't suggest can perform task. > library(hmisc) > capitalize(name) [1] "zip code" "state" "final count" i want get: "zip code" "state" "final count" what 3 word strings: name2 <- c("i pizza") the base of operations r function perform capitalization toupper(x) . help file ?toupper there function need: simplecap <- function(x) { s <- strsplit(x, " ")[[1]] paste(toupper(substring(s, 1,1)), substring(s, 2), sep="", collapse=" ") } name <- c("zip code", "stat...

objective c - Format specifies type 'unsigned int' but the argument has type 'id' -

objective c - Format specifies type 'unsigned int' but the argument has type 'id' - nsstring *val = [nsstring stringwithformat:@"%u",[settingsmgr performselector:nsselectorfromstring([[gets objectatindex:indexpath.section] objectatindex:indexpath.row])]]; in above code getting warning settingsmgr object class , gets nsmutablearray . nsmutablearray can't hold standard types (int, float, bool, etc), they're stored wrapped (in nsnumber mostly). seek changing %u %@ . objective-c warnings

c# - LINQ to XML - How to fix default namespace in the root element -

c# - LINQ to XML - How to fix default namespace in the root element - consider generating next xml structure, has 2 prefixed namespaces: xnamespace ns1 = "http://www.namespace.org/ns1"; const string prefix1 = "w1"; xnamespace ns2 = "http://www.namespace.org/ns2"; const string prefix2 = "w2"; var root = new xelement(ns1 + "root", new xelement(ns1 + "e1" , new xattribute(ns1 + "attr1", "value1") , new xattribute(ns2 + "attr2", "value2")) , new xattribute(xnamespace.xmlns + prefix2, ns2) , new xattribute(xnamespace.xmlns + prefix1, ns1) ); it generates next xml result (which fine): <w1:root xmlns:w2="http://www.namespace.org/ns2" xmlns:w1="http://www.namespace.org/ns1"> <w1:e1 w1:attr1="value1" w2:attr2="value2" /> </w1:root> the problem arises when seek...

javascript - Google Earth API link.setHref not working when using variable -

javascript - Google Earth API link.setHref not working when using variable - the variable getting right info not working in href parameter. added button variable see in browser. if set hard code value, commented, works. <?php @session_start(); $idcoord = $_get['search_fd0']; $kmlpath = "http://nonprasa.t15.org/kml/pr" . $idcoord . "/doc.kml"; ?> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>google earth api sample</title> <script src="http://www.google.com/jsapi?key=abqiaaaaupsjpk3mbtdpj4g8cqbnjrragtyh6uml8madna0ykuwnna8vnxqczvbxtx2dyyxgstoxpwhvig7djw" type="text/javascript"></script> <script type="text/javascript"...

scala - How can I speed up flatten? -

scala - How can I speed up flatten? - i have method: val reportswithcalculatedusage = time("calculate usage") { reportshavingcalculatedcounter.flatten.flatten.tolist.groupby(_._2.product).mapvalues(_.map(_._2)) mapvalues { list => list.foldleft(list[reportdatahelper]()) { case (nil, head) => list(head) case (tail, head) => val previous = tail.head val current = head re-create ( usage = if (head.machine == previous.machine) head.counter - previous.counter else head.usage) current :: tail } reverse } } where reportshavingcalculatedcounter of type: val reportshavingcalculatedcounter: scala.collection.immutable.iterable[scala.collection.immutable.indexedseq[scala.collection.immutable.map[strin g,com.agilexs.machinexs.logic.reportdatahelper]]] . this code works perfectly. problem reportshavingcalculatedcounter has maps within whom sum of reportdatahelper objects (map values) 50 000 entr...

how to store a array values into session variable in php -

how to store a array values into session variable in php - i want store value of array session variable , want utilize session variable in page printing subject name while going print getting blank page. <?php session_start(); $colname=array(); $i=0; while($i<10) { $colname[$i]=$i; $i++; } echo"$colname[0]"; echo"$colname[1]"; echo"$colname[2]"; echo"$colname[3]"; echo"$colname[4]"; echo"$colname[5]"; echo"$colname[6]"; echo"$colname[7]"; echo"$colname[8]"; echo"$colname[9]"; $_session['sub1']=$colname[0]; $_session['sub2']=$colname[1]; $_session['sub3']=$colname[2]; $_session['sub4']=$colname[3]; $_session['sub5']=$colname[4]; $_session['sub6']=$colname[5]; $_session['sub7']=$colname[6]; $_session['sub8']=$colname[7]; $_session['sub9']=$colname[8]; $_session['sub10']=$colname[9]; ?> whi...

sockets - Java - readObject() and setSoTimeout() -

sockets - Java - readObject() and setSoTimeout() - so, wrote thread on client side , tries readobject() socket stream. this thread runs long client connected. the connection server can closed on client's gui. if client decides disconnect(this not exit client program) clicking "disconnect" menu option, socket closed , isconnected set false. since clients read thread tries readobject() stream, while connection can closed via gui, set timeout 250ms ( setsotimeout(250) ). @override public void run() { this.connection = this.connectionhandler.getsocket(); while(connectionhandler.isconnected()) { this.readcircle(); } this.connectionhandler.setreadtaskrunning(false); } private void readcircle() { seek { this.connection.setsotimeout(250); this.connectionhandler.readdata(); //this uses readobject(). } catch(sockettimeoutexception timeout){} catch(...){} } i know readobject() block, , check if client still connected, wraped in...

asp.net web api - Long running jQuery Ajax call -

asp.net web api - Long running jQuery Ajax call - i have jquery ajax phone call request summary count web api services. web api process request , calls stored procedure (sql server) passing request parameters. stored procedure takes longer time (more 10 minutes process request. if stored procedure takes more 10 minutes jquery ajax phone call reporting unknown error status code 12002 or 12152(these errors relates connectivity issue) web server receives result stored procedure after 10 minutes. problem occuring on browser ie8.0 , ie9.0, firefox chrome receiving response if wait beyond 10 minutes. there solutions maintain communication live between server , client. have tried changing connection request header ajax "close","open","keep-alive" nil works. pls help me out. java script code. $.ajax({ type: "post", url: urlprefix + 'api/querydispatcher/summary', data: s, success: function (data) { window.clearinterval(int); $(...

MPI output write 2d block cyclic distribution in C using some of MPI_File_write -

MPI output write 2d block cyclic distribution in C using some of MPI_File_write - i have problems writing 2d block cyclic distributed array in file. i've tried things: rc=mpi_file_open(mpi_comm_world, rez, mpi_mode_wronly, mpi_info_null, &cfile); if(rc){printf("failed open file! error: %d \n", rc);mpi_finalize(); fflush(stdout);} else { mpi_file_write_all(cfile, matc, loccc*locrc, compa, &status); } ... rc=mpi_file_open(mpi_comm_world, rez, mpi_mode_wronly, mpi_info_null, &cfile); if(rc){printf("failed open file! error: %d \n", rc);mpi_finalize(); fflush(stdout);} else { mpi_file_write_ordered(cfile, matc, loccc*locrc, compa, &status); } ... rc=mpi_file_open(mpi_comm_world, rez, mpi_mode_wronly, mpi_info_null, &cfile); if(rc){printf("failed open file! error: %d \n", rc);mpi_finalize(); fflush(stdout);} else { mpi_file_...

android - Show Download Manager progress inside activity -

android - Show Download Manager progress inside activity - i used download manager class within activity perform downloads; works fine , next task show same progress percentage within activity. not sure how it. my code far public class downloadsamplebook extends activity{ private long enqueue; private downloadmanager dm; /** called when activity first created. */ @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_sample_download); broadcastreceiver receiver = new broadcastreceiver() { @override public void onreceive(context context, intent intent) { string action = intent.getaction(); if (downloadmanager.action_download_complete.equals(action)) { long downloadid = intent.getlongextra( downloadmanager.extra_download_id, 0); query query = new query(); query.setfilterbyid(enq...

Android - Java - Get nth element in JSONObject -

Android - Java - Get nth element in JSONObject - my json file contains several attributes. 1 of them list of objects. need access list via numerical key, ie 1st, 2nd etc element. when getting nth element want access attributes alphabetical key. example: myobj.get("itemlist").get(0).get("attribute") if i'm forced convert whole thing jsonarray (afaik) can't access attributes via key position. here's json string: { "id": 1, "items": [ { "id": 1, "type": "video", "name": "test.mp4" }, { "id": 2, "type": "image", "name": "pic.jpg" } ], "name": "test" } any ideas? ok, don't quite understand why when next works: jsonarray mylist = new jsonobject(filepath).getjsonarray("items"); system.out.println((((jsonobject) ...

vb.net - Set Panel backcolor when hover -

vb.net - Set Panel backcolor when hover - i'm creating panel labels , pictureboxes in programitacally. what want it, whenever mouse hovers panel panel backcolor set steelblue , whenever mouseleave occurs, backcolor sets transparent my problem is, whenever hover child of panel such label or picturebox lose backcolor, because code considers mouseleave event of panel . therefore, have tried function whenever hover kid of panel set panel backcolor steelblue. now problem is, backcolor flickers because whenever hover label or picturebox considers mouseleave event of panel how create backcolor of panel remain same until leave panel boundaries? i don't know of easy way of doing this. best way create new command inherits panel control. if that, can override onmouseleave method, this: protected overrides sub onmouseleave(e eventargs) if not me.clientrectangle.contains(me.pointtoclient(control.mouseposition)) mybase.onmouseleave(e...

jQuery - dynamically binding a CSS class on an attr? -

jQuery - dynamically binding a CSS class on an attr? - i have table rows unique, each row has unique id. however, table dynamically generated through ajax. i have button meant update particular table row bgcolor. since table row may dynamically generated, doesn't seem work. $("input[name=save]").live("click", function(event){ //rowid comes somewhere in script $.ajax({ type: "post", url: "./library/savestff.php", data: $("form").serialize(), async: false, datatype: "text", success: function(value){ //value homecoming color //change color $(".info_"+rowid).attr('bgcolor', value); } }); }); 'live', 'on', 'bind' seems work events only. want apply attr/bgcolor. using $(".info_"+rowid).live("attr", $(this).('bgcolor', value)); also seem invalid. use css()...try this $(".info_"+rowid).css...

javascript - Styling all elements of Array with For-Loop -

javascript - Styling all elements of Array with For-Loop - i have div reddish border. border disappear after lets 3 seconds when page done loading. there 3 images within div , i'd them opaque 0.1 after same time. tried doing timer won't run. able border part work when seek images doesn't run , aptana says there error loop is. function setplaylist(){ var playlist = document.getelementbyid('playlist'); var thumbnails = document.getelementsbyclassname('thumb').getelementbytagname('img'); for( var i=0,i<thumbnails.length;i++) { thumbnails[i].style.opacity = ('0.1'); } playlist.style.border = ('none'); /*thumbnails.style.opacity = ('0.1');*/ } function timerpl(){ settimeout(setplaylist,3000); } window.addeventlistener('load',timerpl,false); this function: document.getelementsbyclassname('thumb').getelementbytagname('img'); // ...

ruby on rails - updating database record with click event -

ruby on rails - updating database record with click event - hi attempting remotely update element within database click event. when click event triggered getting next error, though believe i'm using right methods started set "/availabilities/131/edit" 124.168.74.144 @ 2013-02-13 08:02:40 +0100 actioncontroller::routingerror (no route matches [put] "/availabilities/131/edit"): haml click event .six.columns#named_players %h5 named players %table.twelve %thead %tr %th alter status %th attending %tbody - @availabilities.each |a| %tr %td= full_name(a.user) %td %ul.button-group.two-up.even %li= button_to 'accept', edit_availability_path(a), :remote => true, :method => :put, :class => 'button tiny success', :disable_with => 'add' %li= link_to 'decline', '#', :remote => true, :method =>...

java - Main method not found in class/illegal start of expression -

java - Main method not found in class/illegal start of expression - i new of , have basic understanding of coding in general. i trying utilize java code published in chemmedchem (dx.doi.org/10.1002/cmdc.200900317 in supporting information) i have appropriate programs/jar files utilize (from chemaxon) i able re-create code , compile class file no issues: javac -classpath c:\jarfolder\marvinbeans-plugin.jar;c:\jarfolder\marvinbeans.jar; mqn.java though get: note: mqn.java uses or overrides deprecated api. note: recompile -xlint:deprecation details. then when seek run class file (the input file supposed virtual chemical input smiles code): java -classpath c:\jarfolder\marvinbeans-plugin.jar;c:\jarfolder\marvinbeans.jar; mqn test.smiles i get: error: main method not found in class mqn, please define main method as: public static void main(string[] args) i tried enclose code in public static void main(string[] args){} however error: >mqn.ja...

java - How to make Content-Type header optional? -

java - How to make Content-Type header optional? - i've heartbeat api implemeted using spring rest service: @requestmapping(value = "heartbeat", method = requestmethod.get, consumes="application/json") public responseentity<string> getheartbeat() throws exception { string curr_time = myservice.getcurrenttime(); homecoming util.getresponse(curr_time, httpstatus.ok); } and myservice.java has below method: public string getcurrenttime() throws exception { string currentdatetime = null; myjson json = new myjson(); objectmapper mapper = new objectmapper().configure(serializationconfig.feature.default_view_inclusion, false); seek { date currdate = new date(system.currenttimemillis()); currentdatetime = new simpledateformat("yyyy-mm-dd't'hh:mm:ss").format(currdate); json.settime(currentdatetime); objectwriter author = mapp...

matlab - index out of bounds error because numel -

matlab - index out of bounds error because numel - it loops through until lastly time , error "attempted access eq_num(8); index out of bounds because numel(eq_num)=7." n_node=8 n_pre_disp=2 disp_node= [2 7] eq_num = 0; = 1:n_pre_disp node=disp_node(i); eq_num(node) = -i; end row = 0; = 1:n_node if (eq_num(i)==0) row = row+1; eq_num(i)=row; end end in loop eq_num = 0; = 1:n_pre_disp node=disp_node(i); eq_num(node) = -i; end you create eq_num 7 elements; highest value node takes highest value in disp_node(1:2) 7 . in loop row = 0; = 1:n_node if (eq_num(i)==0) row = row+1; eq_num(i)=row; end end you loop on i=1:8 , seek execute eq_num(8)==0 . you need prepare something, don't know what. perchance think matlab arrays indexed 0, they're not, first index matlab array 1. matlab

javascript - Execute code only if AJAX request takes a certain amount of time? -

javascript - Execute code only if AJAX request takes a certain amount of time? - in web application, i'm using $.ajax() request load info database , display in browser. during execution of request, display loading results ... message this: $.ajax({ // ... beforesend: function() { $('#loading-results-message').show(); }, complete: function() { $('#loading-results-message').hide(); } }); this works fine. however, if there not much info load, request takes fraction of second. in case, message displayed fraction of sec well. animation happens it's hard recognize it. therefore, great if possible display message if request takes amount of time, i.e. seconds @ to the lowest degree not fraction of second. possible somehow? way, i'm using django on server side, if should matter. use settimeout found timer, cancel timer when request completes: var desired_delay = 2000; var message_timer = false; $.aj...

jquery ui datepicker - javascript calendar - highlight specific days -

jquery ui datepicker - javascript calendar - highlight specific days - i have datepicker javascript calendar highlights specific holidays specific color. need highlight days wednsday (3) - saturday (6) , struggling. here code using far: <script type="text/javascript"> $(document).ready(function() { var selecteddates = {}; selecteddates[new date('01/01/2014')] = new date('01/01/2014'); selecteddates[new date('01/02/2014')] = new date('01/02/2014'); selecteddates[new date('01/03/2014')] = new date('01/03/2014'); $('#date1, #date2').datepicker({ beforeshowday: function(date) { var highlight = selecteddates[date]; if (highlight) { homecoming [true, "highlighted", highlight]; ...

javascript - Jvectormap markers draw wrong after setFocus call -

javascript - Jvectormap markers draw wrong after setFocus call - i want focus on state on selection of state. code this: var ddd = { "us-va": 1, "us-pa": 1, "us-tx": 1, "us-ri": 1, "us-sc": 1, "us-or": 1, "us-co": 1, "us-ky": 1 }; var map = {}; $(function(){ map = new jvm.worldmap({ map: 'us_aea_en', backgroundcolor: '#eeeeee', container: $('#us-map'), regionsselectable: true, regionsselectableone: true, regionstyle: { initial: { fill: '#777777', "fill-opacity": 1, stroke: 'none', "stroke-width": 0, "stroke-opacity": 1 } }, series: { regions: [{ values: ddd...

objective c - Properly defining a static NSString* c-style array under ARC -

objective c - Properly defining a static NSString* c-style array under ARC - in implementation file, have static 2-dimensional c-style array of nsstring* defined as: static nsstring* thecolorarray[][3] = { [redtype] = {@"red", @"blah", @"yes"}, [bluetype] = {@"blue", @"yadda", @"yes"}, ..... } the method in question accesses array like: -(nsstring*)value:(nsinteger)value { homecoming thecolorarray[value][0]; } this seems work fine 99% of time...but when fails work fails exc_bad_access - kern_invalid_address @ 0x11 i've verified value parameter not beyond bounds of array. seems odd address 0x11 ...which kind of implies array has not been initialized. so happening here? there "gotcha" need aware of arc , c-style arrays? the documentation clear structs cannot contain arc'd objects, argue applies multidimensional array datums well, though doesn't so. did seek ...

Find the non zero values and frequency of those values in R -

Find the non zero values and frequency of those values in R - i have info has 2 parameters, data/time , flow. flow info intermittent flow. lets @ times there 0 flow , flow starts , there non-zero values sometime , flow 0 again. want understand when non-zero values occur , how long each non-zero flow last. have attached sample dataset @ location https://www.dropbox.com/s/ef1411dq4gyg0cm/sampledataflow.csv the info 1 min data. i able import info r follows: flow <- read.csv("sampledataflow.csv") summary(flow) names(flow) <- c("date","discharge") flow$date <- strptime(flow$date, format="%m/%d/%y %h:%m") sapply(flow,class) plot(flow$date, flow$discharge,type="l") i made plot see distribution couldn't clue start frequency of each non 0 values. see output table follows: date duration in minutes please allow me know if not clear here. thanks. additional info: i think need check non-zero valu...

R: layout saving as png -

R: layout saving as png - i have 4 charts (type: ggplot2)and trying save them png. when run code below ch4 gets saved. png(filename = fname, width = 900, height = 600, units = 'px') layout(matrix(c(1,2,3,4), 2, 2, byrow = true)) ch1 ch2 ch3 ch4 dev.off() i grateful know doing wrong. ggplot2 graphs can layed out on single page using grid.arrange() gridextra package, e.g.: df <- data.frame(x=1:3, y=c(1, 4, 9)) p <- ggplot(df, aes(x, y)) p1 <- p + geom_point(colour="red") p2 <- p + geom_point(colour="blue") p3 <- p + geom_point(colour="green") p4 <- p + geom_point(colour="purple") library(gridextra) png(filename="test.png", width=600, height=600) grid.arrange(p1, p2, p3, p4) dev.off() r

StringBuilder to PDF in vb.net -

StringBuilder to PDF in vb.net - how can convert stringbuilder pdf application.. dim sb new stringbuilder() sb.append("<table><tr><td>col 1</td><td>col 2</td><td>col 3</td></tr>") sb.append("<tr><td>val 1</td><td>val 2</td><td>val 3</td></tr>") sb.append("</table>") this sb has convert pdf application. please help. here in link there finish tutorial creating pdf , library add. http://bytescout.com/products/developer/pdfdocscoutsdk/pdfdocscout_example_vb_net.html vb.net pdf innerhtml stringbuilder

android - Finding radius and center of circle with given two points -

android - Finding radius and center of circle with given two points - is possible find radius , center of circle if have 2 points on circle? actually want place circles in positions in pic. have rectangle going contain circles. want these circles placed starting left-center of rect right-center in circular manner. if need more explanation, kindly allow me know... no. takes 3 points define circle. given 2 points, there infinitely many circles pass through 2 points. for example: android math circle angle

maven - NoClassDefFoundError: StoppedByUserException with Eclipse and Quick JUnit -

maven - NoClassDefFoundError: StoppedByUserException with Eclipse and Quick JUnit - eclipse quick junit plugin gives me next error when seek run junit test ctrl+0: java.lang.noclassdeffounderror: org/junit/runner/notification/stoppedbyuserexception @ org.eclipse.jdt.internal.junit4.runner.junit4testloader.createtest(junit4testloader.java:48) @ org.eclipse.jdt.internal.junit4.runner.junit4testloader.loadtests(junit4testloader.java:38) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests(remotetestrunner.java:452) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.runtests(remotetestrunner.java:683) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.run(remotetestrunner.java:390) @ org.eclipse.jdt.internal.junit.runner.remotetestrunner.main(remotetestrunner.java:197) caused by: java.lang.classnotfoundexception: org.junit.runner.notification.stoppedbyuserexception @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ ...

Setting working directory for Rnw / latex in R -

Setting working directory for Rnw / latex in R - hi trying utilize r , latex create pdf document info analysis. in original *.r document have changed working directory multiple times refer data. reason changed working directory because have multiple files of same pattern , ldply function import multiple functions. since, had info on 2 folder, changed working directory 2 times each process. have shown sample illustration in next code. setwd("d:\\model runs \\sediment/") sed_data = ldply(list.files(pattern="dat"),function(fname) { dum = read.table(fname,skip=1) #dum$fname = fname # adds filename read column return(dum) }) names(sed_data) <- c("lat","long","sed") seddata <- aggregate(sed~lat+long, sed_data,mean) dim(seddata) head(seddata) ## read dye info setwd("d:\\model runs \\dye") getwd() dye_data = ldply(list.files(pattern = "dat"), function(filename) { pum = read.table(file...

asp.net - Can you bind an object containing a Dictionary Property to a dropdownlist? -

asp.net - Can you bind an object containing a Dictionary Property to a dropdownlist? - for example, have instance of next class declaration: public class person { public string name = ""; public dictionary<string, string> properties = new dictionary<string, string>(); } and have list of person wish bind asp.net drop downwards list. list<person> people = new list<person>(); //fill list etc.. //bind drop downwards list ddlpeople.datasource = people; ddlpeople.datatextfield = "name"; ddlpeople.datatextfield = "properties['age']"; //this like! age present. not have command of person class. know if trying achievable? thanks! as far know, can not that. i guess go : ddlpeople.items.clear(); ddlpeople.items.addrange(people.select(p => new listitem(p.name, p.properties["age"])).toarray()); but not sure point of question. asp.net data-binding

ios - Why does a (copy, nonatomic) NSMutableArray property create NSArrays? -

ios - Why does a (copy, nonatomic) NSMutableArray property create NSArrays? - i made error while creating tableview class, , accidentally kept @property re-create when defined it: @property (copy, nonatomic) nsmutablearray *words; i initialised array "correctly": (note 3rd attempt, please ignore fact i'm not using mutablecopy , other improve ways of doing this) nsarray *fixedwords = @[@"eeny", @"meeny", @"miny", @"moe", @"catch", @"a", @"tiger", @"by", @"his", @"toe"]; nsmutablearray *mutwords = [[nsmutablearray alloc] initwitharray:fixedwords]; self.words = mutwords; however when later came reorder array, crashed on removeobjectatindex line: id object = [self.words objectatindex:fromindexpath.row]; nsuinteger = fromindexpath.row; nsuinteger = toindexpath.row; [self.words removeobjectatindex:from]; with error message unrecognized s...

python - pandas timeseries use time relative to beginning -

python - pandas timeseries use time relative to beginning - i reading csv log info file , using date,time fields index of frame. when plot timeseries, absolute times shown in x-axis. want show time on x-axis relative start time. how this? for example: here sample x-axis: 23:59:57--------+23:59:58----------23:59:59--------+00:00:00--------------+ i want this: 0---------00:00:01----------00:00:02--------+00:00:03--------------+ an easy solution subtract first index-item index. can done using list comprehension, might not best (fastest) alternative if dataframe large. begin = pd.datetime(2013,1,5,5,53) end = pd.datetime(2013,1,7,7,16) rng = pd.datetimeindex(start=begin, end=end, freq=pd.datetools.minute(15)) df = pd.dataframe(np.random.randn(rng.size), index=rng) fig, axs = plt.subplots(2,1, figsize=(15,6)) fig.subplots_adjust(hspace=.5) df.plot(ax=axs[0]) axs[0].set_title('original') df.index = [idx - df.index[0] idx in df.index] df.plot(ax=axs...

jquery - On click, hide div and remove required attribute -

jquery - On click, hide div and remove required attribute - i have form can appear on different pages, , depending on circumstance, fields not required. i have code hide div, need input fields no longer required. using html5 required attribute. having problem getting code work. code below: $('#detailssame').click(function() { if($(this).is(':checked')) { $(\"#detailssamehide\").hide(); } else { $(\"#detailssamehide\").show(); } }); $('.fullboxform input[type=text], .fullboxform select').each(function() { $(this).removeattr('required'); }); all help appreciated. turns out above code work correctly, alternative reply available using prop try utilize prop() function setting html5 properties. $(function () { $('#detailssame').click(function() { var checked = $(this).is(':checked'); if(checked) { $("#detai...

backbone.js - jQuery .serializeArray() returns empty array -

backbone.js - jQuery .serializeArray() returns empty array - this question has reply here: serialize form not working in jquery 4 answers i'm using jquery , backbone building app. rewrite project in amd architecture require.js.. starts problems posting forms. form: *<div data-role="page" id="login" data-theme="a"> <form class="loginpageform"> <div data-role="content" style="padding: 15px"> <h3 id="login_heading"> login </h3> <div data-role="fieldcontain"> <fieldset data-role="controlgroup" id="email_fieldset"> <label for="email_textinput" > email </label> ...

javascript - Chrome Extensions Content-Security-Policy -

javascript - Chrome Extensions Content-Security-Policy - i have need in extension dynamically load code . wrote load - var se = document.createelement('script'); se.setattribute('type', 'text/javascript'); se.appendchild(document.createtextnode(code)); document.getelementsbytagname('head').item(0).appendchild(se); and security policy in manifest.js - "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" this throws javascript error - "refused execute inline script because violates next content security policy directive: "script-src 'self' 'unsafe eval'" my question - why isn't relaxed ? added line in manifest allow unsafe evals . i don't think it's utilize of eval causing error. appears you're violating policy against executing inline javascript, injecting <script> blocks head of document. ...

Auto fill form in Silverlight OOB -

Auto fill form in Silverlight OOB - i have silverlight out-of-browser (oob) application has webbrowser command within it. displayed website in inner web browser comes different domain application xap file. how automatically fill form displayed in inner browser? preferably straight silverlight, or javascript. i have tried invoke external javascript code silverlight application: webbrowser.invokescript ("eval", "document.getelementbyid('formfield1').value = 'value1';" + "document.getelementbyid('formfield2').value = 'value2';"+ "document.forms[0].submit();"); apparently silverlight limits functionality due security reasons (cross-site scripting think). webbrowser.invokescript executes specified script, defined in loaded html. since js code not loaded in html displayed in web browser command can't utilize approach. most obvious s...

java - Deploying another war file in tomcat within eclipse -

java - Deploying another war file in tomcat within eclipse - i have 2 java ee dynamic web projects within eclipse - a) calculator project , b) calculatoruser project. both have http endpoints. can run both independently. i want utilize war file created project calculator & drop calculatoruser. aim both web applications run within same tomcat instance (on localhost) , calculatoruser can send http messages calculator. this of import point: because of business reasons, calculatoruser cannot phone call methods in calculator, needs communicate webapp-to-webapp. the whole thing sample users. cannot drop calculator.war in tomcat/webapps folder because users should able calculatoruser project & run whole thing. how deploy calculator.war on tomcat server within eclipse in calculatoruser project? there configuration within tomcat can specify path of war file? java eclipse tomcat6 .war

Google closure compiler application using multiple files and how not to print standard output -

Google closure compiler application using multiple files and how not to print standard output - i'm using google closure compiler application , can't figure out of next commands help menu turn off printing of standard output. i'm combining multiple js files: compiler-latest timpeterson$ java -jar compiler.jar --js assets/js/file1.js assets/js/file2.js --js_output_file assets/js/file.min.js note: here's command access help menu compiler-latest timpeterson$ java -jar compiler.jar --help when using --js_output_file option, compiler prints warnings , errors terminal (to standard error). compiler should not write standard output in case. note standard error can include important portions of code you'd have compiled in compiled form. not standard output though. google-closure-compiler

wcf - Index was outside the bounds of the array (please help) -

wcf - Index was outside the bounds of the array (please help) - okey i've tried searhing week , can't work... i've got error reads: "index outside bounds of array" i've done implement wcf, connection string sql database works fine, error when trying attemp populate info or trying reach info in database. i've done: the appcofig: <basichttpbinding> <binding name="basichttpbinding_icoreservice" closetimeout="00:01:00" opentimeout="00:01:00" receivetimeout="00:10:00" sendtimeout="00:01:00" allowcookies="false" bypassproxyonlocal="false" hostnamecomparisonmode="strongwildcard" maxbuffersize="2147483647" maxbufferpoolsize="2147483647" maxreceivedmessagesize="2147483647" messageencoding="text" textencoding="utf-8" transfermode="buffered" usedefaultwebproxy="...