Posts

Excel nested If and VLOOKUP statement -

i making function following: if information in cell equal information stored in list (in worksheet in same workbook) add cell + cell, if false display false or else. i'm new excel decade ago did course on visual basic , remember basic principles of of these functions. tried number of different ways have not come works. i've tried nesting vlookup within if statements hlookup , lookup had no success. rolledsteel product list. list worksheet contains rolledsteel (plus other lists). invoice worksheet contains functions link rolledsteel or list . functions have tried had no success with: =if(n10=list!$a$2:$g$13,w10+w10,false) =if(n10=rolledsteel,w10+w10,false) =if(n10=vlookup(n10,rolledsteel,4,false),w10+w10,false) i have few more questions ahead resolve issue. appreciated. i'm thining easiest way using match() function if(isnumber() follows: =if(isnumber(match(n10,rolledsteel,false)),w10+w10,"false") basically, you're sa...

String replacement in MongoDB? -

i have collection has number of documents title contains encoded & characters ( & ) , convert these back. i'm wondering if possible string replacement on value based on it's original value. for example document below: { title: "this & that" } is possible replace & normal update statement? tried this: db.questions.update({title: /&/}, {title: title.replace(/&/g, "&")}); but threw following error: referenceerror: title not defined can done using update statment? if not, best way find/foreach/update on each document? i'm wondering if possible string replacement on value based on it's original value....can done using update statment? currently, not possible update field's value in mongodb accessing , modifying original value in single update statement. but threw following error: referenceerror: title not defined this error occurs, because mongodb not...

python - What is the point of indexing in pandas? -

can point me link or provide explanation of benefits of indexing in pandas? routinely deal tables , join them based on columns, , joining/merging process seems re-index things anyway, it's bit cumbersome apply index criteria considering don't think need to. any thoughts on best-practices around indexing? like dict, dataframe's index backed hash table. looking rows based on index values looking dict values based on key. in contrast, values in column values in list. looking rows based on index values faster looking rows based on column values. for example, consider df = pd.dataframe({'foo':np.random.random(), 'index':range(10000)}) df_with_index = df.set_index(['index']) here how row df['index'] column equals 999. pandas has loop through every value in column find ones equal 999. df[df['index'] == 999] # foo index # 999 0.375489 999 here how lookup row index equals 999. index, pandas uses ha...

PHP SQLite PDO returns empty json array -

i'm new(ish) php , in particular pdo. can me understand why returning empty array json_encode? the sql query runs fine , returns results. when pass multi-step query via pdo, i'm not getting i'd expect. i've looked @ similar questions on , tried reconcile php documentation without insight. what correct way submit multi-stage (somewhat complex) query via pdo sqlite , pass results json_encode() ? pointers appreciated. updated: code example updated/cleaned helpful comments @darren, @phill, @mike below. $dbh = new pdo('sqlite:livedb2.sqlite'); $sth = $dbh->prepare(' create temporary table tmpnodesa select source, location, count(*) value [emergencydept(sankey)] group source, location union select location, destination, count(*) value [emergencydept(sankey)] group location, destination; create temporary table tmpnodesb select source, location, value tmpnodesa order value desc; create temporary table tmpnodesc select sou...

ios - RoboVM app crashes on ptr.get() -

is there kind of magic required ptr.get() work? reason following code crashes app: audiostreambasicdescription asbd = new audiostreambasicdescription(msamplerate, mformatid, mformatflags, mbytesperpacket, mframesperpacket, mbytesperframe, mchannelsperframe, mbitsperchannel, 0); audiofileptr outaudiofile = new audiofileptr(); file f = file.createtempfile("ptt", ".caf"); audiofileerror afe = audiofile.createwithurl(new nsurl(f), 1667327590, asbd, 1, outaudiofile); system.out.println(afe.name()); system.out.println(outaudiofile.get()); it returns audiofile.createwithurl no errors (error code: no), crashes try java instance. i'm experiencing same type of crash in section of code instantiate audioqueueptr queueptr , pass in audioqueue.newinput , try call queueptr.get() . there i'm missing here? there's no stack trace in java, here's xcode organizer device log: incident identifier: 2eeff4f0-9031-4798-80e7-69f55bb7057...

android - crashlytics "Answers" crashes when app starts -

i added crashlytics feature app got following nullpointerexception at: com.crashlytics.android.answers.answers.doinbackground(answers.java:102) the app not crash @ least app safe... wondering if had same issue thanks

html - Search text file in a web page and import the data in that text file into excel using vba -

i have web page , there text file in web page. text file name keeps changing every week. how search text file in web page , download content excel sheet. pointers start? know how navigate webpage using given url. the problem dont know url of text file( since keeps changing every week), how can know ? http://usda.mannlib.cornell.edu/mannusda/viewdocumentinfo.do?documentid=1048 here link web page. need download txt file here (crop progress, 11.24.2014 [txt]) . please me out here. recorded macro : sub macro4() activesheet.querytables.add(connection:= _ "url;http://usda.mannlib.cornell.edu/usda/current/cropprog/cropprog-11-24-2014.txt" _ , destination:=range("$a$1")) .commandtype = 0 .name = "cropprog-11-24-2014" .fieldnames = true .rownumbers = false .filladjacentformulas = false .preserveformatting = true .refreshonfileopen = false .backgroundquer...