Posts

Showing posts from May, 2011

Wordpress http post 404 -

i have error in wp every time http post 404 i have ready error field names , not that, if fields named random names, or no fields, still 404 error. it happens http post 404, if on same server or not. this happens when permalink set "post name" any fixing error gratefully appreciated cleared cache , restarted router (dynamic ip) , worked, host must have confused me hacker

differentiation - Maxima: evaluate a function f(x) embedding diff() nouns -

i generate taylor series following these instructions : f(x) := ''(ratdisrep(taylor(qexct('x),'x,0,5))); qexct function not defined : want perform computation qexct smooth function. knowing this, how set variable x value (e.g. 1) ? if : f(1); then maxima returns me following error : diff: variable must not number; found: 1 and if : f(d); then considers d variable , substitutes occurrences of variable x variable d . in particular, differentiates using d/dd instead of d/dx. however, substitute variable x number 1 in x^n terms , keep derivatives are… how do ? the variable in diff expression not recognized everywhere in maxim dummy (formal) variable, when try evaluate f(1) , maxima substitutes 1 diff expression , causes error. think that's bug; i'll make bug report it. as work around, can use add-on package pdiff (positional derivatives) included maxima. notation little different dy/dx notation used default in maxima.

Is C++ pointer aliasing a threat if the pointers are exactly the same? -

consider function intended vectorization: void addsqr(float* restrict dst, float* restrict src, int cnt) { (int i=0; i<cnt; i++) dst[i] = src[i] * src[i]; }; this work if src & dst not aliased of course. if src == dst? extreme cases such src == dst+1 not allowed of course. if pointers same, there shouldn't problem, or missing something? edit: restrict intel c++ compiler keyword, msvc has __restrict. my point question don't see way how kind of vectorization go wrong: since every dst value dependent on single src value @ either different (without aliasing) or same address, when dst changed, src value never needed anymore, because fact has been written means output has been calculated. case if compiler used dst temporary buffer, don't think correct. in c, code causes undefined behaviour violating restrict definition because writes 1 object through dst reads same object through src . it doesn't matter whether or not there offset between

javascript - Where does ForerunnerDB save its Database? -

i write html file supposed run in browser locally, create , modify database (forerunner db) , , show results. i wrote below , should find database file ? below enough "once page loaded " sse db or there "save" command ? <!doctype html> <meta charset="utf-8" /> <title>ouch</title> <body> <p id="out">testing..</br> > </body> <script src="c:\users\n17263\node_modules\forerunnerdb\js\dist\fdb-all.min.js" type="text/javascript"></script> <script> var db = new forerunnerdb('db'); var customers= db.collection('customers'); var suppliers= db.collection('suppliers'); var items= db.collection('items'); var s_itmes= db.collection('s_items'); var purchase_invoices= db.collection('purchase_invoices'); var sales_invoices= db.collection('sales_invoices'); var orders= db.collection('orders'); customers.

android - List view updates view which are not touched -

sorry bad title. i adding toggle button @ run-time list view. when click on button state gets changed. problem when scroll down other items selected too. for example, if click on first toggle button 6th toggle button gets checked too. this weird behavior. here xml code acitivty <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <relativelayout android:id="@+id/title_bar" android:layout_width="match_parent" android:layout_height="50dp" android:background="@color/eros_now_title_bar"> <imageview android:id="@+id/back_button_image" android:layout_

what's difference between a callback and observer pattern in java -

i going through following link in stack on flow how perform java callback between classes? in particular question answer 18 refers callbacks , answer 9 refers observer pattern . i unable distinguish difference between both. can please explain these 2 approaches differ? a callback piece of code provide class , gets called @ point. ex: serverconnectionhandler = new serverconnections(new itypedcallback<socket>() { @override public void execute(socket socket) { // socket here } }); the observer's pattern design pattern based on callbacks. can find more details here http://en.wikipedia.org/wiki/observer_pattern .

WPF bind Textbox to a DataSet in another class -

wpf not area, bit of newbie, , having bit of trouble figuring out how achieve in wpf piece of cake in winforms. can't seem find either right thread in forum or right youtube tutorial leads me towards answer. having problems getting simple databinding wpf textbox working correctly. behaviour trying achieve changes made textbox reflected in source class dataset. it's simple display/edit scenario , i'm sure there simple answer. this how have done in winforms.... form code: public partial class form1 : form { private datarecord currentuser; public form1() { initializecomponent(); currentuser = new datarecord(@"data source=c:\users\rr187718\documents\personal\programming\dynamicbackup\dynamicbackup\bin\debug\data\dbdata.sdf"); currentuser.fncbind(ctlcopiestokeep, "value", "tbluser.copiestokeep"); } //test code display value in dataset private void button1_click(object sender, eventargs e)

.htaccess - How to match right single quotation mark character in an Apache RewriteRule -

i'm trying following url: http://olddomain.com/macmillan ’s-st-luke-passion which contains right single quotation mark character ( http://www.fileformat.info/info/unicode/char/2019/index.htm ) to redirect new location. however, cannot apache this. for reference redirect code (in virtualhost) follows: rewriteengine on rewriterule ^macmillan\xe2\x80\x99s-st-luke-passion$ http://newdomain.com/tickets/events/macmillans-st-luke-passion [r=301,l] the file has other redirects exact matching urls, , 1 catch redirect @ bottom of page. 1 intended match remaining urls /events/(old url) . example send olddomain.com/page-title newdomain.com/events/page-title redirect 301 / https://newdomain.com/events/ what's happening @ present apache ignoring specific rule contains \x encoded string right quote character ’ and falls through fallback redirect sends url wrong place. can how match url right quote character ’ in apache rewriterule (or redirectmatch)? thanks!

Lint fails when builing Android Studio project with gradle -

i'm using gradle build android studio project: $ ./gradlew build when process reach 94%, got following error: --------------------------------------------- :lint failed failure: build failed exception. * went wrong: execution failed task ':lint'. > string index out of range: -2 --------------------------------------------- re-run build --stacktrace, got exception stack: ------------------- * went wrong: execution failed task ':lint'. > string index out of range: -2 * try: run --info or --debug option more log output. * exception is: org.gradle.api.tasks.taskexecutionexception: execution failed task ':lint'. @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.executeactions(executeactionstaskexecuter.java:69) @ org.gradle.api.internal.tasks.execution.executeactionstaskexecuter.execute(executeactionstaskexecuter.java:46) @ org.gradle.api.internal.tasks.execution.postexecutionanalysistaskexecuter.execute(poste

android - @OnClick array with optional ids (ButterKnife) -

i have activity inflates view when web request finished. of widgets of view have attached 1 onclick method, have: @onclick({r.id.bt1, r.id.bt2, r.id.inflated_bt1, r.id.inflated_bt2}) public void onclick(view view) { // ... } as r.id.inflated_bt1 , r.id.inflated_bt2 don't exist when app created, throws exception suggesting set @optional annotation. required view 'inflated_bt1' id xxxxxxxx method 'onclick' not found. if view optional add '@optional' annotation. is there way set of views @optional annotation , inject them when view inflated? or, there way it? thank you the correct answer use @nullable annotation. see butterknife home page . usage example: import android.support.annotation.nullable; @nullable @onclick(r.id.maybe_missing) void onmaybemissingclicked() { // todo ... } edit: in year since wrote answer , accepted, butterknife docs changed, , current preferred method accomplishing use @optional annotati

ruby - Alias to sudo gem --proxy <PROXY> or bash function? -

i have script run when behind proxy called proxy.sh auto-sets various proxy settings such as: http_proxy=<proxy> https_proxy=<proxy> once run script love if auto-intercept ruby gem command , add proxy information well: sudo gem install ..... => sudo gem install --http-proxy=<proxy> .... at first wanted write alias understand need make function? correct? how handle this? if run proxy.sh typing: sudo gem install test automatically run sudo gem install --http-proxy=<proxy> test you make alias. in ~/.bash_aliases : alias sudo="sudo " alias gemproxy="gem install --http-proxy=<proxy>" the sudo alias (with space) important if want use alias gemproxy sudo . edit : intercept gem install , can add in .bash_aliases : gem() { if [[ $@ == install* ]]; arg=${@#"install "} command gem install --http-proxy=proxy $arg fi } but this, export proxy if you're not beh

android - Unity UI Button, strange behavior with triggering OnClick() -

using unity 5.0. working on android. i have canvas -> inside panel -> inside button. the button has in button script onclick() gameobject linked. gameobject has script function. when tap button trigger function, working on unity. but when deploy project on android (4.4.2) device, works if tap , leave finger fast. otherwise if tap , wait second, when remove finger onclick() not called anymore. seems triggering sort of "long tap" , ignoring normal tap. missing seetings? have not code @ all, function, rest done via unity inspector. you suffer same problem did. check value "drag threshold" "event system (script)" find in inspector once select eventsystem in hierarchy. default value 5 tiny , briefest of touches not register click drag. increase size. use 20 , buttons work expected on android. reminds me have check on ios again well. good luck

scala - Squeryl - HikariCP - mySql - Distributing Read Traffic to Slaves -

i'm trying follow steps listed @ http://dev.mysql.com/doc/connector-j/en/connector-j-master-slave-replication-connection.html states to enable functionality, use com.mysql.jdbc.replicationdriver class when configuring application server's connection pool from https://github.com/brettwooldridge/hikaricp - says hikaricp attempt resolve driver through drivermanager based solely on jdbcurl so configuration thats needed? db.default.url=jdbc:mysql:replication ... squeryl has has number of db adapters; understanding these unrelated? http://squeryl.org/api/index.html#org.squeryl.adapters.mysqlinnodbadapter sorry key word loading - i'm not sure need focus thanks brent squeryl offers different mysql adapters because innodb supports referential keys, while myisam not. seems your'e doing should handled @ connection pool level, don't think squeryl configuration have affect. i've never configured hikari replicated mysql, if re

vba - Conditional formatting, select only visible cells -

i have written code select specific sheets , on button click email data of selected sheets. in 1 sheet there conditional formatting applied on dropdown list. so requirement when dropdown option 1 chosen, below 2 cells not visible. secondly when dropdown option 2 selected cells visible. with code gets selected. i tried code : overallrange = activesheet.range("c1:d50").specialcells(xlcelltypevisible).select can advice better ways this.... you're headed right way, see sniplet below: sub ert() dim rng range each rng in activesheet.range("c1:d50").specialcells(xlcelltypevisible) rng.select selection .formatconditions.add type:=xlexpression, formula1:="=true" 'replace formula .formatconditions(selection.formatconditions.count).setfirstpriority .formatconditions(1).stopiftrue = false .formatconditions(1).interior.color = 49407 'give touch of orange end next end sub p.s. noone t

mysql - SQL Where Date is greater than X -

i trying run query; select po_purchaseorderdetail.itemcodedesc, po_purchaseorderdetail.quantityordered, po_purchaseorderdetail.quantityreceived, po_purchaseorderdetail.unitcost, po_purchaseorderdetail.jt158_wtsalesorderno, po_purchaseorderdetail.purchaseorderno, po_purchaseorderheader.purchasename, po_purchaseorderheader.purchaseorderdate po_purchaseorderdetail po_purchaseorderdetail, po_purchaseorderheader po_purchaseorderheader (po_purchaseorderdetail.purchaseorderno=po_purchaseorderheader.purchaseorderno) , ***(po_purchaseorderheader.purchaseorderdate > '2013-12-31')*** order po_purchaseorderdetail.jt158_wtsalesorderno, po_purchaseorderdetail.purchaseorderno my problem is, date stored in yyyy-mm-dd format. need show data after date. so, because 2013-12-31 string rather number, operator > doesn't work. ideas? try cast string date in following: p.s. if purchaseorderdate not date datatyp

java - How to detect multiple faces using opencv in order to generate an output of flickering LED lights -

i new @ using processing , opencv, please bear me. have posted question on both stackoverflow , on processing forum reach wider audience , find solution -- apologies if looks if carelessly cross posting, not intentions. i have been working on light installation using arduino , processing. capturing people using face detection webcam , opencv, , translating light installation working off 16x32 led matrix panel. light installation response of amount of spectators viewing lights , being recorded @ same time - idea more people being recorded generate greater display of flickering lights, , when no 1 viewing/being recorded, lights not flicker. i have managed opencv detect faces , output arduino display on lights, can lights flash more intensely when people not being detected, rather when being detected. therefore, lights working in reverse, , flicker more when no-one being detected, , less when there people being detected. i have attached both processing , arduino code reference,

javascript - How to get youtube audio data through given url -

currently i'm working on audio data analyzing project. i want let user key in youtube url and url's youtube audio data website. after getting data want store them in 1-d array further signal processing. can task finished via javascript? thanks in advance. btw, audio data :(for example:wav audio format) [0.5,0.9,0.26,0.44,0.23,0.01,0.11,0.54,......] take here: https://developers.google.com/youtube/terms ii. prohibitions ... separate, isolate, or modify audio or video components of youtube audiovisual content made available through youtube api; promote separately audio or video components of youtube audiovisual content made available through youtube api; so can't separate audio video.

cocoa touch - How do you set a gradient fillcolor for cashapelayer without using a mask? -

Image
how set gradient fillcolor cashapelayer? related question clearer explanation: using cocoa follow path gradient i need gradient that's not mask, instead gradient based on drawing of cashapelayer's path. i can't use gradient mask on top, because i'm making route on minimap in game. if player walks on own tracks, should in different color. i want mapview's polyline: source: http://cdn4.raywenderlich.com/wp-content/uploads/2014/06/23_multicolor_polyline.png i made minimap route by: logging user's different directions, running them through loop bezier paths. i appended bezier paths, , put on cashapelayer. is there way have multicolored in cashapelayer? is there keypath cabasicanimation can put gradient? my code below, , images. [mymapview.layer.sublayers makeobjectsperformselector:@selector(removefromsuperlayer)]; [[mymapview subviews] makeobjectsperformselector:@selector(removefromsuperview)]; int = 0; int x = 17; int y = 272; int m = 16; u

Why don't Scala traits allow constructor parameters? -

i'm new scala, coming java, , reading traits. 1 thing gets mentioned traits don't (can't? won't?) have constructor parameters. curious know if there reason this. coming long ago maths/computer-science background was wondering if inevitable consequence because of language design decision, or if conscious decision avoid inheritance/mix-in problem or another? was hoping might know because feels there might interesting behind fact. the other answers describe language; suspect question may "why designed in way". i believe arises out of awkwardnesses , verboseness arise when extending multiple traits, overrides , types, , various mix-in strategies. the cake pattern results in various traits providing missing bits each other in way totally invisible - design - in mixing class. , mixing can bi-directional, using self-types . construction of class traits can messy business compiler. scala trades simplicity of compiler design , implementation

DomPDF Zend not executing PHP? -

this controller function not generate right pdf problem. this generate static html pdf requirement create pdf on dynamic created html. $archive_msgs = $this->getrequest()->getpost('ids'); $archive_ids = explode(",",$archive_msgs); $ul = '<ul>'; if(!empty($archive_ids)){ foreach($archive_ids $archive){ if(trim($archive)!=''){ $msgdata = $this->getquerydatawithprimary('message', 'msgid', $archive); $dec_data = base64_decode($msgdata[0]['message']['s']); $arr_data_com = explode(",,", $dec_data); $arr_temp = implode("",$arr_data_com); $arr_data_dash = explode("--", $arr_temp); for($j=1; $j<sizeof($arr_data_dash); $j+=3) { $ul .="<li>".$arr_data_dash[$j].":".$arr_data_dash[$j+1].&qu

android - VideoView inside Fragment -

edit: thought had problem implementation of fragment caused videoview not work, turned out implementation correct , had problem layout xml of videoview. ill keep code example of correct implementation of videoview inside fragment using viewpager:) this fragment: import android.content.context; import android.graphics.bitmap; import android.graphics.bitmapfactory; import android.media.mediaplayer; import android.media.thumbnailutils; import android.net.uri; import android.os.bundle; import android.provider.mediastore; import android.support.v4.app.fragment; import android.view.layoutinflater; import android.view.view; import android.view.viewgroup; import android.widget.imageview; import android.widget.mediacontroller; import android.widget.textview; import android.widget.videoview; import uk.co.senab.photoview.photoview; import uk.co.senab.photoview.photoviewattacher; public class screenslidepagefragment extends fragment { private context context = null; //todo make

javascript - Chrome Extension webRequest.onBeforeRequest Cancel Page -

i attempting create chrome extension queries external source reference block or allow through particular page. following part of code. new javascript, , scope seems screws me up. chrome.webrequest.onbeforerequest.addlistener( function(details) { var http = new xmlhttprequest(); var url = "http://xxx.xx.xxxx"; var params = "urlcheck="+encodestring_(details.url); http.open("post", url, true); //send proper header information along request http.setrequestheader("content-type", "application/x-www-form-urlencoded"); http.onreadystatechange = function() { if(http.readystate == 4 && http.status == 200) { guilt = 0; console.log(guilt); }else if(http.readystate == 4 && http.status == 404){ guilt = 1; console.log(guilt); } } http.send(params); i

BCP SQL Server import failure cause? [Unable to open BCP host data-file] -

i have inherited process bunch of tables being prepared locally python , pushed database. fails , don't know why, though first thought access rights. have admin access database (and server?) using sql server authorisation. here example bcp command being churned out python script: bcp "[test].[dbo].[isp_2014_flat]" in "flat_files/isp_2014_201504011504.csv" -u admin -p xxx! -c -t ^ -s "xxx20039999\dzuhe00999,2311" sqlstate = s1000, nativeerror = 0 error = [microsoft][sql server native client 10.0]unable open bcp host data-file what can check might responsible problem? thanks, andrew

java - Increase the height of the toolbar in an E4 application -

Image
i've e4 application toolbar needed custom colored button. i'm using toolcontrol , creating obutton . problem button gets chopped off, there way can increase height of toolbar?

javascript - Need help checking if a value exist using JQuery .inArray() -

i display error message when user types value in input field (emailaddressval) matches value in array (invalidemailaddresses). don't know how go it. help! $(document).ready(function(){ $("input[name='emailaddress']").blur(function(){ // actual email validation function var emailreg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; var haserror = false; var emailaddressval = $("input[name='emailaddress']").val(); var invalidemailaddresses = ['aol.com', 'yahoo.com', 'yahoo.fr', 'juno.com', 'hotmail.com', 'gmail.com']; if($.inarray(invalidemailaddresses,emailaddressval) == -1) { alert('the email provided not business related domain'); } }); }); try following code $(document).ready(function () { $("input[name='emailaddress']&qu

php - City name, County name returning in other languages not in English -

when search using below fq api : https://api.foursquare.com/v2/venues/search?ll=19.346523,-99.191292&query=gimn&oauth_token=z1nasaz5ieusdjajg1vmqo5yx410djxukbkahxn0fyib15bq&v=20150401 in browser got city name "mexico city". but, when used api call in file_get_contents or curl, city name returning "ciudad de méxico" in spanish language. need city name in english, pls provide me steps fix issue. thanks, suhanya.m it's defaulting spanish, it's popular locale. can specify locale=en english: https://developer.foursquare.com/overview/versioning here's new link like; note additional parameter @ end: https://api.foursquare.com/v2/venues/search?ll=19.346523,-99.191292&query=gimn&oauth_token=z1nasaz5ieusdjajg1vmqo5yx410djxukbkahxn0fyib15bq&v=20150401&locale=en

php - Send data to url in form handler -

i have salesforce form, sends form data salesforce_url. implementing form handler. how send data salesforce-url in form handler. in basic form sent via <form action="salesforce-url" method="post" role="form"> now form handler have action set to: <form action="/form-handler.php" method="post" role="form"> in form handler @ form-handler.php how can push data https://www.salesforce.com . ps: using google captcha , auto populating form variables add complexity. below form-handler... <?php $email;$comment;$captcha; if(isset($_post['email'])){ $email=$_post['email']; }if(isset($_post['g-recaptcha-response'])){ $captcha=$_post['g-recaptcha-response']; } if(!$captcha){ echo '<h2>please check the captcha form.</h2>'; exit; } $response=file_get_contents("https://www.example.com/recaptcha/api/si

asp.net mvc - Bootstrap datepicker not popping out in MVC -

i saw lot of post regarding not able solve. in view bootstrap datepicker popping out input tag eg: <input class="span2 datepicker" size="16" type="text" value="12-02-2012"> when run page iam able change date through datepicker. $(document).ready(function () { $('.datepicker').datepicker(); }); but same not working below code <div class="control-group">@html.labelfor(model => model.dob, htmlattributes: new { @class = "control-label " }) <div class="controls"> @html.editorfor(model => model.dob, new { htmlattributes = new {@class = "datepicker" } }) @html.validationmessagefor(model => model.dob, "", new { @class = "field-validation-error text-danger" }) </div> </div> please me. it sorted out. <div class="control-group">@html.labelfor(mode

.htaccess Regex Match File with Extensions or no Extension -

basically want match of patterns below file path after protocol through file name, file doesn't have extension. i got there, once try make match files without extension, matches until rest of line. my test strings http://regexr.com/foo.html?test (//regexr.com/foo.html) http://regexr.com/foo?test (//regexr.com/foo) http://regexr.com/foo.php?test (//regexr.com/foo.htm) http://regexr.com/foo.htm?test (//regexr.com/foo.htm) my current expression \/(.+)\.php doesn't match second file path without extension, , if make last collection optional, selects through parameters. appreciated. edit below .htaccess block i'm attempting modify rewritecond %{request_filename} !-d rewritecond %{the_request} \ /(.+)(\.php|\.html?) rewriterule ^ /%1.aspx [l,r=301] rewriterule ^(.*).aspx$ $1.php [qsa] further edit pointed out, may have been better asked redirect question. (another note, removed html redirect since causes performance hit, files extension *.php f

java - JBPM6: How to resume a process from the last successful node after the server crash? -

i'm trying implement failover strategy when executing jbpm6 processes. setup following: i'm using jbpm6.2.0-final (latest stable release) persistence enabled i'm constructing instance of org.kie.spring.factorybeans.runtimemanagerfactorybean type singleton ksession start/abort processes , complete/abort work items all beans wired spring 3.2 db2 used database engine i use tomcat 7.0.27 in positive scenario working expect. know how resume process in case of server crash. reproduce started process (described bpmn2 file), got @ middle step , killed tomcat process. after see uncompleted process instance in process_instance_info table , uncompleted work item in work_item_info table. there session in session_info table. my question is: show me example of code take remaining process , resume starting last node (if possible). update forgot mention i'm not using jbpm-console, i'm embedding jbpm javaee application. if initialize runtimemanager on

How to get own $UID in ant? -

$ echo $uid # return user id i want use information within ant-buildfile. solution set variable explicitly: ant some-target -downer_uid=$uid this way, in buildfile "${owner_id}" available usage. is there way information within buildfile in "internal" way, without need pass $uid parameter? not cross-platform solution, following work in unix-like environments: <exec executable="id" failonerror="true" outputproperty="uid"> <arg value="--user"/> </exec> <echo>uid: ${uid}</echo>

java - Spring MVC configuration enable -

i'm setting project scratches, i'm on step of configuring spring mvc 4.1.5 using java config. whole app beeing run on tomcat gradle plugin. can explain me why need make following call class defaultservlethandlerconfigurer in order make requests map controllers ? @override public void configuredefaultservlethandling(defaultservlethandlerconfigurer configurer) { configurer.enable(); } without enabling requests beeing rejected , server says there no mapping particular request. i read spring doc find out, description doesn't tell me much. enable forwarding "default" servlet. when method used defaultservlethttprequesthandler try auto-detect "default" servlet name. alternatively, can specify name of default servlet via enable(string). it's explained in spring mvc section documentation here . this allows mapping dispatcherservlet "/" (thus overriding mapping of container’s default servlet), while stil

regex - Perl, regular expression, matching exactly 2 spaces does not work -

working on parser sta/ssta timing reports. following cases of "arrival time" occurrence possible: arrival time 3373.000 - arrival time 638.700 | 100.404 arrival time report the goal match cases 1st , 2nd, ignore 3rd case. i tried 2 matching patterns in perl code: 1) if (m/^-?\s{1,2}arrival\stime/) { ($sta_data{$file}{$path}{arrival_time}) = m/\sarrival\stime\s+(.*)\s+$/ } 2) if (m/^-\sarrival\stime/ || m/^\s{1,2}arrival\stime/) { ($sta_data{$file}{$path}{arrival_time}) = m/\sarrival\stime\s+(.*)\s+$/ } both of them pick 3rd case well. not understand why. defined 1 or 2 space characters \s{1,2} , no more that. 3rd line contains more 2 whitespace character should not match pattern. how possible? the data have published not same used in test. this program checks both of regex patterns against data copied directly edit of original post. neither pattern m

java - Serialization of a class inside the class -

i'm trying make class singleton have serialize method. objective serialize singleton in own function. there way serialize class inside class ? here sample of tried : public void serialize() { singleton commit = this.getinstance(); try { fileoutputstream fileout = new fileoutputstream(new config().getdatafile()); objectoutputstream out = new objectoutputstream(fileout); out.writeobject(commit); out.close(); fileout.close(); } catch (exception e) { system.out.println("unable commit database changes."); e.printstacktrace(system.out); } } and stack trace below : unable commit database changes. java.io.notserializableexception: com.cuistot.data.singleton @ java.io.objectoutputstream.writeobject0(objectoutputstream.java:1184) @ java.io.objectoutputstream.writeobject(objectoutputstream.java:348) @ [...].singleton.serialize(singleton.java:50) [...] does class implement

stored procedures - Pass a date from datepicker to sql server database -

i have datepicker textbox below: <input type="text" id="txtdob" class="datepicker" style="width:154px"/> i not able pass value datepicker database table.everything works fine not going post entire code here.i passing value below: cmd.parameters.addwithvalue("@dob", txtdob.value); but says not find txtdob.any appreciated. try this cmd.parameters.add(new sqlparameter("@dob",data.sqldbtype.datetime)) cmd.parameters("@dob").value = txtdob.value;