Posts

Showing posts from September, 2013

eclipse - How do I change an object's location on the report layout page? -

eclipse - How do I change an object's location on the report layout page? - i using birt in eclipse, have 3 charts on page. can alter size of each 1 , order in appear, not physical location on page , it's driving me crazy. snapped left side of page. am missing obvious? how can alter physical location of object? a grid element need accomplish this. insert grid in report, , drop charts within, in order to take advantage of "text align" property of grid cells center charts, left-align, right-align etc. have @ this example: define grid 2 columns , 2 rows. we dragged 1 chart each cell of first grid-row, , create utilize of padding & text-align property of cells fine setting in sec grid-row merged 2 cells able center 3rd chart we can insert grid grid, necessary result want. eclipse reporting birt

javascript - PDF export in Data table using Tabletools with large number of column create unsymmetrical or non-formated data in PDF -

javascript - PDF export in Data table using Tabletools with large number of column create unsymmetrical or non-formated data in PDF - i have created 1 sample table have 24 column, want export table pdf, using table tools of datatable please find sample issue http://jsfiddle.net/ashukasama/c8ywk/3/ $(document).ready(function () { $('table').datatable({ "bsort": false, "bpaginate": false, "bfilter": false, dom: 't<"clear">lfrtip', tabletools: { "sswfpath": "http://lucentinnovation.com/demo/badmc/charts/plugins/datatables/tabletools/swf/copy_csv_xls_pdf.swf" } }); }); i need format correctly. javascript jquery html pdf datatables

html - SVG clippath viewbox not working -

html - SVG clippath viewbox not working - i attempting add together svg clippath div element. i want clippath span total div element. i gave svg viewbox , gave clippath polygons points within viewbox. however, polygons not seem adjust height , width's based on viewbox or container's height , width. remains static. how work? here svg code: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!doctype svg public "-//w3c//dtd svg 1.1//en" "http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100" viewbox="0 0 100 100" > <clippath id="svgclip"> <polygon points="0 0 0 100 100 100"/> </clippath> <path id="svgmask"> <polygon points="0 0 0 100 100 100"/> </path> </svg&g

android - Send a byte via bluetooth -

android - Send a byte via bluetooth - i wanted know how send byte in binary form via bluetooth. @ moment utilize code: msendbutton = (button) findviewbyid(r.id.button_send); msendbutton.setonclicklistener(new onclicklistener() { public void onclick(view v) { // send message using content of edit text widget textview view = (textview) findviewbyid(r.id.edit_text_out); string message = view.gettext().tostring(); sendmessage(message); } }); only in way sends string , not byte. thanks help. this source: private void sendmessage(string message) { // check we're connected before trying if (mchatservice.getstate() != bluetoothchatservice.state_connected) { toast.maketext(this, r.string.not_connected, toast.length_short).show(); return; } // check there's send if (message.length() > 0) { // message bytes , tell bluetoothchatservice write byte[] sen

Given a image, how extract (detect) blurred (or focussed) regions? -

Given a image, how extract (detect) blurred (or focussed) regions? - blurred (focussed) part arbitrary shape (not rectangle) simple input/output example: (is valid algorithm, command, software, ...) thank you! the variance much higher in focused regions because blurring acts spatial low-pass filter. but if object shows no variance (uniform object wall or sky) lost , not see differences @ between blurred , focused regions. therefore question cannot answered every kind of image. it's impossible. what do: high pass filter image. (edge detection, absolute differences between neighboring pixels, laplace or local variances, ...) (matlab) smooth , apply threshold. apply pre-knowledge imaging optics if existing. illustration knowing focus must round , in in center, ... image-processing

java - What does the use of copyFor() in javaFX -

java - What does the use of copyFor() in javaFX - i've searched on online , didn't found clear explanation utilize of copyfor() method in javafx used on keyevent.copyfor(event.getsource(), event.gettarget()). method used on next code. private keyevent remap(keyevent event) { keyevent newevent = new keyevent( event.geteventtype(), event.getcharacter(), event.gettext(), event.getcode(), !event.isshiftdown(), event.iscontroldown(), event.isaltdown(), event.ismetadown() ); homecoming newevent.copyfor(event.getsource(), event.gettarget()); } as per documentation: creates , returns re-create of event specified event source , target. this means copies event handler new source , target. possible utilize if wanted key combination perform specific event on 2 different nodes. java methods javafx keyevent

javascript - Error in function: '[object BlobConstructor]' is not a constructor -

javascript - Error in function: '[object BlobConstructor]' is not a constructor - i have code converts html pdfs using jspdf. works great in chrome , firefox, upon testing in safari, given message: error in function: '[object blobconstructor]' not constructor . here code: var doc = new jspdf("p", "pt", "letter"); $(document).ready(function () { $("#runpdf").click(function (event) { $(document.body).width(1903); var count=0; $("section").each(function() { $(this).children('footer').children('article').append($(document.createelement('span')).text((count+1)+".").css("float","right").css("font-weight", "900").css("font-size","150%")); count++; }); var pages = $(".page5"); var remaining = pages.length; pages.each(function () { html2canvas($(

java - ClassNotFoundException error when running css-validator.jar -

java - ClassNotFoundException error when running css-validator.jar - i trying implement css-validator w3 , has failed every attempt, raising error message. here error getting: "directory redacted"\framework-web>java -jar "directory redacted"\downloads\ css-validator.jar http://www.w3.org exception in thread "main" java.lang.noclassdeffounderror: org/w3c/tools/resourc es/protocolexception @ java.lang.class.getdeclaredmethods0(native method) @ java.lang.class.privategetdeclaredmethods(class.java:2531) @ java.lang.class.getmethod0(class.java:2774) @ java.lang.class.getmethod(class.java:1663) @ sun.launcher.launcherhelper.getmainmethod(launcherhelper.java:494) @ sun.launcher.launcherhelper.checkandloadmain(launcherhelper.java:486) caused by: java.lang.classnotfoundexception: org.w3c.tools.resources.protocolexc eption @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclasslo

r - Using gsub() in a datatable -

r - Using gsub() in a datatable - i have big info table (about 20,000 rows). 1 of columns contains in integers 1 6. i have character vector of auto models (6 models). i'm trying replace integers corresponding auto model.(just 2 in example) gsub("1",paste0(labels[1]),models) gsub("2",paste0(labels[2]),models) ... "models" name of column. labels <- c("altima","maxima") after fighting 12+ hours gsub() isn't working( sample data: mydata<-data.table(replicate(1,sample(1:6,10000,rep=true))) labels<-c("altima","maxima","sentra","is","gs","ls") i don't think need gsub here. describing factor variable. if info is mydata <- data.table(replicate(1,sample(1:6,1000,rep=true))) models <- c("altima","maxima","sentra","is","gs","l

json - Building a data frame row by row from a list -

json - Building a data frame row by row from a list - i parsing info construction looks in r: [ { 'firstname': 'abc', 'lastname' : 'def' }, { 'firstname': 'abc2', 'lastname' : 'def2' } ] i want store info in info frame. current approach flawed , feels messy. have several info sets, need specify columns. can suggest 'cleaner'? problem 1: need specify info names library(rjson) listdata <- fromjson(jsondata) listnames <- c('firstname', 'lastname') (player in listdata){ playercols = c() (name in listnames){ value <- player[[name]] if (is.null(value}{value <- "na"} playercols <- c(playercols, value) } # code convert playercols data.frame goes here. } i run extraction if possible without using column names, or in such way extract columns info go along. tricky part here not columns populated in each entry. i'd final in

Getting error: error no value given for one or more required parameters in vb.net for update sql query -

Getting error: error no value given for one or more required parameters in vb.net for update sql query - these statement having problems. please help me solve error believe because of update statement str = "update login set title=@title,author=@author,publisher=@publisher,series=@series isbn = @isbn" cmd = new oledbcommand (str, cn) cmd.parameters.addwithvalue("@title", title.text) cmd.parameters.addwithvalue("@author", author_name.text) cmd.parameters.addwithvalue("@publisher", publish.text) cmd.parameters.addwithvalue("@series", series.text) cmd.parameters.addwithvalue("@isbn", isbn_.text) cmd.executenonquery() i don't think oledb back upwards parameters using @ syntax. seek using ? instead likle this: str = "update login set title = ? ,author = ?,publisher = ?,series = ?" & "where isb

service - How to stop NotificationListenerService android? -

service - How to stop NotificationListenerService android? - i'm using notificationlistenerservice in android app developed kpbird's example. service runs in background after app destroyed. there way stop service , start when app started? the notificationlistenerservice extends service yes can stop service calling stopself() method in service class. look @ this: notificationlistenerservice , services hope helps, android service notifications listener

scala - How to return compound types in Slick's Case-If-Then-Else -

scala - How to return compound types in Slick's Case-If-Then-Else - i start dipping toe slick. in coffee-supplier example, seek "case if else" this: val q = coffees.withfilter(_.price > 9.0).flatmap({ c => suppliers.withfilter(_.id == c.supid).map({ s => val t = c.name > s.name case if t { (c.name, s.name) } else { (s.name, c.name) } }) }) the compiler emits error: could not find implicit value evidence parameter of type scala.slick.ast.typedtype[(scala.slick.lifted.column[string], scala.slick.lifted.column[string])] case if t { (c.name, s.name) } else { (s.name, c.name) } ^ much same error apears other compound types list well. guess i'm on own define implicit type in question i'm not sure start. currently not support, created ticket: https://github.com/slick/slick/issues/866 workaround: write individual if constructs each scalar value scala slick

recvfrom in socket programming with C -

recvfrom in socket programming with C - so trying understand socket programming in c when came across code: /* sample udp client */ #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <string.h> int main(int argc, char**argv) { int sockfd,n; struct sockaddr_in servaddr; char sendline[] = "hello udp server! udp client"; char recvline[1000]; if (argc != 2) { printf("usage: ./%s <ip address>\n",argv[0]); homecoming -1; } sockfd=socket(af_inet,sock_dgram,0); bzero(&servaddr,sizeof(servaddr)); servaddr.sin_family = af_inet; servaddr.sin_addr.s_addr=inet_addr(argv[1]); servaddr.sin_port=htons(32000); sendto(sockfd,sendline,strlen(sendline),0,(struct sockaddr *)&servaddr,sizeof(servaddr)); n=recvfrom(sockfd,recvline,10000,0,null,null); recvline[n]=0; printf("received: %s\n",recvl

C++ unable to properly use I/O -

C++ unable to properly use I/O - to begin with, i'm new c++. need decide whether given point inside or outside circle k. for reason have written implementation of pythagoras'es theorem , simplified process much possible: #include <iostream> using namespace std; int main(){ int x = 1; int y = 1; if (x*x+y*y<4){ cout << "point within circle" << endl; } else { cout << "point outside circle" << endl; } } so want create variables user supplied input. however, next attempt: cout << "value x: " << x; cin >> x; cout << "value y: " << y; cin >> y; outputs next (as per first line): value x: 4273158 followed input. these lines cout << "value x: " << x; cin >> x; cout << "value y: " << y; cin >> y; should this cout << "please come i

java - Taglibs are not recognized when war deployed to jetty 8 -

java - Taglibs are not recognized when war deployed to jetty 8 - i asking after 1 day struggling simple problem. have personal web application i've been developing on tomcat on localhost (no problem) since want save memory on server i've decided deploy on jetty in production use. , in moment problem came. can not figure out right configuration of things. files follow: relevant part of pom.xml <dependency> <groupid>javax.servlet</groupid> <artifactid>jstl</artifactid> <version>1.2</version> </dependency> <dependency> <groupid>javax.servlet</groupid> <artifactid>servlet-api</artifactid> <version>2.5</version> </dependency> <dependency> <groupid>taglibs</groupid> <artifactid>standard</artifactid> <version>1.1.2</version> </dependency>

php - How do i call shortcode value from dashboard editor? -

php - How do i call shortcode value from dashboard editor? - i have used shortcode this: <?php add_shortcode( 'myproduct', 'myproduct_func' ); function myproduct_func( $atts ) { extract( shortcode_atts( array( 'cols' => 'none', 'data' => 'none', ), $atts ) ); $cols = explode(',',$cols); $data = explode(',',$data); $total = count($cols); $output = ""; foreach($cols $col): $output .= "| {$col} "; endforeach; $output .= "<br>"; $counter = 1; foreach($data $datum): $output .= "| {$datum} "; if($counter%$total==0): $output .= "<br>"; endif; $counter++; endforeach; homecoming $output; } ?> do display shortcode when writ

javascript - How to use underscore.js sortBy -

javascript - How to use underscore.js sortBy - i'm trying rearrange multidimensional array json file in underscore template can print out disease highest # of cases lowest # of cases the problem comes sortby function not sorting arrays. here illustration array i'm working with the totalcases array looks like: [163, 134, 98, 118, 2, 167, 152, 102, 49, 4, 0, 0, 0, 1, 0, 0, 1265] and sortby function is: <% _.sortby(totalcases , function (num) { %> <%= num %> <% }); %> it returns 163, 134, 98, 118, 2, 167, 152, 102, 49, 4, 0, 0, 0, 1, 0, 0, 1265 i don't know going wrong how i'm using sortby you mixing view controller somehow. don't want rearrange array in the underscore template, before presenting it. reread docs sortby , takes callback sort criteria or property name or so, don't want output in there. <% var sortedcases = _.sortby(totalcases, function(case) { homecoming // sort criteria he

Checkout in git superproject and submodules -

Checkout in git superproject and submodules - consider superproject submodule. if superproject checked out previous commit, how automatically check out submodule corresponding commit ? superproject : - b submodule : x - y - z superproject head on b, corresponding index on submodule on z. imagine in a, submodule index in x. how can automatically checkout submodule on x when check out superproject in ? i can manually this question not efficient superproject many submodules. [edit] by checkout, mean using git checkout commitsha1 . according doc, prepare work on top of , detaching head @ (see "detached head" section), , updating index , files in working tree. i want recompile code in superproject commit (possibly tagged) without knowing explicitly corresponding submodules indexes. i believe command you're looking is: git submodule update that should submodules right version (when run after git checkout ) http://git-scm.com/docs/git-s

ios - How to render GLKViewController with iphone camera -

ios - How to render GLKViewController with iphone camera - i have glkviewcontroller renders cube , transformations class helps scaled, moved or rotated. view controller utilize device info rotate cube. want place cube on ios camera. please help. use avcapture classes avfoundation framework video camera, , cvopenglestexturecache class photographic camera frames opengl es textures. 1 time have such texture, utilize other — phone call glbindtexture , issue draw call. photographic camera info comes in biplanar yuv format, you'll need shader programme reads y , uv textures , converts them rgb output while drawing. apple's glcameraripple sample code project demonstrates of above. ios iphone opengl-es-2.0 glkit

python - Inconsistent results when exporting JSON from Postgres using Django -

python - Inconsistent results when exporting JSON from Postgres using Django - i'm trying create django view returns json info postgres (i.e. info postgres of json type). i utilize django dev server , postgres in development environment, , utilize apache , postgres (a different server) in production environment. this view works fine in development environment: def my_custom_sql(request): cursor = connection.cursor() cursor.execute("... query ...") homecoming httpresponse(cursor.fetchone(), mimetype="application/json") but output different in production environment. to create work in production, changed 4th line from: homecoming httpresponse(cursor.fetchone(), mimetype="application/json") to: homecoming httpresponse(json.dumps(cursor.fetchone()[0]), mimetype="application/json") these results (i added line returns): development environment: using cursor.fetchone() - correct [{&

Parsing JSON Data in Windows Phone 8 -

Parsing JSON Data in Windows Phone 8 - i know , how can parse json info received rest web service. sample json info given here {"success":true, username:true} i seeing numerous articles this, new this, don't know best method. thanks in advance sebastian i propose build classes of json or else go this site , generate classes. a sample snippet this: public class rootobject { public response response { get; set; } } public class response { public int errorflag { get; set; } [jsonproperty("score detail")] public jobject scoredetail { get; set; } } have @ article fore more: http://blogs.msdn.com/b/africaapps/archive/2013/02/25/parsing-json-in-windows-phone-apps.aspx json windows-phone-8

php - findafter with relation another table yii -

php - findafter with relation another table yii - in database have 2 tables: country(id,name) users(id,countryid) country ->id= users->countryid; i'm trying perform task yii relations name country table : users modals public function relations() { homecoming array( 'linkedindex' => array(self::belongs_to, 'country','countryid'), ); } public function afterfind() { $name = users::model()->findbypk(1); } if @ code closely, see variable name beingness populated,but after functions ends, variable gets destroyed, public function afterfind() { $name = users::model()->findbypk(1); } if want maintain $name , have create property of model class (or store in existing property) php yii

javascript - How to confirm if a radiobox is checked -

javascript - How to confirm if a radiobox is checked - *currently want check if radiobox checked using html , javascript only. when click radio buttons, want javascript alert message pop saying particular button has been clicked, nil comes up. able rectify errors have function checked() { if(document.getelementbyid("s1").checked) { alert("small"); } if(document.getelementbyid("s2").checked) { alert("medium"); } if(document.getelementbyid("s3").checked) { alert("large"); } if(document.getelementbyid("s4").checked) { alert("extra large"); } } <input type="radio" id="s1" name="shirtsize" value="small" onchange="checked()"/>small <input type="radio" id="s2" name="shirtsize" value="medium" onchange="checked()"/>medium <input type="radio" id="

Java approach for XML Validation -

Java approach for XML Validation - i want validate xml tag values in java. scenario: suppose have info follow elements: element1, element2, element3, element4, element5 values: value1, value2, value3, value4, value5, value6, value7, value8 next possible combinations have validate: 1. element1 can have value1/value2 ( element1->value1/value2 ) 2. element2 can have value3/value4 ( element2->value3/value4 ) 4. element3 can have value5 if element1 has value1 ( element3->value5 if element1->value1 ) else element3 can have value6 if element1 has value2 ( element3->value6 if element1->value2 ) 5. element4 can have value7 if element1->value1 , element2->value4 i can have hard-coding of requirement in 1 java file want flexible approach wherein if in future new status comes image can added. i thought of hibernate validation later on came know supported java 6 , above. constraint have utilize java 1.5 please suggest appropriate ap

loops - referencing a list of variables to do calculations with in r -

loops - referencing a list of variables to do calculations with in r - i trying calculate number of pairwise differences between strings of 5 variables s1 vs s3, s1 vs s4, s1 vs s5, s2 vs s3, s2 vs s4, s2 vs s5 s1 <- unlist(strsplit('tgtagcaacggattccacccatatgggctcagcaggcaggtcctggattgtttgct','')) s2 <- unlist(strsplit('tgtaacaacgaattccatccatatgggctcagcaggcaggtcctggactatttgct','')) s3 <- unlist(strsplit('tgtaacgatgggtcctgcttacgcgggttcagtaggtaaattctaggccgcctatt','')) s4 <- unlist(strsplit('tgtaacaacggattccacccatatgggctcagcaggcaggtcctggactgtttgct','')) s5 <- unlist(strsplit('tgtaacgacgggccctgcttacgcgggttcagtaggtaaattctgggccgcttatt','')) for(i in 1:2) { for(j in 3:5){ diff(i.j) <- sum(mapply(function(x,y) sum(x!=y),s(i),s(j))) } } so keeping variables , style, think want this: s1 <- unlist(strsplit('tgtagcaacggattccacccatatgggctcagcaggcaggtcctggattgtttgct',

Check remaining time with Youtube Javascript API -

Check remaining time with Youtube Javascript API - i embedding youtube video , using yt js api. user encouraged utilize chromecast view embedded video. however, when video cast button in player, player.getcurrenttime() , player.getplayerstate() become frozen, , onstatechange event doesn't fire. is there can work around these issues, or problem youtube can fix? thanks! my code: var player; function onyoutubeiframeapiready() { player = new yt.player('ytplayer', { events:{ 'onstatechange': onplayerstatechange } }); } function onplayerstatechange(event){ console.log('player statechange: '+event.data); //this never runs when casting video. } here's code var tag = document.createelement('script'); tag.src = "https://www.youtube.com/iframe_api"; var firstscripttag = document.getelementsbytagname('script')[0]; firstscripttag.parentnode.insertbe

Writing an object value in java -

Writing an object value in java - this question has reply here: how create println/print method custom class 6 answers hello have question little programme how can print value of p1 ? when using p1.tostring() method still shows me address of object searching in google other ways , still don't know how this. here code: public class boss { string name; public boss(string input) { // constructor name = "our boss known : " + input; } public static void main(string args[]) { boss p1 = new boss("super-man"); system.out.println(p1.tostring()); } you seem have forgotten override tostring() // add together boss public string tostring() { homecoming name; } or (as have code), // system.out.println(p1.tostring()); system.out.println(p1.name); you should add together getname() method boss well, public strin

How do I comment out multi-lines in netbeans version 8.0? -

How do I comment out multi-lines in netbeans version 8.0? - i used able turn multi-line codes single line clicking on minus sign on left of code , add together // comment out multi-line code. when it, code gets deleted… what do? select lines want comment out , press ctrl + shift + c netbeans

How to add monit cartridge to OpenShift? -

How to add monit cartridge to OpenShift? - i'm trying add together monit cartridge openshift app using next syntax: rhc cartridge add together https://github.com/openshift-cartridges/openshift-origin-cartridge-monit/blob/master/metadata/manifest.yml -a <appname> -n <domainname> unfortunately i'm getting: the cartridge manifest @ <linkfromabove> not downloaded: cartridge manifest @ <linkfromabove> must smaller 20480 bytes. what's problem - how can prepare it? the cartridge has been updated , should working, trying download version did not exist anymore. downloading latest version. openshift openshift-client-tools

python - How to limit for loop iterations within cursor? -

python - How to limit for loop iterations within cursor? - i using for loop within searchcursor iterate through features in featureclass. import arcpy fc = r'c:\path\to\featureclass' arcpy.da.searchcursor(fc, ["fielda", "fieldb", "fieldc"]) cursor: row in cursor: # something... i troubleshooting script , need find way limit iterations to, say, 5 rather 3500 configured. know basic way limit number of iterations in for loop follows: numbers = [1,2,3,4,5] in numbers[0:2] print however, approach not work when iterating on cursor object. method can utilize limit number of iterations of for loop within cursor object wrapped in with statement? you utilize list comprehension grab , take first 5 rows need. check illustration below: max = 5 #insert max number of iterations here arcpy.da.searchcursor(fc, ["fielda", "fieldb", "fieldc"]) cursor: output = [list(row) row i

java - CSV to MySQl Import -

java - CSV to MySQl Import - i need insert csv mysql database in proper column. let csv has header , info b c and mysql has table column c b i need know best way insert csv info mysql table i believe can utilize next syntax mysql: "insert users (username, password, email, firstname, lastname, createdate) values ('test', 'test', 'test', 'test', 'test', 'test')" so can build query, using header , column falls into, (pseudocode): "insert table (header1, header2, header3) values (column1, column2, column3)" regardless of order info in table, insert info right column. java mysql sql

javascript - Reading multiple image using fileReader -

javascript - Reading multiple image using fileReader - i'm trying create image input file button. 1 time image selected default image alter image selected. using filereader able target 1 image. how create target image attr in selected div ? is possible ? html code <div class="prep"> <div class="row"> <label>step 1</label> <img src="http://png-4.findicons.com/files/icons/129/soft_scraps/256/button_upload_01.png" id="upfile1" style="cursor:pointer" class="img"/ > <input type="file" class="inputimg" /> </div> </div> <span class="add">add step</span> js code. $(document).on("click" ,".img" , function(){ $(this).closest("div").find(".inputimg").trigger("click"); }); var count = 1; $(".add").on("click",function(){ count ++;

android - Are Urban Airship push notifications supposed to persist after reboot? -

android - Are Urban Airship push notifications supposed to persist after reboot? - in tests, device receives urban airship force notifications expected, after rebooting device, ua notifications disappear android status bar area. i'm surprised unclicked notifications absent after reboot because assume ua handle process of re-adding notifications after reboot. i don't see promises of persistence in ua documentation, i'm not sure if expected behavior or not. i reached urban airship folks via email. confirmed ua not effort persist force notifications. expected behavior lose them after reboots, example. android urbanairship.com

Automation of Mainframe jobs using Selenium WebDriver/JAVA -

Automation of Mainframe jobs using Selenium WebDriver/JAVA - in our project, using selenium web driver automate web application.for 1 of application, need submit mainframe jobs , info available next application. as not able automate mainframe jobs, there gap between 2 application , not able accomplish end end scenarios. does have thought on automating mainframe session using java/web driver. i came know jameleon/jagacy driver. not much info available. its helpful me if share thoughts on achieving this. you can ftp job using java. can add together selenium test http://www.ibm.com/developerworks/systems/library/es-batch-zos.html if ftp isnt open on firewall seek telnet java selenium-webdriver

unix - What is "exit" in Solaris? -

unix - What is "exit" in Solaris? - this feels newbie question, i've been working solaris years, , stumped this. does know happens when type exit on solaris command line? i'm using solaris 10, , i'd know happens when run "exit". i assumed command, can't find it: $ uname -a sunos base of operations 5.10 generic_150400-05 sun4v sparc sun4v $ exit no exit in /usr/bin . /usr/local/bin /usr/local/bin /usr/ucb /usr/x/bin /sbin /usr/sbin /usr/local/sbin /usr/sbin /usr/sbin /usr/local/bin $ sudo find / -name exit $ thanks, warwick. exit shell built-in. think how shell typically works without built-ins. executes file in command path forking new process. exit terminates current process. if there external exit program, calling exit exit program. therefore, exit 1 of built-in commands bash (and other shells) knows how interpret (along cd ). exit within process itself. excellent explanation on wikipedia: http://en.wikipedia.

android - Change background color of ListView item after 3 seconds -

android - Change background color of ListView item after 3 seconds - i have list of items "seen" or "not seen" in arraylist<item> . if they're not seen alter background color of listview item in customarrayadapter : if(item.is_seen == null || item.is_seen == 0) { row.setbackgroundresource(r.color.yellow); } else { row.setbackgroundresource(r.color.transparent); } now want set items background transparent after 3 seconds spent on page. i tried this: mscheduledexecutor.schedule(new runnable() { @override public void run() { for(int i=0; i<mitems.size(); i++) { final item n = mitems.get(i); if(n.is_seen == null || n.is_seen == 0) { // update value in db int isseen = 1; updateitem(n._id, isseen); // alter color of backgrounds view view = listviewitem.getchildat(i); if(view != null) { view.setbackgroundresource(r.color.red); } } } updating

android - Replacing TableLayout with ListView? -

android - Replacing TableLayout with ListView? - i using tablelayout within scrollview , multiple listview within tablerows getting next results. with next xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <include layout="@layout/progress_bar" /> <scrollview android:id="@+id/sv" android:layout_width="match_parent" android:layout_height="match_parent" > <tablelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <tablerow android:id="@+id/tr_lbl_topsongs" android:layout_width="match_

Amazon RDS allocated Space unclear -

Amazon RDS allocated Space unclear - i trying setup amazon rds. during db instance setup don't understand meaning of "allocated storage" ? max allocated storage sql server 1024 gb. mean if db uses 1024 gb space run of space? is rds right selection unlimited sql server info storage? thanks allocated storage means amount of disk space database instance drive has been configured. yes if db uses 1024 gb space run out of space sql server on rds has limits ( rds variants - mysql, postgre, oracle have space limits). in case of sql server 1024 gb. if need more that, may need setup own sql server cluster on ec2 attaching several ebs volumes , configuring , monitoring db's health ps : for non-sql server instances can start small, allocate 50gb , info size grows can increment allocated space. can increment storage , cannot decrease size. point in involvement of cost. for sql server, can not alter allocation size 1 time has been set. stated ama

objective c - stopAllActions doesn't work on Spritebuilder3.1 and cocos2d 3.0 -

objective c - stopAllActions doesn't work on Spritebuilder3.1 and cocos2d 3.0 - @implementation mainscene { ccsprite * _hero . . } - (void) stop { [_hero setscale:(3.0f)]; [_hero stopallaction] } my sprite _hero has multiple keyframes , image's changed. this code(stopallaction) works when using spritebuilder 3.0 , cocos2d 2.x. however stopallaction doesn't work on spritebuilder3.1 , cocos2d 3.0 [_hero setscale:(3.0f)]; works correctly think _hero working well. (i insert line test purpose) i guess relevant cocos2d 3.0 update though, does know work-around way or have same problem??? objective-c cocos2d-iphone spritebuilder

javascript - issue updating variable on window resize -

javascript - issue updating variable on window resize - i have status size of browser window variable "windowsize" doesnt updated , value on document load 1 considered. doing wrong, need global variable? here have: jquery(function(){ jcf.customforms.replaceall(); initcarousel(); initcyclecarousel(); initslideshow(); initopenclose(); initaccordion(); jquery('input, textarea').placeholder(); ..... ... }); ..... ... // open-close init function initopenclose() { var $window = $(window); var windowsize = $window.width(); $(window).resize(function() { windowsize = $window.width(); }); if (windowsize > 1200) { //if window greater 1200px wide then.. jquery('#nav > ul > li').openclose({ activeclass: 'active', opener: '> a', slider: '.drop-container', animspeed: 200, event: 'over', effec

c# - Error when exporting a zip file: "The entry name must be non-null and non-empty" -

c# - Error when exporting a zip file: "The entry name must be non-null and non-empty" - ionic.zip.addfile gives error: "the entry name must non-null , non-empty" my code: zip.addfile(filepath, file path); or zip.addfile(filepath,"") httpcontext.current.response.clear(); httpcontext.current.response.addheader("content-disposition", "attachment; filename=callrecording" + datetime.now); httpcontext.current.response.contenttype = "application/zip"; zip.save(httpcontext.current.response.outputstream); httpcontext.current.response.end(); both code getting same error. the "non-null , non empty" error means you're trying add together file has either null value or "" filename. you might find 1 of values in list either empty or null. c# asp.net

javascript - Easy pie chart does not: loading animation using Waypoint JS -

javascript - Easy pie chart does not: loading animation using Waypoint JS - i designing 1 page scrolling webpage. in webpage using easy pie chart in skill page. want load easy pie chart animation when reached skill page. used waypoint js not working. load animation when in skill page when in top , refresh page & go skill page, not working. my code given bellow custom.js: jquery('.skill').waypoint(function() { $('.chart1').easypiechart({ animate: 4000, barcolor: '#000', trackcolor: '#ddd', scalecolor: '#e1e1e3', linewidth: 15, size: 152, }); }, { triggeronce: true, offset: 'bottom-in-view' }); now how can solve problem ? you can seek code: $(window).scroll( function(){ /* check location of each desired element */ $('.skill').each( function(i){ var bottom_of_object = $(this).offset().top + $(this).outerheight(); var bottom_of_window = $(window).scrolltop() + $(window).heigh

Media Player Release not clearing data -

Media Player Release not clearing data - i seek release media stream info not working. i got listview songs in few different activities. case 1: if (zac) { if(playing){ mp.stop(); playing = true; mp = mediaplayer.create(getapplicationcontext(), r.raw.asdasdas); mp.start(); }else{ mp = mediaplayer.create(getapplicationcontext(), r.raw.asdasdas); mp.start(); mp.start(); playing = true; } } break; i phone call release method : if(mp!=null){ mp.stop(); mp.release(); mp = null; } it seems works because removing media object ( have create mp 1 time again play sound) im still getting media player error (-19,0). phone call mp.release problem persist, storage gets total , media sounds aint playing. media release player

Scala: serialize case class to JSON , alternate names -

Scala: serialize case class to JSON , alternate names - any way serialize scala case class json , have ability provide custom serialized names ? for example, in java can done using gson library : public class someclasswithfields { @serializedname("name") private final string somefield; private final string someotherfield; public someclasswithfields(string a, string b) { this.somefield = a; this.someotherfield = b; } } i tried doing in scala : case class someclasswithfields(@serializedname("name") somefield:string) but seems have no effect . any thoughts ? you can spray-json calling jsonformat overloads. here's how work example: import spray.json._ case class someclasswithfields( somefield:string) object someclassjsonprotocol extends defaultjsonprotocol { implicit val someclassformat = jsonformat(someclasswithfields,"name") } json scala serialization gson

can I control the refresh rate of a Java listener? -

can I control the refresh rate of a Java listener? - i'm struggling issue since days ago , i'm not able find solution. have listener receives market info (orders @ bid , ask). if market quiet (pre-market or post-market (low volatility)) works fine. 1 time market open listener receives events fast. after couple of minutes app freezes. right listener assigns received info var. orderbookbid.getbuyorders().addlistener(new observablelistmodellistener<order>() { @override public void modelchanged(final change<? extends order> change) { system.out.println("bid event"); bidchange = change.getsource(); } }); the programme freezes when uses real data. when market closed , uses test info local file works fine. is there way set maximum number of events per second? or way ignore events short time period? thought on how can handle appreciated. thanks. you set load balancer

java - JavaMail: Searching for emails -

java - JavaMail: Searching for emails - i'm busying trying implement/play around oracle's javamail. i'm using index big quantities of emails via imap (as need folder structure). i'll cutting chase: there quick way search across folders particular message-id? what i'm doing downloading subset of emails folder, , reading 'references' header of each email. in order compile emails mutual discussions/threads need find remaining emails referenced in each email's header. there way this? going compiling messages mutual threads wrong way? i've thought iterating through each folder , doing search, method slow... any input muchly appreciated ;-) there's imap extensions might help, few implemented more 1 server, , typically not popular servers. so, pretty much, you're stuck doing hard way. can parallelize operations on folders if help. within limits of have do, there more , less efficient ways using imap protocol , javamail api.

ruby on rails - What is the best way to update data post migration? -

ruby on rails - What is the best way to update data post migration? - in rails / activerecord have changed field create required; want run appversion.where('content_rating null').each {|av| av.update_column('content_rating', 7) } to ensure content_rating not null. from read, migrations not place alter records. there "do once" way run code within rails structure? yes, can create rake task: http://railsguides.net/2012/03/14/how-to-generate-rake-task/ $ rails g task update_version update_rating_column $ create lib/tasks/update_version.rake namespace :update_version desc "update content_rating" task :update_rating_column => :environment appversion.where('content_rating null').each {|av| av.update_column('content_rating', 7) } end end you can run task in migration if needed: execute rake task within migration? ruby-on-rails

Android Facebook - Login / Logout Dialog -

Android Facebook - Login / Logout Dialog - i've managed implement facebook login android app.the issue i'm facing is,on logout,whenever click logout button,i capture click of "cancel / logout" options.how go doing this?below images attached much clearer illustration. as shown in images,how go capturing clicks in highlighted reddish circles? below attached codes login/logout activity well.thank :) view view = inflater.inflate(r.layout.splash, container, false); loginbutton authbutton = (loginbutton) view .findviewbyid(r.id.login_button); authbutton.setfragment(this); // more permissions authbutton.setpublishpermissions(arrays .aslist("publish_actions,read_stream")); authbutton.setfragment(getparentfragment()); i post old but... had same problem you, did was: (only sure facebook sdk v2.0) 1. go bundle com.facebook.widget; 2. open file loginbutton.java; 3. go line 819 within public void on

ios - Drawing PDF from two views -

ios - Drawing PDF from two views - i have first view firstview , draw sec view secondview , add together subview firstview . have method creates firstview pdf file: -(void)createpdffromuiview:(uiview*)firstview { nsmutabledata *pdfdata = [nsmutabledata data]; uigraphicsbeginpdfcontexttodata(pdfdata, self.view.bounds, nil); uigraphicsbeginpdfpage(); cgcontextref pdfcontext = uigraphicsgetcurrentcontext(); [firstview.layer drawincontext:pdfcontext]; uigraphicsendpdfcontext(); nsarray* documentdirectories = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask,yes); nsstring* documentdirectory = [documentdirectories objectatindex:0]; nsstring* documentdirectoryfilename = [documentdirectory stringbyappendingpathcomponent:@"resolution.pdf"]; [pdfdata writetofile:documentdirectoryfilename atomically:yes]; nslog(@"documentdirectoryfilename: %@",documentdirectoryfilename); } how can draw

OIDs in MonetDB -

OIDs in MonetDB - is there way query oids in monetdb using sql? is, i'd along lines of select <oid>, <column 1>, ..., <column n> <table> and select * <table> <oid> in (...) i looked through documentation , source examples, found no mention querying oids or if oids accessible in monetdb/sql. i don't think can access oid's straight through sql interface, since internal utilize only. however, can row identifiers, might looking for. see window functions more information. so select row_number on () row, , ..., what need for? monetdb

c++ - const qualifier disappears from pure virtual function -

c++ - const qualifier disappears from pure virtual function - this question has reply here: top-level const doesn't influence function signature 7 answers using gcc version 4.8.2: i'm running issue const qualifier on parameters disappearing when compile code. here example: main.cc: #include <iostream> class base of operations { public: virtual int getsum( const int number ) = 0; }; class derived : public base of operations { public: derived( const int& num ) : _mynumber( num ) {} virtual int getsum( const int number ) { homecoming _mynumber + number; } private: int _mynumber; }; int main( int argc, const char* argv[] ) { base of operations *b = new derived( 2 ); std::cout << b->getsum( 3 ) << "\n&q

linux device driver - pci_disable_msi Oops Bug -

linux device driver - pci_disable_msi Oops Bug - i trying write kernel module handle msi interrupts pcie device. have written simple skeleton outline driver , whenever seek phone call 'pci_disable_msi(dev)' unable handle kernel null pointer dereference error. next along described /documentation/pci/msi-howto.txt , seems me should not getting error. bug or setup incorrect? judging lastly print occures, pretty sure happening @ fpga_remove() when phone call pci_disable_msi(). (clearly occures when removing module) static struct pci_driver fpga_driver = { .name = "pcie_test", .id_table = fpga_dev_table, .probe = fpga_probe, .remove = fpga_remove, .suspend = fpga_suspend, .resume = fpga_resume, }; static irqreturn_t fpga_isr(int irq, struct pci_dev *dev) { printk(kern_notice "this isr\n"); homecoming irq_handled; } static int setup_msi_interrupt(struct pci_dev *dev,

c++ - I am getting a resource leak : fin error when the code worked previously -

c++ - I am getting a resource leak : fin error when the code worked previously - i've read few threads said should close file when error pops when utilize cppcheck. issue this: 2 weeks ran shell script called file within execute , worked fine. past 2 days, got segmentation fault in when running main code using cygwin. had posted earlier, , on analysing executable file (in cpp) using cppcheck, got line 31 resource leak : fin. this particular block of code pasted: void load_fasta_list(char * file_name, vector<string> &file_list){ file * fin; fin = fopen(file_name, "rt"); char temp_file[512]; char * temp_file2; while (!feof(fin)){ fgets(temp_file, 512, fin); if (!feof(fin)){ temp_file2 = strtok(temp_file, "\n"); file_list.push_back(temp_file2); } } cout<<file_list.size()<<" fasta files analyzed."<<endl; } the line 31 lastly bracket there. these codes available washington u u

Bluebird, Promise.bind - how to access bound context in pending promise? -

Bluebird, Promise.bind - how to access bound context in pending promise? - someone pointed me promise.bind() in bluebird able have context in promise chain. however, utilize case requires me utilize context "from outside" when have reference promise object (the 1 then , catch api). is possible? sure, .bind has non-static counterpart. yourpromise.bind({x:3}).then(function(data){ console.log("yourpromise fulfilled with", data, "and x ", this.x); }); here fiddle illustrating usage. promise bluebird

html - What does the "container" div class do on Weebly themes? -

html - What does the "container" div class do on Weebly themes? - i'm quite beginner css , html i'm trying larn while making webpage on weebly anyways, see container div class after every div id. looking through css , saw margin , width property div class itself, saw container class kid element after id selectors. wondering container class , why needed. example: .container { margin: 0 auto; width: 960px; } #nav-wrap { background: url(nav-bg.jpg); box-shadow:0 1px 2px 1px rgba(0,0,0,0.25); position:relative; z-index:3; } #nav-wrap .container { clear: both; overflow: hidden; position: relative; width: 960px; box-shadow:none; } in illustration above, area #nav-wrap indicate , area #nav.wrap .container indicate? thanks! #nav-wrap correspond html tag id nav-wrap. nav-wrap container compound styling; area both nav-wrap , container styles apply. read source code. if tinker with, might find

Error when calling a method in Scala with a " " rather than a "." -

Error when calling a method in Scala with a " " rather than a "." - why first pair of method calls (using mkstring ) both work, while sec pair of method calls (using fold ) fail when replace "." " "? parameter type missing? i'm using scala version 2.11.0. scala> list("a", "b", "c").mkstring("") res0: string = abc scala> list("a", "b", "c") mkstring("") res1: string = abc scala> list("a", "b", "c").fold(""){(x,y)=> x++y} res2: string = abc scala> list("a", "b", "c") fold(""){(x,y)=> x++y} <console>:8: error: missing parameter type list("a", "b", "c") fold(""){(x,y)=> x++y} ^ <console>:8: error: missing parameter type list("a&

django - How to extend a base.html using two different files? -

django - How to extend a base.html using two different files? - i'm writing application in user can take 1 of several tools info analysis , open in panel on main page. possible utilize django "extends" , have each tool defined in different file? the minimal illustration of im strugling this: base.html <div> {% block left_panel %} left block {% endblock content%} </div> <div> {% block right_panel %} right block {% endblock %} </div> and sample left_panel , right_panel tools: left1.html {% extends "base.html" %} {% block left_panel %} <p>test left 1</p> {% endblock %} right1.html {% extends "base.html" %} {% block right_panel %} <p>test right 1</p> {% endblock %} is there way render base.html both blocks overwriten? i believe best way implement requirement create new template extends base.html , includes left1.html , right1.html. this: {

Android FragmentTabHost Layout Positioning -

Android FragmentTabHost Layout Positioning - i learning android development , trying create tab interface within fragment, tabs in bottom. have seen many web pages (like one) how configure tabs in bottom using relativelayout can't things right in screen. the tab's framelayout taking space tab interface, , tabs can't seen: the code using is: <android.support.v13.app.fragmenttabhost android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@android:id/tabhost" android:layout_marginright="5dp" android:layout_aligntop="@+id/ibright" android:layout_alignbottom="@+id/ibright" android:layout_toleftof="@+id/ibright" android:layout_alignleft="@+id/ibtop"> <relativelayout android:layout_width="match_parent"

wordpress - How to get rid of blue box surrounding text pressed using detail tag (in html) -

wordpress - How to get rid of blue box surrounding text pressed using detail tag (in html) - on wordpress, when click text drops downwards list (done using detail tag), bluish rectangular box forms around text. there way, using html, prevent happening? (i don't have availability of css on wordpress.com blog.) thanks i think wordpress allows inline css default. so, depending on settings, next might work: <details> <summary style="outline:none";>alabama</summary> <p>domino's</p> <p>donatos</p> </details> http://clarkwp.wordpress.com/2013/11/07/inline-css-styling-in-wordpress/ html wordpress

javascript - Youtube videos not working in jquery -

javascript - Youtube videos not working in jquery - i need display youtube videos when click image, displays youtube videos new popup. here code: <html> <head> <meta content="text/html; charset=utf-8" http-equiv="content-type"> <title> - jsfiddle demo</title> <script src="jquery-1.9.1.js" type="text/javascript"></script> <script src="jquery-ui.js" type="text/javascript"> </script> <link href="jquery-ui.css" type="text/css" rel="stylesheet"> <script src="youtubepopup.min.js" type="text/javascript"> </script> <script type="text/javascript"> $(function(){ $("a.youtube").youtubepopup({ autoplay: 0 }); }); </script> </head> <body> <a class="youtube" href="http://www.youtube.com/watch?v=4eyspiz2fju" title="jquery youtube popu