Posts

Showing posts from August, 2012

vb.net - Delete Item from ListBox and Update Total Visual Basic -

i new in vb, have managed add items in listbox , update total keep on adding items. question want delete selected items listbox , update total/deduct price, don't know how it. posting sample code used add total. private sub btncoffee6_click(sender object, e eventargs) handles btncoffee6.click dim sum double sum = 1.5 itembox.items.add("regular coffee $1.00") x integer = 0 itembox.items.count - 1 sum += val(itembox.items.item(x).tostring) next txttotal.text = sum.tostring itembox.items.add(sum) end sub try removeat() , yes tutorial dim sum double private sub btnremove_click(sender object, e eventargs) handles btnremove.click itembox.items.removeat(itembox.selectedindex) sum = sum - val(itembox.items.item(itembox.selectedindex).tostring) txttotal.text = sum.tostring itembox.items.add(sum) end sub

assembly - GAS what does @ and .type do? -

i reading following code online. wondering @ symbol next function call means. wondering .type exactly. can point me url explains different .types? .section .rodata lhello: .asciz "hello!" .section .text .globl somerelocations .type somerelocations, stt_func somerelocations: leaq lhello(%rip), %rdi call puts@plt ret the ".type" keyword place information object file generated saying "somerelocations" of type stt_func (which means: function). the linker and/or debuggers may use information. on cpus (such arm variants tht support both thumb , arm modes) linker must know if "somerelocations" function or variable because linking done bit differently functions , variables in case. for assembler "@" regular character @ point. "puts@plt" processed assembler same way "putsxplt" processed. to unprecise: when position-independent file being generated linker...

ruby - Install gem in local folder -

i have limited privileges on shared machine i'm using, can't install gems way i'm used to. example: $ gem install request-log-analyzer error: while executing gem ... (gem::filepermissionerror) don't have write permissions /usr/lib/ruby/gems/1.8 directory. is possible install gem locally? (if matters, i'm trying install this gem .) i saw number of posts on stack overflow talked using bundler or gemfiles i'm not installing gem ruby on rails project - want use in isolation. i'm running linux, not sure flavor though. add --local flag install: gem install --local request-log-analyzer if causes problems, try downloading gem manually , pointing gem directly using: gem install --local path/to/gem/filename.gem if want install user home, per rubygems : when use --user-install option, rubygems install gems directory inside home directory, ~/.gem/ruby/1.9.1. commands provided gems installed end in ~/.gem/ruby/1.9.1/bin. pr...

php - Get month name in Symfony -

is possible somehow name of given month (by number) in symfony's controller. , in current locale . form's date widget translates month current locale automatically. same in controller. i know how country translated didn't found same funtionality month. thanks solution doesn't rely on symfony components (except locale): setlocale(lc_all, $this->request->getlocale()); $month = strftime("%b", mktime(0, 0, 0, $monthid, 1, 2000)); first, take @ official icu docs date formatting. icu underlying component intl (mentioned yann in comments above). so, given variable $monthid contains number of month, do: $monthid = .... $date = new \datetime(); # overwrite date first day in month $y = (int)$date->format('y'); $date->setdate($y, $monthid, 1); # create formatter $fmt = new intldateformatter( 'en_us', // locale? "llll", // <--- long month format intldateformatter::full, ...

javascript - How to get last/previous visited route with iron-router - meteor -

i went situation need last visited page iron-router in meteorjs. checked docs didn't solution there. have current() function that's gives current route name. there way it? i need show specific data when last visited page equal set page. i tried: document.referer but works when page refresh. thanks, i don't think can last route directly. save current route in session variable , check against that, (untested): router.route('/route', { name: 'route', onrun: function() { if (router.current().route === session.get("lastroute")) { console.log('same route'); } }, onafteraction: function() { session.set("lastroute", router.current().route); }, });

loops - Multiple AsyncTask Android -

i have specific annoying process on app. app needs retrieve server list of complex object "product". each product object contains id refers manufacturer id. process request list of products , each product need request on manufacturer id informations related it. thing use volley make requests. asynchronous method, i cannot make loop (which synchronous) request each manufacturer. i've read asynctask perform such process. means need execute asynctask each product retrieve manufacturer information. i wanted know if there way manage because seems bad performance... if have 50 product, need make 50 asynctasks... if don't need tasks in foreground when end, use threadpoolexecutor run requests using fixed amount of threads (as don't want start 50 threads). if need know when have finished, can use synchronization tools java.util.concurrent package, cyclicbarrier or atomicinteger .

java - Is it possible to turn a Jhipster application into a mobile app? -

is possible turn jhipster application mobile app? app html5 through phonegap. yes it's possible means substantial manual effort split server side client side, put client side cordova project, adapt build process. have add cors headers on server-side servlet filter , on client-side. of course assumes decide keep bootstrap css framework, if decide use mobile framework ionic, have rewrite views , parts of controllers too. so it's feasible if experienced angular developer. another possibility write yeoman generator reads jhipster json format describing entities generate ionic code.

dart - Redstone Mapper stuck on pub get -

i added redstone_mappe r in dependencies , run pub got stuck on resolving dependencies... here's pubspec.yaml name: sample version: 0.0.1 description: sample author: joes homepage: http://www.joes.com/ environment: sdk: '>=1.5.0 <2.0.0' dependencies: appengine: '>=0.3.0 <0.4.0' browser: '>=0.10.0 <0.11.0' polymer: '>=0.16.0 <0.17.0' paper_elements: '>=0.7.0 <0.8.0' redstone: '>=0.6.0-beta.1 <0.7.0' redstone_mapper: '0.2.0-beta.1 <0.3.0' shelf: '>=0.6.0 <0.7.0' shelf_static: '>=0.2.0 <0.3.0' shelf_rpc: '>=0.0.0 <0.1.0' route_hierarchical: '>=0.6.0 <0.7.0' sass: '>=0.4.0 <0.5.0' dartson: '>=0.2.0 <0.3.0' dev_dependencies: test: transformers: - sass/inlined_sass_transformer - dartson - polymer: entry_points: web/index.html - $dart2js: minify: true ...

android - Toast is not showing in posting tweet -

this code when user click share button. public void onclick(view v) { switch (v.getid()) { case r.id.btn_login : logintotwitter(); break; case r.id.btn_share: status = "i'm riding @ taxi name: " + operator.gettext().tostring() + "\n" + "with plate number of: " + plate.gettext().tostring() + "\n" + shareedittext.gettext().tostring(); if(status.trim().length() > 0) { new updatetwitterstatus().execute(status); } else { toast.maketext(this, "message empty!!", toast.length_short).show(); } break; } } class updatetwitterstatus extends asynctask<string, string, void> { @override protected void onpreexecute() { super.onpreexecute(); pdialog = new progressdialog(m...

r - trying to perform a paired t.test for each row and count all rows where p-value is less than 0.05 -

i've been wrecking head past 4 hours trying find solution r problem, driving me nuts. i've searching everywhere decent answer (including stackoverflow.com) far i've been hitting wall after wall. appealing of fine community :) consider following dataset: set.seed(2112) datasample <- matrix(rnorm(24000),nrow=1000) colnames(datasample) <- c(paste("trial",1:12,sep=""),paste("control",13:24,sep="")) i need perform t-test every row in datasample in order find out if groups trial , control differ (equal variance applies). then need count number of rows p-value equal to, or lower 0.05. so here code tried, know wrong: set.seed(2112) datasample <- matrix(rnorm(24000),nrow=1000) colnames(datasample) <- c(paste("trial",1:12,sep=""),paste("control",13:24,sep="")) pvalresults <- apply( datasample[,1:12],1,function(x) t.test(x,datasample[,13:24], var.equal=t)$p.value ) sum...

upnp - Error when running cling 2.0 Browser example in Android -

i trying use cling 2.0 on android 4.1 , upnp renderer , server. following error when the browser example runs: process: com.mike.cling_test, pid: 8846 java.lang.noclassdeffounderror: failed resolution of: lorg/eclipse/jetty/server/server; @ org.fourthline.cling.transport.impl.jetty.jettyservletcontainer.resetserver(jettyservletcontainer.java:165) @ org.fourthline.cling.transport.impl.jetty.jettyservletcontainer.<init>(jettyservletcontainer.java:57) @ org.fourthline.cling.transport.impl.jetty.jettyservletcontainer.<clinit>(jettyservletcontainer.java:55) i have googled error , found cling user forum i have followed steps outlined in the answer, still same error. online manual not seem 1 should using. there pdf of version 2.0 manual? i had same issue, problem cling provided without jetty library. you have use maven dependency this: <dependency> <groupid>org.eclipse.jetty</groupid> <arti...

scripting - Bash with getopts/flags and multiple functions -

i have problem getopts. when write ./nameofscript.sh -n name - should make new repository says me : -- n unknown option , in new line: adding user name: blank. why happen ? #!/bin/bash #what2do=${0##*/} #what2do=${what2do%.sh} what2do="addproject" what2do="addrepository" what2do="adduser" doaddrepository () { local reponame="$1" echo "adding repo name: $reponame" # adding new repository name $reponame... } doaddproject () { local projname="$1" echo "adding project name: $projname" # adding new project name $projname... } doadduser () { local username="$1" echo "adding user name: $username" # code add user "$username"... } case $what2do in addrepository) while getopts 'n:' key; case $key in n) repo_name=$optarg ;; esac done doaddr...

python - How do you add httplib2 into ansible? -

i trying use get_url module ansible , when run following error: failed: [localhost] => (item=10) => {"failed": true, "item": "10"} msg: httplib2 not installed now have installed httplib2 using pip: pip install httplib2 requirement satisfied (use --upgrade upgrade): httplib2 in /usr/local/lib/python2.7/site-packages but hasn't helped situation. can see ansible using different python_path os (where httplib2 installed) cannot work out how httplib2 installed path (other copying isn't nice). any appreciate. i ran problem on 1 of macs (i had been switching between homebrew python installation , system install recently, funky anyways), , ended fixing it, @ least particular session, starting interactive python session on cli , importing library: $ python >>> import httplib2 >>> exit() $ [continue doing ansible...]

Difference between stash vs stage files in GIT -

hy, when need save changes 1 branch before checking out other branch, git says: stage or commit files before can checkout other branch. have been recommended use stash option so: 1.stage files not enough save files before checking out other branch? what differences between stage , stash files? thanks 1.- more "save" files, act git expect according flow. (advice, git knows :) ) 2.- stash move modified files stack. so, later in same or in branch, able bring them , see modifications in project. stage step before make commit, add modified files "staged files" create next commit. now, stash files $git stash and add files (stage) $git add now, why better stash changes staging them? maybe part of documentation can solve doubts: documentation: stashing: often, when you’ve been working on part of project, things in messy state , want switch branches bit work on else. problem is, don’t want commit of half-done work ca...

python 2.7 - Challenge: Creating a list of tuples of different combinations with different value 'options' in each location of the tuple. -

here's challenge. , if can solve you're better man me. lets can = 1 or 0, b can = 1 or 0, c can = 0,1 or 2, d can = 0,1,2 or 4, e 0, , f = 0 or 1. make list of tuples have of combinations sum specific number, under 5, selection of letters. eg a,b,c,d , number 4 give (in no specific order) [(1,1,1,1),(1,1,2,0),(1,1,0,2),(0,0,2,2),(0,0,0,4)] or f,f,e,d,c , 3 give [(1,1,0,1,0),(1,1,0,0,1)(1,0,0,1,1),(1,0,0,2,0),(1,0,0,0,2),(0,1,0,2,0),(0,1,0,0,2)] creating of combinations , dropping ones dont add number cheating , inefficient. i have tried using list(itertools.product(*a)) but said creates combinations cheating use can reduce it. you use a list comprehension with short-circuiting conditionals : [(a,b,c,d) in range(2) b in range(2) if a+b <= 4 c in range(3) if a+b+c <= 4 d in [0,1,2,4] if a+b+c+d == 4] yields [(0, 0, 0, 4), (0, 0, 2, 2), (0, 1, 1, 2), (0, 1, 2, 1), (1, 0, 1, 2), (1, 0, 2, 1), (1, 1, 0, 2), (1, 1, 1, 1), ...

Create Nexus User Through REST API -

i working nexus oss 2.11.x , create new users through rest api. following command correctly retrieves list of users, confirming able call api: curl -u $nexus_user:$nexus_pass $nexus_local/service/local/users based on api documentation, i've constructed json user object: export user='{"data":{"email":"testing@example.com","firstname":"test","lastname":"ing","userid":"testing","status": "active","roles":["repository-any-read"],"password": "test123$"}}' and submit post request: curl -i -h "accept: application/json" -h "contenttype: application/json; charset=utf-8" -v -d "$user" -u $nexus_user:$nexus_pass $nexus_local/service/local/users the response comes http 201 (created) - get /service/local/users gives me original user list. user not in list provided ui, , log (available in ui) n...

maven - AEM CQ5 project giving NoClassDefFoundError for org/codehaus/mojo/animal_sniffer/logging/Logger when run mvn install disconnected from internet -

i'm new aem cq5, trying setup maven on 1 linux machine can not connected internet (company infosec reasons). so, i've tried uploading dependencies manually on our internal nexus, project builds fine when run " mvn clean install ". our main idea make cq projects build on our machine(s) can not connected internet (and fetch dependencies local nexus). all find " content-package-maven-plugin " , " content-package-maven-plugin-parent " missing in our local nexus, uploaded them. now, when run " mvn install " below error during maven phase " content-package-maven-plugin:0.0.20:check-signature (default-check-signature) " [info] --- content-package-maven-plugin:0.0.20:check-signature (default-check-signature) @ myproject-content --- [warning] error injecting: com.day.jcr.vault.maven.pack.checksignaturemojo java.lang.noclassdeffounderror: org/codehaus/mojo/animal_sniffer/logging/logger @ java.lang.class.getdeclaredconstructo...

php - Session in codeigniter model View Controller -

when login success redirect home page. after set session in login , view page, when refresh same page redirect in login page, whats reason , please provide solution problem? controller public function login() { $email = $this->input->post('email'); $password = md5($this->input->post('password')); $result = $this->search_model->login($email, $password); if($result !='') { $this->session->set_userdata('user_id', $email); $seid = $this->session->userdata('user_id'); } if ($seid=='') { //echo ($seid); $this->index(); } else { $this->view(); } } public function view() { $seid = $this->session->userdata('user_id'); $data['result']=$this->search_model->getall($seid); $this->load->view('pagination_view',$data); } model function login($email, $password...

shell - How to copy files with a particular extension from one directory to another in linux -

i newbie in linux. have write shell script accepts user input ("file extension" , "destination") , copy files 1 directory destination directory. how that? try this: myscript.sh #/bin/sh ext=${1} dst=${2} cp *.$ext "$dst" ex: $ myscript.sh cpp /home/user/ copies files .cpp extension in current directory /home/user directory

sip - 481 Call Leg/Transaction Does Not Exist using SipUnit -

i've changed sipr sipunit, , i'm trying make basic call. server has digest authentication. unfurnately, keep getting "481 call leg/transaction not exist" , i'm sure because of pretty obvious reason, can't seem solve it... i've tried everything. here critical piece pbx's logs. in advance, if can explain me why happening! - --> sip/2.0 407 proxy authentication required - from: <sip:6000@auto>;tag=126319630 - to: <sip:6001@auto>;tag=2ff812a8-da5512ac-1b94-6006-5a9c94-45273d5a-5a9c94 - call-id: e0114805d5e2e318089ce3ef710aad63@10.200.10.59 - cseq: 1 invite - contact: <sip:6001@172.18.85.218:1060> - proxy-authenticate: digest realm="radvision.com",nonce="c0cf196770955ca0fc6e3e65dc0cdb410000000055c1cef4",algorithm=md5 - via: sip/2.0/udp 10.200.10.59:9001;received=172.18.85.218;rport=1060;branch=z9hg4bk-373136-f42a6651eba8e1583353591126fdf561 - content-length: 0 - <-- ack sip...

image - PFFile to UIImage in Parse (ios) -

i trying convert pffile uiimage. works, however, doesn't seem run until end. line after image called appends image array (photosarray.append(image!)), when this, doesnt work, , stores nothing. believe because since image hasnt been retrieved yet because grabbing image in background. how not have save in background, wait until data loaded, append photosarray image, array isnt empty? var photosarray = [uiimage]() let photosvalue = log["images"] as! pffile photosvalue.getdatainbackgroundwithblock({ (imagedata: nsdata?, error:nserror?) -> void in if (error == nil) { let image = uiimage(data:imagedata!) //line below appends nothing! photosarray empty array, [] photosarray.append(image!) //following line of code doesnt run until end. last line printed in console. println("our image: \(image)") } }) //prints "[]", no value...

angularjs - Change position of legend in angular nvd3.js -

i trying change position of legends bottom of piechart [which top default]. in normal nvd3.js without angular-nvd3, it's suggested use: d3.select(".nv-legendwrap") .attr("transform", "translate(100,100)"); is possible in angular-nvd3 or there option? override css custom attributes: .your-div-class .nv-series:nth-child(1){ transform: translate(0, 0); } .your-div-class .nv-series:nth-child(2){ transform: translate(0, 20px); } .your-div-class .nv-series:nth-child(3){ transform: translate(0, 40px); } .your-div-class .nv-series:nth-child(4){ transform: translate(0, 60px); } .your-div-class .nv-series:nth-child(5){ transform: translate(0, 80px); } .your-div-class .nv-series:nth-child(6){ transform: translate(0, 100px); } .your-div-class .nv-series:nth-child(7){ transform: translate(0, 120px); } .your-div-class .nv-legend{ transform: translate(180px, 150px); } .your-div-class .nv-legendwrap{ transform: translate(-80px, 70px); } your-d...

stream - c# DeflateSream return 0; -

i'm trying compress image using defltestream somehow when try print return buffer length it's 0. public void goo() { memorystream ms = new memorystream(); memorystream ms2 = new memorystream(); bitmap prev; prev = getdesktopimage(); prev.save(ms,imageformat.png); prev.save(ms2, imageformat.png); com = ms.toarray(); messagebox.show((com.length / 1000).tostring() + "kb"); messagebox.show(((compress(ms2).length/1000).tostring()+"kb")); } getdesktopimage function returns screenshot. in first messagebox display length (for example output is: "350kb"), in second 0kb! this compress method: private static byte[] compress(stream input) { using (var compressstream = new memorystream()) using (var compressor = new deflatestream(compressstream, compressionmode.compress)) { input.copyto(compressor); compressor.close(); return compressstream.toarray(); ...

c# - "An expression of non-boolean type specified" error executing SQL from .Net -

i getting error: an expression of non-boolean type specified in context condition expected, near 'likeram'. i entered "ram" in txt_name : sqlconnection con = new sqlconnection( @"data source=dell_laptop\sqlexpress;integrated security=true"); datatable dt = new datatable(); sqldataadapter sda = new sqldataadapter( "select * newproj name like" + txt_name.text, con); sda.fill(dt); datagridview1.datasource = dt; you're missing space between like , string concatentation , quotation mark around parameter: sqldataadapter sda = new sqldataadapter( string.format("select * newproj name '{0}'" txt_name.text), con); though i'd advise not use method prone sql injections. use sql parameters instead: sqlcommand command = new sqlcommand("select * newproj name @text"); command.parameters...

google chrome - Navbar occasionally renders in two lines -

Image
i'm having strange behavior using bootstrap's navbar nav. have normal text , label span in 1 of navigational elements , span ends in new line rendering whole navbar higher should be. strangest thing happens (~50% of time), without me changing conditions (same screen size, same page/content, etc.). also, able reproduce in chrome not in firefox. as use dev-tools adjust css settings, span jumps in place, i'm out of idea how debug or experiment fixes. any ideas or suggestions on: how debug issuse? what cause? here how looks broken: and how should be: and here excerpt of header. unfortunately have lot of code in full header (and it's angular app things controlled dynamically), i'm not excluding possibility problem somewhere else, i'm having hard time reproducing regularly full code, didn't think making plunker case easy. <header class="navbar navbar-default navbar-fixed-top ng-scope"> <nav class="collapse navb...

html - Issue with Bootstrap Anchor Tag within Paragraph Tag -

Image
i have simple issue regarding html anchor tag within paragraph tag. bootstrap template. the problem occurring when viewing webpage in small , small viewports. here website the anchor tag button shifts outside of container, whenever scaling down smaller viewports. need anchor remain within container, i'm not clear on need modify. <div class="item"> <img class="img-responsive rounded-2x img-width-175 hidden-xs" style="float: left; margin-top: 2px;" src="images/home/exterior2.jpg" alt="exterior painter"> <h3 style="background-color: #ff6d00; margin-top: -2px; float: inherit; text-decoration: underline;"><i>exterior painting</i></h3> <p class="text-justify" style="text-align: left; font-size: 1.07em; background-color: #ff6d00; padding-left: 8px; padding-bottom: 6px; margin-top: -10px; line-height: 1.37em;"> whether home new, or perha...

objective c - Xcode - Created an iOS framework but can't use it in a project -

Image
i've created ios framework tutorial: http://www.raywenderlich.com/65964/create-a-framework-for-ios#comments when add new project, can import public header , can build successfully. problem comes when try create instance of object framework; when building it, fails 40 errors: all errors displayed this: apple mach-o linker error "_objc_class_$_avplayeritem < example. at bottom shows message > symbol(s) not found architecture arm64 at first thought problem framework created wasn't supporting arm64. executed following line in terminal check architectures supported framework: xcrun lipo -info myframework the output > architectures in fat file: myframework are: armv7 i385 x86_64 arm64 i'm using xcode 6.4. thank you. update: here images of error list: thanks! i wrong think in myframework project used several ios frameworks avfoundation , c++ standard library (libstdc++.6.dylib). in fat library don't have them. need add d...

c# - Unable to schedule my WiX Custom Action into the msi -

i have installer solution in visual studio contains c# windows application bootstrapper, , 2 msi projects. want schedule custom action 1 of 2 msis run during uninstall sequence - first added customactions projects same solution (called "customactions"), has customaction.cs file defines custom function scheduled. function should write log file now: namespace customactions { public class customactions { [customaction] public static actionresult uninstallsecondarymsi(session session) { session.log("begin customaction1"); /* search productcode of secondary msi here; run msiexec uninstall */ return actionresult.success; } } i added customactions project reference msi project, , added following product.wxs: <!-- custom actions --> <fragment> <binary id="customactiondll" sourcefile="$(var.customactions.targetdir)\customactions.ca.dll" /...

ruby - Render Custom views instead of default Devise views- Rails -

i have changed views generated devise gem rails keeps rendering file devise's gem file path. rendered /users/jeremy/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/devise-3.5.1/app/views/devise/shared/_links.html.erb p/s - i've changed config.scoped_views true overriding default devise’s views simple , straight forward, need generate views in our app/views folder following single command. rails g devise:views the following views generated. app/views/devise/confirmations app/views/devise/mailer app/views/devise/passwords app/views/devise/registrations app/views/devise/sessions app/views/devise/shared app/views/devise/unlocks no other changes necessary. or if have done it,you need move folders inside app/views/devise

sql - Get hierarchy only for updated records -

i have couple of tables resource data resource ---------- rid | rname | updatedstamp r1 res1 01-jul-2015 r2 res2 01-jul-2015 r3 res3 01-jul-2015 r4 res4 01-jul-2015 r5 res5 01-jul-2015 r15 res15 01-aug-2015 resourcetree ---------- parid | rid | updatedstamp --------------------------- null r1 01-jul-2015 r1 r2 01-aug-2015 r2 r3 01-jul-2015 r3 r4 01-jul-2015 r4 r5 01-jul-2015 r14 r15 01-jul-2015 i need select query fetch records updated on or after '01-aug-2015'. also, need fetch details of child resources of parent updated on '01-aug-2015' so in case, need fetch records resource table updated on 01-aug-2015. in case r15. additionally, should fetch details resource_tree table update has happened on or post 01-aug-2015 . in case r2 r3 r4 r5. results parid rid rname r14 r15 res15 r1 r2 res2 r2 r3 res3 r3 r4 res4 r4 r5 res5 query tried ...

sparql - Querying named RDF graphs in TDB using tdbquery -

i trying query newly created tdb database use tdbquery program. however, having hard time writing query targets correct named graph. doing following: first create new dataset , add name graph called "facts" dataset dataset = tdbfactory.createdataset("/tdb/"); dataset.begin(readwrite.write) ; try { model facts = rdfdatamgr.loadmodel("lineitem.ttl") ; dataset.addnamedmodel("facts", facts); dataset.commit(); tdb.sync(dataset); dataset.end(); } { dataset.close(); } when query graphs in tdb database looks fine. ./tdbquery --loc /tdb/ "select * { graph ?g { ?s ?p ?o } }" -------------------------------------------------- | s | p | o | g | ================================================== | <fact1> | <predicate> | <nation> | <facts> | | <fact2> | <predicate> | <region> | <facts> | ------------------------------------...

How to perform division of BigIntegers with bigger denominator than numerator and exponentiating it to 1/x where x is also biginteger -

i trying solve equation = ( ( z/(u.s^v) ) ^ 1/e ) mod n, , variables bigintegers. denominator bigger numberator, numerator being 50 digits , denominator of above 250 digits. answer 0 division. i tried bigdecimal well, gives me same problem.

android - Click on Facebook LikeView returns "Application is not visible to this person" exception -

i'm using facebook-android-sdk v4.4.0 , i'm trying implement button in android app. did "by book": in activity's oncreate i'm doing following: mlikeview = (likeview) findviewbyid(r.id.like_view); mlikeview.setobjectidandtype(url, likeview.objecttype.open_graph); mlikeview.setonclicklistener(this); mlikeview.setonerrorlistener(new likeview.onerrorlistener() { @override public void onerror(facebookexception e) { log.d(tag, e.getmessage(), e); } }); and after in activity's onactivityresult i'm calling mcallbackmanager.onactivityresult(requestcode, resultcode, data); like button shown whenever click it, blank facebook page closes instantly , "application not visible person" facebookexception. button still under review , i'm administrator of facebook app. i've found out why happening. wrong application id. found out uninstalling facebook app phone , letting webview it's job w...

jquery - How to add addtional class name on click, other than `mouseenter' in angularjs -

i add additional class name element on click. how add that? i trying way, not working: here code : <div class="row designoption" ng-class="{'active':prodesign}" ng-class="{'activeshow':prodesignadd}"> <span ng-mouseenter="prodesign = true" ng-mouseleave="prodesign = false" ng-click="categoriesadd('prodesign')" class="icon icond">d</span> <span class="info infod">design</span> </div> here shuffling active , on click need add activeshow how that? syntax add class on element using selector. $('selector').addclass("classname"); for case, if add class <span ng-mouseenter="prodesign = true" ng-mouseleave="prodesign = false" ng-click="categoriesadd('prodesign')" class="icon icond">d</span> then try $('.i...

hp ux - how to set python environment variable in HP-UX OS? -

i new in hp-ux. trying working python in hp-ux. have install python download package hp-ux package but can not set environment variable. python found in "/usr/local/bin". when tried python --version it returned python: command not found how can work python in hp-ux ? thanks this looks directory containing python interpreter not on path . check if path contains /usr/local/bin : echo $path if not see /usr/local/bin in there, can add path this: export path=$path:/usr/local/bin

html - Send ID instead Name in PHP and MYSQL -

problem: i want send id database table instead of name. want display name in field instead of id. work's while send through combo box. don,t know how work search field. php code given below: <font> <b>name: </b></font> <?php include("database/db.php"); if($link === false){ die("error: not connect. " . mysqli_connect_error()); } $sql = "select * table"; $result = $link->query($sql); ?> <select name="id"> <?php if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { $ad_id = $row["id"]; $name= $row['name']; ?> <option value="<?php echo $ad_id; ?>"><?php echo $name; ?></option> <?php } } else { echo "0 results"; } // close connection mysqli_close($link); ?> </select> as per comment can use auto...

javascript - Possible to style Zurb Foundation Joyride like this? -

just wondering if knows if possible style foundation's joyride tooltips this ? specifically little progress indicator , placement of button. or if point me towards sort of resource in how set up? thanks

javascript - d3 js graph not displaying line -

the below d3 graph runs fine... except can't see resulting line on graph. can inspect element in chrome , of values of line there no line visible. i'm pretty sure it's css issue can't figure out. the code based on this: focus+context via brushing any appreciated! var data = [ { day : 'sunday', time : '0.00', bluetooth : '3', date : '03\/06\/2015', epoch : '1440808200' }, { day : 'sunday', time : '0.25', bluetooth : '3', date : '03\/06\/2015', epoch : '1440809100' }, { day : 'sunday', time : '0.50', bluetooth : 3, date : '03\/06\/2015', epoch : '1440810000' }, { day : 'sunday', time : '0.75', bluetooth : '3', date : '03\/06\/2015', epoch : '1440810900' }, { day : 'sunday', time ...

r - Average Value in other cells for Unique Groups -

i have following sample dataset. first 3 columns identify specific group. dat <- read.table(header=true, text=" id lfrom lto it1 it2 it3 it4 1120 1 2 47 152 259 140 2000 1.1 2.1 88 236 251 145 2000 1.2 2.1 72 263 331 147 1120 1 2 71 207 290 242 1120 1 2 47 152 259 140 2001 1.2 2.1 72 263 331 147 2001 1.1 2 71 207 290 242 1120 1 2 47 152 259 140 2000 1.1 2.1 88 236 251 145 1120 1 2 72 263 331 147 2000 1.1 2.1 71 207 290 242 ") dat id lfrom lto it1 it2 it3 it4 1 1120 1.0 2.0 47 152 259 140 2 2000 1.1 2.1 88 236 251 145 3 2000 1.2 2.1 72 263 331 147 4 1120 1.0 2.0 71 207 290 242 5 1120 1.0 2.0 47 152 259 140 6 2001 1.2 2.1 72 2...