Posts

Showing posts from August, 2015

Installing Silverlight 4 Toolkit without Visual studio 2010 (for build server) -

Installing Silverlight 4 Toolkit without Visual studio 2010 (for build server) - i have been informed silverlight 4 toolkit (latest download) requires prior installation of vs 2010. we setting automated build server big silverlight prism project , prefer not total install of vs 2010 on unmanned build machine. is vs 2010 required install of silverlight 4 toolkit? why required? is possible work around (copy specific pieces dev machine?) thanks in advance information. don't install toolkit @ all. in these big controlled scenarios want re-create toolkit dlls folder owned alter command scheme anyway. ultimately toolkit set of dlls. on install other things create using developer convenient in vs , blend has no special requirements @ build time. silverlight visual-studio-2010 silverlight-4.0 build-automation silverlight-toolkit

ios4 - Performing background task in an app on iphone -

ios4 - Performing background task in an app on iphone - i want app poll server updates , download them when app running in background. how can accomplish this. can tell me start from? any help appreciated. generally, apple wants utilize push, not pull, because conserves battery life. however, if want go polling, there things into. apple documentation describes background tasks in depth here. (note may need registered developer see it. sounds though.) particularly, want utilize these methods: applicationwillresignactive: applicationdidenterbackground: applicationwillenterforeground: beginbackgroundtaskwithexpirationhandler: ios4

android - Showing a fragment over a viewpager -

android - Showing a fragment over a viewpager - i have viewpager 3 sliding fragments . each of fragment has listview contains images. i'm trying show new fragment on viewpager (like activity) when 1 of images in listview clicked , have ability navigate viewpager when button pressed. my code listview onclick within fragment follows(for testing, i'm using onclick on entire listview , not images) listview.setonitemclicklistener(new adapterview.onitemclicklistener(){ @override public void onitemclick(adapterview<?> parent, view view, int position, long id) { log.d(tag,"clicked"); itemdetailfragment fragment = itemdetailfragment.newinstance("ab","cd"); fragmenttransaction transaction = getfragmentmanager().begintransaction(); transaction.replace(r.id.containerr,fragment); transaction.addtobackstack(null); transaction.commit(); } }); ...

java - How should I manage temporary downloads in Android app? -

java - How should I manage temporary downloads in Android app? - i have async task in doinbackgrund setting connection perform get, takes response outputstream , ends writing file sd. such file mp3 reproduced 1 time using mediaplayer , forgotten, not ever used again. this how i'm doing ... @override protected file doinbackground(string... params) { seek { string urlstring = ttsurl + urlencoder.encode(params[0], "utf-8"); url url = new url(urlstring); system.out.println(url.tostring()); urlconnection = (httpurlconnection) url.openconnection(); urlconnection.setrequestmethod("get"); urlconnection.setrequestproperty("user-agent","mozilla/5.0 (x11; linux x86_64) applewebkit/537.36 (khtml, gecko) chrome/41.0.2272.89 safari/537.36"); log.d("query properties",urlconnection.getrequestproperties().tostring()); urlconnection.connect(); if (urlconne...

c - CUnit (undefined reference) -

c - CUnit (undefined reference) - i need write programme using c , cunit test simple stack functions , using "makefile" when seek compile it, same errors. terminal on ubuntu show when write "make" command: gcc -o pilhaa_teste.o pilhaa_teste.c -lcunit /tmp/cclqnqax.o: in function `main': pilhaa_teste.c:(.text+0x21): undefined reference `clean_suite1' pilhaa_teste.c:(.text+0x26): undefined reference `init_suite1' pilhaa_teste.c:(.text+0x50): undefined reference `testatop' the .h wrote is: typedef struct no { struct no *prox; int info; }no; typedef struct pilha { no *topo; }pilha; int init_suite1(void); int clean_suite1(void); void testatop(void); /*create empty stack*/ pilha *cria_pilha(void); /*add 1 element stack*/ void force (pilha *p, int valor); /*free first element of stack*/ void pop (pilha *p); /*print , find first element*/ int top (pilha *p); /*free stack*/ void libera(pilha *p); /*print stack*/ void imp...

javascript - change marked.js image/link expression -

javascript - change marked.js image/link expression - i need alter marked.js image expression. the original look is: /^\!?\[(inside)\]\(href\)(\w*\s*)*/ ---> ![]() i need id of images, need transform look id value ----> {>"id"<}![inside](href) . i tryed alter look this: /^\{\>index\>\}\!?\[(inside)\]\(href\)(\w*\s*)*/ and after thar need write look "index" value of {>index<}![inside](href) examples within & href: inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/; inline._href = /\s*<?([\s\s]*?)>?(?:\s+['"]([\s\s]*?)['"])?\s*/; inline._index = /(?:^\{\>[^\<\}]*\<\}|[^\{\>\<\}]|\<\}(?=[^\{\>]*\<\}))/; // tryed this, not works //replacing inline.link = replace(inline.link) ('inside', inline._inside) ('href', inline._href) ('index', inline._index) (); anyone can help me build expression? if right, want obtain info link has...

ios - How to get a country code from the given phone number -

ios - How to get a country code from the given phone number - i have 2 phone numbers +17896786788 , +322657579849. retrieve code i.e, +1 , +322 passing these phone number. is there api avalable code out of phone number ? libphonenumber given country code given country.link: libphonenumber ios country code country but code out of phone number. regards, bhat ios phone

Run time java jar file with jython exceptions -

Run time java jar file with jython exceptions - i have big application worked perfect within eclipse, create executable jar file application, application utilize jython define resources. create `the next .bat file run file: @ echo off java -xms64m -xmx512m -xincgc -dpython.home=jython-2.1 -dpython.path=jython-2.1/lib/alice -djava.library.path=lib/win32;externallib/win32; -jar myprog23.jar when execute .bat file exception appeared, part of exception: java.lang.exceptionininitializererror @ java.lang.class.forname0(native method) @ java.lang.class.forname(unknown source) @ edu.cmu.cs.stage3.alice.authoringtool.jalice.main(jalice.java:163) caused by: traceback (innermost last): file "c:\mywork\alicedev\alice test\resources\alice style.py", line 23, in ? file "c:\mywork\alicedev\alice test\resources\common\standardresources.py", li ne 181, in ? attributeerror: java bundle 'javax' has no attribute 'vecmath...

java - How to resolve exception in thread “main” javax.naming.NameNotFoundException: not bound? -

java - How to resolve exception in thread “main” javax.naming.NameNotFoundException: not bound? - i'm trying create jms publisher/subscriber chat application in eclipse. import java.util.properties; import javax.jms.jmsexception; import javax.jms.message; import javax.jms.messagelistener; import javax.jms.textmessage; import javax.jms.topic; import javax.jms.topicconnection; import javax.jms.topicconnectionfactory; import javax.jms.topicsession; import javax.naming.context; import javax.naming.initialcontext; import javax.naming.namingexception; public class topicconsumer implements messagelistener { public static void main(string[] args) throws jmsexception, namingexception { system.out.println(".....entering jms illustration topicconsumer...."); context context = topicconsumer.getinitialcontext(); topicconnectionfactory topicconnectionfactory = (topicconnectionfactory)...

android - Opacity/Translucent Canvas - I want to see the activity background "through" the canvas -

android - Opacity/Translucent Canvas - I want to see the activity background "through" the canvas - sorry bad english. in ondraw, want set canvas color "transparent" : want see activity's background behind through canvas. that's exemple of want: http://cdn.makeuseof.com/wp-content/uploads/2014/02/flow-free-levels.png?35dc20 thank help. you can this: @override public void ondraw(canvas canvas) { canvas.savelayeralpha(0, 0, canvas.getwidth(), canvas.getheight(), 0x66, canvas.has_alpha_layer_save_flag); super.ondraw(canvas); } android canvas colors paint opacity

outlook vba - Create a mail object and track it down in sent folder -

outlook vba - Create a mail object and track it down in sent folder - i need create mail service via vba, send it, , export .msg file of sent mail service archived (i know, it's weird, that's boss asked for). creating mail service straightforward: set olk = outlook.session set ml = olk.createitem olmailitem ml .recipients.add "somebody@somedomain.com" .subject = "great mail service have there" .body = "it shame if couldn't archive it" end ml.send problem is, after sending mail service moved in sent folder , ml object points nothing. i utilize .saveas method before sending, saved file unsent version, can edited , sent again. how can trace mail service in sent folder? the "brute force" way found out implies saving conversationindex before sending idx= ml.conversationindex and scan items in sent folder it: for each ml in olk.session.getdefaultfolder(olfoldersentmail).items if ml.conversatio...

c - Where to go from here when manipulating files -

c - Where to go from here when manipulating files - #include <stdio.h> #include <stdlib.h> #include <math.h> struct pupil { int stdntnum[8]; float homework; float lab; float midterm; float finalgrade; float overall; }; int main() { file *fileptr, *file2ptr; char headers[30]; int string[100]; fileptr = fopen("lab5_inputfile.txt", "r"); file2ptr = fopen("lab5_outputfile.txt", "w"); fgets(headers, 30, fileptr); printf("%s", headers); fprintf(file2ptr, "%s\toverall grade\n", headers); fclose(fileptr); fclose(file2ptr); } hey guys,my assignment manipulate illustration of file shown here: id homework lab midterm final 1016807 89.0 93.0 78.0 50.0 1211272 84.0 78.0 23.0 59.0 i've gotten headings read , write on new file, i'm unsure how approach sec part. need alter first...

c - Pointers, structure, passing arguments, recursion -

c - Pointers, structure, passing arguments, recursion - i have code this: typedef struct _statistics { code here } statistics; void function1(char *string, statistics *statistic){ code here function1(string1, statistic); } int main(){ statistics statistic; function1(string, &statistic); } this idiotic question, don't understand pointers completely: understand why utilize & in main function, & send address of variable statistic, in function1 can modify it. why don't utilize & in recursive function1? sometimes helps write way: void function1(char* string, statistics* statistic){ the variable statistic pointer statistics, not statistics itself. if did in function1: function1(string1, &statistic); you passing pointer (because of &) pointer (because of * in declaration) statistics, incorrect. your declaration of statistic in main statistic adds confusion: you're using same variable name differen...

android - Draw a Top Border for TabWidget -

android - Draw a Top Border for TabWidget - how draw top border tabwidget? here styles.xml tabwidget <style name="lighttabwidget" parent="@android:style/widget.tabwidget"> <item name="android:textcolor">#8e8e8e</item> </style> i understand need create .xml file in drawable folder , add together line styles.xml . correct? android

jquery - IE8 Object Doesn't Support Method... ".closest()" -

jquery - IE8 Object Doesn't Support Method... ".closest()" - hate bother must simple, maintain getting ie8 unsupported property or method error next code. works fine in firefox. compname = comps[index].getelementsbytagname("compname")[0].firstchild.nodevalue; compdesc = comps[index].getelementsbytagname("description")[0].firstchild.nodevalue; nextcluster = comps[index].closest("skillcluster").getelementsbytagname("skillname")[0].firstchild.nodevalue; <factor> gets results </factor> <skillcluster> <skillname> works , efficiently </skillname> <competency id="25"> <compname> plans , aligns </compname> <description> planning , prioritizing work meet commitments aligned organizational goals. </description> ...

eclipse - pde.exportFeatures for features in the target? -

eclipse - pde.exportFeatures for features in the target? - i have feature abc in target file, , want re-create local folder. utilize ant build file command pde.exportfeatures . yet next error message: buildfile: c:\...\workspace\.metadata\.plugins\org.eclipse.pde.core\.bundle_pool\features\abc.feature_1.6.1\build.xml not exist is pde.exportfeatures not meant used features in target file? pde.exportfeatures intended used features in workspace not in target platform. eclipse ant eclipse-plugin eclipse-pde

silverlight 4.0 - Extract assembly from all the dll's inside xap -

silverlight 4.0 - Extract assembly from all the dll's inside xap - i have byte array silverlight xap . need extract dll's within xap byte array. 1 time dll's need extract assemblies it.silverlight xap stored in repository , repository homecoming me xap byte array .is there standard api available in c# accomplish functionality ?if not how can accomplish ? regards,abhishek create memorystream byte array , phone call function: public list<assembly> extractassembliesfromxap(stream stream) { list<assembly> assemblies = new list<assembly>(); string appmanifest = new streamreader(application.getresourcestream( new streamresourceinfo(stream, null), new uri("appmanifest.xaml", urikind.relative)).stream).readtoend(); xelement deploy = xdocument.parse(appmanifest).root; list<xelement> parts = (from assemblyparts in deploy.elements().elements()...

set - Looking for an single byte encoding with grave=xC1 acute=xC2 cedilla=xD0 -

set - Looking for an single byte encoding with grave=xC1 acute=xC2 cedilla=xD0 - having problem finding code page or other single byte encoding having accents in these positions: grave in xc1 acute in xc2 cedilla in xd0 i can't think of encoding meets criteria. iso 6937 quite close. surprised see these days though. encoding set character codepages

iis 7 - Install ISAPI extensions programmatically in IIS7 -

iis 7 - Install ISAPI extensions programmatically in IIS7 - i want install isapi extensions in iis7 on windows7 programmatically (control panel -> programs , features->turn windows features on or off->iis->www->application development feature->isapi extensions). basically want accomplish can next dism command dism /online /enable-feature /featurename:iis-isapiextensions i tried utilize microsoft.web.administration, next code using (servermanager servermanager = new servermanager()) { configuration config = servermanager.getapplicationhostconfiguration(); configurationsection gloabalmodulessection = config.getsection("system.webserver/globalmodules"); configurationelementcollection globalmodulescollection = gloabalmodulessection.getcollection(); configurationelement isapiextension = globalmodulescollection.createelement("add"); isapiextension.setattributevalue("name", "isapimodule"); isapiex...

android - java multiple inheritance ActionBarActivity -

android - java multiple inheritance ActionBarActivity - i've got class (it's main activity) extends other class: public class advancepreferences extends custompreferences i utilize v7 actionbar. according site: https://developer.android.com/training/basics/actionbar/setting-up.html need extend actionbaractivity. looks need multiple inheritance here: public class advancepreferences extends custompreferences extends actionbaractivity how can resolve problem? not want lose preferences feature. -------------- more details: not sure if matter, but: advancepreferences extends custompreferences custom class. custompreferences extends preferenceactivity , implements onsharedpreferencechangelistener. need advancepreferences extend not custompreferences actionbaractivity also. -----------------important: utilize minsdkver = 7 java not allow multiple inheritance. by way, create extends first actionbaractivity (maybe utilize class more activities utiliz...

java - White question mark while trying to get user's Facebook profile picture in Android -

java - White question mark while trying to get user's Facebook profile picture in Android - i store app-scoped-ids in database, hoping fetch profile pictures them via graph api. this code: string url = "https://graph.facebook.com/" + mate.getfacebookid() + "/picture?type=large"; defaulthttpclient httpclient = new defaulthttpclient(); httpget httpget = new httpget(url); httpresponse response = null; httpentity entity = null; seek { response = httpclient.execute(httpget); } grab (ioexception e) { e.printstacktrace(); } if (response != null) { entity = response.getentity(); } byte[] info = null; seek { info = entityutils.tobytearray(entity); } grab (ioexception e) { e.printstacktrace(); } bitmap bitmap = null; if (data != null) { bitmap = bitmapfactory.decodebytearray(data, 0, data.length); } homecoming bitmap; ...doe...

android - Changing ImageView Source Does not Change Properly Image of ImageView -

android - Changing ImageView Source Does not Change Properly Image of ImageView - actually changing blank! in app, going images-path database , show them in main activity. process achieves selecting thumbnails of images in dialogfragment , sending record id main activity withing interface communicating between fragment-activity. @ point going utilize asynctask inner class filepath of selected image , show imageview. everythings works except imageview not show , show blank! p.s.: filepath correct, used in onactivityresult on place in app. thank you. main activity code: public class annotatediagramactivity extends activity implements communicator { @override public void respond(string info , int requestcode) { //passing project id cpdialogfragment or pldialogfragment switch(requestcode) { case open_projectid: projectid = integer.valueof(data); loadproject(projectid); toastshort(data); ...

javascript link isn't working on click; function works when page loads -

javascript link isn't working on click; function works when page loads - var randomnumber // generate random numbers based on length of image array randomnumber = math.floor(math.random() * topimages.length); function shuffletop(){ document.getelementbyid("topimage").src = topimages[randomnumber]; }; $("p a#shuffle").click(shuffletop()); this link in source code: <p><a href="#" id="shuffle">shuffle</a></p> you running function , returning beingness assigned cliek. not assigning reference function shuffletop . $("p a#shuffle").click(shuffletop()); needs be $("p a#shuffle").click(shuffletop); and generate number once, move random number generator inside. function shuffletop(){ randomnumber = math.floor(math.random() * topimages.length); document.getelementbyid("topimage").src = topimages[randomnumber]; }; javascript function random shuffle ...

android - While saving an image from url using download manager how to hide the download manager icon? -

android - While saving an image from url using download manager how to hide the download manager icon? - i using save image url accepted reply saving image, there way hide circled icon shown while process starts. there no methods customize , sense of notification downloadmanager , if ever check official api document. if want customize outlook of downloading notification, maybe need implement download mechanism own. android android-download-manager

How to check exact style from two excel file using apache poi? -

How to check exact style from two excel file using apache poi? - i want compare 2 excel file cell style. using apache poi how can compare styles cell cell? , need style not matched, align or bold or color..etc. means unmatched styles should string(style name - align, color....) with cell.getcellstyle() can find out style per cell. can check fine granular cellstyle settings. apache-poi

php - Mysql dynamic rows to columns -

php - Mysql dynamic rows to columns - layout https://www.dropbox.com/s/6fu81cqsl25vksd/layout.png?dl=0 link image example: create statement: create table rating ( id int, tieid int, inspected datetime, rate varchar(50) ); insert statement: insert rating values (1,1, '0000-00-00 00:00:00', 'e'), (2,1, '2015-03-31 01:01:22', 'g'), (3,1, '2015-02-26 01:01:22', 'b'), (4,2, '0000-00-00 00:00:00', 'e'), (5,2, '2015-03-31 01:01:22', 'f'); what im trying ouput info such cant seem figure out how query right this tieid | inspected1 | rate1| inspected2 | rate2| inspected3 | rate3| 1     | 0000-00-00 |e       |2015-02-26 |b      | 2015-03-31 |g      | 2     | 0000-00-00 |e       |2015-03-31 |f       |           ...

How to identify if a view is scrollable view in Android? -

How to identify if a view is scrollable view in Android? - i creating custom view. need parse parents till scrollable view. how can identify view scrollable view ? one simple way : while(view != null){ if(view.getparent() instanceof view) { view = (view) view.getparent(); } else{ view = null; } if(view instanceof listview){ scrollableparentview = view; break; } else if(view instanceof scrollview){ scrollableparentview = view; break; } else if(view instanceof gridview){ scrollableparentview = view; break; } else if(view instanceof horizontalscrollview){ scrollableparentview = view; break; } }` with approach implementation fail if tomorrow new scrollable view android. please suggest approach. one more question : how can hear parent scrollview event in c...

python - Getting error for regression using csv files in scikit -

python - Getting error for regression using csv files in scikit - i read info features.csv file , stored in array. got classlabels of features , stored in textfile. fitting data: y_rbf = svr_rbf.fit(train_input, train_lab) but when utilize test set getting same value records of test data. if utilize test set subset training set o/p exact. unable know whether model built or not. how overcome problem. not classification. regression. python scikit-learn linear-regression

htc - Android - GoogleApiClient ActivityRecognitionIntentService is never called -

htc - Android - GoogleApiClient ActivityRecognitionIntentService is never called - i need observe user dynamics in application. started using googleplayservicesclient till 3 months ago worked perfectly, stopped working on htc 1 device (although still working on 3 different devices i've checked). know replaced googleapiclient, thought problem, keeps not working after changing new api. problem intent given activityrecognition.activityrecognitionapi.requestactivityupdates never called. used same implementation : https://blacode.wordpress.com/2014/12/26/user-activity-recognition-through-new-activityrecognitionapi-in-android-activityrecognitionclient-deprecated/ (and again, implementation works on 3 other devices not on htc one). i did reading online , saw similar issues solved updating google play or activating google play location services or disable mock location on android developers settings. non worked me. has encountered same problem or maybe has thought can cause? ...

ASP.NET MVC 2 Point Return Links to Appropriate View -

ASP.NET MVC 2 Point Return Links to Appropriate View - the default scaffolded views generated asp.net mvc 2 contain links such as: <%: html.actionlink("back list", "index") %> <%: html.actionlink("create new", "create") %> these links perfect if came page same root. example, if have orders , persons , navigate /orders/edit/17 via /persons/orders/3 , 'back list' returns me orders root not persons root, want go, because 'edit orders' view knows orders. makes navigation awkward , breaks flow.. i want reuse same 'edit orders' view regardless of came from, i'm not sure how pass information. i know it's possible pass parameters /orders/edit/17?myparam=myvalue limit choices later on if need pass parameters indicate sort/filter order grids? what preferred way pass return/origin location view can render links properly? otherwise, how can phone call view differently controller? edit: for c...

vb.net - android: transfer sqlite database from pc to device via usb programatically -

vb.net - android: transfer sqlite database from pc to device via usb programatically - the situation this. have application written in vb.net. consists or 2 parts. 1 on pc , other on handheld windows mobile 6 device . desktop programme transfers sqlserver compact database , handheld device using activesync via usb. potentially want having android handheld devices supported application. know can utilize sqlite .net. know can utilize adb force , pull info (and hence database files) , device. what need know can access adb straight vb.net api or sdk rather having manually. unless of course of study i'm missing , can re-create databases , device in other way? thanks in anticipation there's no direct api that. have similar scenario, user syncs content (i.e. database) desktop client (in our case java swing based), utilized adb manually , it's working fine far. in our java client, we'd call: private static final string adb_push = "\"...

java - How to wait for all async REST calls are finished using Unirest? -

java - How to wait for all async REST calls are finished using Unirest? - being new async programming wondering how van wait futures complete? in current utilize case have read file , post content line line using json post rest webservice. when in normal way programme exists before futures finished. below code program. while ((line = br.readline()) != null) { future<httpresponse<string>> future = unirest.post("http://www.dummy.net") .fields(map) .asstringasync(new callback<string>() { public void completed(httpresponse<string> response) { int code = response.getstatus(); } public void failed(unirestexception e) { system.out.println("the request has failed"); } public void cancelled() { system.out.println("the request has been cancelled"); } } ); } this code runs , ...

c# - Can't I set If-Modified-Since on a WebClient? -

c# - Can't I set If-Modified-Since on a WebClient? - i using webclient retrieve website. decided set if-modified-since because if website hasn't changed, don't want again: var c = new webclient(); c.headers[httprequestheader.ifmodifiedsince] = last_refreshed.touniversaltime().tostring("r"); where last_refreshed variable in store time i've lastly seen website. but when run this, webexception text: the 'if-modified-since' header must modified using appropriate property or method. parameter name: name turns out api docs mention this: in addition, other headers restricted when using webclient object. these restricted headers include, not limited following: accept connection content-length expect (when value set "100-continue") if-modified-since range transfer-encoding the httpwebrequest class has properties setting of above headers. if of import application set these headers, httpwebreq...

ruby - continued example - cannot find watir element -

ruby - continued example - cannot find watir element - in cannot click html element watir, trying click element gives me row below: i not able find 3 dropdown lists see in image above. how do ? each time, id of dropdown elements changes. for example, middle 1 html code is: <td> <select id="filtersjob6_intrinsic_enumoperator" name="filtersjob6_intrinsic_enumoperator" onchange="if(top.document.getelementbyid('filtersjob6_intrinsic_enumoperator').value=='isnull'||top.document.getelementbyid('filtersjob6_intrinsic_enumoperator').value=='isnotnull'){top.document.getelementbyid('filtersjob6_intrinsic_operand1container').style.display='none';}else{top.document.getelementbyid('filtersjob6_intrinsic_operand1container').style.display='inline';}"> <option value="equals" selected="selected">equals</option> <option value="notequal">n...

javascript - How to Increasing/Decreasing PHP variable value and reload function via ajax -

javascript - How to Increasing/Decreasing PHP variable value and reload function via ajax - i have function specifies date depending on variable ex. $modification = "+1 week" function calendar($modification){ $month = array("januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"); $date = new datetime(date('y-m-d')); $date->modify($modification); $year = $date->format('o'); $week = $date->format('w'); $fulldate = $date->format('c'); $valenc = 'w'; $monthnum = $date->format('n'); $moddate = date('y-m-d',strtotime($fulldate)); $mmon = date('n', mktime(0, 0, 0, date('m', strtotime("$moddate")), date("d", strtotime("$year$valenc$week")), date...

java - get Nullpointerexception while insert records -

java - get Nullpointerexception while insert records - this question has reply here: what null pointer exception, , how prepare it? 12 answers i trying insert info database using prepare statements nullpointerexception my database connection code public class dbconnect { connection conn=null; public static connection connecrdb(){ try{ class.forname("org.sqlite.jdbc"); connection conn = drivermanager.getconnection("jdbc:sqlite:e:\\netbeansprojects\\abdo`s project\\project.sqlite"); system.out.println("connection success"); conn.setautocommit(false); homecoming conn; } catch(exception e){ joptionpane.showmessagedialog(null, e); homecoming null; } } } and code in main class public cla...

java - can't insert into sqlite database, error: Table doen't exist -

java - can't insert into sqlite database, error: Table doen't exist - i have been trying solve seems simple problem lastly 3 days, trying insert record sqlite database activity, have searched issue without look. below find activity code , dbhelper code. dbhelper code: public long insertresult(string quest_id,string test1,string test2) { sqlitedatabase db = this.getwritabledatabase(); contentvalues initialvalues = new contentvalues(); initialvalues.put("question", quest_id); initialvalues.put("rights", test1); initialvalues.put("wrongs", test2); log.d("result:", "rights " + initialvalues.get("rights")); homecoming db.insertorthrow("results", null, initialvalues); } mainactivity long ins = mydbhelper.insertresult("test","test2","test3"); results table doesn't exist in database. it looks dbhelper extending sqliteopenhelper . ...

javascript - Qhen mousing over a link I want the div that contains the link and other content to increase in height then back down to 19px on mouse out -

javascript - Qhen mousing over a link I want the div that contains the link and other content to increase in height then back down to 19px on mouse out - i'm customizing forum software each page has 20 threads each thread contained within div class="threadpreview" inside of each "threadpreview" divs links total thread, , 500 character preview of thread right beneath link when page loads up, have divs' height set 19px , overflow:hidden preview of thread hidden , can see link divs "rolled up" when user mouses on link thread, threadpreview div should "unroll" it's original height show content, , onmouseout should roll 19px hide content. (i'm not using jquery) edit: if jquery can i'll give shot something should point in right direction: function init() { var ldivs = document.getelementsbytagname("div"); for(var = ldivs.length; i--;) { if(ldivs[i].classname == "threadpreview...

ios - Hiding Tableview section headers on the fly -

ios - Hiding Tableview section headers on the fly - i trying hide , display section headers when there or isn't info populating tableview. code have works intended occasionally, mostly, 1 or both of section headers remain displayed, (however, if drag header off screen when there no info disappear intended). this code using hide/unhide sections. -(uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { //create custom header titles desired header spacing if (section == 0) { uiview *headerview; if (self.searchusers.count || self.searchtracks.count) { headerview = [[uiview alloc]initwithframe:cgrectmake(0, 0, 320, 40)]; } else{ headerview = [[uiview alloc]initwithframe:cgrectmake(0, 0, 0, 0)]; } headertitlelabel *headertitle = [[headertitlelabel alloc] initwithframe:cgrectmake(17, 10, 150, 20) headertext:@"users"]; [headerview addsubv...

java - Cannot interrupt a thread -

java - Cannot interrupt a thread - i implementing chatting program. whenever user clicks "start" in player.java, terminates previous chatter thread , build new thread start. chatter thread has gui chatting. i terminate chatter thread interrupt() method. thought set flag in chatter thread terminated checking isinterrupted() false. supposed true when phone call interrupt() in player.java here code: player.java public class player implements gameconstants{ /** * listener used when user clicks quit in gui. */ private class controllistener implements actionlistener{ /** * method sends quit server when listener triggered. * @param e actionevent */ @override public void actionperformed(actionevent e){ string cmd = ((jbutton)(e.getsource())).gettext(); if ("start".equals(cmd)) { //i interrup...

VB.net & Access query -

VB.net & Access query - im doing vb.net project college , want create new access record using textboxes, masked textboxes , richtextboxes using vb gui. maintain getting exception: "an unhandled exception of type 'system.data.oledb.oledbexception' occurred in system.data.dll additional information: syntax error in insert statement." here code working on other forms private sub btnsavenew_click(sender object, e eventargs) handles btnsavenew.click dim objrow datarow objrow = objdataset.tables("tblengineersreport").newrow objrow.item("to") = txtto.text objrow.item("date_carried_out") = txtcompleteddate.text objrow.item("description_of_work") = txtworkdescription.text objrow.item("comment") = txtcomment.text objrow.item("quantity1") = txtquantity1.text objrow.item("quantity2") = txtquantity2.text objrow.item("quantity3") = txtquantity...

sql - Match Against... SEMI-Literall -

sql - Match Against... SEMI-Literall - i want match-against query in words of string must necessary in field, needs take mistakes or words uncomplete. my actual script this: $search= '+'.str_replace(" ","% +",$_post["searchtext"]); with convert "this text" "+this +is +my +text" words necessary in search, , make $query = $dbh->prepare("select name,surname match (name,surname) against (:search in boolean mode) coincidences users match (name,surname) against (:search2 in boolean mode) order coincidences"); $query->execute(array('search' => $search,'search2' => $search)); the problem if in db there "stephen hawking" , search "stephen hawk" wont appear... how can prepare this? thank much its done... $search= '+'.str_replace(" ","* +",$_post["searchtext"]).'*'; :d sql search match against

embedded - How can I use crt0.o to setup .bss and .data in my bare metal C program? -

embedded - How can I use crt0.o to setup .bss and .data in my bare metal C program? - i wrote bare metal c programme running on stm32f4. it's nil fancy, usual led-blinky-program. in project have written initialization routines clearing .bss section , initializing .data section myself. this wasn't complicated. in linker script, instructed linker create symbols marking start , end of .data , .bss section. .data 0x20001000 : align(4) { __etext = loadaddr(.data); __data_start__ = addr(.data) ; *(.data*) ; __data_end__ = addr(.data) + sizeof(.data) ; } >ram at>rom .bss : align(4) { __bss_start__ = addr(.bss) ; *(.bss*) ; __bss_end__ = addr(.bss) + sizeof(.bss) ; } >ram then using these symbols in code: extern unsigned int __etext; extern unsigned int __data_start__; extern unsigned int __data_end__; extern unsigned int __bss_start__; extern unsigned int __bss_end__; voi...

sql server - Join two SQL select statements and get both results in to single -

sql server - Join two SQL select statements and get both results in to single - i want bring together these 2 sql select statements , both results single result. --1st select statement select ta.devid, ta.task, ta.assigndate, ta.devstart,ta.tasktype, ta.estimatetime, ta.status, ta.devfinish, takpi.actasigntime, takpi.acttime, takpi.kpi tt_taskassign ta inner bring together hr_employeemaster1 em on ta.devid=em.empno inner bring together dbo.tt_taskasignkpi takpi on takpi.assignid = ta.assignid ta.devid='1435' --2nd select statement select tt_taskassign.devid devid ,hr_employeemaster1.empfirstname+' '+hr_employeemaster1.empmiddlename+' '+hr_employeemaster1.emplastname developer, sum( case when tt_taskassign.status='done' 1 else 0 end ) doneprojects , sum( case when tt_taskassign.status='developing' 1 else 0 end ) developingprjects, sum( case when tt_taskassign.status='assign' 1 else 0 end ) assignedpending, sum(convert(int...