Posts

python - How to write to cloudstorage using task chaining, The blobstore Files API did a nice job -

python - How to write to cloudstorage using task chaining, The blobstore Files API did a nice job - using blobstore file api, write very big blobfiles: create blobfile read info datastore , write (append) blobstore file pass datastore page cursor , blobstore file (next) task ....use other tasks same purpose and finalize blobstore file now gae gcs client cannot append , finalize. how write big files gcs without compose. compose not part of gcs client. files api still works fine, has been deprecated. below blobstore solution using task chaining: class blobdata(webapp2.requesthandler): def post(self): page = int(self.request.get('page', default_value='0')) info = data.get_data(.....) blob_file = self.request.get('blobfile', default_value='none') if blob_file == 'none': file_name = files.blobstore.create(mime_type='text/...', ...

regex - How to repeat a block of lines using awk? -

regex - How to repeat a block of lines using awk? - i'm trying repeat block of lines avobe occurs word number of times inticated in line. block of lines repeat have smaller number @ start of line. i mean, input: 01 patient-treatments. 05 patient-name pic x(30). 05 patient-ss-number pic 9(9). 05 number-of-treatments pic 99 comp-3. 05 treatment-history occurs 2. 10 treatment-date occurs 3. 15 treatment-day pic 99. 15 treatment-month pic 99. 15 treatment-year pic 9(4). 10 treating-physician pic x(30). 10 treatment-code pic 99. 05 hello pic x(9). 05 stack occurs 2. 10 overflow pic x(99). this output: 01 patient-treatments. 05 patient-name pic x(30). 05 patient-ss-number pic 9(9). 05 number-of-treatments pic 99 comp-3. 05 treatment-history occurs 2. 10 treatmen...

SQL Server seed value lower than max identity -

SQL Server seed value lower than max identity - i have table contains a column, integer, specified auto-incrementing primary key. create table [dbo].[table] ( [tablekey] [int] identity(1,1) not replication not null, [...] constraint [pk_tablekey] primary key clustered ( [tablekey] asc ) ( pad_index = off, statistics_norecompute = off, ignore_dup_key = off, allow_row_locks = on, allow_page_locks = on, fillfactor = 80 ) on [primary] ) on [primary] this table has been having anywhere 0 - 7000 records inserted m-f, without issue. lastly fri ~4k records inserted identity values starting @ 2,064,682 , ending @ 2,068,076. morning received error... violation of primary key constraint 'pk_tablekey'. cannot insert duplicate key in object 'dbo.table'. duplicate key value (2067844). after going downwards lot of wrong paths found current seed table 2067845 . my...

javascript - Parallax background effect with ScrollTo and Localscroll -

javascript - Parallax background effect with ScrollTo and Localscroll - i have looked around hours trying figure out. have site built jsfiddle. <div id="window"> <div id="section-wrapper"> <div id="one" class="section"><p>one</p> </div> <div id="two" class="section"><p>two</p> </div> <div id="three" class="section"><p>three</p> </div> <div id="four" class="section"><p>four</p> </div> <div id="five" class="section"><p>five</p> </div> <div id="six" class="section"><p>six</p> </div> <div id="seven" class="section"><p>seven</p> </div> <div id="eight" class=...

vim - Can I somehow add my own info to the status line via vimscript -

vim - Can I somehow add my own info to the status line via vimscript - can somehow add together own info status line via vimscript? need create plugin update value in status line after time. thanks in advance. the 'statusline' alternative configures shown in status line. can add together value of arbitrary vimscript expressions via %{expr} syntax, e.g.: :set statusline+=\ %{localtime()} note gets invoked frequently, shouldn't much processing. alternatively, insert (buffer-local) variable, , utilize other means ( :autocmd ) update variable value when necessary. if plan create plugin reusable, improve not straight mess 'statusline' option, offer (global or autoload) function , instructions users include in personal alternative value. vim

VBA Getting program names and task ID of running processes -

VBA Getting program names and task ID of running processes - how programme names , task ids of running processes. shell() returns task id of initiated process. similar, task id , name of processes running , not created macro. i've found code returns programs names output lacks task ids info : http://www.vbaexpress.com/forum/archive/index.php/t-36677.html sub test_allrunningapps() dim apps() variant apps() = allrunningapps range("a1").resize(ubound(apps), 1).value2 = worksheetfunction.transpose(apps) range("a:a").columns.autofit end sub 'similar to: http://msdn.microsoft.com/en-us/library/aa393618%28vs.85%29.aspx public function allrunningapps() variant dim strcomputer string dim objservices object, objprocessset object, process object dim odic object, a() variant set odic = createobject("scripting.dictionary") strcomputer = "." set objservices = getobject("winmgmts:\\" _ ...

java - How to Make an HTTP POST with JSON object as data? -

java - How to Make an HTTP POST with JSON object as data? - can refer me single, simple resource explaining how in java create http post json object data? want able without using apache http client. the next i've done far. trying figure out how modify json. public class httppostrequestwithsocket { public void sendrequest(){ seek { string params = urlencoder.encode("param1", "utf-8") + "=" + urlencoder.encode("value1", "utf-8"); params += "&" + urlencoder.encode("param2", "utf-8") + "=" + urlencoder.encode("value2", "utf-8"); string hostname = "nameofthewebsite.com"; int port = 80; inetaddress addr = inetaddress.getbyname(hostname); socket socket = new socket(addr, port); string path = "/nameofapp"; ...