Posts

Showing posts from July, 2013

java - JSESSIONID not expired, SPRING_SECURITY_REMEMBER_ME expired -

java - JSESSIONID not expired, SPRING_SECURITY_REMEMBER_ME expired - so, have in application spring security , have introduced remember me functionality when checkbox checked in. i wanted know exact behavior: if set </remember-me> tag , specify remembermeservices tokenvalidityseconds 20 seconds, shouldn't session expire , and inquire me log in again? have set: <session-config> <session-timeout>xx</session-timeout> </session-config> so matches spring_security_remember_me cookie tokenvalidityseconds ? update does matter if i've implemented own persistenttokenbasedremembermeservices ? had override default persistenttokenbasedremembermeservices coming spring, because persistentremembermetoken did not have no-arg constructor, unable utilize hibernate that, did wrote own persistentremembermetoken , persistenttokenbasedremembermeservices (which, way, no have special beside me introducing no-arg constructor in persistentreme...

php - MYSQL - First Database Structure help Please -

php - MYSQL - First Database Structure help Please - thanks taking time read , attempting help me, appreciate information! this first time making own mysql database, , hoping pointers. i've looked through previous questions , found possible search multiple tables @ once... expanded posibilities. what trying do, have searchable / filterable listing of snowmobile clubs on php page. these clubs should listable state, county or searchable name / other contained info. i'd them alphabetized in results, despite order of entry. currently mind in place of , have table ny, pa etc with columns county(varchar), clubname(varchar), street address (long text) , phone (varchar) email (varchar) website address (varchar) should making multiple tables each county, such ny.albany , ny.madison are field formats have chosen sensible ones? should address broken subcomponents... such street1, street2, city, state, zip thank much input can provide eventually, think i'd c...

ios - local notification style coming up as banner, instead of alert -

ios - local notification style coming up as banner, instead of alert - so i'm working on first app. i'm trying create alarm other stuff. i've found, want uilocalnotification. i've followed few tutorials on subject, , have notification fire. however, shows banner disappears. want alarm clock alert... or client alert ok, cancel. upon farther reading in forum, else asked question, , if i'm reading correctly user can specify how alert style looks. is right? can not forcefulness alert box popup @ specified time? , uialertview... looks i'm looking also... can used go off alarm clock , x time in future? appreciate input, thanks no, cannot that. user 1 decides kind of notification he/she gets. ios

java - JPARepository's findAll query on baseclass of @MappedSuperClass just returns entries of baseclass -

java - JPARepository's findAll query on baseclass of @MappedSuperClass just returns entries of baseclass - i have jpa mappedsuperclass this: @mappedsuperclass public abstract class foo extends abstractpersistable<long> { private status status; @manytoone(cascade=cascadetype.all) private user owner; and 2 subclasses inheriting foo, namely defined follows: @entity @table(name="barfoo") @equalsandhashcode(callsuper=true) @primarykeyjoincolumn(name="id", referencedcolumnname="id") public @data class bar extends foo { private string beer; and @entity @table(name="blubfoo") @equalsandhashcode(callsuper=true) @primarykeyjoincolumn(name="id", referencedcolumnname="id") public @data class blub extends foo { private string cider; now when save info in object of type bar or blub expect myrepository.findall homecoming cider or beer , both status , owner mappedsuperclass. instead, returns cider ...

git - How to push a branch back to a private github repo -

git - How to push a branch back to a private github repo - i've cloned private repo in github local machine. after i'm done making changes, want force branch github propose merge (or pull request, github calls it). how do that? i'm absolutely new github (i utilize bzr/launchpad, , command bzr force lp:~<username>/<master-branch>/<name of new kid branch> . equivalence of in git ?). [edit: found wording confusing due little understanding of git's terminologies, going re-describe did] ( bar private repo) $git clone git@github.com:foo/bar.git $cd bar $touch <some file> # ie., create changes $git commit ... $ <<<<< need force github here. from comments above , original question, want pull request on github you've modified master locally ... that's problem. wanted branch first, create changes, commit locally, , force branch. create pull request on github branch. first need prepare is: gi...

Bash: A multiword variable breaking curl -

Bash: A multiword variable breaking curl - i having little problem in bash. i have rather ugly line curl -u "$user:$pass" --request post --data '{"title": "'$branch_name'", "body": "'$description'", "head": "'$owner':'$branch_name'", "base": "develop"}' https://api.github.com/repos/$owner/$repo_name/pulls where of these variables single words $description can more 1 seems breaks line. is there way create $description not break curl command when has more 1 word in it? using shell here-doc, safer (y)our brain(s) : curl \ -x post \ -h "content-type:text/json" \ -d@- \ "https://api.github.com/repos/$owner/$repo_name/pulls" <<eof { "title": "$branch_name", "body" : "$description", "head" : "$owner:$branch_name...

persistence - JAVA: an EntityManager object in a multithread environment -

persistence - JAVA: an EntityManager object in a multithread environment - if have multiple threads, each utilize injector entitymanager object, each utilize em object select list of other class objects. ready used in loop. if thread finishes first , calls clear(), impact other threads? loop have exception? how close()? if reply "it depends", (class definition? method call?) , (java code? annotation? xml?) should @ find out how depended? i did not write source, using else's library without documentation. thank you. here total working thread-safe entity manager helper . import javax.persistence.entitymanager; import javax.persistence.entitymanagerfactory; import javax.persistence.persistence; public class entitymanagerhelper { private static final entitymanagerfactory emf; private static final threadlocal<entitymanager> threadlocal; static { emf = persistence.createentitymanagerfactory("persistent_name");...

perl - How to print an array that it looks like a hash -

perl - How to print an array that it looks like a hash - this question has reply here: i need help in perl, how write code output of csv file in form of hash [closed] 1 reply i new perl, , have write code takes contents of file , array , print output looks hash. here illustration entry: my %amino_acids = (f => ["phenylalanine", "phe", ["ttt", "ttc"]]) out set should in above format. lines of files this... "methionine":"met":"m":"aug":"atg" "phenylalanine":"phe":"f":"uuu, uuc":"ttt, ttc" "proline":"pro":"p":"ccu, ccc, cca, ccg":"cct, ccc, cca, ccg" i have take lastly codons after semicolon , ignore first group. is intention build equivalent hash? or really...

How to properly handle long-lived MySQL connections in Java when using Guice Injections? -

How to properly handle long-lived MySQL connections in Java when using Guice Injections? - i hate stating questions apparently seem have lot of solutions online, cannot seem find valid best-practice solution our case, , hence felt had no choice. we building restful server application in periods between utilize may differ couple of hours multiple months. the server hosted jetty. not using orm, application layered 3 layers (webservice- , business- , info layer). info layer exist of one class injected through guice framework. jdbc (mysql connection) instantiated within constructor of class. @ first, had lot of problem many connections before understood guice default creates new instance on each request(ref). rid of problem, , because our info layer class stateful, made class injected singleton. now we've foreseen might run problem when our rest application not used time, since connection time out, , no new connection instantiated, constructor called once. we hav...

javascript - How to increase the delay on animation on every pass of a for loop -

javascript - How to increase the delay on animation on every pass of a for loop - first i've created basic demonstration of have @ moment here. second javascript i'm using. var boxes = ["#one","#two","#three","#four"]; boxhover = function(a){ $("#hover").hover( function(){ $(a).stop(true).delay(250).animate({opacity:1}); }, function(){ $(a).stop(true).delay(250).animate({opacity:0}); } ) } for(var i=0; i<boxes.length; i++) { boxhover(boxes[i]) } what i'm hoping accomplish have each box hover 1 after each other delay time of 250. i've tried adding delay animation function (as can see above) , settimeout in loop, no luck. help great. you can pass in array index additional parameter boxhover function , perform multiplication on delay factor. var boxes = ["#one","#two","#three","#four"]; ...

how to change the foreground color of the RadDatePicker in windows phone 8 app? -

how to change the foreground color of the RadDatePicker in windows phone 8 app? - hi using telerik rad controls windows phone 8 in windows phone 8 app. my uncertainty :- i want alter foreground color of date picker (want alter foreground color of date). i tried setting in way :- <telerikcontrols:raddatepicker foreground="black" x:name="datepicker1" popupclosed="datepicker1_popupclosed_1" popupopened="datepicker1_popupopened_1" margin="141,254,139,-247" height="83" width="162" /> but didnt work , how can se foreground colour . note :- having image background entire screen , thats not creating prolem right ?? please allow me know . looking forwards reply . thanks in advance. windows-phone-7 windows-8 telerik windows-phone-8

jquery - How can you remove a dynamically created div with unique id? -

jquery - How can you remove a dynamically created div with unique id? - i'm going post code that's relevant. if need whole code, allow me know. anyway, have next code: var deck = []; var c = 0; $('#add').click(function(){ var addtodeck = $('input[name=searchitem]').val(); addtodeck = addtodeck.tolowercase(); deck.push(addtodeck); $('#save').append('<div id="cardlist' + (c++) + '">' + database[deck[deck.length-1]].name + '</div>'); }); which dynamically adds divs unique id's each time button pressed (ex: cardlist1, cardlist2, etc). now, if user clicks on div particular id (say cardlist2), want remove list. i tried this: $(document).on('click','#save', function(){ $('#cardlist' + 'c').remove(); }); but doesn't work. think i'm in right direction though. just re-iterate, card game deck building application... want cr...

Formatting Highchart's Date in Tooltip Causes Values to Change -

Formatting Highchart's Date in Tooltip Causes Values to Change - i using highcharts plot points occur within 1 day. when utilize defaults x-axis labels correct: 12am, 4am, 8am, 12pm, 4pm , 8pm, , times echoed in tooltip each point correct, e.g. jan 6, 0400, jan 6 1200, jan 6, 1600, etc. i don't want armed forces time (e.g. 1600 hour) alter time format via: tooltip: {xdateformat: '%b %e, %l %p' } which thought result in jan 6, 4 pm. but happens when that, labels on x-axis become 12 , tooltip jan 6, 00:00:00.016. points appear in same spots, it's labels , tooltips wrong; seems times in milliseconds 12am. can shed lite on this? you can utilize highcharts.dateformat(); http://api.highcharts.com/highcharts#highcharts.dateformat() highcharts

C# Error handling catch blocks -

C# Error handling catch blocks - why adviced of time should not trap errors "exception" trap errors expect developers. there performance nail in trapping generic errors or recommended best practice point of view? seek { // } catch(exception e) { //log error } the best practice grab specific exception first , move on more generic ones. exception handling (c# programming guide) multiple grab blocks different exception filters can chained together. grab blocks evaluated top bottom in code, 1 grab block executed each exception thrown. first grab block specifies exact type or base of operations class of thrown exception executed. if no grab block specifies matching exception filter, grab block not have filter selected, if 1 nowadays in statement. it of import position grab blocks specific (that is, derived) exception types first. for question: why adviced of time should not trap errors ...

c# - How to animate WPF data bound Line item (Shape) -

c# - How to animate WPF data bound Line item (Shape) - i'm using mvvm, binding observablecollection<shape> (drawinginstructions) , animate line shapes beingness added. the individual lines shall drawn fra (x1,y1) (x2,y2) in doubleanimation kind of way. i've tried variations on following, not work. class="lang-cs prettyprint-override"> <itemscontrol itemssource="{binding path=drawinginstructions}"> <itemscontrol.itemspanel> <itemspaneltemplate > <canvas> : </canvas> </itemspaneltemplate> </itemscontrol.itemspanel> <itemscontrol.triggers> <eventtrigger routedevent="binding.targetupdated"> <beginstoryboard> <storyboard > <doubleanimation duration="0:0:2" storyboard.targetname="currentline" storyboard.targetproperty="position" from="{binding path=x1}...

python - too many sse connections hangs the webpage -

python - too many sse connections hangs the webpage - what limits number of sse(server sent event) connections? i have been working on project using django/gunicorn/django-sse. my project works great when limit number of sse connections page (5 works 6 hangs), isnt huge problem cause utilize pagination can limit number per page. prefer able have many like. my question is: number of connections slowing down, or amount of info beingness transfered? the first problem think prepare making them share connection sec limit me bit more. any ideas may be? edit: client side js sse code: function event(url, resource_name, yes, no, audio_in, audio_out, current_draw){ /** * listens events posted server * * useful site understanding server sent events: * http://www.w3.org/tr/eventsource/ */ var source = new eventsource(url); source.addeventlistener("message", function(e) { resettime(resource_name); info ...

asp.net - How to set different Cache expire times for Client and Server caches -

asp.net - How to set different Cache expire times for Client and Server caches - i have pages have 10 min cache clients , 24 hours server. reason if page changes, client fetch updated version within 10 minutes, if nil changes server have rebuild page 1 time day. the problem output cache settings seem override client settings. here have setup: custom actionfilterattribute class public class clientcacheattribute : actionfilterattribute { private bool _noclientcache; public int expireminutes { get; set; } public clientcacheattribute(bool noclientcache) { _noclientcache = noclientcache; } public override void onresultexecuting(resultexecutingcontext filtercontext) { if (_noclientcache || expireminutes <= 0) { filtercontext.httpcontext.response.cache.setexpires(datetime.utcnow.adddays(-1)); filtercontext.httpcontext.response.cache.setvaliduntilexpires(false); filtercontext.httpconte...

android - Softkeyboard overlap Editext -

android - Softkeyboard overlap Editext - the question - why softkeyboard overlaps edittext ( shown in below image) has been asked several times @ so. i have come across 2 answers add scrollview top container , in fact solves problem in case create problems. add android:windowsoftinputmode="adjustresize" or adjustpan or several combination , not work. my question is there other solution solve problem? also frustrated why happens @ all, should not framework take care of this. android android-edittext android-softkeyboard overlapping

javascript - Draggable with ghosting in jquery-ui not working in IE8/9 -

javascript - Draggable with ghosting in jquery-ui not working in IE8/9 - starting generating draggable box, , handle @ top using jquery-ui draggable(). however, sometime content within of box can flash , tends cause dragging function move slowly. decided move ghosting type scheme drag , shows box moving it, , moves location drop this. i have gotten running in chrome/firefox, cannot run in either ie8 or ie9. wondering if had suggestions. below jquery specific code. $(document).ready(function () { $container = $('#container'); $container.draggable({ handle: "#header", containment: "parent", scroll: false, helper: function () { homecoming "<div class='dragbox' style='width:" + ($container.width()) + "px;height:" + ($container.height()) + "px'></div>"; }, stop: function (e, ui) { var top = ui.position.top, left = ui.position.left; ...

AngularJS Search Change Event -

AngularJS Search Change Event - i need event $routechangesuccess $location.search() variable. calling $location.search('newview'), , need way know when changes. thanks! you should utilize $scope.$watch : class="lang-js prettyprint-override"> $scope.$watch(function(){ homecoming $location.search() }, function(){ // reaction }); see more $watch in angular docs. if looking add-on of 'newview', query string above code work. i.e. http://server/page http://server/page?newvalue however, if looking alter in 'newview' above code not work. i.e http://server/page?newvalue=a http://server/page?newvalue=b you need utilize 'objectequality' param phone call $watch. causes $watch utilize value equality, instead of object reference equality. class="lang-js prettyprint-override"> $scope.$watch(function(){ homecoming $location.search() }, function(){ // reaction }, true); notice add-o...

Grails with Java,Spring MVC and no database resource -

Grails with Java,Spring MVC and no database resource - i have web project running on machine no direct access database. goal build using template offered grails (when scaffolding enabled) prefer code in java without using database resource. have looked couple of hours in search engines find illustration or tutorial utilize grails + spring mvc +java not database resource , @ same time take advantage of scaffolding template of grails amount of html code must written me zero. ideas suggestions or resources on how handle appropriately appreciated. not sure can help, guide published came mind. might not helpful...it's based on need. curiously, why not utilize database? seems cloud options create database availability non-issue. in event, isn't there open source piece makes jdbc connect csvs ? remember, connect our app csv 1 of analytic packages used use. java spring grails spring-mvc

facebook - How to store graph data in a php variable? -

facebook - How to store graph data in a php variable? - i trying number of likes of particular page on website , store in array. stuck in middle, figured out can number of likes along other info next code: /*$site="http://graph.facebook.com/?ids=http%3a%2f%2xxxxxxxx.com/abc.php"; $graph= file_get_contents($site); the output follows: {"http:\/\/xxxxxxxx.com\/abc.php":{"id":"http:\/\/xxxxxxxx.com\/abc.php","shares":75,"comments":3}} is there way can store number of likes i.e. in case 75 in php array? i tried explode(); problem url using wont of constant length. this json string decode it, utilize json_decode output array. ref : http://php.net/manual/en/function.json-decode.php $array = json_deocde($json_string, true); echo "<pre>"; print_r($array); php facebook facebook-graph-api facebook-like

is there any function called crypt in C? Or i have to build that function myself? -

is there any function called crypt in C? Or i have to build that function myself? - crypt (const char *key, const char *salt) i saw in code, not find implementation of function. of conventions of c? it's specified posix not version of c standard. careful though: the crypt() function string encoding function. the algorithm implementation-defined. c function encryption passwords

osgi - Trying to install new features in Eclipse (using ADT as the base package) -

osgi - Trying to install new features in Eclipse (using ADT as the base package) - when seek install new features in eclipse (using adt base of operations package) ‘installing software’ has encountered problem. error occurred while collecting items installed error occurred while collecting items installed session context was:(profile=profile, hase=org.eclipse.equinox.internal.p2.engine.phases.collect, operand=, action=). no repository found containing: osgi.bundle,com.android.ide.eclipse.base,21.1.0.v201302060044-569685 no repository found containing: osgi.bundle,com.android.ide.eclipse.ddms,21.1.0.v201302060044-569685 no repository found containing: org.eclipse.update.feature,com.android.ide.eclipse.ddms,21.1.0.v201302060044-569685 i have installed number of addons , i’m not sure 1 might giving error. if else has faced error , found solution, great. thanks. try changing address of repo http https or vice versa eclipse osgi bundle runtime-error adt

Google Maps Styled (API) - use javascript -

Google Maps Styled (API) - use javascript - i trying apply code wizard http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html for example: [ { "elementtype": "geometry", "stylers": [ { "hue": "#00ccff" }, { "visibility": "simplified" } ] } ] in this code anyone willing help? sincerely don't know hot proceed. pass example-array in question styles -option of map : map = new google.maps.map(document.getelementbyid('map-canvas'), { center: new google.maps.latlng(48.70727541512677, 20.578157256250062), zoom: 7, styles:[ { "elementtype": "geometry", "stylers": [ { "hue": "#00ccff" }, { "visibility": "simplified" } ] } ], pancontrol: false, zoomcontr...

How to delete xml Dom document in php -

How to delete xml Dom document in php - i'd search problem , find questions didn't mention error... i'm trying remove kid of dom document , when type $x->removechild($key); function, nil happend... $xmlreq = new domdocument; $xmlreq->loadxml($xmlstr); $x = $xmlreq->getelementsbytagname('*'); foreach($x $key) { if (substr($key->nodevalue,0,3)=="{{{" , substr($key->nodevalue,-3)=="}}}") { $field = explode("|",substr($key->nodevalue,3,strlen($key->nodevalue)-6)); if((int)$field[3]==0) { if(trim($_post[$field[2]])=="") { $x->removechild($key); }else{ $key->nodevalue = trim($_post[$field[2]]); } }elseif((int)$field[3]==1) { if(trim($_post[$field[2]])=="") { $errors.=""; }else{ $...

html - How to echo all XML within an element in PHP? -

html - How to echo all XML within an element in PHP? - this question has reply here: php simplexml innerxml 10 answers i have piece of xml looks this: <root> <element>normal,<b>bold</b></element> </root> how can utilize php echo within <element> , output " normal,<b>bold</b> "? edit: here code: <?php $xml = simplexml_load_file('xml_file.xml'); $element = $xml->element; echo $element[1]; ?> i "normal". $xml = '<root> <element>normal,<b>bold</b></element> </root>'; $sxe = new simplexmlelement($xml); echo strip_tags($sxe->element->asxml()); you must strip tags when match element. php html xml

Maven Android SDK Deployer run the command "mvn install" error: Properties file not found. The file path seems not correct -

Maven Android SDK Deployer run the command "mvn install" error: Properties file not found. The file path seems not correct - [error] failed execute goal org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties (default) on project android-17: properties file not found: d:\maven-android-sdk-deployer-master\platforms\android-17\${env.android_home}\platforms\android-17\source.properties -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties (default) on project android-17: properties file not found: d:\maven-android-sdk-deployer-master\platforms\android-17\${env.android_home}\platforms\android-17\source.properties i'm using maven on windows. android_home has been set. value d:\adt-bundle-windows-x86_64\sdk i find source.properties under d:\adt-bundle-windows-x86_64\sdk\platforms\android-17 d:\maven-android-sdk-deployer-maste...

primefaces - Not able to create multiple instances of an input set in flowscope -

primefaces - Not able to create multiple instances of an input set in flowscope - i have , input type , it's value set in flowscope. class="lang-xml prettyprint-override"> <input name="myitem" required="false" value="flowscope.myitem"/> i creating list of myotheritem , sending controller method this: class="lang-xml prettyprint-override"> <evaluate expression="mycontroller.save(myotheritemdatamodel.selectedrows,myitem)" result="flowscope.myitem"/> inside mycontroller have method save in want save multiple instances of myitem getting info myotheritemlist. class="lang-java prettyprint-override"> public myitem save(myotheritem[] myotheritem,myitem myitem){ for(int i=0; i<myotheritem.length; i++){ myitem.setdata(myotheritem[i].getdata()); savemyitem(myitem); } homecoming myitem; } inside savemyitem method persisting myitem ob...

linux - Internetless vocal trigger recognition -

linux - Internetless vocal trigger recognition - speech recognition on handheld devices triggered press of button. how go triggering speech recognition without that? raspberry pi based device intentionally not have users able interact manually - there microphone hanging out wall. i trying implement way have understand simple trigger command initiate sequence of actions. in short, want run single .sh script whenever "hears" sound trigger. don't want understand else trigger - there no meaning has decode trigger - name of script or parameters. simple function - "hear trigger -> execute .sh script" i've explored different options: getting sound stream continuously sent google speech recognition service - not thought - much wasted traffic , resources getting internetless speech recognition application continuously hear sound stream , "pick out" trigger words - that's bit improve yet pretty much waste of resources , these system...

regex - Cocoa preg_split equivalent -

regex - Cocoa preg_split equivalent - i'm using preg_split split string based on regular look in php, using next code: $array = preg_split("~(?<!\*),~", $string); what equivalent in cocoa? any help appreciated. ended writing own method using nsregularexpression + (nsarray *)preg_split:(nsstring *)expression withsubject:(nsstring *)subject { nsregularexpression *exp = [nsregularexpression regularexpressionwithpattern:expression options:0 error:nil]; nsarray *matches = [exp matchesinstring:subject options:0 range:nsmakerange(0, [subject length])]; nsmutablearray *results = [[nsmutablearray alloc] init]; (nstextcheckingresult *match in matches) { [results addobject:[subject substringwithrange:[match range]]]; } homecoming results; } regex cocoa preg-split

ruby on rails - uninitialized constant mailer DEFAULT_FROM -

ruby on rails - uninitialized constant mailer DEFAULT_FROM - it seems when run application in production mode getting next within console: /home/desktop/portal/app/mailers/holiday_mailer.rb:2:in `<class:holidaymailer>': uninitialized constant holidaymailer::default_from (nameerror) i have looked @ next question rails 3 action mailer uninitialized constant. appears have not made error set followed: environment.rb require file.expand_path('../application', __file__) # initialize rails application portal::application.initialize! actionmailer::base.delivery_method = :smtp default_from = "portal@gmail.com" holiday mailer class holidaymailer < actionmailer::base default :from => default_from def holiday_confirmation(holiday) @holiday = holiday mail(:to => holiday.user.email, :subject => "your absence request") end end holiday controller def update() admin = user.find(current_user.role?...

oracle - Difference of NOT IN and NOT EQUALS different behaviour in SQL query -

oracle - Difference of NOT IN and NOT EQUALS different behaviour in SQL query - i thought not in behaves same != in query. query using != returns more rows query using not in : select count(a.no) a.code != 'a' , a.code != 'b' , a.code != 'c' , a.name != 'd' , a.name != 'e' returns 1566 rows, whereas select count(a.no) a.code not in ('a','b','c') , a.name not in ('d','e') returns 1200 rows. i suppose not in excludes null values - difference? i have tried replecate problem using this simplified sql fiddle, however, returns same number both versions. what differant data? sql oracle

Opening multiple TXT files in Notepad++ using VB.net -

Opening multiple TXT files in Notepad++ using VB.net - i've written vb.net programme opens number of different .txt files in notepad++, however, having ran it, opens new instance of programme each .txt file. this line utilize ... dim p = process.start("notepad++.exe", myfile1) ... how can tell next file open in new tab, rather new instance ... dim p = process.start("notepad++.exe", newtab, myfile2) ? also, there command can utilize in vb.net close each tab & close instance initiated (as there may notepad++ running) when done processing ? this appears purely timing matter & delaying each phone call notepad++ 1/2 sec working ok ... faster pcs mine may not have problem !!! notepad++ vb.net-2010

scala - How to get String value from the List that QueryString returns? -

scala - How to get String value from the List that QueryString returns? - newbie question on play!/scala: how string stored in result? object app extends application { def route = { case get(path("/feed/geocodeo")) & querystring(qs) => action{ request=> val result = querystring(qs,"latlng").getorelse("40.714224,-73.961452") val response = ws.url("http://maps.googleapis.com/maps/api/geocode/json?latlng="+result.tostring+"&sensor=false").get() val body = response.value.get.body ok(body).as("text/html") } } } if querystring returns list[string], code shouldn't compile. scala> list("hi","bye").getorelse("whatever") <console>:8: error: value getorelse not fellow member of list[java.lang.string] list("hi","bye").getorelse("whatever") ^ does code...

linux - installing lpsolve for MATLAB on Ubuntu 12.04 64bit? -

linux - installing lpsolve for MATLAB on Ubuntu 12.04 64bit? - i trying install toolkit 3 hours.... first, python.. gave up. matlab... http://web.mit.edu/lpsolve/doc/matlab.htm it says installation(and read @ other websites), have no thought of says... why complicated? not windows, in want install, double-clicking 'setup' or 'install' file on .zip file installed need. i confused , distressed.. please help me... i not know bit ubuntu, please explain me files should download(there lot of files not know download...), , how install commands. thank you. linux ubuntu matlab lpsolve

Sqlite Database creation, Best practise Android -

Sqlite Database creation, Best practise Android - i have database few tables. wish know, best way create table in database. tables contain both strings(text) , numbers(int , doubles). should create table datatypes text, int, double etc., or should create table texts , convert them before inserting , reading display. let's table have... sqldb.execsql("create table if not exists "+scriptname+"(dateofpurchase text, buyorsell text," + " purchasedquantity int, purchasedprice double, investmentwithoutbrokerage double," + " brokerage double, servicetax double, stt double, stampduty double, othertaxes double," + " investmentwithbrokerage double)"); instead of creating table different datatypes, if create table "text"s , needful conversions on strings whenever needed. sqldb.execsql("create table if not exists "+scriptname+"(dateofpurchase text, buyorsell...

oracle - Login form within vb.net- to direct to different forms -

oracle - Login form within vb.net- to direct to different forms - in login form vb.net connected oracle database.. there way of inserting if statement direct different users different forms.. eg, accountant accounting home page or driver driver homepage though there id's , passwords in 1 table within database. there position field within database , utilize differentiate different users levels of access. here code working far: dim conn new oledb.oledbconnection conn.connectionstring = _ "provider=msdaora;data source=orabis;user id=112221800;password=112221800;" conn.open() dim parmuser new oledb.oledbparameter parmuser.oledbtype = oledb.oledbtype.char parmuser.value = txtstaffno.text dim parmpass new oledb.oledbparameter parmpass.oledbtype = oledb.oledbtype.char parmpass.value = txtpassword.text dim cmd new oledbcommand cmd.connection = conn cmd = new oledbcommand("select staffid,password staff staffid ='" & txtstaffno.text ...

javascript - Removing %20 on output -

javascript - Removing %20 on output - i utilize code aweber passes user info signup next page, here code aweber <script type="text/javascript"> var formdata = function(){ var query_string = (location.search)?((location.search.indexof('#') != -1) ? location.search.substring(1, location.search.indexof('#')) : location.search.substring(1)) : ''; var elements = []; if(query_string){ var pairs = query_string.split("&"); for(i in pairs) { if (typeof pairs[i] == 'string') { var tmp = pairs[i].split("="); var querykey = unescape(tmp[0]); querykey = (querykey.charat(0) == 'c') ? querykey.replace(/\s/g, "_") : querykey;elements[querykey] = unescape(tmp[1]); } } } return{display: function(key){if(elements[key]){document.write...

java - .equals acting really funny -

java - .equals acting really funny - (int y = 0; y < stuff.length(); y++) { string n = wordtemp[y]; string m = finish [y]; system.out.println(n + m); if (n.equals(m)); { fin = fin + 1; } } if (fin == stuff.length()) { system.out.println("completed! play 1 time again later."); return; } this lastly part of hangman main method. have 2 arrays running. first beingness complete[], contains inputted word chopped character-by-character substring. sec array have "guessed" word array. e.g. if word fish, complete[] contain [f,i,s,h} while wordtemp contain [f,-,-,-] if guessed f. however, when go compare elements of these 2 arrays see if user has completed challenge, jump right out of java. here's how ends going: after taking first guess, whole thing skips out. suspect .equals isn...

matlab - missing value or empty string in enum -

matlab - missing value or empty string in enum - is there way have enum this: classdef(enumeration) bla_type < int32 enumeration bla_one(1) bla_2(2) end end with missing or nan value? thanks. nan values apply floating-point types, not integers. integers every bit pattern has numeric meaning. floating-point patterns reserved nans , infinities. since underlying type enum int32, won't able utilize nan. matlab matlab-class

assembly - Near and Far JMPs -

assembly - Near and Far JMPs - i doing linux assembly , understand has flat memory model. confused near , far jmps. near in same segment while far segment. understand there no segments in linux virtual memory? how know if program's code laid out in multiple segments? it hasn't been segments long time now. right term in protected mode x86 selector. having said that, difference between near jump , far 1 former maintains same code selector cs while latter (usually) changes it. in flat memory model, former case how it's done. you could have operating scheme flat memory model served multiple selectors can't see useful utilize case it, , it's not way linux works, @ to the lowest degree on x86. assembly x86 nasm jmp

Android OS not identifying orientation changes -

Android OS not identifying orientation changes - i have next folders within /res directory back upwards different screen densities , orientation. /layout /layout-land /layout-small /layout-small-land /layout-large /layout-large-land in above xmls, different alignment between components. instance, in portrait: <linearlayout android:id="@+id/linearlayout5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="@+id/linearlayout3" android:layout_marginleft="20dp" android:layout_torightof="@+id/linearlayout3" /> whereas in landscape, <linearlayout android:id="@+id/linearlayout5" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_aligntop="@+id/linearlayout3" android:layout_marginleft=...

php - Paypal invalid merchant configuration error -

php - Paypal invalid merchant configuration error - i using paypal sandbox environment test payment site. using paypal pro (dodirectpayment) method. create business relationship on paypal send box using paypal pro alternative got invalid server configuration error. the error got is: 10501 invalid merchant configuration. i did not find solution until now. just login developer.paypal.com account go applications -> sandbox accounts click business type business relationship want upgrade pro, , click 'profile' there should upgrade pro option, click on , enable paypal pro payment. it alter business relationship type business-pro. can test api credentials , test. it help you. php paypal-sandbox

oracle - Split string using pl/sql using connect level on null value -

oracle - Split string using pl/sql using connect level on null value - i'm using next code in oracle pl/sql (version: oracle database 11g release 11.2.0.1.0) select regexp_substr('a~b~c','[^~]+',1,level) output dual connect level <= length(regexp_replace('a~b~c','[^~]+')) + 1 which gives next results row1: row2: b row3: c that's perfect, should want give null value, ie: select regexp_substr('~b~c','[^~]+',1,level) output dual connect level <= length(regexp_replace('~b~c','[^~]+')) + 1 i expected , wanted following: row1: <null> row2: b row3: c but got output: row1: b row2: c row3: null am doing pl/sql code wrong? how can create work right? you can combine instr und substr achive desiered result: select str, replace(substr(str, case level when 1 0 else instr( str, '~',1, level-1) ...

search - How to repair this issue when i click on result link in modx ajaxSearch? -

search - How to repair this issue when i click on result link in modx ajaxSearch? - i used ajaxsearch on site: http://www.rhemapress.pl/www_poradnia/ , when type something, e.g: czwarta or wspomaganie when clicked on 1 of homecoming links redirect me document on end of link this: &searched=wspomaganie&advsearch=oneword&highlight=ajaxsearch_highlight+ajaxsearch_highlight1 , i've got error after clicked. modx encountered next error while attempting parse requested resource: htmlentities() [function.htmlentities]: charset `iso-8859-2' not supported, assuming iso-8859-1 /home/users/rhemapress/public_html/rhemapress/www_poradnia/manager/includes/document.parser.class.inc.php(790) : eval()'d code where problem? how can correctly? database utf8. i think need replace character set similar how here: http://forums.modx.com/index.php?topic=17161.0 find instances similar this, "etomite_charset": htmlentities($output,ent_q...

events - OpenStreetMap on PhoneGap -

events - OpenStreetMap on PhoneGap - i want utilize openstreetmap on phonegap application. my problem click events not fired on phonegap. the code below works in normal browser: class="lang-html prettyprint-override"> <!doctype html> <html> <head> <title>openlayers demo</title> <style type="text/css"> html, body, #basicmap { width: 100%; height: 100%; margin: 0; } </style> <script src="http://www.openlayers.org/api/openlayers.js"></script> <script> function init() { map = new openlayers.map("basicmap"); var mapnik = new openlayers.layer.osm(); var fromprojection = new openlayers.projection("epsg:4326"); // transform wgs 1984 var toprojection = new openlayers.projection("epsg:900913"); // spherical mercator projection var position = new openlayers.lonl...

Android: How to call Camera -

Android: How to call Camera - this question has reply here: android - capture photo 2 answers right asked create simple application in person can take photo. , photo saved particular folder , folder cannot accessed main gallery. application can access folder , see pictures. my question is, how add together or phone call photographic camera in application? steps in taking photo, capturing photo, saving in folder, , how stop photo saving (like cancel saving). there lots of docs on android photographic camera api. can utilize google find them. here link helpful article on photographic camera api. http://www.vogella.com/articles/androidcamera/article.html android android-camera android-capture

sharepoint 2010 - Restrict user rights in SP2010, so they CAN ADD list items but CANNOT EDIT them once saved? -

sharepoint 2010 - Restrict user rights in SP2010, so they CAN ADD list items but CANNOT EDIT them once saved? - i appreciate if can help me this. wonderful company uses sp2010, , got task solve issue using - though not programmer (basic html still ok). i need simple annual leave list next capabilities: group of users (~100 members) should able create list items in list contains annual leave data. columns are: name, leave start date, leave end date, team leader, etc. once fill in new item form, workflow notifies team leader visit item , set column "approval status" "approved" or "rejected". based on column value, workflow notifies requestor decision. 4. after line manager sets column approved, item should locked, users should able see items in list, should not able edit it. sounds simple, have big issues point 4. sharepoint not differentiate create , edit rights list item. result, requestor can edit dates of approved items. any hints how...

android:parentActivityName doesn't work although android-support-v4.jar is included -

android:parentActivityName doesn't work although android-support-v4.jar is included - i've included android-support-v4.jar library utilize "android:parentactivityname="com.myapp.example.mainactivity". it's included in "android" dependencies" , "referenced libraries", still doesn't work -> error: no resource identifier found attribute 'parentactivityname' in bundle 'android' any suggestions? <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp.example" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="14" android:targetsdkversion="17" /> <uses-permission android:name="android.permission.access_coarse_location" /> <uses-permiss...

How to query by custom post type values in WordPress? -

How to query by custom post type values in WordPress? - i have custom post type using custom post type ui plugin called case studies . i'm using custom fields add together capability field case studies . how can query case studies capability equal id? $query = array('post_type' => 'case-studies','posts_per_page' => 3); is query far you need set key capability, , query value post id. 'meta_query' => array( array( 'key' => 'capability', 'value' => $post->id, 'compare' => 'example' ) ) custom-post-type wordpress

3d - How to handle COLLADA indices? -

3d - How to handle COLLADA indices? - i wrote simple reader collada file format, , seems work ok. now, have blender-exported cube mesh edge-splitted , triangulated, should have 12 triangles (2 per face), 24 vertices (4 per face) , 36 indices (6 per face). mesh has normal info , uv maps. the collada file has 24 vertices, 12 normals, , 36 uvs, assume normals per-triangle , uvs per-index. polylist count triangles 12, correct, , vcount has twelve '3's, that's right too. now, <p> index list has 108 entries, 0, 3, 6 etc. vertex indices, 1, 4, 7 etc. normal indices , 2, 5, 8 etc. uv indices. i have internal struct vertices, consists of position ( vec3 ), normal ( vec3 ) , uv coordinate ( vec2 ). draw meshes, utilize opengl's vertex buffers, , have separate list of indices. the thing is, shouldn't have 24 vertices after loading mesh? 108 entries in <p> translates 36 vertices. what's problem here indices? i may missing simple here, can...

iphone - How to create Multicolor TextEditor in IOS -

iphone - How to create Multicolor TextEditor in IOS - i creating texteditor application in iphone sdk. in app alter color , font when ever user needs while editing text. creating have refer of next library ego textview-it allowed alter different font setcolor property not available richtextkit - setkeyboard, setautocorrent not available but non of them worked me. can 1 suggest thought create multiple color , multiple font texteditor in iphone sdk? for multiple font , multiple color, can go cg or nsattributedstring. nsmutableattributedstring *attributedstring = [nsmutableattributedstring attributedstringwithstring:@"colorfull text"]; [attributedstring setfont:[uifont systemfontofsize:15]]; [attributedstring settextcolor:[uicolor redcolor]]; [attributedstring settextcolor:[uicolor greencolor] range:nsmakerange(3,7)]; iphone ios6 uitextfield

java - Why does the backing bean get created twice first time dialog is launched? -

java - Why does the backing bean get created twice first time dialog is launched? - i using primefaces ui library web ui project. i have manage_watchfolder.xhtml page has button, , button launches dialog: <p:commandbutton value="add" oncomplete="dlgeditwf.show()" update=":editwfform"> <f:param value="#{item.value.id}" name="editid"/> <h:graphicimage value="./edit.png" /> </p:commandlink> inside same file have dlgeditwf included edit_watchfolder.xhtml : <p:dialog id="editdialog" widgetvar="dlgeditwf" dynamic="true"> <ui:include src="edit/edit_watchfolder.xhtml"/> </p:dialog> i using dynamic=="true" prevent edit_watchfolder.xhtml beingness loaded before button clicked. editwfform form in edit_watchfolder.xhtml . problem when launch dialog first time, edit_watchfolder.xhtml backing bean (request...

php - Foreach issue with empty variables -

php - Foreach issue with empty variables - i'd refer original question: populating calendar php foreach code when working on localhost server, script works, when uploaded online, calendar not appear, , chrome gives me next errors: <b>warning</b>: array_values() [<a href='function.array-values'>function.array-values</a>]: argument should array in <b>/home/flyeurov/public_html/lib/skins/flyeuro/events/events_index.tpl</b> on line <b>30</b> <b>warning</b>: array_merge() [<a href='function.array-merge'>function.array-merge</a>]: argument #2 not array in <b>/home/flyeurov/public_html/lib/skins/flyeuro/events/events_index.tpl</b> on line <b>30</b> <b>warning</b>: invalid argument supplied foreach() in <b>/home/flyeurov/public_html/lib/skins/flyeuro/events/events_index.tpl</b> on line <b>30</b><br /> i have discovered ha...

Derive UIC generated Qt UI class from custom interface -

Derive UIC generated Qt UI class from custom interface - i've simple qt question. want automatically generated uic files derived custom interface class in: intention class myuiinterface { public: virtual void setupui(qwidget* w) = 0; virtual void retranslateui(qwidget*w) = 0; }; generated uic file should like: class ui_mywidget { public: void setupui(qwidget* w) { ... } void retranslateui(qwidget* w) { ... } }; namespace ui { class mywidget : public myuiinterface , public ui_mywidget {}; } why? every ui::class implement myuiinterface. in each class derives ui::class (see the multiple inheritance approach) able phone call setupui , retranslateui makes sense if class derives ui::class class base of operations class either. want every widget derived abstrcat base of operations class mywidgetbase . consider following: class mywidgetbase abstract : public qwidget, protected myuiinterface { protected: void ch...

webdav - How to remove duplicate event entires from Caldav client for iCloud calendar -

webdav - How to remove duplicate event entires from Caldav client for iCloud calendar - i working on caldav client icloud calendar . when request list of calendars there few calendars follows not visible in icloud interface. /calendars/notification/, /calendars/tasks/, /calendars/inbox/ along normal calendars like. /calendars/home/, /calendars/work/ the issue events in home calendar duplicated in inbox calendar also. create case invite event, event appear in home calendar , inbox calendar. how can remove these duplicate entries. can ignore such calendars, if yes how list of invisible calendars? thanks when issuing prpopfind request, should inquire dav:resourcetype property. in response server, proper calendars have caldav:calendar subelement in property (see https://tools.ietf.org/html/rfc4791#section-4.2) whereas inbox have caldav:schedule-inbox subelement (see http://tools.ietf.org/html/rfc6638#section-2.2 ) , notification 1 have yet value. the task ca...

c++ - Can this be done with static typing? -

c++ - Can this be done with static typing? - this method attempts select ( std::vector<?> ) based on key ( std::string ), ? either int or float : template<typename l> inline void ensembleclustering::graph::fornodeswithattribute(std::string attrkey, l handle) { // nodemap attrkey auto nodemap; // ? auto findidpair = this->attrkey2idpair.find(attrkey); if (findidpair != this->attrkey2idpair.end()) { std::pair<index, index> idpair = findidpair->second; index typeid = idpair.first; index mapid = idpair.second; // nodemaps in vector, 1 each node attribute type int, float, nodeattribute switch (typeid) { case 0: nodemap = this->nodemapsint[mapid]; break; case 1: nodemap = this->nodemapsfloat[mapid]; break; } // iterate on nodes , phone call handler attribute this->fornodes([&](node u) { ...

new to Perl - CSV - find a string and print all numbers in that column -

new to Perl - CSV - find a string and print all numbers in that column - i've got bunch of info in csv file, first row strings (all text , underscores), subsequent rows filled numbers relating said strings. i'm trying parse through first line , find particular strings, remember column string in, , go through rest of file , info in same column. need 3 strings. i've been using text::csv can't figure out how increment counter until finds string in first line , go next line, info same column, etc. etc. here's i've tried far: while (<csv>) { if ($csv->parse($data)) { @field = $csv->fields; $count = 0; $column (@field) { print ++$count, " => ", $column, "\n"; } } else { $err = $csv->error_input; print "failed parse line: $err"; } } since $data in line 1, prints "1 $data" 25 times (# of lines in csv file). how rememb...