Posts

Testing Android In App Billing real purchases -

what conditions test real purchases, when have tested app using test product android.test.purchased ? there few steps need pass, remembering, of them need time update on google play servers. for example, let's use com.example.product our real product id. time shows in example change own. upload apk file you can't test real purchases in debug mode. need download app beta, google know it's ok make purchases in app. check if have billing permission in androidmanifest.xml : <uses-permission android:name="com.android.vending.billing" /> change android.test.purchased com.example.product , export *.apk file. must signed ! publish apk in beta, you can go next steps, you'd need time beta ready download. add new product you can't add new product until have published beta. you can't test subscriptions, products. can test subscriptions (they renewed every 24h) go products section in google play develop...

ruby on rails - Capistrano Many Private Repo Github -

very strange behavior , cant understand problems. have 2 private repositories on github , deploy capistrano. first app normal deployed deploy.rb : require "rvm/capistrano" require 'bundler/capistrano' set :rvm_ruby_string, "2.1.0" set :assets_role, :app set :normalize_asset_timestamps, false set :application, "awesome_app_one" set :scm, :git set :repository, "git@github.com:myaccount/repo_one.git" set :branch, :master set :deploy_via, :remote_cache set :ssh_options, { forward_agent: true } set :user, "rails" set :deploy_to, "/home/rails/#{application}" set :shared_children, %w(public/system public/files public/uploads log tmp/pids tmp/sockets) set :use_sudo, false task :production role :web, "123.456.789.0" role :app, "123.456.789.0" role :db, "123.456.789.0", primary: true set :branch, :master set :deploy_to, "/home/rails/#{application}" set :rails_env...

html - Table using divs - no y overflow for row -

i trying create table using divs. (i can't use table, tr & td tags) the problem is: my cells must next each other (i use float:left ) my row should never expand vertically, can grow on x-axis. so here html : <div id="table"> <div class="rowheader"> </div> <div class="row"> <div class="cell">bla</div> <div class="cell">bla</div> <div class="cell">bla</div> </div> <div class="row"> <div class="cell">bla2</div> <div class="cell">bla2</div> <div class="cell">bla2</div> </div> </div> and css : #table { display: table; width: 100%; } .row { width: 100%; overflow: hidden; display: table-row; } .cell { float: left; display: table-cell; margin: 1px; padding: 2px; width: 35%; backg...

gcc - Installing gfortran 4.6 in Fedora 19 -

i beginner fedora. use gamess software programme requires gfortran 4.6. when "yum install gcc-gfortran", fedora 19 ships gfortran 4.8.ix probl can tell me in detail fix problem. gfortran 4.6 has been replaced newer version since fedora 18. can download prebuilt release. there if have 64 bit machine, , there if have 32 bit. simply unpack , copy directory in path .

excel - How can I wrap an If statement around this code? -

i given project work on , i'm bit stumped. have routine being driven shortcut macro move data column column f , begin build itemized list 1 works through column. what need, however, wrap current operation in if statement operation not move data new cell if data in g5 (or, rc) equal cell value in a4 (or, rc-1). if can logic down, can operation work intended. the macro created macro recorder, here code: sub inserttagline() selection.insert shift:=xldown activecell.offset(1, 0).range("a1").select selection.copy activecell.offset(-1, 4).range("a1").select activesheet.paste activecell.offset(0, 1).range("a1").select application.cutcopymode = false activecell.formular1c1 = "=""tag: ""&rc[-1]" activecell.select selection.copy selection.pastespecial paste:=xlpastevalues, operation:=xlnone, skipblanks _ :=false, transpose:=false activecell.offset(0, -1).rang...

multithreading - Time based thread synchronization in java -

wondering if there time based synchronization in java. example below synchronization locks object , waits until //my application processor finishes task. synchronize (myobject) { //my application processor. } with same, there way synchronize 1 min or 2 min. synchronize (only 1 min && object) { //my application processor } or there other way in java synchronization method. p.s: don't want run threadmanager monitor above. , don't want run while loop. maybe looking java.util.concurrent.scheduledthreadpoolexecutor provides various ways of scheduling task performed/repeated in thread @ specified time/times in future. maybe have method holds lock extended period of time (almost bad idea), , asking how abort operation , release lock if time limit reached. there couple of ways depending on takes time. but guesses. haven't told problem trying solve. your example of using "synchronized" timeout not make sense. purpose of ...

c++ - casting array to variable -

i need efficient way cast part of array variable. let's suppose array defined this: unsigned char bytes[240]; now, need uint32_t value somewhere in array, this: uint32_t * word = reinterpret_cast<uint32_t *>(bytes[4]); which think me second word in array right? question is, safe , portable (windows, linux on x86 & x86_64, os x nice, don't care arm, ia-64 etc). you should use memcpy . portably ensures there no alignment or strict aliasing problems. if no copy needed, compilers smart enough figure out , directly reference data in array: uint32_t value; memcpy(&value, &bytes[4], sizeof value); //modify value: //... //copy array: memcpy(&bytes[4], &value, sizeof value);