Posts

Showing posts from May, 2014

where to place the external java jar when deploy birt report? -

i use java code retrieve data database, , export java code runnable jar, placed jar in eclipse\plugins\org.eclipse.birt.report.viewer_3.7.1.v20110905\birt\scriptlib, in birt report can use jar data. in eclipse goes smoothly, can see correct data in preview. but when upload myreport.rptdesign server, don't know place jar report can refer it. in our team, use grails deploy birt report, need upload rptdesign file specified server directory, when there's no java jar refer, that's enough. when need refer java jar, not know how deploy. please , lot. ========================================================= here answer of question. put jar in directory lib of grails. works! did try put jar file in server/lib directory? kind of application server using?

haskell - parse error in pattern -

count [] = 0 count (b:xs) = c + count xs c = case b of (b==a) -> 1 (b/=a) -> 0 ghci gives error "parse error in pattern: b == a" i know why parse error occurs. thank you. a == b not pattern, it's expression. other answer says, work: case == b of true -> 1 false -> 0 but can written more as if == b 1 else 0 perhaps you're thinking pattern guards? case of junk | == b -> 1 | /= b -> 0 in general, haskell offers many different ways conditional branching, can confusing work out 1 need. patterns when want decide based on constructor present, or want extract 1 of constructor's fields variable something. comparing values, want if-expression instead.

json - Amber and localstorage, asJSON? -

i want store amber ( on-line ide ) orderedcollection in localstorage of web browser , later retrieve it. creating test data object | coll hcoll | coll := orderedcollection new. coll add: 'abc'. coll add: 'xon'. hcoll := hashedcollection new. hcoll at: 'en' put: 'english'. hcoll at: 'fr' put: 'french'. hcoll at: 'ge' put: 'german'. coll add: hcoll. storing test data object in localstorage localstorage key-value store in browser. values have strings. localstorage setitem: 'coll' value: coll asjsonstring. "we set coll nil indicate going retrieve localstorage" coll := nil. getting stored value a printit of following localstorage getitem: 'coll' gives '["abc","xon",{"en":"english","fr":"french","ge":"german"}]' this json string. how orderedcollection coll ? use json parser ...

c# - Get Row data from DataGridView of form1 to form2 TextBox without opening form 2 again -

i have 2 forms, form1 (containing textbox ) , form2 (containing datagridview , button). want pass 1 of selected row data form2 form1 . problem don't want open form1 again. when click on button update textbox only. in form2 declare string value , pass datagridview's value datagridview's cellenter event: private void datagridview2_cellenter(object sender, datagridviewcelleventargs e) { stext = datagridview2.rows[e.rowindex].cells[e.columnindex].value.tostring(); } in form1 create public method retreive , display data: public void getanddisplay(string stext) { textbox1.text = stext; } need add property in form2 define form1 form2's parent: public form1 fparent {get; set;} and when calling form1 have way: form2 f2 = new form2(); f2.fparent = this; f2.show(); and in end, call getanddisplay method form2's button: fparent.getanddisplay(stext);

jQuery FullCalendar accents in dayView -

Image
i think bug. setup names (in italian) of days: daynames:['domenica','luned&igrave;', 'martedì', 'mercoledì', 'giovedì', 'venerdì', 'sabato'] the name shown correctly in header of dayview not in subheader. does know why? same problem. solved changing function "htmlescape" in file fullcalendar.js add: .replace(/ì/g, '&igrave;') the function work correctly me (i need italian language in application), must add character correctly encod in day names function htmlescape(s) { return (s + '').replace(/&/g, '&amp;') .replace(/</g, '&lt;') .replace(/>/g, '&gt;') .replace(/'/g, '&#039;') .replace(/"/g, '&quot;') .replace(/ì/g, '&igrave;') .replace(/\n/g, '<br />'); }

installer - How to simulate a "clean PC" for application D3DX redist installation testing? -

it's common problem developer pcs have d3dx redists , vc++ redists installed, end-user pcs may not. if have "clean pc" installation testing, moment install it's no longer clean. specifically d3dx redists, there way remove redists app won't work unless it's installer installs required redist versions? virtual machines. many vms have feature create save point of virtual harddisk can rollback changes disk since save point made.

mercurial - IS there a way to disallow pull while there are uncommited changes in a subrepository? -

i've had clean main repository uncommitted changes subrepository when executed hg pull --rebase . i'm pretty sure time ago safe - there uncommitted changes, after 1 of mercurial updates stopped checking subrepos when pulling main repo. there way configure check subrepos clean before attempting pull main repo? i think you'd have script precommit hook. use non-standard onsub extension pretty quickly.

jquery - When I click on every another option it should slideUp -

i'm using code slidedown additional form in contact form when choose last option list menu. whole form has id="other" . how should edit code add statement, when click on every <option> additional form should slideup (disappear). <script> $(document).ready(function(){ $("#other option:last-child").click(function(){ $("#wpcf7-f852-p27-o1 p:nth-child(3)").slidedown(); }); }); </script> <div class="wpcf7" id="wpcf7-f852-p27-o1"><form action="/tailor-made-trips/#wpcf7-f852-p27-o1" method="post" class="wpcf7-form" novalidate="novalidate"> <div style="display: none;"> <input type="hidden" name="_wpcf7" value="852" /> <input type="hidden" name="_wpcf7_version" value="3.7.2" /> <input type="hidden" name="_wpcf7_locale" value="en_us" ...

c# - Show Form from hidden console application -

i have main application runs console application. console application started hidden ( processwindowstyle.hidden ), testing purposes can run window shown. within console application can have plugins loaded , executed. 1 of plugins tries open winform dialog. works fine if console application visible, doesn't work more if console hidden. i have tried: application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); application.run(new form()); and tried same in new thread. thread t = new system.threading.thread(start); t.start(); t.join(); where start() contains things before. in addition tried showdialog() application.enablevisualstyles(); application.setcompatibletextrenderingdefault(false); var f = new form(); f.showdialog(); none of methods showed window. in windbg, native callstack includes ntuserwaitmessage() : 0:000> k childebp retaddr 0038dd58 7b0d8e08 user32!ntuserwaitmessage+0x15 and managed callstack includes waitmessa...

android - How to distinguish always null object from null at first objects? -

on android app, need read information telephonymanager right after boot completed. on first try returns null, keep calling method until returns value (usually takes 3-4 tries). there rare devices return null don’t have value i’m looking for, app stuck on loop , crashes eventually. how can avoid that? thought counting times tries getting value , limit number, if still getting null disable app, seems bit unstable. my code like: private void main () { //...code... while (getdeviceversion()==null) { log.d("error","cannot read data yet"); } //continue code cause data received } private string getdeviceversion () { telephonymanager telephony = (telephonymanager)getsystemservice(context.telephony_service); string version = telephony.getdevicesoftwareversion(); return version; } any other ideas? appreciate kind of help… thanks! first, i'd should wait bit between 2 call getdevicesoftware...

MySQL: join with special character in column name -

i have column name special character " truck_# ". 2 tables " shipment " , other " truck ". both have " truck_# " column in common. want perform join on column " truck_# " i have written query select * shipment right join truck on shipment.truck_#=truck.truck_# it gives me error saying unknown column name 'shipment.truck_' near on i think not taking special character. can tell me how correct it. thanx in advance. select * shipment right join truck on `shipment`.`truck_#`=`truck`.`truck_#`

how to sync data between android app and php server? -

i trying sync data between android application , php server. in application use json webservices data php server. now whenever there new fields added php server database app should reflect immediately. its kind of background services everytime new data php server database. how can ? if need immediately, should consider using gcm . this sentence on gcm's front page: send data server users' android-powered devices. lightweight message telling app there new data fetched server what need make backend notify gcm new data (via gcm's web service). then, it's gcm's responsibility deliver message app. it'll launch app when it's not running. as specific solution, have 2 possibilities: either backend "ping" app via gcm, , app fetch data itself, or, if update small, backend send app directly in gcm message.

php - Displaying data from database in a Dropdown Menu -

i have got php code connect database , retreieve data , display it. trying take data , display in dropdown menu, when dropdown menu displays correct number of options correlates data in database(ie. gives 3 options if there 3 values in db). doesn't display text options blank. ideas why not displaying text? <?php $dbhost= 'host ip'; $dbuser ='my username'; $dbpass = 'password'; $conn = mysql_connect($dbhost, $dbuser, $dbpass); $sql='select event_id events'; mysql_select_db('db_name'); $retval= mysql_query($sql, $conn); echo'<select name=dropdown value=', '>dropdown</option>'; while($r= mysql_fetch_array($retval)) { echo "<option value={$r["event_id"]}>{$r["events"]}</option>"; } echo "</select>"; ?> http://i.imgur.com/30uq0ok.png the link menu returns thanks you did not select events database. need select all(*) or required columns...

amazon web services - What is the root URL of an ec2 server? -

i need give root url ec2 server, can please give me syntax of root url of general ec2 server? (just know syntax give specific web server details in). tried one: http://ec2-**-**-**-**.eu-west-1.compute.amazonaws.com/ but doesn't work, flash builder says invalid, works in browser can't see how can be. to answer question, assuming mean general syntax ec2 server dns name? it's ec2-<external-ip-with-dashes-instead-of-dots>.<region>.compute.amazonaws.com so yes: ec2-**-**-**-**.eu-west-1.compute.amazonaws.com is correct eu-west-1 region. now looks have problem, either not allowing port 80 on security group associated instance or not running on port 80. i.e. apache, nginx, etc.

c# - Adding default value to dropdown in jquery ajax call -

i have cascading dropdowns. on selection of 1 dropdown, dropdown binds using ajax. works want second dropdown should contain default text , value ('select me'). how can add default value. code. function bindcities(drpstate) { var stateid = $(drpstate).val(); $.ajax({ url: '/register.aspx/bindcities', type: "post", async: false, contenttype: "application/json; charset=utf-8", datatype: "json", data: '{"id":"' + stateid + '"}', success: function (result) { var drpcity = $('.drpcity'); drpcity.empty(); $.each(result.d, function () { drpcity.append( $('<option/>', { value: this.id, text: this.name }) ...

org.openqa.selenium.remote.UnreachableBrowserException on Selenium and Safari -

i trying execute few test scenarios on safari-mac using selenium-2.4.0 , cucumber. i have created extension of safari browser , used following code: @given("^time (\\d+).$") public void time_(int time) throws throwable { system.setproperty("webdriver.safari.driver",path_to_extension/safariextension/safaridriver.safariextz"); webdriver driver = new safaridriver(); driver.get("www.google.com"); } a safari window opened following message: [ 0.020s] [safaridriver.client] requesting connection @ ws://localhost:7039... [ 2.546s] [safaridriver.client] unable establish connection safaridriver and following error stack: org.openqa.selenium.remote.unreachablebrowserexception: failed connect safaridriver after 45062 ms build info: version: '2.40.0', revision: '4c5c0568b004f67810ee41c459549aa4b09c651e', time: '2014-02-19 11:13:01' system info: host: 'host-name', ip: 'xxx.xx.xx.xx', os.name: ...

omnicomplete - vim php omnicompletion not showing classes -

i tried setting omnicompletion in vim yii project. this, go yii/framework folder , create ctags file ctags-exuberant -f yii.tags --languages=php -r in .vimrc, added yii.tags file :set tags=~/public_html/yii/framework/yii.tags on opening tags file shows classes. however, when open file , hit c-x, c-o , dropdown list contains functions , variables. couldn't find similar problem on search. missing? according :help ft-php-omni , default omnicomplete script php (the 1 part of standard vim distribution) completes class names after new keyword. work? if want method completion restricted correct class, may have add hints in comments. docs include example /* @var $myvar myclass */ $myvar->

unix find command ending with '+' character -

while perusing aws docs noticed following command: find /var/www -type d -exec sudo chmod 2775 {} + i'm familiar \; ending exec in find string have never seen '+'. can shed light on this? here's original page: http://docs.aws.amazon.com/awsec2/latest/userguide/install-lamp.html thanks! if use plus ( + ) instead of escaped semicolon, arguments grouped before being passed command. example: $ find . -type f -exec echo {} + . ./bar.txt ./foo.txt in case, 1 child process ( echo . ./bar.txt ./foo.txt )is created more efficient, because avoids fork/exec each single argument. using escaped semi-colon, child process created each argument. $ find . -type f -exec echo {} \; . ./bar.txt ./foo.txt

jenkins: pass multiple "Extended Choice Parameter" values using a URL -

one of parameters in jenkins build extended choice parameter submitted selection of comma separated values when invoking build build webpage. however, need invoke build using wget + url . so, in format: wget "${jenkins_url}/job/buildname/buildwithparameters?ecp_list=blah1&token=token" say extended choice parameter ecp_list has possible values: blah1, blah2, blah3, blah4. if invoke, example: wget "${jenkins_url}/job/buildname/buildwithparameters?ecp_list=blah3&token=token" the build starts fine value blah3 epc_list parameter. however, if wish invoke 2 or more values, passes blank value parameter. i've tried separating values using various things, spaces, encoded comma, semi-colon. haven't had luck finding answer here or on google either. hopefully can me out. thanks! including url in single quotes work: wget '${jenkins_url}/job/buildname/buildwithparameters?ecp_list=blah3&token=token' similarly if ...

Django Unhandled Exception Troubleshoot -

django has been set on site5 , running smoothly, till tried install django-lockdown , broke. i'm unable last working state, unfortunately. here's error log: mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packages/django/db/models/base.py", line 96, in __new__ mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packages/django/contrib/contenttypes/models.py", line 129, in <module> mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packages/django/contrib/auth/models.py", line 20, in <module> mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packages/django/contrib/auth/backends.py", line 3, in <module> mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packages/django/contrib/auth/middleware.py", line 3, in <module> mod_fcgid: stderr: file "/home/projectname/.local/lib/python2.6/site-packa...

html5 - EventSource and Internet Explorer -

i have following server side play code in order provide endpoint html5 eventsources. package controllers import scala.util.matching import play.api.mvc._ import play.api.libs.json.jsvalue import play.api.libs.iteratee.{concurrent, enumeratee} import play.api.libs.eventsource import play.api.libs.concurrent.execution.implicits._ object application extends controller { /** central hub distributing chat messages */ val (eventout, eventchannel) = concurrent.broadcast[jsvalue] /** enumeratee filtering messages based on eventspec */ def filter(eventspec: string) = enumeratee.filter[jsvalue] { json: jsvalue => ("(?i)" + eventspec).r.pattern.matcher((json \ "eventspec").as[string]).matches } /** enumeratee detecting disconnect of sse stream */ def conndeathwatch(addr: string): enumeratee[jsvalue, jsvalue] = enumeratee.oniterateedone{ () => println(addr + " - sse disconnected") } /** controller action serving activity base...

c# - open specific file in appropriate app from inside Windows 8 App -

Image
i'm creating windows 8 app in need list specific files in page , let user open file. i'm using c# backend. i want ask (as in image below), user when try open app listed in app page. when user select specific app, file clicked should open in app. unlike previous versions of windows, user in control of file associations. to show launch using window above, can refer complete example of launching options here . the core of deciding on point on screen (which openwithposition in example below) , calling launchuriasync options set display window. var options = new windows.system.launcheroptions(); options.displayapplicationpicker = true; options.ui.invocationpoint = openwithposition; options.ui.preferredplacement = windows.ui.popups.placement.below; // launch uri. bool success = await windows.system.launcher.launchuriasync(uri, options); the linked example code contains function can compute reasonable point given xaml element.

c# - using System.Windows; is not a name space -

i guess pretty basic mistake @ should ashamed off, dont see it. checked braces , correct. im thankfull help. using system; using system.io; using system.xml; using system.windows; using system.windows.markup; using system.windows.controls; namespace ampelthingy { public class load { void loading() { streamreader sr = new streamreader(@"aa.xaml"); string text = sr.readtoend(); sr.close(); stringreader stringreader = new stringreader(text); xmlreader xmlreader = xmlreader.create(stringreader); wrappanel wp = (wrappanel)system.windows.markup.xamlreader.load(xmlreader); ((mainwindow)system.windows.application.current.mainwindow).sp2.children.clear(); // clear existing children foreach (frameworkelement child in wp.children) // , each child in wrappanel loaded (wp) { ((mainwindow)system.windows.application.current.mainwindow).sp2.children.add(cloneframeworkelement(child)); // clone child , add our existing ...

javascript - Facebook comment scroll -

im building first website , driving me crazy. no matter scroll bar not showing up. i have tried use tips post: custom scrollbar facebook comments it's still not working. doing wrong? here's website test page. http://www.thespiderkingdom.com/atest.html please or i'm loosing hairs. hi visited website if mean comment filed not getting scroll in comment portion. then can tweaks in css class as(fbfeedbackcontent class in csss find it) : .fbfeedbackcontent { max-height: 300px; min-height: 160px; overflow: scroll; } this scrolling add css good

javascript - How to use today & tomorrow button with bootstrap-datetime picker? -

Image
i've made bootstrap-datetimepicker. need today & tomorrow button & layout should below. how can that? html code: <div class='col-md-6'> <label class=" text-info">depart</label> <div class="form-group"> <div class='input-group date' id='datetimepicker1' data-date-format="dd-mm-yyyy"> <input type='text' class="form-control" placeholder="dd-mm-yyyy" /> <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span> </span> </div> </div> </div> <div class='col-md-6'> <label class=" text-info">return</label> <div class="form-group"> <div class='input-group date' id='datetimepicker2' data-date-format="dd-mm-yyyy"...

java - jaxb2-maven-plugin only executing first execution -

i'm trying convert multiple xsds pojos in different packages using jaxb using jaxb-maven plugin. i've set use multiple execution blocks, first execution block executes, message saying: no changes detected in schema or binding files this extract pom.xml: ... <build> <pluginmanagement> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>jaxb2-maven-plugin</artifactid> <version>1.5</version> </plugin> </pluginmanagement> <plugins> <!-- jaxb generator plugin --> <plugin> <groupid>org.codehaus.mojo</groupid> <artifactid>jaxb2-maven-plugin</artifactid> <version>1.5</version> <executions> <execution> <id>application0</id> <phase>generate-sources</phase> ...

c# - SQL SERVER Named Pipes Provider, error: 40 only on EXE file -

so on server have sql server 2008 r2 have got 3 sites all of them works , can connect db using same connection string : <add name="myconnectionstring" connectionstring= "data source=(local); initial catalog=my_db; persist security info=true; user id=my_user; password=mypass" providername="system.data.sqlclient"/> problem is: i have windows form applications use same connection string as sites iam getting a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server) any ideas ?

android - Best Practice for releasing 2 versions of app -

i'd release 2 versions of app, pro version have pay , free version. difference (so far), free version has ads , pro version doesn't, few lines of code difference. still want able give away pro version free (for example beta-testers). best practice that? have following questions: should give them .apk of pro version? don't idea of giving .apk away. btw: can somehow .apk of installed paid app? assume can't because wouldn't these shared then? an idea give both versions identical code including boolean pro. in free version false, in paid version true. additionally in free version can set true after entering secret code. has disadvantage if secret code gets leaked somehow, gets pro version easily. how if make code depend on device specific constants? do need change package name if release 2 versions? thank in advance answers! you can publish 2 different apks, pro , free, lot of developers in google play, example, follow way. don't need boolean go...

How to clear shell values of python? -

assume in python shell. have entered a=10. >>> a=10 >>> 10 but nothing c , mean >>> c traceback (most recent call last): file "<stdin>", line 1, in <module> nameerror: name 'c' not defined >>> how can clear value of , should have stored nothing. mean after clearing if press output should similar c. note: dont want leave python. delete name del statement : del after accessing a throw nameerror well: >>> = 10 >>> 10 >>> del >>> traceback (most recent call last): file "<stdin>", line 1, in <module> nameerror: name 'a' not defined

javascript - Uncaught TypeError: Object #<HTMLInputElement> has no method 'processCard' -

i'm trying configure coffeescript class manage stripe payments. i'm basing solution on this tutorial . here's code: class subscription count = 0 page = createform: "form#new_subscription" createbutton: 'input#create_subscription[type=submit]' cardnumber: '#card_number' cardcode: '#card_code' cardmonth: '#card_month' cardyear: '#card_year' stripeerror: '#stripe_error' setupform: -> console.log "binding submit" $(page.createbutton).click (e) -> $(page.createbutton).attr('disabled', true) @processcard() return false processcard: -> console.log "processing card" card = number: $(page.cardnumber).val() cvc: $(page.cardcode).val() expmonth: $(page.cardmonth).val() expyear: $(page.cardyear).val() stripe.card.createtoken(card, subscription.handlestriperesponse); handlestrip...

javascript - how to Change The Position of a sprite? -

<?php $left=307; $top=282; ?> <html> <head> </head> <body> <script> function move() { var x=20; var left=<?php echo $left ?>; var left=left + x; document.getelementbyid("demo").style.left= left + "px"; var x=x+5; } </script> <img src="images/map2.png" style="position:absolute"> <img id="demo" src="images/avatars/0down.png" style="position:absolute; left:<?php echo $left ?>; top:<?php echo $top ?>"> <img src="images/arrow_right.png" style="position:absolute" onclick="move()"> </body> </html> this entire code(incomplete know)! trying move sprite 1 place another! new in coding! , bit impatient .. can judge coding gu...

git - can I submit a request for a bug-fix with a 'pull-and-patch' on Github? -

i encountered bug in project repo hosted on github, logged issue, in response project maintainer asked me "make pull request patch" , closed issue. does mean fix issue (the 'patch') or can patch more 'direct' way indicate problem, is, direct reference problematic code, without fix proposed? providing patch means fixing issue yourself, submitting diff between modified copy , original one. in git environment, patch can produced via subcommand , mailed. however, github offers simpler mechanism submitting patches: pull request. my opinion author asked fix code because he/she has no time or not find exact issue. anyway, providing detailed list of changed (and why) should fine too, don't expect developer fix issue quickly. also consider describing relevant changes applied might take longer patching code.

c# - WP8 - Code to find connected Accounts -

how can programmatically find out accounts phone user has connected windows phone? for example, have connected gmail, facebook, twitter , linkedin accounts phone , contacts in people hub. there anyway can use c# me list of these connected accounts? thanks in advance. there no way in current sdk.

database - IBM Worklight Adapters read-only and transactional access modes means? -

i going through worklight documentation , came across topic benefits of ibm worklight adapters ; adapters provide various benefits, 1 of them per documentation is: read-only , transactional capabilities: ibm worklight adapters support read-only , transactional access modes back-end systems. what meaning of read-only , transactional modes? , there specific configuration enable configuration? there nothing "enable" per-se. nature of using sql adapters . this nothing unique worklight. see this definition "database transaction" read-only means imo: database can opened (=used for) read access.

how to call stored procedure from SSIS? -

i want create ssis package call stored procedure , dump output of procedure table. ssis package return output , need resultset ouput dump table. before inserting want update rows tables if rows exist date or insert resultset. i do't quite understand requirements way: drop on execute sql task ensure yourstagingtable exists , columns match stored procedure output here sample code put in execute sql task want: -- clear staging table truncate yourstagingtable -- save results of stored proc staging table insert yourstagingtable exec yourproc -- update existing records update yourfinaltable set yourupdatefield = yourstagingtable.yoursourcefield yourstagingtable yourfinaltable.joinfield1 = yourstagingtable.joinfield1 -- insert non existing records insert yourfinaltable (column1,column2) select column1,column2 yourstagingtable not exists ( select 1 yourfinaltable yourfinaltable.joinfield1 = yourstagingtable.joinfield1 )

cross domain - Load remote URL in a div jquery -

does know how can load http://www.google.com in div without iframe or without creating body using jquery ? $("#div_id").load('http://www.google.com'); this not work goes cross-domain , , due browser security , not allow content placed @ our div. thanks in advance

c++ - What is the fastest way to insert data into postgres using pqxx -

i'm using pqxx api access postgres c++ code. i'm trying insert large amount of data , finding performance isn't enough. i've tried several things , nothing giving performance need. i've been trying use pqxx::pipeline asyn inserts, seams this, can either wait until end of inserts commit transaction in case run risk of losing large amount of data if process crashes before commit. or can commit (like every 5 minutes) in case have blocking call every 5 minutes takes quite large amount of time. is there way without having transaction, or have asynchronous commits transaction?

jquery - How to validate various fields for email only -

i have following code: $(document).ready(function(){ $("#enviarform").attr('disabled', true); $(":input").bind("keyup change", function(e) { var comboval = $('.emailrequerido').val()+$('.emailrequerido2').val()+$('.emailrequerido3').val()+$('.emailrequerido4').val()+$('.emailrequerido5').val()+$('.contactorequerido').val()+$('.gruporequerido').val(); if(comboval == 'nullnull'){ $("#enviarform").attr('disabled', true); } else { $("#enviarform").removeattr('disabled'); } }); }); i need validate inserted in each emailrequerido1,2,3.. fields , make sure email format. have function made: function validaremail(valor) { if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(valor)){ return true; } else { return false; } } how can adapt function code validate each field? use .each method this: $(...

java - @Autowired JSF 2 Spring 3 Null -

i not able inject service using @autowired. aplicationcontext.xml <context:component-scan base-package="com.mypackage" /> <context:component-scan base-package="com.mypackage.bean" /> <context:component-scan base-package="com.mypackage.dao" /> <context:component-scan base-package="com.mypackage.service" /> <context:component-scan base-package="com.mypackage.filters" /> <context:annotation-config /> faces-config.xml <application> <el-resolver>org.springframework.web.jsf.el.springbeanfaceselresolver</el-resolver></application> web.xml <listener> <listener-class>org.springframework.web.context.request.requestcontextlistener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.contextloaderlistener</listener-class> </listener> service declaration: ...

java - The application sati(process com.example.sati)has stopped unexpectedly.Please try again -

i making app in there splash class containing image display when app made run , class made adding , subtracting number , displayed after image appered first .... manifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.sati" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="18" />// here shows warning saying"not targeting latest versions of android; compatibility modes apply. consider testing , updating version. consult android.os.build.version_codes javadoc details." <application android:allowbackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity ...

apache camel - spring context error with processing xml -

i have problem processing root-context simple content. want configure camel-client , camel proxy beans get: error occured processing xml 'provider com.sun.xml.internal.bind.v2.contextfactory not instantiated: com.sun.xml.internal.bind.v2.runtime.illegalannotationsexception: 1 counts of illegalannotationexceptions class has 2 properties of same name "outputs" problem related following location: @ public java.util.list org.apache.camel.model.resequencedefinition.getoutputs() @ org.apache.camel.model.resequencedefinition problem related following location: @ private java.util.list org.apache.camel.model.resequencedefinition.outputs @ org.apache.camel.model.resequencedefinition '. see error log more details this root-context.xml : <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance...

java - JMonkeyEngine with JDK 8 -

Image
i want use lambda expressions, need jdk 8. have set project jdk 8, in properties, editor of code gives errors when use lambda. when trying build gives error this: warning: [options] bootstrap class path not set in conjunction -source 1.7 test.java:17: error: lambda expressions not supported in -source 1.7 runnable r = () -> system.out.println(); (use -source 8 or higher enable lambda expressions) how set jmonkeyengine working on jdk 8? thanks. i wasn't able java 8 work within jmonkey ide. able other way round; add jmonkey libraries netbeans 8. install netbeans 8 then follow instructions for adding jmonkey library annother ide . instructions eclipse (as jmonkey ide based on netbeans make no sense this). download recent build of jmonkey unzip , save in user directory open netbeans 8 either open existing jmonkey project or start new project open project properties select add jars browse saved jmonkey build , open lib folder select lib...

c# - Highlighting matching brackets in code -

i've wanted write own portable ide clisp while , have started it, using c#. i have implemented bracket highlighting checking if current character bracket , moving backwards/forwards throughout text, whilst keeping track of following opening/closing brackets until number of opening , closing brackets equal. i have done using simple loops (also "break"-ing loop matching bracket found), method slow on larger blocks of code. method of highlighting text in richtextbox seems bit inefficient, i.e. selecting characters programmatically moving cursor , applying highlight, deselecting , moving cursor's original position. moving away brackets requires highlighting cleared, select text , remove formatting on it. occasionally application can't keep track of cursor supposed if user moves cursor fast (using arrow keys on keyboard) , application might erroneously move previous position. put, highlighting function wrote can't keep if user scrolls through large blocks...

php - How to add custom information (ex. title of event) to form submission -

situation : i'm building website on bootstrap 3.0, , contains section upcoming events. if user wants attend, can clicking on event. modal appears name, e-mail , event title input fields. e-mail goes me know who's coming what. html single event: <div class="col-md-6"> <div class="event-left"> <div class="event-date"> <h1>15 mrt</h1> </div> <div class="event-title"> <p>random event title</p> </div> <a class="cta-button" data-toggle="modal" data-target="#mymodal"><i class="fa fa-chevron-right fa-lg"></i></a> <div class="event-text"> <p>random event description</p> </div> </div> </div> question : how can code this, automatically adds title of event e-mail clicking on event? don't want user...

repeater asp.net issue vb -

i tried implement asp.net repeater show table attribut in database protected function setable(byval name string) datatable conn.open() dim dt new datatable() dt.columns.addrange(new datacolumn(1) {new datacolumn("id", gettype(string)), new datacolumn("attribut", gettype(string))}) dim integer = 0 try mycommand = new sqlcommand("select column_name,* information_schema.columns table_name = '" & name & "' order ordinal_position", conn) rdrvsd = mycommand.executereader() while rdrvsd.read() dt.rows.add(i, rdrvsd.item("column_name")) += 1 loop rdrvsd.close() conn.close() return dt catch ex exception rdrvsd.close() conn.close() return dt end try end function with datable returned tried databinding ...

PHP code not executing when javascript comes between -

here situation... 2 results created in php page.. results echoed json_encode . results showing perfectly. when insert javascript code within 2 php code blocks, 1 result shown while other not.. have no idea why happening.. code $action = isset($_get['action']); if($action == "get_requests"){ include("../connect.php"); $sql_song_req = "select count(*) `song_requests`"; $sql_select_song = "select * `song_requests` order id asc"; $sql_count = $rad->prepare($sql_song_req); $sql_count->execute(); $count = $sql_count->fetchcolumn(); $select_song_prep = $rad->prepare($sql_select_song); $select_song_prep->execute(); while($row = $select_song_prep->fetch(pdo::fetch_assoc)){ $id = $row['id']; $name = $row['name']; $song = $row['songname']; $dedicatedto = $row['dedicatedto']; ?> <script> ...

java - Cursor.moveToNext without moveToFirst -

will next code work expected? cursor c = db.query(tablename, requestedcolumns, condition, conditionparams, null, null, sortorder); while(c.movetonext()) { //do stuff rows } the examples found far suggest calling c.movetofirst() prior looping, necessary? yes, work, movetonext call movetofirst

programatically set Spring profile in Cucumber -

i have begun use cucumber tests spring application. set active spring profile passing jvm argument spring.profiles.active=testprofile. is there way programatically? like: @runwith(cucumber.class) @cucumber.options(...) @activeprofiles("testprofile") public class mycucumbertest using cucumber 1.1.6 i'm not sure proper way it, @ least working me. i'm using cucumber version 1.2.4 i specialized cucumber junit runner set wanted spring profile in constructor: public class springprofilecucumber extends cucumber { public springprofilecucumber(class clazz) throws initializationerror, ioexception { super(clazz); system.setproperty("spring.profiles.active", "testprofile"); } } in test use springprofilecucumber junit runner @runwith(springprofilecucumber.class) @cucumberoptions(features = {"src/test/java/tests/cucumber/test.feature"}, glue = { "tests.cucumber"}...

NUnit tests run on build server, but report incorrect count in test results -

using tfs 2012, have build configured run our nunit tests. of our test projects have nunit test adapter vs2012 , vs2013 nuget package installed. corresponding extension installed, tests run locally in vs2013 using test harness (test explorer window). on our tfs build server, however, our tests run, test results in our build output report incorrect test count. using 1 of our test projects has 228 unit tests, build reports 65 of 65 ran correctly. when viewing results, 65 tests appear first 65 tests ordered qualified class name alphabetically. when view build log, however, see 228 unit tests executed. what make test count incorrect? , ideas how correct this?

jackson - Different JSON output when using custom json serializer in Spring Data Rest -

after adding custom jackson serializer based on official documenation i've observed different json output format. this example based on fork of spring-restbucks . extend org.springsource.restbucks.webconfiguration repositoryrestmvcconfiguration , override configurejacksonobjectmapper : @override protected void configurejacksonobjectmapper(objectmapper objectmapper) { final simpleserializers serializers = new simpleserializers(); serializers.addserializer(order.class, new orderserializer()); objectmapper.registermodule(new simplemodule("customserializermodule"){ @override public void setupmodule(setupcontext context) { context.addserializers(serializers); } }); } create class org.springsource.restbucks.order.orderserializer . sake of brevity write attribute paid json. public class orderserializer extends jsonserializer<order> { @override public void serialize(order value, jsongenerator jgen, seria...