Posts

Featured post

Google sheets equipment borrowing system -

i working on google sheets system shows has item. have never worked google apps script before, want check value of c2, make sheet copy of data (d2, e2, g2) here (it trying copy 2nd column) , move here (in different sheet same document) next corresponding name on each particular section i think want rotate data columns becomes rows, , rows become columns, right? what need [transpose][1] function. for example, in a2, if put =transpose('sheet 2'!c1:1) , google sheets automatically fill column values of first row of 'sheet 2', starting @ c1 position. updated answer: here working example here steps: get filtered list of timestamp matched equipment sort list it's reverse order get first item sorted list ("last date") get position of "last date" in timestamp list get item in action list @ same position "last date" if item "check out" it's not available. note: might want store result of index()

what is select distribution ratio under insert distributions in cassandra stress tool? -

select distribution ratio : ratio of rows each partition should insert proportion of total possible rows partition (as defined clustering distribution columns). default fixed(1)/1 can explain means? , why called select distribution ration when under insert distribution? http://www.datastax.com/dev/blog/improved-cassandra-2-1-stress-tool-benchmark-any-schema in cassandra, data assigned given node partition key, , stored sorted on disk based on clustering key within partition. the 'distribution ratio' allows define: 1) how many rows stress tool create in each partition, 2) how many rows stress tool read each partition (they'll ordered, it's fast grab more one) in case of fixed(), means each partition have fixed number of rows - if choose of other options, you'll end variable number of rows. edit explain multiple rows per partition: for example, if had data model gathered weather information different cities: create table sensor_readings

javascript - Filter Radio Elements -

i have jquery variable of array of radio elements. want further select specific element based on value. below idea of have i'm still not sure how accomplish this. var gender = 1; var radiobuttons = $('[name=\'gender\']'); //should contain 2 radio elements radiobuttons.find('[value=\'' + gender + '\']').prop('checked', true); html <label>female<input type="radio" name="gender" value="0"></label> <label>male<input type="radio" name="gender" value="1"></label> the .find() method attempt select descendant elements. since input element self-closed , doesn't contain descendant elements, nothing selected. it seems want .filter() method instead: var gender = 1; var radiobuttons = $("[name='gender']"); radiobuttons.filter(function () { return this.value === gender.tostring(); }).prop('checke

How many try/except is too many in python function -

i have function geocodes address. don't want function die trying catch error , return tuple instead. want differentiate between errors, use try/except in multiple places. is there such thing many try/except? how optimize function? here code: def geocode(address): js = '' try: urlq = urllib.urlencode({'address':address, 'sensor':'false'}) except exception, e: return (false, "error url-encoding address. error:%s" % e, js, 'failed') try: f = urllib2.urlopen(geo_url + urlq) d = f.read() except exception, e: return (false, "error making connection. error:%s" % e, js, 'failed') # try: js = json.loads(d) except exception, e: return (false, "error converting json. error:%s" % e, js, 'failed') return (true, '', js, 'ok') catching exception bad idea. want specify error want catch.

Nuget.exe fails with "Could not load file or assembly 'System.Net.Http...' -

i trying run "nuget restore" on server not have visual studio installation. nuget.exe fails immediately. else needs installed nuget run? c:\users\kevin>nuget not load file or assembly 'system.net.http, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified. not load type 'system.runtime.compilerservices.iasyncstatemachine' assembly 'mscorlib, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089'. not load file or assembly 'system.net.http.webrequest, version=4.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a' or 1 of dependencies. system cannot find file specified. had issue well. newer versions of nuget requires .net 4.5 . installing .net 4.5.2 resolved issue me.

java - ELKI does not find class gnu/trove/impl/hash/TObjectHash -

i have dataset consisting of around 10000 samples 2 features. use elki run lsdbc algorithm , cluster dataset. however, have not been able elki work. after running elki-0.7.0.jar , inputing desired settings gui, regardless of settings pick, long stream of error messages in console input @ bottom of gui (i have yet able enter of desired settings). me indicates missing dependency, missed installation step, or somehow not using software correctly. unfortunately, there doesn't seem lot of documentation on elki, has 1 of implementations of lsdbc have been able find. i'm looking step step, eli5, instructions install , run algorithm on dataset (which in arff file created weka) , output results csv file; namely output file indicating cluster assignment of each sample. additionally able perform grid search optimal k , alpha values (that is, run algorithm several values of k , alpha , save each of results; afterwards determine optimal values). using mac os x yosemite. i fee

How to capitalize every word in excel cell? -

i have 15k rows each has 3 column similar following structure. id title description 0 short title long description column i want capitalize every single word in title column appear as: a short title is there way achieve this? =proper(b2) the formula can capitalize every 1st character of every word in string. edit: if want manually, copy formula across column that. can goto cell containing formula. on bottom right corner, see + sign when hover on cell - double click bottom right corner when see that. this copy formula rows underneath current one, till finds there data in column preceding it. edit2: using code option explicit sub changeallcellsinthiscolumntopropercase(byval startcell range) dim lastcell range set lastcell = startcell.end(xldown) dim data dim rangetocover range set rangetocover = range(startcell.address & ":" & lastcell.address) data = rangetocover.value dim countofcells long countofcells = rangetocover.cells.cou