Posts

Showing posts from May, 2014

r - Quantstrat logical error while running applySignals - missing value where TRUE/FALSE needed -

i having error while running strategy back-testing in r, using quantstrat package. whenever, try use applysignals function test signals, shows logical error. tried remove nas na.omit(fb) command, when calculate simple moving average, have nas in beginning. can suggest me solution? thanks, require(performanceanalytics) require(quantstrat) require(quantmod) require(blotter) initdate="2015-01-01" from="2015-01-02" to="2015-06-30" options(width=100) currency('usd') sys.setenv(tz="utc") symbols = c("spy", "fb", "twtr") getsymbols(symbols, from=from, to=to, src="yahoo", adjust=true) stock(symbols, currency="usd", multiplier=1) suppresswarnings(rm("account.mac","portfolio.mac",pos=.blotter)) suppresswarnings(rm("order_book.mac",pos=.strategy)) tradesize <- 1000 initeq <- tradesize strategy.st <- portfolio.st <- account.st <- "m...

How to check Type of structure in C -

i made simple listing struct in c holds kind of data using void* pointer, like: struct node { void *the_data; node *next; }; it working fine, have lists contains, example, struct_a in list , struct_b in list. need check if first element of list of struct_a type or struct_b type in single if() question know data list holding. how this? thanks edit: i've come simple solution enough problem now, dunno if it's best: struct node { void *data; node *next; } and added "descriptor" node, contains address of first node , info type: struct list_desc { node *list; short int type; } and i'll use macros like #define __data_type1 10 #define __data_type2 20 so later can compare if( struct.type == __data_tipe1 ) etc... what think that: typedef enum tag_elementtype { elementa, elementb } en_elementtype; typedef struct tag_container { en_elementtype elementtype; void *pdata; } st_container; in case structure this: typedef stru...

infragistics - UltraWebGrid in Chrome works on one server, but not another -

i have same code on stage server on production server. in chrome on production grid displays properly. on stage server, grid not render correctly. might cause this? <%@ register assembly="infragistics35.webui.ultrawebgrid.v8.3, version=8.3.20083.1009, culture=neutral, publickeytoken=7dd5c3163f2cd0cb" namespace="infragistics.webui.ultrawebgrid" tagprefix="igtbl" %> <igtbl:ultrawebgrid id="grdsearchresult" runat="server" width="100%" ....

postgresql - SQL Attribute is a list - Access one element of the list -

i have postgresql table x attribute names | character varying(255)[] . now, names in 1 entry { 'mary' , 'james' , 'john' } . how run query along lines - select names,other_attribute_1 x 'mary' in names ; i need fetch (or attributes) of row names list has 'mary'. you can use like operator: select names, other_attribute_1 x names '%mary%';

Java AWT/ImageIO: Bilinear and Bicubic scaling of a JPEG image result in completely black output -

Image
nearest neighbor scaling works: entire picture stays intact when use type_nearest_neighbor . even though scala code, used libraries standard java libraries. functions: def getbufferedimage(imagefile: java.io.file): bufferedimage = { imageio.read(imagefile) } def scaleimage(image: bufferedimage, minsize: double): bufferedimage = { val before: bufferedimage = image val w = before.getwidth() val h = before.getheight() val affit = new affinetransform() var scale = 1.0 if(h < w) { if(h > 0) { scale = minsize / h } } else { if(w > 0) { scale = minsize / w } } affit.scale(scale, scale) val affitop = new affinetransformop(affit, affinetransformop.type_bicubic) affitop.filter(before, null) } def getimagejpegbytearray(image: bufferedimage): array[byte] = { val baos = new java.io.bytearrayoutputstream() val mcios = new memorycacheimageoutputstream(baos) imageio.write(image, ...

How may I see the names of a separate Excel worksheet from within an active worksheet name-box? -

i using excel 2010 how may see names of separate worksheet within active worksheet name-box please? regrads the name box ever show names can use in current sheet, i.e. workbook scoped , current sheet scoped names, not names scoped other worksheets. to see names sheet, open name manager, sort scope , scroll down worksheet name after. name manager has filter button show workbook scoped versus worksheet scoped names, cannot filter on specific worksheet.

flex - ColdFusion - I'm not familiar with this application -

my boss passed away suddenly, leaving behind little in notes , information , didn't share me while worked him. he'd been here 29 years , took lot of information him. one of items had here coldfusion server v9 , lot of apps had written our users rely on. loved write code, 5 different languages i've found far, me not much, know little. question is......to keep apps going ,until can find replacements them, there web content editing software go coldfusion server or going have pull plug on apps when break? i found adobe flex builder 2 cd , adobe creative suite 3 web standard cd. of value me? looks old versions. 250 users , equipment, network, etc take care of i'm little busy. information on appreciated. cfml code (.cfm, , .cfc files) can edited in text editor including notepad. adobe has official ide called coldfusion builder. lot of developers use sublime text or dreamweaver. cfml compiled just-in-time compiler need edit code , can refresh page. ...

Prevent bad data being selected with SQL Server COLLATE -

i have 2 databases , moving data 1 database another. on columns need resolve collation conflict between "latin1_general_ci_as" , "latin1_general_ci_ai". do: select [column] collate latin1_general_ci_ai xxx this works in main in fields see characters like: &#65533; in data has been copied across. seems characters original db lost when collation changed on new db. know can use replace rid of them, wondered rather search entire record set - there way filter out or prevent special characters coming across in first place?

How to fix run time error '13' in Excel VBA? -

i have huge excel vba file (xlsm). used able run without problem. co-worker runs without problem. when run it, keeps giving me "run time error '13'". installed patch called: "excel2010-kb2956142-fullfile-x64-glb" on windows 7, 64bit machine. here code snipet: ipos2 = 0 on error resume next ipos2 = application.match(scomponent, sbslvlshort(), 0) on error goto 0 the debug stops @ line with: application.match else can done? know excel has no problem. thanks help. jennifer enter debug mode when code "breaks". then, in vbe "immediate" pane, enter following statement , press return key: ?typename(ipos2) and tell me prints on next line. again in immediate pane, enter statement , press return key: ?application.match(scomponent, sbslvlshort(), 0) then, tell me printed on next line. whatever being stored in array causing mismatch data type associated ipos2 variable. one other possibility have inadvertently ...

objective-c array is only saving one object in it -

this have for (pfobject *object in objects){ nsstring *address = object[@"address"]; addarray = [nsmutablearray arraywithobjects:address, nil]; } nslog(@"outside loop"); for(nsstring *add in addarray) { nslog(@"%@", add); } the address string ends printing out amount of addresses inside loop if use nslog(@"%@", address); know address string changing next one. reason array shows last address , won't save first one. addarray = [nsmutablearray array]; (pfobject *object in objects) { nsstring *address = object[@"address"]; [addarray addobject:address]; }

groovy - Order is not working with criteria in Grails -

i have started working groovy , grails , has confusion on order clause criteria. below code, def order = "rollnumber" def orderby = "asc" studentlistcriteria = students.createcriteria() int max = 6 int offset = params?.offset ? integer.valueof(params.offset) : 0 def studentlist = studentlistcriteria.list(max: max, offset: offset) { , { eq("isactive", boolean.true ) } order(order,orderby) } while executing it's throw below error. groovy.lang.missingmethodexceptionmessageno signature of method: java.lang.string.call() applicable argument types: (java.lang.string, java.lang.string) values: [rollnumber, asc] possible solutions: wait(), any(), tr(java.lang.string, java.lang.string), trim(), find(), size() can suggest doing wrong here?? please check below code, can not use keywords here. def orderparameter = "rollnumber"//change name of variable. def orderbyparameter = "as...

Is there a way to automate a client purchasing something from paypal? -

i'm building program generate test data paypal. need generate purchases using express checkout. i'm able automate creation of purchase set express checkout, wondering if there api call have buyer purchase specific purchase. example, there way automate going https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token= , confirming purchase? thanks. edit: more clarification, i'm talking automating step 3 in link https://developer.paypal.com/docs/integration/web/web-checkout/ i use nopcommerce selling platform. have prebuilt paypal express module. have considered using pre-built e-commerce solution? http://www.nopcommerce.com/p/1149/paypal-express-payment-plugin.aspx

javascript - Extjs Override makeButton -

i have problem ext js 4.2.1. want override makebutton function in ext.window.messagebox. code: ext.override(ext.window.messagebox,{ makebutton: function(btnidx) { var btnid = this.buttonids[btnidx]; var buttonicons = { ok: 'iewp-icon-ok', yes: 'iewp-icon-ok', no: 'iewp-icon-cancel', cancel: 'iewp-icon-cancel' }; return new ext.button.button( { handler : this.btncallback, itemid : btnid, iconcls: buttonicons[btnid], scope : this, text : this.buttontext[btnid], minwidth : 75 }); } }); ext.override called in init function of application...

html - Overflow of div inside fieldset not working in Chrome -

Image
this question has answer here: google chrome - fieldset overflow bug 5 answers what's going on here, bug in chrome? when introduce fieldset , overflow of nested div stops working in chrome. here minimal example. html head style(type="text/css"). .wrapper { overflow: scroll; height: 100px; border: solid 1px black; } fieldset { margin: 0; padding: 0; border: 0; } body form .wrapper .content aaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssddddddddddddddddddddddddaaaaaaaaaaaaaaaaaaaaaaadsssssssssssssssssssdddddddddddddddddddd...

java - Bean collection Spring: ConversionNotSupportedException -

i'm new in spring , i'm try create simple quick start application. application composed 3 java classes, pom.xml file , xml file: produttore.java: package com.mkyong.core; import org.springframework.stereotype.component; @component public class produttore { private int id; private string ruolo; public int getid() { return id; } public void setid(int id) { this.id = id; } public string getruolo() { return ruolo; } public void setruolo(string ruolo) { this.ruolo = ruolo; } @override public string tostring(){ return "produttore " + id + ", ruolo " + ruolo; } } team.java: package com.mkyong.core; import java.util.list; import org.springframework.stereotype.component; @component public class team { private produttore leader; private list<produttore> membri; public produttore getleader() { return leader; } public vo...

javascript - How do I add some text in front of a textarea -

i have text-area , want put div or floating text in front of , when click text want open link in new window. searched on google, couldn't find way using html/css. here css code textarea : textarea { width:400px; height:400px; display:block; position:absolute; top:50%; left:50%; margin-left:-200px; margin-top:-200px; border-width:5px; border-color:green; background-image: url("../pictures/background.jpg"); } try using code. <a href="link" id="idname"></a> also, i'd practice using lower cases in directories. i.e "pictures" not "pictures". easier remember.

javascript - How to pass variable asyncronously through different scripts -

i can't figure out how it. i have 2 separate scripts. first 1 generates interval (or timeout) run specified function every x seconds, i.e. reload page. the other script contains actions button control (pause/play) interval. the pitfall here both sides must asyncronous (both run when document loaded). how use interval within second script? here's jsfiddle: http://jsfiddle.net/hm2d6d6l/4/ and here's code quick view: var interval; // main script (function($){ $(function(){ var reload = function() { console.log('reloading...'); }; // create interval here run reload() every time }); })(jquery); // script, available specific users (function($){ $(function(){ var $playerbutton = $('body').find('button.player'), $icon = $playerbutton.children('i'); buttonaction = function(e){ e.preventdefault(); if ($(this).hasc...

jquery - Getting elements from table row within different tables with Javascript -

i need returning elements tr javascript(jquery) question 1. how can reach td comment "i need item (based on question1)" ? need last item class "b" , first td comes after it? number of td's not static. classes b may not in same table. question 2. if want select class "a" , give next 5 (for example) td's class ("b" example) how can it? function nextall can elements single row. example below: <table> <tr> <td></td> <td></td> <td class="a"></td> <td></td> <!-- needs class b --> <td></td> <!-- needs class b --> <td></td> <!-- needs class b --> </tr> </table> <table> <tr> <td></td> <!-- needs class b --> <td></td> <!-- needs class b --> <td></td> <!-- need item (based on question1) --> <td></td> <td><...

android - Support Map fragment inside list item adapter returning null second time -

i using fragments in app.first 1 activity loaded , fragments come on activity , destroy.my problem here trying load support mapfragment inside listview adapter when clicked on button inside list item,it works fine first time second time gmap = ((supportmapfragment) fm.findfragmentbyid(r.id.map)).getmap(); this line returning null inside adapter.what should rectify problem here. calling map fragment inside adapter in oncreateviewholder method of adapter. public class productlistadapter extends recyclerview.adapter { private activity context; list<listdetails> products; sharedpreference sharedpreference; public static com.android.volley.toolbox.imageloader imageloader; layoutinflater inflater; viewholder holder; protected string day = ""; public static view alertlayout; private static gmapv2direction gmapdirection; public static googlemap gmap; protected document doc; public productlistadapter(context context, list<listdetails> products) { ...

c# - How can I delete a single entry from a table -

i have listbox usernames, , remove button want selected user (with entered data associated user) deleted when remove button clicked. my code sqlconnection con = new sqlconnection("data source=james-pc\\sqlexpress;initial catalog=staff;integrated security=true"); con.open(); string sql = @"delete staff1;"; sqlcommand cmd = new sqlcommand(sql, con); cmd.executenonquery(); con.close(); this code deletes whole table. how can delete selected user? you need clause select required record. have username of selected user deleted , pass @username parameter. var username = (listbox.selecteditem datarowview)["username"].tostring(); string sql = @"delete staff1 username = @username;"; sqlcommand cmd = new sqlcommand(sql, con); cmd.parameters.addwithvalue("@username",usename); cmd.executenonquery(); con.close(); see this thread on how use parameters in sql.

html - Pointer Event/Hover change size or disable -

when hover on "related articles" section of page - hover effect creates huge red box - there way can make same size article preview or disable if not? http://insightcxo.com/5-ways-to-increase-profit-this-year/ it works fine on homepage though: http://insightcxo.com/ cheers! modify css follows: .related-item figure { background-color: #222222; width: 100%; height: auto; position: relative; background-color: #212121; } this make behave one's present in homepage.

jQuery Show and Hide Content -

i have vertical accordion menu on left , once user clicks on menu item, content displays on right. trying when user loads page, there content on right. content area blank. how can have content on right , when user clicks on menu item content replaced new content. i new jquery. first project. appreciated. thanks. the display on jsfiddle not exact, should able idea. the link jsfiddle probably simplest way: $('#section-whicheveryouwant').show(); add end of $(document).ready function. also - recommend putting $(document).ready inside closure - or don't use closure - consistent.

node.js - CSRF Token Storage by sailsjs -

i working on enterprise solution using sailsjs nodejs framework. security integral part of implementation. apart ssl, cors, using sailsjs csrf implementation. still evaluating how secure use token. can guide on following: sailsjs stores csrf token? encrypted? how secure use? you'll need work validate tokens not accessible untrusted servers; should respond requests, , should not accessible via ajax, nor should cors headers enabled. pillarjs has excellent readme on csrf . says csrf tokens: csrf tokens alas, final solution using csrf tokens. how csrf tokens work? server sends client token. client submits form token. server rejects request if token invalid. attacker have somehow csrf token site, , have use javascript so. thus, if site not support cors, there's no way attacker csrf token, eliminating threat. make sure csrf tokens can not accessed ajax! don't create /csrf route grab token, , don't support cors on route! ...

python - Suppressing messages to terminal from spawned process -

this question has answer here: how hide output of subprocess in python 2.7 5 answers i've got command looks this subprocess.popen('shp2pgsql -s 17932 \\storage1\dev1\gis\a.shp asmithe.mytable | psql -u asmithe -h example.org -d inventory -q', shell=true).wait() heinous know. outputs screen , don't want that. how can supress it? psql has -q option quiet can't find simillar shp2pgsql the easiest way capture stdout , stderr , send them devnull (i'm using espeak 4; echo 'bye' test command; echo prints stdout , espeak , well, speaks have output isn't captured) in [14]: p = subprocess.popen("espeak 4; echo 'bye'", shell=true, \ stdout=subprocess.devnull, stderr=subprocess.devnull).wait() in [15]: p = subprocess.popen("espeak 4; echo 'bye'", shell=true).wait() bye t...

meteor - MeteorJs: Return data Iron:router -

iron router return data in template can't use it. for example have db jobs, every job has position (e.g. jobs.position ): existjobpostcontroller = routecontroller.extend({ layouttemplate: 'existjob', data:function() {return posts.findone(this.params._id); } }) router.map(function() { this.route('existjob', { path: '/jobs/:_id', controller: existjobpostcontroller, }); }); <template name="existjob"> {{position}} </template> and nothing happens, think it's fault, can't understand how fix this. can help? you should first check correct data being set on template data context. here's quick general summary of how set data context , how access various locations: router.map(function() { this.route('index', { path: '/index', data: function(){ var obj = { fname: "tom", lname: "smith" }; return obj; ...

xml - Android: Two images inside a scroll view -

i able display 2 images user, images fill screen (horizontally) , able scroll down next image, possible? have been messing around different xml layouts , cant seem find solution. when place image view inside of scroll view doesn't fill screen, how can 2 in there 1 visible start off with? ?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/building_block" android:layout_margin="2dp"> <scrollview android:layout_width="match_parent" android:layout_height="fill_parent" android:id="@+id/scrollview" android:layout_alignparentbottom="true" android:layout_alignparenttop="true"> ...

java - spring 4.0.0 + mongodb 3.0.4 working very slow -

below library version defined in pom.xml <spring.version>4.0.0.release</spring.version> <spring.security.version>3.0.5.release</spring.security.version> <mongo-java-driver.version>2.12.1</mongo-java-driver.version> <spring-data-commons.version>1.7.2.release</spring-data-commons.version> <spring-data-mongodb.version>1.4.2.release</spring-data-mongodb.version> <org.aspectj-version>1.7.4</org.aspectj-version> <jackson.databind-version>2.2.3</jackson.databind-version> <log4j.version>1.2.17</log4j.version> <dependencies> <dependency> <groupid>junit</groupid> <artifactid>junit</artifactid> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- spring --> <dependency> <groupid>org.springframework</groupid> <artifactid>sprin...

mat - How to process a JPEG binary data in OpenCV? -

i trying process jpeg binary data in opencv. when segmentation fault (core dumped) . i read jpeg file through fread command , stored in buffer. after reading, copied buffer data mat variable, when tried grayscale conversion on copied data using cvtcolor opencv function. segmentation fault. int main( int argc, char** argv ) { mat threshold_output; mat gray_image; unsigned char *pre_image; file *read_image; file *write_image; int filesize; size_t data, write; read_image = fopen(argv[1] , "rb"); //read jpeg binary write_image = fopen("output11.jpg", "wb"); //write jpeg if(read_image == null) { printf("image not found\r\n"); } fseek(read_image, 0, seek_end); int filelen = ftell(read_image); fseek(read_image, 0, seek_set); pre_image = (unsigned char *)malloc(filelen); data = fread(pre_image, 1, filelen, read_image); write = fwrite(pre_image, 1, filelen, ...

pyqt4 - python pyqt interactive usuage -

i use edit functions defining slots while pyqt gui running can debug program without having restart it. example of have is, after importing py file generated pyuic ##-------------------------## app=qapplication([]) window = qmainwindow() window.show() ui = ui_mainwindow() ui.setupui(window) ##-------------------------## def helloworld(): print "hi" ui.pushbutton.clicked.connect(helloworld) now, after starting program can execute commands in console. after running program, redefine helloworld function using console def helloworld(): print "goodbye" however, if this, both "hi" , "goodbye" both printed. "goodbye" printed. i going use feature debug functions, while gui live. using spyder ide python 2.7.6 , pyqt4 edit: after redefining function, reconnect slot. thereby, clicked action results in executing old function (printing "hi") , new function (printing "goodbye") redefining func...

scala - shapeless Mapper for LabelledGeneric not found -

i have basic type pool defined that: sealed trait section final case class header(...) extends section final case class customer(...) extends section final case class supplier(...) extends section final case class tech(...) extends section i'd present case classes composed of types pool this: final case class contractviewpartners(customer: customer, supplier: supplier) final case class contractview(header: header, partners: contractviewpartners, tech: tech) as heavily used in feature-generators implemented via transfoming hlist s using method described here , i'd ensure each field of presented type 1 of section subtype hlist of section subtypes record presentable hlist of section subtypes i've defined simple compile-time checker condition: object traverseview extends poly1 { implicit def casesection[s <: section] = at[s](_ => ()) implicit def casesectionlist[l <: hlist] (implicit evt: totraversable.aux[l, list, section]) = at[l](_ ...

python - Why list comprehension is much faster than numpy for multiplying arrays? -

recently answered this question wanted multiplication of 2 lists,some user suggested following way using numpy, alongside mine think proper way : (a.t*b).t also found aray.resize() has same performance that. way answer suggested solution using list comprehension : [[m*n n in second] m, second in zip(b,a)] but after benchmark saw list comprehension performs faster numpy : from timeit import timeit s1=""" a=[[2,3,5],[3,6,2],[1,3,2]] b=[4,2,1] [[m*n n in second] m, second in zip(b,a)] """ s2=""" a=np.array([[2,3,5],[3,6,2],[1,3,2]]) b=np.array([4,2,1]) (a.t*b).t """ print ' first: ' ,timeit(stmt=s1, number=1000000) print 'second : ',timeit(stmt=s2, number=1000000,setup="import numpy np") result : first: 1.49778485298 second : 7.43547797203 as can see numpy approximately 5 time faster. surprising thing faster without using transpose, , following code : a=np.array([[2,3,5],...

html - Media query not working for specific div class -

i've searched thoroughly on internet no avail. have below text left-author , right-author class #wrapper-author { margin: 0 auto; padding: 15px; overflow: auto; } .left-author { width: 50%; vertical-align: top; float: left; } .right-author { width: 50%; vertical-align: top; float: right; } and media queries. every single query left-author , right-author work. @media screen , (max-width: 380px) { .left-author .right-author { float: none; width: 100%; vertical-align: initial; } .widget_highlighted_posts .single-article { float: none; margin-right: 0; max-width: 100%; } } does have idea i'm doing wrong? here's html.... <div id="wrapper-author"> <div class="left-author clearfix"> <h4>i guess want know <?php the_author(); ?> is.</h4> <span style="font-family: sofia-pro; font-size: 20px;"><?php the_author_meta( 'description...

Is using get() excessively in Java inefficient? -

i wondering whether more efficient use get() excessively on object or store return of get() in variable , use that. example, more efficient this: someobject.setcolor(otherobject.getcolor().r, otherobject.getcolor().g, otherobject.getcolor().b); or store in variable this color color = otherobject.getcolor(); someobject.setcolor(color.r, color.g, color.b); option 1: write code in example 1. the java runtime might or might not optimize code (to turn example 2) harder read option 2: write code in example 2. does not rely on optimizations java runtime easier read in experience runtime difference can ignored (you can't measure difference if not executed within giant loop), writing clean , understandable code counts.

angularjs - How to use radio buttons with Angular ng-repeat on a Rails collection, with a default value -

i'm angular newbie, , having issues using ng-repeat against rails collection. i have rails collection of accounts associated user: current_user.accounts i'm trying use ng-repeat iterate through collection, , have radio buttons user select primary account. radio button should set whichever current primary account (as determined attribute on account, account.is_primary = true). can't seem work @ all. i'm vaguely trying do: table.pure-table.pure-table-striped thead tr th name th account th primary account tbody ng-controller="miscaccountctrl" div ng-repeat="account in accounts" tr.collapsible td .slider ng-class="isopen" .cell-container {{ account.account_type }} td .slider ng-class="isopen" .cell-container= {{ account.name }} td .slider ng-class="isopen" .cell-container ...

XLConnect, rJava and package building -

i writing function want include in user-defined package (mypackage). function follows: readschedule <- function(file){ wb = loadworkbook(file) ws= readworksheet(wb, sheet = 'sheet1',header = true) return(ws) } where file name of excel file want read. when writing function, want import xlconnect, since package uses. placed header code defining function: @param file excel file @return excel data @export @import xlconnect i have added import(xlconnect) namespace , description file of mypackage. package builds fine (or @ least @ first cut appears build ok) when run "check package" fails , gives me following error: * installing *source* package 'mypackage' ... ** r ** preparing package lazy loading ** *** installing indices ** building package indices ** testing if installed package can loaded *** arch - i386 error : .onload failed in loadnamespace() 'rjava', details: call: fun(libname, pkgname) error: no currentversion ...

java - PyDev throws NPE During Sync SystemPYTHONPATH -

i have rcp app built pydev in it, , every time launch it, if there 1 or more interpreters cnfigured, pydev throws nullpointerexception while running sync system pythonpath job. if manually check synchronization clicking button on pydev/interpreters preference page, or if pydev automatic sync check within 1 minute of starting. it if configure interpreter. when configure same interpreter in eclipse ide itself, don't npe. in rcp app causing pydev throw error, don't have idea else need use pydev in app. the npe occurs @ synchsystemmodulesmanager lie 391, using pydev 4.2.0 the builder supposed contributed via extension point null. led me realize missing required plugins in eclipse run config , in maven build. problem solved making sure dependencies of org.python.pydev included in product.

jquery - Single Javascript function not working in on Heroku -

i deployed rails app heroku , have found there single javascript function. function, officercheck() lives in own file officercheck.js . , called initialization file init.js line officercheck . the function below; first output log doesn't show up function officercheck(){ console.log("officer check in"); var change=0; $('#toggle-two-wrapper').on('change', function(){ if(change===0){ checking(); }else{ change=0; } }); function checking(){ var alert=0; var existingroles=[]; neededroles=["president", "secretary", "treasurer"]; $("select.officer_role").each(function(i,e){ existingroles[i]=$(e).val(); console.log("existing roles "+existingroles[i]); }); $(neededroles).each(function(i,e){ if($.inarray(e,existingroles)==-1){ alert=1; ...