Posts

Showing posts from April, 2010

visual studio 2012 - Azure publish can't use saved RDP password? -

every time publish our azure project (all machines in our team/at home well) asks re-enter our rdp password. this bit annoying means files check out , have keep entering password. the error message "the existing remote desktop credentials not loaded in environment. re-enter desired password". anyone got idea up? bit frustrating. answer because publishing different instances same configuration , not using fixed rdp cert. re-generating certificate each time. if have problem upload cert each cloud service deploying , use 1 cert across deployments.

iphone - How can I add a image for each button in the table -

how can add image each button in table i have 8 buttons in table , want put different images each button i have how code can modified accept 8 images - (uiimage *)cellbackgroundforrowatindexpath:(nsindexpath *)indexpath { nsinteger rowcount = [self tableview:[self tableview] numberofrowsinsection:0]; nsinteger rowindex = indexpath.row; uiimage *background = nil; if (rowindex == 0) { background = [uiimage imagenamed:@"button01.png"]; } else if (rowindex == rowcount - 1) { background = [uiimage imagenamed:@"button02.png"]; } else { background = [uiimage imagenamed:@"button03.png"]; } return background; } form array name of images in it. self.imagesarray = @[@"button01.png",@"button02.png",@"button03.png",...]; and access inside tableview:cellforrowatindexpath: or configuring cell using indexpath find corresponding image imagesarray - (uiimage *)cellbackgroundforrowatindexpath:(nsindexpat

jquery - Dropdown validation onchange of start period in javascript -

i wondering how update values in length based on user selects in start period . for example, if user selects 09:00 - 09:50 start period has options 1-7. if user selects 10:00 - 10:50 start period has options 1-6. ... if user selects 17:00 - 17:50 start period has options 1. how achieve using javascript? here code far: http://jsfiddle.net/rmxuh/ <p> <label>start period</label> <select onchange="reloadroompreference();" id = "edit_req_start" name=""> <option>09:00 - 09:50</option> <option>10:00 - 10:50</option> <option>11:00 - 11:50</option> <option>12:00 - 12:50</option> <option>13:00 - 13:50</option> <option>14:00 - 14:50</option> <option>15:00 - 15:50</option> <option>16:00 - 16:50</option> <option>17:00 - 17:50</option> </select> </p> <p> &

.net - C++ Transferring Variable between Buttons -

in code want re-use buttons, since dont want deal tons of them... variables use change events of buttons not transferring... how make variable global enough if changed 1 button, x = 1, can used button, x = 1 in button well? here code 2 buttons... int ^ yesorno has been initialized outside of 2 buttons, making them accessible not change-able buttons... private: system::void button2_click(system::object^ sender, system::eventargs^ e) { -> button4 -> visible = true; -> button2 -> visible = false; -> button5 -> visible = true; -> button3 -> visible = false; -> label2 -> visible = true; -> label2 -> text = "are sure?"; yesorno = 1; } private: system::void button4_click(system::object^ sender, system::eventargs^ e) { if (yesorno == 1) { -> label2 -> text = "to make pony character, see ponymakin.txt in your... etc; button4 -> text = "show pony"; y

operator precedence - PHP: Illegal string offset because [] binds tighter than -> -

i new php , had learning experience sharing here others who, me, may need find cause of error , because still don't know solution , sure there syntax haven't found yet need do. so, problem can demonstrated this: class sample { protected $foo = array(); public function magicsamplesetfunc($property, $key, $value) { $this->$property[$key] = $value; } } ... $s = new sample(); $s->magicsamplesetfunc('foo', 'somekey', 'someval'); obviously, isn't real code (nor have run it) minimal example explain situation. here have member variable foo array , generic function going try set key , value it. can var_dump $this->$property , see array, on $this->$property[$key] line error message: "warning: illegal string offset 'somekey' in ...". at first though saying 'somekey' illegal string use array offset, didn't make sense. and, if wrap in isset complains. first thing learned if have strin

Redis ltrim - possible race condition? -

is there possible race condition redis' ltrim , rpush? for instance, suppose redis list has these items: [1, 2, 3, 4, 5] and call ltrim list 4 -1 should slice list [5] but let's say: a millisecond after ltrim has started , before ltrim finished , thread pushing items list: rpush list 6 rpush list 7 when both 2 rpushes, , ltrims finished, resulting list consist of [5, 6, 7]? could possibly [5]? in other words, there possibility of race condition ltrim creating temporary list [5], , overwrites [5,6,7] [5] after 2 rpushes done? short answer: no, because commands atomic. honest answer: don't think because think operations atomic; however, website doesn't explicitly state atomic i'm 99.99999999% sure are. logical answer: redis single-threaded, there no other threads preempt ltrim command. race condition occur in single threaded application have explicitly jump out of ltrim operation before it's done , start doing else, doesn't mak

php - Member function non object -

i have made simple mysqli function wrapper use connect with. when try use it, fatal error "fatal error: call member function query() on non-object in /home/cgateams/public_html/home.cga/test.php on line 5" line 5: $res = $dblink->query("select * test"); test.php include('includes/db/config.php'); $dblink = db_connect(); $res = $dblink->query("select * test"); while ($res = $row) { echo $row['test']; } config.php //database server $host = 'localhost'; $dbname = 'dbname'; //sanitized data $dbuser = 'dbuser'; $dbpass = 'dbpass'; // db connect nm database function db_connect() { global $host, $dbuser, $dbpass, $dbname; $dbconnect = new mysqli($host, $dbuser, $dbpass, $dbname); if (!dbconnect) throw new exception('could not connect cga database currently'); else return $dbonnect; } you're missing $. should be: if (!$dbconnect) and further

Java Garbage Collection Induced Latency affecting Performance -

i'm noticing weird phenomenon in application. store objects in hashmap after submitting them server , remove them when response arrives. i noticed slow performance after running. upon checking, discovered memory usage stays @ 4gb , drops less 1 gb. suspect cleaning lot of objects that's why performance gets bad. so question why taking java garbage collect late? is, why wait until heap full , garbage collection? shouldn't collect garbage @ regular intervals. the objects gets stored in hashmap gets created right @ time, not long lived. this on linux (rhel), oracle jvm hotspot 7. 64-bit. 4 cores. how app run: java -jar -xmx4g prog.jar note: have seen this: tuning garbage collections low latency want understand why gc taking long kick in? it sounds have 1 of 2 issues going on: if have semi-long lived objects, moved young generation older (like on hotspot mark-compact generation .) is, they'll stop being reference counted collection , start being

Javascript Library to Test API Endpoints -

i looking simple api testing rest api. able keep mocha and/or jasmine asserts structure, while chaining api data, verb etc. api( '/maker' ) .put( return { name: 'sample 1', type: 'cheese', country: 'united states' } ) .failed() .succussed(). .has( return { assert(1, 1) } ); supertest https://github.com/visionmedia/supertest you're looking for.

c - Find substring in a string -

here code find substring entered user in given string. bool find_str(char *str, char const *substr) { while(*str) { if(*str++ == *substr) { char const *a = substr; while((*str++ == *++a)); /*empty*/ if(*a == '\0') return true; } } return false; } // if match found, return true, else false int main(void) { printf("%d", find_str("abcdef", "cde")); /* return true in case */ printf("%d", find_str("abcde", "cde")); /* return false in case */ } as explained in comment, returns true whenever ends additional characters. if not, returns false. think there problem in increment/decrement operator. not find how? this because code decides stop on finding \0 after performing comparison *str++ == *++a this condition true when match happens @ end of string on null terminators, while loop happily proceed beyond end of both s

windows - python win32com FileSystemObject failed on getting huge folder -

my test code is: #!/usr/bin/env python import win32com.client def getfoldersizequick(target_folder): fso = win32com.client.dispatch("scripting.filesystemobject") fobj = fso.getfolder(target_folder) return fobj.size print(getfoldersizequick("d:/pytools")) print(getfoldersizequick("d:/cygwin")) the result is: d:\>python a.py 160659697 traceback (most recent call last): file "a.py", line 10, in <module> print(getfoldersizequick("d:/cygwin")) file "a.py", line 7, in getfoldersizequick return fobj.size file "d:\applications\python33\lib\site-packages\win32com\client\dynamic.py", line 511, in __getattr__ ret = self._oleobj_.invoke(retentry.dispid,0,invoke_type,1) pywintypes.com_error: (-2147352567, '发生意外。', (0, none, none, none, 0, -2146828218), none) the first call getfoldersizequick on d:/pytools folder works. it's 153mb. second call failed. folder d:/cygwi

calculating rolling average using python -

i've started learning python. using write script calculate salt inflow rolling average. have data that date a4260502_flow a4261051_flow a4260502_ec a4261051_ec 25/02/1970 1304 0 411 0 1304 26/02/1970 1331 0 391 0 1331 27/02/1970 0 0 420 411 0 28/02/1970 0 0 400 391 0 1/03/1970 0 0 0 420 0 2/03/1970 1351 1304 405 400 1327.5 3/03/1970 2819 1331 415 405 2075 4/03/1970 2816 0 413 0 2816 5/03/1970 0 1351 0 415 1351 6/03/1970 0 0 0 0 0 7/03/1970 0 2819 0 413 2819 8/03/1970 0 0 0 0 0 9/03/1970 0 2816 0 412 2816 and script is inputfilename = "output.csv" outputfilename = "si_calculation.csv" # open files infile = open(inputfilename,"r+") outfile = open(outputfilename,'w') # initialise variables ec_con

python - OptionMenu won't show the first option when clicked (Tkinter) -

i added optionmenu widget code, , assigned list it's options. how is: z = stringvar() z.set(userlist[0]) usersoption = optionmenu(frame1, z, *userlist)#, command=changeuser) usersoption.pack(side=right, padx=3) now, reckon show options in said list. so: option 1 \/ <-- box selected option option 1 }\__the options show on click option 2 }/ but shows second option, , when choose there is, basically, no way back, if click box again keeps showing option 2 , can't change , down keys. tried looking solutions, got nowhere, i'm starting think default operating way of widget, found nothing show me how solve in documentation read. p.s.: i'm using python 3.3 i had same problem , driving me mad, looked in source . think issue 3rd constructor argument default value. if don't specify before *userlist, looks takes first item default value. real fix like: z = stringvar() z.set(userlist[0]) usersoption = optionmenu(frame1, z, userlist[0] ,*u

java - NullPointerException for Google App Engine Text -

i have following profile bean text property: import com.google.appengine.api.datastore.text; public class profile { ... private text aboutmyself = null; public string getaboutmyself() { return aboutmyself.getvalue(); } public void setaboutmyself(string aboutmyself) { this.aboutmyself = new text(aboutmyself); } ... } when getting aboutmyself , have ff condition. if (profile.getaboutmyself() != null){ ... } the problem still encountered npe line if (profile.getaboutmyself() != null) why? how fix it? stacktrace: uncaught exception servlet java.lang.nullpointerexception @ profile.getaboutmyself(profile.java:263) @ ...(.....java:137) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method

Javascript SOAP action in sharepoint -

im tyring run basic javascript soap action on content editor web part in sharepoint not work. if take code out of sharepoint runs fine in ie, why be? <button onclick="dostuff()" type="submit">send</button> <textarea name="request_data" cols=120 rows=17 > <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/xmlschema"> <soap:body> <createmodifyrequest> <username>josephs</username> <lookupids> <lookupids>4225</lookupids><!--firepass--> </lookupids> </createmodifyrequest> </soap:body> </soap:envelope> </textarea> <script language="javascript"> function dostuff() { var xmlhttp = new activexobject("msxml2.xmlhttp.3.0"); xmlhttp.open("post", "h

c++ - Pixels in YUV image -

i using opencv achieve object tracking. read yuv image better option use rgb image. problem fail understand yuv format although spend time read notes. y brightness believe calculated combination of r, g, b component. my main problem how can access , manipulate pixels in yuv image format. in rgb format easy access component , therefore change using simple operatin src.at<vec3b>(j,i).val[0] = 0; example but not case in yuv. need in accessing , changing pixel values in yuv image. example if pixel in rgb red, want keep corresponding pixel in yuv , rest removed. please me this. i suggest operating on image in hsv or lab rather rgb. the raw image camera in ycbcr (sometimes called yuv, think incorrect, may wrong), , laid out in way resembles yuyv (repeating), if can convert directly hsv, avoid additional copy , conversion operations save time. may matter if you're processing video or batches of images however. here's c++ code converting between ycbcr , rgb

asp.net - How to execute an external script that is in notepad from c# -

i wrote script in notepad , saved in folder. want execute script c# button click. can please me how it? since have chosen asp.net tag: want start script on server or on client machines? can start script on server, starting scripts out browser different story: process.start(@"c:\myscript.vbs"); just make sure have following line @ top of file: using system.diagnostics;

android - Why does the background service stops while running? -

i have background service in android application.in thread listening recent tasks running frequently.my service overrides both oncreate() , onstartcommand() methods. when tried open applications gallery , camera etc..., service stopped.it calls oncreate() method , not ondestroy() or onstartcommand() .i tried override onlowmemory() in service logs nothing.the application saved internally specifying android:installlocation="internalonly" in manifest file. note: issue noticed on micromax a54 2.3.5 . why background service stops sometimes? there solution issue? public class myservice extends service { public myservice() { } @override public int onstartcommand(intent intent, int flags, int startid) { try { if(intent != null){ //...... } } catch (throwable e) { } return start_sticky; } @override public void ondestroy() { super.ondestroy(); }

android - Why using this sample on my Galaxy Nexus camera is slow? -

the code took link : http://www.stanford.edu/class/ee368/android/index.html the project: color histograms working showing histograms in real time on device . the problem if i'm using device camera regulary it's moving fast , smooth mean i'm moving device around without recording video or taking photos , it's moving smooth fast. but once i'm using project , show histograms in real time it's . the question why ? , if there way make smoother , faster ? this main code: package com.example.viewfinderee368; import java.io.ioexception; import android.app.activity; import android.content.context; import android.graphics.bitmap; import android.graphics.canvas; import android.graphics.color; import android.graphics.paint; import android.graphics.rect; import android.graphics.rectf; import android.hardware.camera; import android.hardware.camera.previewcallback; import android.os.bundle; import android.view.surfaceholder; import android.view.surfaceview;

asp.net mvc - How to write code in html for retrieving the session value.? -

i have default2.cs file stores value in session textbox1.text = "haii"; session["name"] = textbox1.text; and need retrieve in html page- default.aspx <script runat="server"> sub page_load string na=(string)session["name"]; label1.text=na; end sub </script> it shows error 'string' class type , cannot used expression. please help try in html in defaul.aspx, <% string na=(string)session["name"]; %> <label id="label1"><% =na %></label>

ios - RestKit Pagination mapping error -

the pagination documentation suggests: the paginator must configured pagination-mapping specifying how configuration metadata mapped out of response payload. configured mapping must have objectclass of rkpaginator , should include attribute mappings currentpage, pagecount, perpage, , objectcount. example, given paginated resource loaded ‘/articles?page=1’ following json: { "pagination": { "per_page": 10, "total_pages": 25, "total_objects": 250 }, "articles": [ // array of articles ] } but if api doesn't provide me total_pages, gives me total_objects? can calculate total pages combination of per_page , total_objects. have feeling difference causing mappings not map. that should fine. paginator uses perpage , objectcount calculate pagecount (the project open source can verify , debug happens during mapping). if turn on trace logging should information what's happening during pagination mapping stage (like

scrollbar - How to get scroll bar real width in Qt? -

i'm trying make custom widget, bunch of textedits single vertical scroll bar on right. keep widget size determined, have find width of scrollbar, texedits geometry depends on it. calling scroll_bar->width(); freshly created vertical bar returns 101, obviuosly wrong. so, there way determine vertical scroll bar width correctly in qt 3.2.3? int w = qapp->style()->pixelmetric(qstyle::pm_scrollbarextent);

c# - ASP.NET MVC 3.0 2 Foreign Keys from the same table exception -

i have 2 tables , models corresponding each table: employee , employeeeducation in employeeeducation have 2 foreign keys table employee: id consultant , id actual employee owns educations. each education can have different consultant. [required(errormessage = "contact admin")] [display(name = "consultant")] public int? consultantid { get; set; } *emphasized text* [required(errormessage = "contact admin")] public int? employeeid { get; set; } for each id ı have these objects reach objects [foreignkey("employeeid")] public virtual employee employee { get; set; } [foreignkey("consultantid")] public virtual employee consultant { get; set; } when run code , try enter education employee consultant gives me following exception inner exception. entitycommandexecutionexception {"an error occurred while executing command definition. see inner exception details."} inner exception: sqlceexception {"the column name n

android - Multiple ListViews inside a ScrollView -

i have complex xml file , need scrollview. please don't mind ids have changed them. scrollview here doesn't work. <scrollview xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillviewport="true"> <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:id="@+id/f_summary_ll"> <linearlayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content"> <linearlayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@col

profiler - Which factors affect the speed of cpu tracing? -

when use yjp cpu-tracing profile on our own product, slow. the product runs in 16 core machine 8gb heap, , use grinder run small load test (e.g. 10 grinder threads) have 7~10 steps during profiling. have script start product profiler, start profiling (using controller api) , start grinder emulate user operations. when operations finish, script tells profiler stop profiling , save snapshot. during profiling, each step in grinder test, takes more 1 million ms finish. whole profiling takes more 10 hours 10 grinder threads, , each runs test 10 times. without profiler, finishes within 500 ms. so... besides problems product profiled, there else affects performance of cpu tracing process itself? last used yourkit (v7.5.11, pretty old, current version 12) had 2 cpu profiling settings: sampling , tracing, latter being faster , less accurate. since tracing supposed more accurate used myself , observed huge slowdown, in spite of statement slowdown "average". yet far l

c - How to delete all nodes of same value from linklist/Queue -

i have been trying hard resolve yet not succeed have data structs follow (which complex simplifies discussion) : typedef struct node{ struct node* next; void* arg; }node_t; typedef struct queue{ node_t* head; node_t* tail; }queue_t; addq(queue_t*ptr , int data) { queue_t* q = ptr; node_t * n = malloc(sizeof(*n)); n->arg = data; n->next = null; if(null == q->head){ q->head = q->tail = n; return ; } q->tail->next = n; q->tail = q->tail->next; } now want delete node of same value ( have tried couple ways yet not succeed ) , consider sequence reference: addq(q, 12); addq(q, 12); addq(q, 4); addq(q, 12); addq(q, 12); addq(q, 14); addq(q, 12); addq(q, 12); i want delete nodes value 12. this solution got bit hairy double pointers, still it, doesn't have special case node (first vs rest) being checked. tried put enough comments in describe what's going on, it's still hard me fo

.net - how to interchange images with application bar icon buttons in windows phone 8? -

Image
i working on windows phone 8 app. how interchange images applicationbariconbutton shown below. first screenshot example it. in second screenshot letter d dragged on applicationbar , in applicationbar, letter c replaced letter d(third screenshot). have kind of default feature in iphone known morenavigationcontroller edit button screen. how possible in wp8? thank u in advance. so first need correctly detect drag , drop. have tried solving that? once detect intention of user drop image on application bar, can replace icon on target application bar icon. if cannot via drag , drop, have considered replacing feature "hold context menu" option? basically, instead of d'n'd, hold press on letter , context menu spawned asks if want add application bar. note default applicationbar control not support binding , need find third party controls if want data binding. super easy replace icon.

css - unable to align navbar to center -

i have searched lots of question in forum , doesnt seems help. i'm trying center navigation bar despite following of answers text-align = center; doesn't work me. html code in asp.net: <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>untitled</title> <link rel="stylesheet" href="css/style.css" type="text/css" /> <!--[if lt ie 8]> <script src ="http://ie7-js.googlecode.com/svn/version/2.1(beta2)/ie8.js"></script> <![endif]--> </head> <body> <ul id="nav"> <li><a href="#">home</a></li> <li><a href="#">login</a></li> <li><a href="#">report</a></li>

string - Display number of spaces -

how should display number of words contained in string(vector)? there may multiple spaces between 2 words. ex: input: ' hello world, how ' should return 5. to count number of spaces in vector v, write: n←+/v∊' ' but, won't display number of words. anyone? s←'hello world, how you?' a←s∊'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz' +/ (a,0)∧~0,a a vector contains 1-s @ positions letters occur , 0-s elsewhere. s: h e l l o w o r l d , h o w r e y o u ? a: 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 every initial letter of word correspond 1 preceded 0 (or in initial position). well, if shift sequence right, negate it, , "and" original value of a , can identify word-initial letters: s: h e l l o w o r l d , h o w r e y o u ? a,0: 1 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 0 0 ~0,a: 1 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 1 0 0 0 1 (a,0)∧~0,a: 1 0 0

java - Google Search API: Loading all datastore data into document builder for full text search on all records -

i have been following tutorial regarding google search api @ https://developers.google.com/appengine/docs/java/search/overview . information have found clear on how build document , load index. not sure of how load datastore data document. what trying achieve simple %like% query on few fields. example, working on music library. if user types in "glory", use search api return entities "glory" somewhere in title. have implemented "starts with" work around adding search text "\ufffd", however, find insufficient. users novice, , helpful if didn't have pick field in traditional search. full text search seems solution. here questions: should each record in datastore document? or records 1 document? have pretty fixed datastore size of 1000 records. provide example of correct method? i return entire datastore entity (it's 8 fields) iterable of type of entity. specify each field need return? example says: for (scoreddocu

sql - how can we assign a ORDER BY in two seperate fields in MySql query? -

how set order 2 separate fields in mysql code $sql = 'select q.question_id, a.answer_id, q.question_name, a.option_name, q.display_order ques_order, a.correct, a.display_order opt_order questions q join answers on (a.question_id = q.question_id) test_id = '.$m_test_id.' order ques_order, opt_order asc'; error message: mysql­error: have error in sql syntax; check manual corresponds my­sql server version right syntax use near '­order ques_­order,­ opt_­order asc' @ line 4 order ques_­order,­ opt_­order asc; there's wrong $m_test_id ; it's empty , causing issues sql grammar. consider using prepared statements: $sql = 'select q.question_id, a.answer_id, q.question_name, a.option_name, q.display_order ques_order, a.correct, a.display_order opt_order questions q join answers on a.question_id = q.question_id test_id = :test order ques_order, opt_order asc'; $stmt = $db->prepare($sql); $stmt->

java - Caching data using collection -

so, have issue caching data inside java collection. when initialize app first time use below function this, cacheimageandsounds(0,6); now once reach 4th position start want remove previous 3 elements collection , cache next 3 i.e. cacheimageandsounds(4,10); but have 4th, 5th , 6th image in cache won't want re-bring them inside cache present, hence download or fetch 7th 10th image , sound files. how can go doing this, or how may tweak algorithm of caching data inside map? this function use create cache of images , sound files inside collection , use further retrieve data it, based on various index values. use in way knowingly can set 2 indexes , required data filled inside collection. public int cacheimageandsounds(int startindex,int lastindex) { for(int i=startindex;i<lastindex;i++) { aq.ajax(data1.get(i), bitmap.class, new ajaxcallback<bitmap>() { @override public void callback(string url, bitmap obj

eclipse - Beginning OpenCV in Android -

i have knowledge in android , learn opencv,for have followed several tutorials , ended doing following steps. 1. download eclipse c/c++ developers 2. added android plugin 3. set path ndk 4. downloaded opencv library , samples 5. imported library , samples in eclipse 6. installed opencv manager in device but, dismay,a cross appears in library folder , other sample folders shows foot-mark or build error, step missing out. please help. thx in advance. right click on project -> properties->android . add android library android project add opencv library project. right click on project -> properties->android add library to convert project c/c++ project right click on project -> new -> other -> c/c++ -> convert c/c++ project if have converted project c/c++ project ensure follows right click on project -> properties->c/c++ general -> paths , symbols -> includes -> gnu c , gnu c++ add path e:/android-ndk-r8d/

How to update document in sqlite database & phone storage in Android? -

i building app in android using web services. trying synchronization function. getting properties web server , have 1 boolean value it, if boolean true update downloaded document. but stuck on here either need first delete document , replace or can directly replace document. code this: soapobject docresponse = (soapobject)envelope.getresponse(); log.i("uspdated documentss", docresponse.tostring()); for(int i=0; < docresponse.getpropertycount(); i++) { soapobject singlesubfolder = (soapobject)docresponse.getproperty(i); id = singlesubfolder.getproperty(0).tostring(); filelongname = singlesubfolder.getproperty(1).tostring(); userfilename = singlesubfolder.getproperty(2).tostring(); url = singlesubfolder.getproperty(3).tostring(); fileextension = singlesubfolder.getproperty(4).tostring(); lastmodifieddate = singlesubfolder.getproperty(5).tostring(