Posts

c# - Syntax error during inserting data using mysql -

c# - Syntax error during inserting data using mysql - error: incorrect syntax near 's'. unclosed quotation mark after charater string ');'. the code: private void btnadd_click(object sender, eventargs e) { sqlconnection cn = new sqlconnection(global::cimt.properties.settings.default.database2connectionstring); seek { string sql = "insert students(student_id,first_name,last_name,fathers_name,dob,mobile,address,post_code) values('"+this.txtid.text+"','"+this.txtfname.text+"','"+this.txtlname.text+"','"+this.txtfaname.text+"','"+this.txtdob.text+"','"+this.txtmob.text+"','"+this.txtaddress.text+"','"+this.txtpostcode.text+ "');"; sqlcommand exesql = new sqlcommand(sql, cn); cn.open(); exesql.executenonquery(); messagebox.show("add new record do...

javascript - JSON.parse is not working on iPad safari -

javascript - JSON.parse is not working on iPad safari - i doing 1 ajax phone call , in success function using json.parse function.but problem json.parse function working everywhere except in ipad-safari browser(ipad version~7.0.6).in ipad safari , code after line used json.parse not seems executed .i tried alert message under line json.parse had no luck.can find work around of problem? thanks in advance. here script running: var obj = json.parse($('#divwolistforfe').html()); alert('hello'); //this alert doesnt execute on ipadsafari $('#divwolistforfe').html(''); bindworkordergrid(obj, 1, 10); the value of $('#divwolistforfe').html() below "[{"pk_workorderid":6806,"fk_companyid":null,"fk_createdbyuserid":null,"fk_proposalid":null,"fk_invoiceid":null,"orderno":242,"fk_siteaddressid":null,"fk_customerid":null,"fk_ganttitemid":nul...

ssas - Create a drop down list in excel using data from cube -

ssas - Create a drop down list in excel using data from cube - i working on populating info cube on excel. new excel. can suggest me how create drop downwards list in excel using info cube sourse. i have product list based on category like: category products --------- ---------- finance audit contracting loans marketing target market market segmentation market subsidies all info in above table got cube. can utilize cube functions source in info validation - lists. can allow me know on possible ways of doing above. select both category field , product field in excel, toolbar select info , filter. filter can used dropdown. if looking else, please extend question vague. excel ssas cube

java - structr is it right to use -

java - structr is it right to use - i going develop application in neo4j ,i found structr based on neo4j. what structr? is spring or hibernate or totally different,what kind of problems can solve , stable plenty used in production. (disclaimer: i'm founder of project) structr can used as rapid application development tool content management system json document database graph editing/visualization tool it's end-user facing product ui, not library or mapping layer, although sports java-based ogm (object graph mapper). it stable , used in production. java neo4j structr

c++ - Do...While loop with probably if ... else statment inside with temporarily variables -

c++ - Do...While loop with probably if ... else statment inside with temporarily variables - i asked, after giving me initial_population(7), growth_rate(1.2%), initial_year (2011), , formula link final population inital 1 next : initial_population * exp ( (final_year - initial_year) * (rate/ 100.0)) for population entered, have made population grow year after year next forumla : double pc(0.0); // pc = population entered while (pc <= initial_population) { cout << "how many billion (> 7) ? "; cin >> pc; }; int temp(year); { ++temp; cout << "population in " << temp << " : " << initial_population * exp ( (final_year - initial_year) * (rate/ 100.0)) << endl; } while ( pc > initial_population * exp ( (final_year - initial_year) * (rate/ 100.0))); i create population growth...

jQuery Autoselect not working -

jQuery Autoselect not working - i've been trying fire event of autoselect using jquery.. works in way shouldn't work. don't understand what's going on. supposed work per documentation. code works $('.carcomplete').autocomplete( "/autocomplete.html?ajax=true&type=car" ); code doesn't work $('.carcomplete').autocomplete({ source:"/autocomplete.html?ajax=true&type=car" }); is there wrong in code? your url must point json or jsonp, not html. jquery jquery-autocomplete

How to convert pdfstamper to byte array -

How to convert pdfstamper to byte array - in application, need read existing pdf , add together barcode existing pdf , pass output stream. here existing pdf template. using itext jar adding barcode. i want know possibilities of converting pdfstamper object byte array or pdfcontentbyte byte array. can help on this? your question unclear. assume want write bytearrayoutputstream instead of fileoutputstream . there different examples on how on itext web site. see instance formservlet illustration says: // create outputstream new pdf bytearrayoutputstream baos = new bytearrayoutputstream(); // create pdf pdfstamper stamper = new pdfstamper(reader, baos); then later in example, this: // write pdf bytes outputstream outputstream os = response.getoutputstream(); baos.writeto(os); if want byte[] , can this: byte[] pdfbytes = baos.tobytearray(); i hope question wasn't writing pdfcontentbyte stream byte[] because wouldn't create sense: content str...