Posts

Showing posts from March, 2010

How to observe individual input elements which were created in bulk in R Shiny -

i have set of sliderinput s number equals number of columns in data. number of columns determined values of choices global.r . each slider associate 1 column , created shown bellow in server.r , ui.r . i observe them individually can apply values associated column. in example. suggestion? #example. not valide code!!! selectedvalbysliders <- observe({ print("numbers selected via sliders:") out_sliders <- input$sliders[1:numsliders] print(out_sliders) }) server.r output$sliders <- renderui({ numsliders <- numcols(input$dataname) lapply(1:numsliders, function(i) { sliderinput( inputid = paste0('column', i), label = paste0('select range column ', i), min = min(selectrange(input$dataname)), max = max(selectrange(input$dataname)), value = c(min(selectrange(input$dataname)), max(selectrange(input$dat...

java - Wicket onsubmit information dialog -

i trying have wicket display information dialog after save button clicked invokes onsubmit has no access ajaxrequesttarget target. here code snippet if (trainingmode() && !recorddecision.equalsignorecase("primary")) { if (trainingevalservice.comparedecisions(recorddecision, recordset.getrecordsetid())) { system.out.println("validity matchesmaserati: " + trainingevalservice.gettrainingeval().getactual_validity_decision_comment()); // dialog associated save button dialog = new messagedialog("dialog", "notice", "decision matches " + trainingevalservice.gettrainingeval().getactual_validity_decision_comment() , dialogbuttons.ok_cancel, dialogicon.warn) { public void onclose(ajaxrequesttarget target, dialogbutton button) { } }; dialog.open(target) // breaks here without reference ajaxtarget } else { ...

c# 4.0 - How to find the parent object from the child(property) object in C#? -

i have situation child able reference parent. reason want child have ability update parent object. configuration.range.next(configuration) i not want pass parent object reference instead range object should able find parent object. how this? class range { ....methodx(){how access configuration object here } } class configuration { public range range{get;set;} ..... } part of difficulty answering question people use terms "child" , "parent" mean different things different people. one of common uses of terms synonyms subclass (child) , superclass (parent) in inheritance structure. assuming meaning, have access superclass (i.e. "parent") declared public or protected . example: public class parent { protected int foo { get; set; } } public class child : parent { public void dosomething() { foo = 42; // or base.foo = 42; } } if isn't situation you're working please add more inf...

javascript - Sort unordered list based on data-row and data-col -

i have page 'ul' (unordered list) insert 'li' elements on fly. 2 attributes: data-col , data-row. 2 attributes arbitrary , can value. (any real positive number) is there way re-order 'li' elements based on data-row , data-col? not have visible, need 'ul' element children ordered. extra info: reason because have back-end code needs read 'ul' element children in sequence , populate table element. it´s i´m saving multi-dimensional array 1 dimension array. thanks :) you can use jquery.sort() sort list of li elements based on row, column, , re-append sorted list ul . appended list replaces previous unsorted version: var ul = $('#mylist'); var lis = $('#mylist > li'); lis.sort( function(a, b) { var ela = $(a); var elb = $(b); var res = +ela.data('row') - elb.data('row'); if (res == 0) // if rows same, sort column res = +ela.data('col...

python - Djangos TEMPLATE_DIRS not found -

i trying create login page in django application. created "templates" folder on root directory of application. then on settings.py wrote code. template_dirs = (os.path.join(base_dir,'templates'),) and giving feedback: templatedoesnotexist @ /login/ template-loader postmortem django tried loading these templates, in order: using loader django.template.loaders.filesystem.loader: using loader django.template.loaders.app_directories.loader: /users/julianasakae/desktop/djangoproject/demo/lib/python3.4/site-packages/django/contrib/admin/templates/login.html (file not exist) /users/julianasakae/desktop/djangoproject/demo/lib/python3.4/site-packages/django/contrib/auth/templates/login.html (file not exist) /users/julianasakae/desktop/djangoproject/boardgames/main/templates/login.html (file not exist) i tryed everything, not seems work. any suggestions? what version of django using? appears template_dirs used prior 1.8 in current...

Javascript Object Addition Assignment Operator -

i trying use addition assignment operator within javascript object in order add number of votes in student election. given following: var votes = { "alex": { president: "bob", vicepresident: "devin", secretary: "gail", treasurer: "kerry" }, "bob": { president: "mary", vicepresident: "hermann", secretary: "fred", treasurer: "ivy" }, "cindy": { president: "cindy", vicepresident: "hermann", secretary: "bob", treasurer: "bob" }, "devin": { president: "louise", vicepresident: "john", secretary: "bob", treasurer: "fred" }, "ernest": { president: "fred", vicepresident: "hermann", secretary: "fred", treasurer: "ivy" }, "fred": { president: "louise", vicepresident: "alex", secretary: "ivy", t...

ios - Local Notification not always sending -

i set local notification fire off @ 7:45:01 pm every day, not firing on daily basis @ time . any idea i'm missing here? i've tried editing code, still stuck knowing i'm missing. will post code needed, thanks! appdelegate.m : - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { if ([application respondstoselector:@selector(registerusernotificationsettings:)]) { [application registerusernotificationsettings:[uiusernotificationsettings settingsfortypes:uiusernotificationtypealert|uiusernotificationtypebadge|uiusernotificationtypesound categories:nil]]; } return yes; } viewcontroller.m : - (void)viewdidload { [super viewdidload]; uilocalnotification* localnotification = [[uilocalnotification alloc] init]; nscalendar *cal = [nscalendar currentcalendar]; nsdatecomponents *comp = [cal components:(nscalendarunityear | nscalendarunitmonth | nscalendarunitday | nscalend...

mapreduce - How to do a cross join / cartesian product in RavenDB? -

i have web application uses ravendb on backend , allows user keep track of inventory. 3 entities in domain are: public class location { string id string name } public class itemtype { string id string name } public class item { string id denormalizedref<location> location denormalizedref<itemtype> itemtype } on web app, there page user see summary breakdown of inventory have @ various locations. specifically, shows location name, item type name, , count of items. the first approach took map/reduce index on inventoryitems: this.map = inventoryitems => inventoryitem in inventoryitems select new { locationname = inventoryitem.location.name, itemtypename = inventoryitem.itemtype.name, count = 1 }); this.reduce = indexentries => indexentry in indexentries group indexentry new { indexentry.locationname, indexentry.itemtypename, } g select new { ...

php - ElasticSearch query hangs in laravel job queue -

i using laravel-elasticsearch provider es queries. using within job processed laravel queue(using beanstalkd). problem having in long running jobs, no longer able insert data elasticsearch. job hangs (no exceptions thrown) have narrowed down code making es call. possible connection become stale how , not reconnect? other thought has using facade , being singleton. here doing, not exact code. code works fine when not run in long running job.i wanted provide context.it inserts fine, there no issues code functioning until run after long running process. update: i have narrowed issue down elasticsearch-php library persisting connection. have es behind load balancer times out tcp connections after 5 min. issue there no keep alive in es php library. after 5 min connection closed not close connection on end. there way set keep alive elasticsearch-php? or call reset connection? //run functions.... $params = array(); $params['body'] = array('somefield' => 's...

Twilio Screen Caller with Voicemail -

my goal have ability screen incoming calls, , send them voicemail. below code screening correctly, if answer call , and hangup call dropped instead of directing voicemail. how can accomplish this? <say>please wait while connect aaron. calls may recorded quality assurance purposes.</say> <dial action="voicemail.php?email=aaron" timeout="15"> <number url="screen-caller.xml">+11231231234</number> </dial> screen-caller.xml: <response> <gather action="handle-screen-input.php" numdigits="1"> <say>to accept, press 1.</say> </gather> <!-- if customer doesn't input anything, prompt , try again. --> <say>sorry, didn't response.</say> <redirect>screen-caller.xml</redirect> </response> handle-screen-input.php: echo '<?xml version="1.0" encoding="utf-8"?>...

php - How to select values where another value is an array? -

i'm trying select values post values array, not know wrong query giving me error. i'm trying know courses added table. have 5 inputs in form. notice: trying property of non-object in c:\apache\htdocs\xxx\addcourse.php on line 262 here code <?php if(isset($_post['submit'])) { $code= isset($_post['code']) ? $_post['code'] : ''; $coursecode = isset($_post['coursecode']) ? $_post['coursecode'] : ''; $both=$code[$x] .' '. $coursecode[$x]; $sqlcourses = "select * courses course_code='$both' order course_id desc limit 5 "; $resultcourses = $mysqli->query($sqlcourses); if ($resultcourses->num_rows > 0) { while($row = $resultcourses->fetch_assoc()) { ?> </p> <p>&nbsp;</p> <p>&nbsp; </p> <table wi...

android - How to force picture select library in landscape? -

i can use following way open picture select library, there way force in landscape? intent = (new intent("android.intent.action.pick")).settype("image/*"); fragment.startactivityforresult(intent, 9162); in manifest set orientation of activity landscape? instance <activity android:name="android.intent.action.pick" android:screenorientation="landscape" ...

ios - I am 5 Controllers deep into a Storyboard, how do I programmatically pop back to the Official Initial Controller? -

i 5 controllers deep storyboard, how programmatically , pop official initial controller? is there 1 liner this? elegant , simple solution? 1 - on root vc, create unwind method: like: - (ibaction)unwindtoroot:(uistoryboardsegue*); then wire "exit" in storyboard. unwind segue. or 2 - in fifth vc, pop manually: [self.navigationcontroller poptorootviewcontrolleranimated:yes]

javascript - jQuery: How to search the user defined array? -

the user can define how many <select> choose , when <select> on change event triggered, value of <select> push array. basically, value , length of array depending on user. now, want if user selected specific value on other <select> , tries select on other <select> , prompt message item selected. well, item name of existing value select. don't know how it. here codes adding <select> . var = 1; $('#add').click(function() { var cnt = $('#append').val(); (var = 0; < cnt; i++) { a++; $('#contain').append('<select class="sel" name="' + + '"></select><button id="remove" name="' + + '">x</button><br name="' + + '"/>'); } var selval = $('#contain select').val(); var optarr = []; $('#contain #sel1 option').each(function() { var opt = $(this).val(); if ...

closures - Traversing/modifying a Groovy data structure -

i'm developing project read data in proprietary format, gather unified groovy data structure, , write out in neat xml (or, json, haven't decided yet) format. i'm total newbie groovy, but, project being ant build project, groovy seems best way go. so far good, i'm able read data, create atomic structures, concatenate them using >> operator, , seamlessly dump them xml markupbuilder (ways easier if doing in java). however, i'm stuck @ point when need modify gathered structures, or traverse through them compose aggregated data. to illustrate, supposing collected our data it's equivalent to: def inventory = { car (make: "subaru", model: "impreza wrx", year: 2010, color: "blue") { feature ("premium sound") feature ("brembo brakes") bug ("leaks oil") bug ("needs new transmission") } car (make: "jeep", model: "wrangler", y...

mysql - findOne({key:value}) or findOne().where({key:value}) when querying database with waterline? -

i'm using waterline query mysql database sails. found 2 ways that. don't know 1 better? way, how handle error both case? 1. model.findone().where({key: value}).then(function(data){ console.log(data);}) 2. phase.findone({key: value}).then(function(data){ console.log(phase);}) either work. in method catch error seen below. 1. model.findone().where({key: value}).then(function(data){ console.log(data);}).catch(function(err){/*....*/}) 2. phase.findone({key: value}).then(function(data){ console.log(phase);}).catch(function(err){/*....*/}) another option phase.findone({key: value}).exec(function(err, data){ if(err) /* error */ console.log(phase); }) also, if searching primary key can phase.findone(pk) https://github.com/balderdashy/waterline-docs/blob/master/query.md#query-language

outlook - Reading calendar folder in a date range using JACOB -

hi guys possible on jacob on reading calendar folder date range , let me subject. if yes please give sample code reference. lot this code has 2 filters 1) first date range - start , end date 2) filter subject = "test" if need date, can omit second filter. how to: filter recurring appointments , search string in subject dispatch namespace = outlokax.getproperty("session").todispatch(); dispatch calendarfolder = dispatch.call(namespace, "getdefaultfolder", new integer(9)).todispatch(); dispatch calitems = dispatch.get(calendarfolder, "items").todispatch(); string customfilter = "@sql=\"urn:schemas:calendar:dtstart\" > '" + dateutility.datetoutcstring(startdate) + "' , \"urn:schemas:calendar:dtend\" = '" + dateutility.datetoutcstring(enddate) + "'" ; string customfindfilter = "@sql=\"urn:schemas:httpmail:subject\" '" + "test...

c++ - Make While Loop Shoot Back Up To Top -

so, i'm working on c++ assignment intro computer science class. in program want there loop can shoot top anytime want, sort of how can boolean in example: bool1 = true; while (bool1){ bool1 = true; } is there anyway can mirror effect in while loop set depend on numerical value like: while(x > 99) thanks in advance. you said in comment: repeat beginning. if want go start of while loop, use continue; while(x > 99) { // stuff. // ... // upon condition, go beginning. if ( some_condition_is_true ) continue; // otherwise, proceed normal execution of // loop. // ... }

android - adb broadcast with intent -

i'm setup campain measurement testting my pakage : com.example.proj and reciver : com.example.proj.reciver.mreciver cmd: adb shell broadcast -a com.android.vending.install_referrer -n com.example.proj/com.example.proj.reciver.mreciver --es "referrer" 'utm_source=testsource&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=testcampaign' i not work , if replace & character , it's ok . i'm missing? sorry bad english edit: have put 2 line : adb shell then am broadcast -a com.android.vending.install_referrer -n com.example.proj/com.example.proj.reciver.mreciver --es "referrer" "utm_source=testsource&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=testcampaign" thanks.

Summing an array in assembly x86. On the inputted indexes -

im having trouble adding array on inputted indexes. example, user inputs 4 starting , 6 ending array have loop through array[4] array[6] , add numbers inclusively. i'm not sure if can use array in .data in arraysum procedure. have push procedure somehow? i using kip irvine's external library this. my code here: title assignment 7 include irvine32.inc .data str1 byte "the array sum is: ",0 start byte "enter starting index: ",0 endinx byte "enter ending index: ",0 array dword 4, 6, 2, 5, 6, 7, 8, 4 sum dword ? j dword ? k dword ? .code main proc mov esi, offset array mov ecx, lengthof array mov edx, offset start call writestring call readint mov j, eax mov esi, j mov edx, offset endinx call writestring call readint mov k, eax mov ecx, k call arraysum mov sum,eax call writeint main endp ;--------------------------------------------------- arraysum proc ;sums a...

wordpress - Query for filter product by multi attribute and price in Wooecommerce? -

i create query that: <?php $args = array( 'numberposts' => -1, 'post_type' => 'product', 'meta_query' => array( 'relation' => 'or', array( 'key' => 'pa_color', 'value' => array('red'), 'compare' => 'in', ), array( 'key' => 'pa_for', 'value' => 'men', 'compare' => '=', ), ), ); $post = get_posts($args); echo '<pre>'; print_r($post); echo '</pre>'; when try run code nothing. please me check query , how products attribute , price?. take meta_key in term_taxonomy table. many thanks!

livecode - Shortcut key have problems -

i have got of coding shortcut. problem have scrolling filed when performing shortcut key event place particular key scrolling field eg: if press alt+b b placed inside scrolling field on rawkeydown thekeynumber switch (thekeynumber) case 98 -- b if altkey down answer"hai" end if break end switch pass rawkeydown end rawkeydown the behavior you're seeing occurring because you're not exiting rawkeydown handler when altkey detected. try this: on rawkeydown thekeynumber switch (thekeynumber) case 98 -- b if altkey down answer "hai" exit rawkeydown #<---exit here end if break end switch pass rawkeydown end rawkeydown

Android ListView scrolls slowly -

i have listview , connected database using cursor adapter. scrolling fine previously. scrolls slow , throws message in log i/choreographer﹕ skipped 115 frames! application may doing work on main thread. how can trace causes slowness? getview code @override public view getview(final int position, view convertview, viewgroup parent) { context = parent.getcontext(); view vi = super.getview(position, convertview, parent); image_comment = (imageview) vi.findviewbyid(r.id.outbox_comment); image_more = (imageview) vi.findviewbyid(r.id.outbox_details); feedbacktext = (textview) vi.findviewbyid(r.id.outbox_feedback_text); relativelayout outbox_bg = (relativelayout) vi.findviewbyid(r.id.outbox_msg_layout); linearlayout outbox_option = (linearlayout) vi.findviewbyid(r.id.outbox_option_layout); avatartext = (textview) vi.findviewbyid(r.id.avatar_text); avatarimage = (imageview) vi.findviewbyid(r.id.avatar_image); avatartext.setvisibility(view.g...

Apache Camel consumer.delay MAX value -

what maximum value can set apache camel consumer.delay ? example need set 3 months. possible its using scheduled executor service java jvm, can use value supports. , yes value 3 months possible. whether idea story.

mysql count not working with join and where clause -

if using query: select clinic.id clinic join dentist on dentist.id = clinic.dentist_id join user on user.id = dentist.user_id user.status = 'active' , clinic.status = 'approved' , user.role_id = 2 group clinic.id; so gives me rows like 32 35 36 42 44 47 50 bug if going total count of results apply query : select count(clinic.id) cnt clinic join dentist on dentist.id = clinic.dentist_id join user on user.id = dentist.user_id user.status = 'active' , clinic.status = 'approved' , user.role_id = 2 group clinic.id; i applied count() id, , returns 1 1 1 1 1 1 1 it not returns 7, want result 7. can guide please. do not use group by or try this select clinicid,sum(case when clinic !=null 1 else null end).id cnt clinic join dentist on dentist.id = clinic.dentist_id join user on user.id = dentist.user_id user.status = 'active' , clinic.status = 'approved' , user.role_id = 2 group clinic.id;

java - Spring hangs when loading bean definitions -

i have following java code: applicationcontext context = new classpathxmlapplicationcontext ("classpath:applicationcontext.xml"); and following application context: <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd"> <mvc:annotation-driven/> <context:component-scan base-package="in.ksharma"/...

java - Hibernate: getting data from two linked tables using Ctriteria API -

Image
how can data 2 linked tables (one-to-many: 1 user , many results) value ' ispassed ' (boolean) using ctriteria api? private list<?> winners; try { sessionfactory factory = hibernateutil.getsessionfactory(); session hsession = factory.opensession(); transaction tx = null; try { tx = hsession.begintransaction(); winners = hsession.createsqlquery("select * usertable u, resulttable r u.id = r.id r.ispassed = true").list(); tx.commit(); } catch (exception e) { if (tx != null) tx.rollback(); } { hsession.close(); } } catch (exception e) { e.printstacktrace(); } system.out.println(winners.size()); // exception you can use hql: from usertable u, resultta...

Why printing Integer array Object gives hash code while char array object gives value in java? -

here snippet of code public class test1 { public static void main(string[] args) { // todo auto-generated method stub char[] a={'a','b','c',97,'a'}; system.out.println(a); int[] a1={8,6,7}; system.out.println(a1); integer[] b={10,20,30}; system.out.println(b); } } here output abcaa [i@239d5fe6 [ljava.lang.integer;@5527f4f9 i know has deal tostring() method. has been overridden in char return value. hence getting first output expected here overridden tostring() method of java.lang.character .. public string tostring() { char buf[] = {value};//the value of character. return string.valueof(buf); } but looking @ integer there overridden tostring() method public string tostring() { return string.valueof(value); //the value of integer. } then why printing a1 , b code calls default tostring() implementation of object class, is: public stri...

ios - Integer literal overflows when stored into 'UInt' -

updated xcode 6.3 and/or swift 1.2 , getting error integer literal overflows when stored 'uint'* pointing red dot below @ hex color 0x100114151 here code: mybuttonoutlet.settitlecolor(uicolorfromrgb(0x100114151), forstate: uicontrolstate.normal) here uicolorfromrgb() method func uicolorfromrgb(rgbvalue: uint) -> uicolor { return uicolor( red: cgfloat((rgbvalue & 0xff0000) >> 16) / 255.0, green: cgfloat((rgbvalue & 0x00ff00) >> 8) / 255.0, blue: cgfloat(rgbvalue & 0x0000ff) / 255.0, alpha: cgfloat(1.0) ) } 0x100114151 . okay, that's 9 hex digits. assumption: uint 32 bits on platform. works out 8 hex digits. in other words, assigning >32-bit value variable can hold 32 bits.

c# - Deploy addin project with ppt slide within solution and include it in deployed folder -

Image
i trying deploy project having power point slide in solution exlorer. after build these gives me error not find @@.ppt file in bin debug. used build action content , copy output directory copy seems of no help. there other option below code trying copy shapes ppt saved in solution explorer current ppt after deploy since ppt doesnt add deployed files cannot find ppt doesnt add shapes. powerpoint.application ppapp = globals.thisaddin.application; string programfilespath = appdomain.currentdomain.basedirectory; //var filespath = directory.getparent(directory.getparent(directory.getparent(programfilespath).tostring()).tostring()); string fullpath = programfilespath; string pptname = "moons.ppt"; string themepresentationpath = fullpath + pptname; // powerpoint.application ppapp2 = var temporarypresentation = ppapp.presentations.open(themepresentationpath, msotristate.msofalse, msotristate.msotrue, msotristate...

php - Multiple INSERT query's fetching last_insert_id of each each -

mysql_query( "insert users(email, password) values ('$email','$password')" ); $user_id = mysql_insert_id( ); mysql_query( "insert business_details ( business_id, name, address, city, state, country, pincode) values ('$category','$business_name', '$business_address', '$city', '$state', '$country', '$pincode')" ); $idb = mysql_insert_id( ); mysql_query( "insert user_profiles (name, phone, user_id, business_details_id) values ('$person_name', '$phone_number', '$user_id', '$idb')" ); what best way insert queries in one? possible? no, isn't supported in mysql - oracle can it.

angularjs - Using Angular and Rails: Bcrypt throwing an error when trying to create user -

i working on app use angular , rails. trying create new user, keep getting error: bcrypt::errors::invalidhash (invalid hash): app/models/user.rb:14:in `new' app/models/user.rb:14:in `password' app/controllers/users_controller.rb:8:in `create' it seems angular creating password, not getting passed rails. parameters: {"first_name"=>"john", "last_name"=>"smith", "email"=>"john.smith@gmail.com", "username"=>"johnsmith", "password"=>"[filtered]", "user"=>{"first_name"=>"john", "last_name"=>"smith", "username"=>"johnsmith", "email"=>"john.smith@gmail.com"}} here frontend code looks like: app.js $scope.signup = function() { var newuser = {first_name: $scope.firstname, last_name: $scope.lastname, email: $scope.email, username: $scope.userna...

mysql - Need a trigger to prevent Unique input update from a table window -

i have frontend application windows table insert/update/delete rows in database table. have 1 unique column , i'm looking trigger prevent , give meaninful error user when trying insert duplicate. create unique constraint in column. if user tries enter value present in table mysql error 1062 "duplicate entry...." , @ time show user "value entered exist, please enter different value"

html - how to add single parent element for all the child nodes in jquery -

i have below code working fine. but, on this, when click first element [node 1], then, copied target div without parent 'ul'. same happening when click child node directly. mean, if click node 1.1, node 1.2 etc, then, these should captured inside single 'ul' element. i.e., this below should changed `<li><span>node 1.1</span></li><li><span>node 1.2</span></li>` (this getting right now) <ul><li><span>node 1.1</span></li><li><span>node 1.2</span></li></ul> the same should happen if select 'node 1' also. any idea? please help. http://jsfiddle.net/fjalsnlh/7/ kindly make amendments on fiddle link please. use jquery's wrapall $('li').wrapall('<ul></ul>'); jsfiddle: http://jsfiddle.net/fjalsnlh/12/

Meteor - How To Extract Key Name From Collection? -

i have following in initialize file values loaded in database on startup: meteor.startup(function() { if(typeof person.findone() === 'undefined') { person.insert({ name: "", gender: ["male", "female", "prefer not say"], age: 0 }); } }); and in server/abc.js have: meteor.methods({ checkperson: function (input) { (var key in person) { if (input === key) { ... } } } }); this meteor method checkperson called in client side string value being passed argument(input). i want check 'input' string value against name of key in person collection. person has key called 'gender'. instance, if 'input' holds string value 'gender' if statement should true in case comes false , hence code inside if statement never executed. any help/guidance appreciated. update i searched...

android - Downloading mp3 file and storing in app's directory -

in android project, programmatically need download .mp3 file google drive download url , store in app sandbox. then, app can have play option play audio locally. how possible achieve downloading .mp3 file server , store locally in app? later, can played local storage. on appreciated. thank you. you can use method: static void downloadfile(string dwnload_file_path, string filename, string pathtosave) { int downloadedsize = 0; int totalsize = 0; try { url url = new url(dwnload_file_path); httpurlconnection urlconnection = (httpurlconnection) url .openconnection(); urlconnection.setrequestmethod("post"); urlconnection.setdooutput(true); // connect urlconnection.connect(); file mydir; mydir = new file(pathtosave); mydir.mkdirs(); // create new file, save downloaded file string mfilename = filename; file file = new file(mydir,...

Where can I put Powershell modules that will be accessed by multiple users? -

i used variable $env:psmodulepath , provided 2 paths. > c:\users\my user\documents\windowspowershell\modules > c:\windows\system32\windowspowershell\v1.0\modules\ seems user accessible me. module used multiple person , when uninstalling application [i installing module via msi], if other user uninstalls should removed. can use "c:\windows\system32\windowspowershell\v1.0\modules\" application related module? or there other better place ? can use "c:\windows\system32\windowspowershell\v1.0\modules\" application related module? no. place not noted in section "rules installing modules" of module installation guidelines . you can decide want put modules shared multiple users. some options include: create new folder in program files , , add path psmodulepath . use network share (though means need change execution policy allow this), @rubanov said. use all users folder example.

How do I place the cursor at a certain point after sending an AutoHotkey script? -

i thought i'd ask question here instead of autohotkey forums since 1 seems more active , knowledgeable. i using ahk basic purpose @ time, , implement typing color , style, shown below: ^|:: send, [b][color={#}4f6377][/color][/b]x return it bbcode makes color bold dark blue. trying make cursor (x) go first position 1 shown below. ^|:: send, [b][color={#}4f6377]x[/color][/b] return thank in advance. this should do: ^|:: sendinput, [b][color={#}4f6377][/color][/b] sendinput, {left 12} return it's using sendinput instead of send it's faster.