Posts

Showing posts from January, 2012

mysql - php $_GET item to virtual subdomain with Htaccess -

mysql - php $_GET item to virtual subdomain with Htaccess - i have simple question related php , htaccess. just think have php code : if(isset($_get['word'])) { echo $_get['word']; } so have (for example) : example.com/?word=test and code echo out **test** , question that, how can alter $_get value, virtual subdomain ? for example, want have this, if below address opened : test.example.com then code gets run , echo out **test** . i need htaccess code thing, so, how can htaccess ? i have tried codes couldn't results . you can utilize code in document_root/.htaccess file: rewriteengine on rewritecond %{http_host} !^www\. [nc] rewritecond %{http_host} ^([^.]+) [nc] rewritecond %{query_string} !(?:^|&)word=[^&]+(?:&|$) [nc] rewriterule ^ %{request_uri}?word=%1 [qsa,l] %1 reference value captured in line: rewritecond %{http_host} ^([^.]+) [nc] first part of domain name before dot. php mysql .htacce

c - Freeing array of struct -

c - Freeing array of struct - i've done research , couldn't find reply problem. i'm having problems freeing struct. this how create struct: struct construction * newstructure(int n) { struct construction * structure; int i; construction = (struct construction * ) malloc(n * sizeof(struct structure)); (i = 0; < n; i++) { structure[i].i_number = (int * ) malloc(sizeof(int)); structure[i].c_char = (char * ) malloc(sizeof(char)); structure[i].c_char[0] = '\0'; structure[i].d_float = (double * ) malloc(sizeof(double)); } homecoming structure; } everything works point. later fill every variable random values not empty. i phone call freememory function freememory(structure, amountofstructures); , here freememory function itself: void freememory (struct structure* structure, int n) { int i; for( i=0 ; i<n ; i++ ) { if (structure[i].i_number!=null) free(struc

r - Change file name when using write.table() according to the name of the third column in data frame -

r - Change file name when using write.table() according to the name of the third column in data frame - i wrote script in r merges , modifies csv info , saves resulting info frame using write table(). when saves file adds current date name of file. 3rd column of resulting info frame country specific, wondering if there way include in file name using write.table name of country depending on country code (name of 3rd column). for example, if name of 3rd column "it", want add together "italy" name of csv file using write.table. import list of country names , codes r: (it wise @ top of script: outside processing loop dont read in info on , on each dataset beingness written out .csv. rest of code goes before current write.table command library(rcurl) csv_src <- geturl("https://raw.githubusercontent.com/umpirsky/country-list/master/country/cldr/en/country.csv") world <- read.csv(text=csv_src, header=t)` get name of 3rd c

Assign Javascript popup HTML link to PHP variable -

Assign Javascript popup HTML link to PHP variable - i trying assign next php variable: [<a href='"'javascript:pop_booking_item_add({id})'"'>add new item</a>] i have tried this: $add_button = "[<a href='"'javascript:pop_booking_item_add({id})'"'>add new item</a>]"; but getting error message: error: syntax error, unexpected ''javascript:pop_booking_item_a' (t_constant_encapsed_string) i think need escape quotes i'm not sure how to? this should work: $add_button = "[<a href='javascript:pop_booking_item_add({id})'>add new item</a>]"; or $add_button = "[<a href=\"javascript:pop_booking_item_add({id})\">add new item</a>]"; javascript php html escaping variable-assignment

django - nginx + gunicorn 502 bad gateway -

django - nginx + gunicorn 502 bad gateway - i'm trying deploy django project on vps server via nginx , gunicorn, got nginx error '502 bad gateway' when seek open page rollservice-rostov.ru something wrong nginx configuration, can't figure out is. /etc/nginx/sites-enabled/rollservice.conf: upstream rollservice-rostov.ru { server 127.0.0.1:8010 fail_timeout=0; } server { hear 80; server_name www.rollservice-rostov.ru; rewrite ^/(.*) http://rollservice-rostov.ru/$1 permanent; client_max_body_size 4g; access_log /home/django/logs/rollservice/nginx.access.log; error_log /home/django/logs/rollservice/nginx.error.log; location /static/ { alias /home/django/projects/rollservice/static/; } location / { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_redirect off; if (!-f $request_filename) { proxy_pass http://rollse

How to take a 5-day average around a specific date in r -

How to take a 5-day average around a specific date in r - so have dataset looks without weekends: x1 x2 3798 2009-12-29 0 3799 2009-12-30 0 3800 2009-12-31 0 3802 2010-01-02 0 3803 2010-01-03 2.1 3804 2010-01-04 0 3805 2010-01-05 0 3806 2010-01-06 0 3807 2010-01-07 0 3808 2010-01-08 0 3809 2010-01-09 0 3810 2010-01-10 6.8 3811 2010-01-12 0 3812 2010-01-13 0 3813 2010-01-14 17.7 3814 2010-01-16 0 3815 2010-01-17 0 3816 2010-01-18 1.5 3817 2010-01-19 0 3818 2010-01-20 0 3819 2010-01-21 0 3820 2010-01-22 0 3821 2010-01-23 0 3822 2010-01-24 0 3823 2010-01-25 0 3824 2010-01-26 0 3825 2010-01-27 4.5 3826 2010-01-28 0 3827 2010-01-29 0 3828 2010-01-31 0 3829 2010-02-01 0 3830 2010

javascript - How to get form-field values on html-file where form was send -

javascript - How to get form-field values on html-file where form was send - i have html-file containing form (start.html). submitting it, navigates different html-form (result.html). how date-entries in result.html done in textfields of form in start.html? something like: $(document).ready(function () { var fww = 'what value fieldsindex.html?'; $('#div1').html(fww); }); </script> </head> <body> <div id="div1"> </div> any solution jquery or javascript appreciated. thanks you can form info using form elements id shown below, can not transfer info 1 form other form using js only, should utilize backend controller form.html <input type="text" id="formelement"> js $("formelement").val(); javascript jquery

javascript - What is the purpose of classnames in angle brackets in definitions? -

javascript - What is the purpose of classnames in angle brackets in definitions? - in question here on stack overflow (this one) have seen piece of code: ext.define("app.view.leaders.myviewname", { extend: 'app.view.basepopup', xtype: 'myviewname', config: <ext.form.ipanel>{ scrollable: 'vertical', items: [ { xtype: 'fieldset', title: 'add new auto asset', instructions: '<hr class="separate" />', items: [ <ext.field.iselect>{ xtype: 'selectfield', label: 'borrower position', store: 'borrowerpositionselectorstore', }, <ext.field.iselect>{ xtype: 'selectfield',

Bash script for calling Java programs -

Bash script for calling Java programs - i have jar file can phone call next way: java -jar myjar.jar param1 param2 param3 now need bash script waits until clock time reached (e.g. 5pm) , calls jar file several times, lets 5 times (so have 5 jvms running). moreover, arguments passed bash script should passed jar. then, after times (e.g. 10 minutes), started java programs should killed. how can this? thank much. a bash script waits until clock time reached (e.g. 5pm) , calls jar file several times, lets 5 times update: many glenn jackman, incorporated reply #!/bin/bash cat<<endblock | @ 5pm in {1..5}; java -jar myjar.jar "$@" & pid=$! { sleep 600 && kill $pid; } & done endblock java bash automation

objective c - Buttons are not working -

objective c - Buttons are not working - hello next this tutorial little bit of enhancements of own. unfortunately stuck @ 1 point can't find out do.. (i doing of training/learning purposes im pretty new ios development). at step have add segue navigate back did whatever tutorial said won't bring me original view 1 time @ viewcontroller , press cancel or done. i did add together new header file called grocerylisttableviewcontroller.h containing @interface grocerylisttableviewcontroller (workaround) -(ibaction)unwindtolist: (uistoryboardsegue *)segue; @end and have changed classname of grocerylisttableviewcontroller.swift @objc(grocerylisttableviewcontroller)class grocerylisttableviewcontroller: uitableviewcontroller then lastly step pointed both buttons exit element above viewcontroller. somehow works except 2 buttons. doing wrong here? the woraround separate .h file beta versions of xcode , no longer necessary. can delete .h file. in cla

algorithm - Find two vectors whose sum is close to query vector -

algorithm - Find two vectors whose sum is close to query vector - basically, question sort of research question. post here gain more hints you. suppose have set s of n d-dimension vectors. given d-dimension query vector, want find 2 vectors s sum close query vector, in term of cosine distance. right now, solution enumerating possible combinations of s, results n^2 possible sum-vectors. hash these n^2 vectors b buckets using local sensitive hashing. when given query vector, hash query 1 of b buckets , check possible sum-vectors in bucket, see 1 closest. need o(b) space , o(n^2/b) searching time. space time trade off. is there other solutions ? hints welcome ! don't need exact closest results, approximation results more welcome! algorithm hash sum approximation

javascript - Limit Number of Inputs onClick -

javascript - Limit Number of Inputs onClick - i want allow 1 entry of text in textarea 1 time button clicked. if button clicked 2 or more times 1 entry should entered in textarea. javascript: function inyectartexto(elemento,valor){ var elemento_dom=document.getelementsbyname(elemento)[0]; if(document.selection){ elemento_dom.focus(); sel=document.selection.createrange(); sel.text=valor; return; }if(elemento_dom.selectionstart||elemento_dom.selectionstart=="0"){ var t_start=elemento_dom.selectionstart; var t_end=elemento_dom.selectionend; var val_start=elemento_dom.value.substring(0,t_start); var val_end=elemento_dom.value.substring(t_end,elemento_dom.value.length); elemento_dom.value=val_start+valor+val_end; }else{ elemento_dom.value+=valor; } } html: <a href="javascript:void(0);" onclick="inyectartexto('nametfield','hello world');" >say hello world text</a> here issue if click link say

python - Pandas read_excel mangles non-dates to dates -

python - Pandas read_excel mangles non-dates to dates - from next zip file: wget http://www.nature.com/nature/journal/v498/n7453/extref/nature12172-s1.zip unzip nature12172-s1.zip reading supplementary_table2.xlsx , has weird gene names row ids "2010002n04rik", these parsed dates, not regular strings!! expression = pd.read_excel('nature12172-s1/supplementary_table2.xlsx', "supptable2final.txt", # need specify index column both first , lastly columns, # because lastly column "gene category" index_col=[0, -1], parse_dates=false, infer_datetime_format=false) expression.index multiindex(levels=[[100043387, 2013-03-01 00:00:00, 2013-03-02 00:00:00, 2013-03-03 00:00:00, 2013-03-04 00:00:00, 2013-03-05 00:00:00, 2013-03-06 00:00:00, 2013-03-07 00:00:00, u'0610007l01rik', u'0610007p14rik', u'0610007p22rik', u'0610008f07rik'

xcode - "Right way" to add attributes to all numbers in NSMutableAttributedString -

xcode - "Right way" to add attributes to all numbers in NSMutableAttributedString - is way add together attributes numbers in nsmutableattributedstring? let reg: nsregularexpression = nsregularexpression(pattern: "\\d+", options: nil, error: nil)! reg.enumeratematchesinstring(str, options: nil, range: nsmakerange(0, str.length)) { (result, _, _) -> void in paragraph.addattribute(attributename, value: attributevalue, range: result.range) } or maybe should done in other way? i'm totaly new xcode (comming "php world") want create sure i'm doing things in swift should. xcode cocoa swift

swing - How to use the Timer class to set/reset a boolean periodically? (Java) -

swing - How to use the Timer class to set/reset a boolean periodically? (Java) - i trying create whack mole game. have used swing create background , add together mole images event listeners increment score each time clicked, having problems setting whether should visible or not. thought best way utilize timer set/reset boolean. boolean passed image's setvisible() constructor. randomizing period images visible ideal. have attempted instantiating timer , task (inheriting timertask) class, calling timer.vis(vis) should reset boolean , passing task timer.schedule() i'm getting null pointer exception. going wrong way? well, flip bit random intervals. add together code invoke in swingworker thread depending on value of bit after alter it. import java.util.timer; import java.util.timertask; import java.util.concurrent.atomic.atomicboolean; public class randombitflip { public static void main(string[] args) throws interruptedexception { final atomicbool

ios8 - XML Parser issue in iOS 8 -

ios8 - XML Parser issue in iOS 8 - i working on xml parser, @ same time fetching multiple urls info server. in ios 6,and ios 7 working fine, in ios 8 parser blocked. please check out screenshot. i using dispatch_queue_t (app.forgroundqueue). check code here appdelegate *app = (appdelegate *) [[uiapplication sharedapplication]delegate]; app.isserialqueuerunning =yes; dispatch_async( app.forgroundqueue, ^{ [self setdelegate:adelegate]; self.responsearray =[[nsmutablearray alloc] init]; nsurlrequest *request = [nsurlrequest requestwithurl:[nsurl urlwithstring:[url stringbyaddingpercentescapesusingencoding:nsasciistringencoding]]]; nsurlsession *session = [nsurlsession sessionwithconfiguration:[nsurlsessionconfiguration defaultsessionconfiguration] delegate:self delegatequeue:nil]; nsurlsessiondatatask *task = [session datataskwithrequest:request

python - numpy peformance differences between Linux and Windows -

python - numpy peformance differences between Linux and Windows - i trying run sklearn.decomposition.truncatedsvd() on 2 different computers , understand performance differences. computer 1 (windows 7, physical computer) os name microsoft windows 7 professional scheme type x64-based pc processor intel(r) core(tm) i7-3770 cpu @ 3.40ghz, 3401 mhz, 4 core(s), 8 logical installed physical memory (ram) 8.00 gb total physical memory 7.89 gb computer 2 (debian, on amazon cloud) architecture: x86_64 cpu op-mode(s): 32-bit, 64-bit byte order: little endian cpu(s): 8 width: 64 bits capabilities: ldt16 vsyscall32 *-core description: motherboard physical id: 0 *-memory description: scheme memory physical id: 0 size: 29gib *-cpu product: intel(r) xeon(r) cpu e5-2670 0 @ 2.60ghz vendor: intel corp. physical id: 1 bus info: cpu@0 width: 64 bits computer 3 (windows 2008r2, on amazon cloud) os name

ruby - Access my model using a daemon on rails 3 -

ruby - Access my model using a daemon on rails 3 - i have next script: #!/usr/bin/ruby require 'rubygems' unless defined?(gem) require 'mongoid' include mongoid::document @classes = availability.where(:availability_date.gt => time.now.utc + 1.hours).to_a puts @classes.count but get: classes_notification.rb:6:in `': uninitialized constant availability (nameerror) some help please, need create daemon send emails info on availability model. thanks in advance. update code my script under app/script/user/remeber_classes.rb how can access require file.dirname(file) + "/../../config/environment" because i'm getting /users/jeanosorio/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:126:in require': cannot load such file -- ./../../config/environments (loaderror) /users/jeanosorio/.rvm/rubies/ruby-1.9.3-p484/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:1

Add PHP code before any other code in Wordpress template, on a per post basis -

Add PHP code before any other code in Wordpress template, on a per post basis - i'm trying figure out how add together php code template, before else (line:1). i want using custom field in post itself. i'm experimenting wordpress hooks, can seem able insert html/js, , within actual header.php, , not before it. is there specific hook should utilize this, , also, possible add together php template in manner? if need access custom fields of post, need hook wp hook fires after post object created , conditional functions available, before get_header fired. in functions.php file: <?php function my_function(){ global $post; if( is_single() ){ $my_meta = get_post_meta( $post->id, 'my key', true ); // assumes custom meta returns single value if( 'value expected' == $my_meta ){ // php code run goes here } } } add_action( 'wp', 'my_function' ); php wordpress themes

selenium - How to solve the url loading issue in the latest Firefox version-34? -

selenium - How to solve the url loading issue in the latest Firefox version-34? - when update firefox browser 34th version found browser not loading url, when automate script using selenium-java. when downgrade lower version loading need execute in latest version(34th ver) only. please give me solution.thanks in advance. update webdriver. webdriver 2.43.1 fixes issue firefox. 2.44 latest stable release if not mistaking selenium automation

Using paste in R -

Using paste in R - i have question regarding utilize of paste in r a<-c(1,2,3,5,5,6,7,8) b<-c(2,3,5,6,2,3,6,7) d<-c(2,8,4,6,3,7,3,5) df<-data.frame(a,b) cbind(df,sugar=d) using above code, got this: > b sugar 1 1 2 2 2 2 3 8 3 3 5 4 4 5 6 6 5 5 2 3 6 6 3 7 7 7 6 3 8 8 7 5 however, wonder why couldn't same results using paste function: name<-c("sugar","salt","fat") cbind(df,paste(name[1])=d) any help much appreciated!! if need create new column name stored in object, try df[name[1]] <- d df # b sugar #1 1 2 2 #2 2 3 8 #3 3 5 4 #4 5 6 6 #5 5 2 3 #6 6 3 7 #7 7 6 3 #8 8 7 5 another alternative might utilize assign assign('df', `[[<-`(df, name[1], value=d)) r paste

php - When running the project I'm getting error: Warning: opendir failed to open dir: not implemented -

php - When running the project I'm getting error: Warning: opendir failed to open dir: not implemented - in index.php have code: <?php $pattern="(\.jpg$)|(\.png$)|(\.jpeg$)|(\.gif$) |(\.gif$)"; //valid image extensions $files = array(); $curimage=0; if($handle = opendir("http://newsxpressmedia.com/files/radar-simulation-files")) { while(false !== ($file = readdir($handle))){ if(eregi($pattern, $file)){ //if file valid image //output javascript array element $files[] = $file; $curimage++; } } closedir($handle); } ?> <!doctype html> <html> <head> <title>change picture</title> <link rel="stylesheet" type="text/css" href="/css/result-light.css"> <style type='text/css'> #timer_countdown{ background:black; color:yellow; font-weight:bold; text-align:center; }

Xcode Objective C How to write in system's directory (Mac Os)? -

Xcode Objective C How to write in system's directory (Mac Os)? - i want write txt file in /macintosh hd/library/preferences folder: nsstring *fullpath = [@"/library/preferences" stringbyappendingpathcomponent:@"some_txt_file.txt"]; nsstring *str = @"some text"; [str writetofile:fullpath atomically:true encoding:nsutf8stringencoding error:null]; but not working. if alter properties "read , write" in window, code working: http://s52.radikal.ru/i135/1411/d0/32babf6a05a0.png when alter options, scheme inquire me password! how can inquire password , receive administrator promts write in directory cocoa application mac os, when click button? many thanks! first of should reconsider whether need write here , not ~/library/preferences (in user directory rather root). preferences per-user things. if need write in /library/preferences (root) need elevated privleges. apple provides sample of here. note unless i&

kendo ui - KendoUI - grid - style default edit, delete, update and cancel buttons -

kendo ui - KendoUI - grid - style default edit, delete, update and cancel buttons - how can alter default edit, delete, update , cancel button , replace them buttons icons ? my command code: class="lang-js prettyprint-override"> command: [ { name: 'edit', template: "<a if-role-permission=\"['permission_workflow_definition_delete']\" class='k-grid-edit k-grid-update k-button' style='width: 26px; height: 26px; vertical-align: middle; text-align: center;' ><span style='margin: 4px;' class='glyphicon glyphicon-edit'></span></a>" }, { name: 'destroy', template: "<a if-role-permission=\"['permission_workflow_definition_delete']\" class='k-grid-delete k-button' style='width: 26px; height: 26px; vertical-align: middle; text-align: center;' ><span styl

performance - Application gets freezed on Load Android? -

performance - Application gets freezed on Load Android? - hi created application of images , working fine. there little bugs have come up. 1 when application icon clicked on launcher freezes , turns screen black sometimes. loads fast , properly. happens randomly. so when loads or freezes app , turns black before load see gc running how prevent behaviour. i have defined application extends application class phone call after application before launcher activity freezes screen. following code in application: public class wallieapplication extends application implements wallieconstants, wallieparseconstants, walliesharedpreferencesconstant { @override public void oncreate() { seek { super.oncreate(); /** * phone call enable local info storage. */ log.i("debug", "enable local datastore parse"); parse.enablelocaldatastore(this); log.i("de

css - Vertically centre variable-length content inside responsive boxes with fixed-pixel margins? -

css - Vertically centre variable-length content inside responsive boxes with fixed-pixel margins? - i'm looking simplest way accomplish type of layout looks simple: ...but involves lot of criteria, many of involve non-trivial css issues: vertically centred content in div... ...where content of variable length (so distance top , bottom can't hard coded)... ...where div within selection of floated divs... ...where divs have percentage widths fill screen on responsive layout... ...where there fixed pixel gap between each div... ...where divs have solid background colours or images , background behind divs isn't known solid colour can re-applied various elements of have been addressed in separate questions (for illustration vertically aligning floated divs, , pixel gaps between responsive percentage-width divs), couldn't find combining them. simplest means: as few html wrappers possible minimal javascript (none if possible) minimal css needs alter whe

javascript - Expose parent Polymer element data to a child element -

javascript - Expose parent Polymer element data to a child element - i have next structure: <main-container data-endpoint="/api/allrecent"> <section> <list-container data-source="{{feed.recent}}" data-type="member" data-title="recent members"></list-container> </section> </main-container> where in main-container.js fetch info promise like: var self = this; connector.get(this.dataset.endpoint) .then(function(data) { self.feed = json.parse(data); }); now, i'd expose self.feed list-container data-source. meaning when promise gets resolved, populate list-container's content. i'm troubled on accessing feed within list-container . i've read answers , polymer documentation haven't found proper way of achieving this. the solution simple (like 1 attribute bind) haven't found it. if want utilize binding need polymer element or <auto-binding> tag m

c# - Does BackgroundWorker guarantee that memory changes made on the background thread become visible to the main thread? -

c# - Does BackgroundWorker guarantee that memory changes made on the background thread become visible to the main thread? - if utilize backgroundworker modify info structures in application, there guarantee changes made on background thread visible main (ui) thread when backgroundworker completes (e.g. within runworkercompleted event handler)? bonus points: if so, mechanism guarantees this? no, there no such guarantee. you'll need synchronize access shared memory if want access multiple threads. of course of study if utilize bgw built in mechanisms passing info between threads, such through result or progress info stores, synchronize access data. c# backgroundworker memory-visibility

javascript - Handling uploads with skipper in sails.js (on progress) -

javascript - Handling uploads with skipper in sails.js (on progress) - i using skipper upload multiple files @ 1 time local folder. ran few problems. upload: function (req, res) { if (_.isempty(req.session.user)){ homecoming res.json({ //---> 1 success: 0 }); }else{ res.settimeout(0); var maxbytes = 10*1000*1000; //---> 2 if (req._fileparser.form.bytesexpected > maxbytes){ homecoming res.json({ success: 0, error: 'file size limit exceeded.' }); }else{ req.file('file[]').on('progress', function(event){ homecoming event; //---> 3 }).upload({ maxbytes: maxbytes }, function whendone(err, uploadedfiles)

css - How To change box shadow range in jQuery -

css - How To change box shadow range in jQuery - how alter box shadow width code $('#range1').change(function () { $('.divwidth').css({ boxshadowx: this.value + 'px' }); $('.divwidth').css({ 'boxshadowy': this.value + 'px' }); $('.divwidth').css({ 'boxshadowblur': this.value + 'px' }); }); this.value + 'px' = avalue of html range jquery before 1.8 $('.divwidth').css({ 'color' : 'black', 'background' : 'white', 'border-radius' : '15px', 'box-shadow' : '0px 0px 0px #444', '-moz-box-shadow' : '0px 0px 0px #444', '-webkit-box-shadow' : '0px 0px 0px #444', }); after 1.8 can utilize $('.divwidth').css({ boxshadow: '1px 3px 6px #444' })

django - Is there a way to check the data type of a context variable in Jinja2? -

django - Is there a way to check the data type of a context variable in Jinja2? - i trying check type of context variable on jinja2 template, on django app. trying check if variable result of type <searchresult: myapp.b (pk=u'1')> or <searchresult: myapp.a (pk=u'1')> . here's code trying implement. context = 'results':form.search()} x.html {% result in results %} <!-- if result searchobject of b --> {% ifequal result 'searchresult: myapp.b' %} <div class="container"> <div class="list-group"> <a href="/b/{{ result.pk }}" class="list-group-item"> <h4 class="list-group-item-heading">{{ result.title }}</h4> <h6 class="list-group-item-heading">created on: {{ result.createdon }} </h6> </a> </div> </div>

javascript - how to make column into on click event for HTML href in googlechart and VB -

javascript - how to make column into on click event for HTML href in googlechart and VB - i making google chart in vb module of dnn 7+ website. attempting create column 0 clickable html link(column 7) bring new page. have attempted follow 1, 2, 3. chart works until add together code //click event. // sql command creating datatable not listed returns //create google chart format strjson += "google.setonloadcallback(drawvisualization); function drawvisualization() { " & _ "var info = new google.visualization.datatable();" strjson += "data.addcolumn('string', 'agronomist', {textstyle: 5});" strjson += "data.addcolumn('number', 'current contracts');" strjson += "data.addcolumn('number', 'current other income');" strjson += "data.addcolumn('number', 'py contracts');" strjson += "data.add

How to fix Linking Error; SoundCloud iOS API -

How to fix Linking Error; SoundCloud iOS API - i writing ios app uses soundcloud api. when seek build barebones project, receive linker error: undefined symbols architecture x86_64: "_objc_class_$_scsoundcloud", referenced from: objc-class-ref in soundcloudplumbing.o i followed setup steps on https://developers.soundcloud.com/docs/api/ios-quickstart#installation starting "install sdk , dependencies" through "authentication." created objective-c file soundcloudplumbing.m next code (clientid, secret, , projectname changes privacy reasons) #import <foundation/foundation.h> #import <soundcloudapi/scapi.h> void initializesoundcloud(){ [scsoundcloud setclientid:@"heresaclientid" secret:@"heresasecret" redirecturl:[nsurl urlwithstring:@"projectname://oauth"]]; } i have tried creating new app , refollowing setup instructions. same error. know how prep

javascript - Error calling refresh() on a jQuery Mobile select -

javascript - Error calling refresh() on a jQuery Mobile select - i'm having problem updating jquery mobile select. on demand want alter contents , update selected value. here's fiddle (code below): http://jsfiddle.net/cjindustries/0cmg8vvt/2/ i'm getting error in console (along select not updating): uncaught error: cannot phone call methods on selectmenu prior initialization; attempted phone call method 'refresh' i've seen similar things here on none of answers i've found prepare issue. we're using jquerymobile 1.3.1 , jquery 1.9.1. any help appreciated :) thanks, chris. code... <div data-role="page" id="p1"> <div data-role="content"> <h1>page 1</h1> <select class="pageselect"></select> <a href="#" id="update-select-1" data-role="button">update select menu</a> </div> </di

tfs2010 - TFS SDK 10.0 Compatibility with TFS Server Versions and Lock Items without a local workspace -

tfs2010 - TFS SDK 10.0 Compatibility with TFS Server Versions and Lock Items without a local workspace - i'm new tfs , have taken first dive tfs world lastly few days (could knowledge on tfs till now, limited reading blogs, msdn , quick read through couple of books). i've been given task extend repository browser command before done developer (the referred tfs sdk version 2010). main purpose of command list contents under given path. have few queries clarified, before jump this; will able utilize 2010 sdk connect tfs 2010, 2012 , 2013 servers without need switch newer vesion of sdk based on server version? i have few commands implemented in command allow users to; apply label file / folder lock / unlock files create sub-directory under folder drop files / folders know, whether have these commands executed without local workspace mapping (something similar in case of tortoisesvn repo browser 1 lock/unlock or drop file / folders without local working copy).

mysql - How to create a trigger the triggers a self-referencing trigger...yeah -

mysql - How to create a trigger the triggers a self-referencing trigger...yeah - i have mysql database with...interesting architecture , convoluted enrollment process. there several programme tables need insert rows on historic enrollment table when they're updated, inserted or deleted. i've got working using triggers on each of tables (around 30 different tables) using next iterated on of tables: drop trigger if exists programtable_afterinsert;$$ create trigger programtable_afterinsert after insert on programtable each row begin if new.enrolled = 1 insert enrollment (id, action, date_updated, user, program, reason, action_date) values (new.id, 'enrolled', now(), 'programuser', 'programname', 'enrolled in program', now()); elseif new.enrolled = 0 insert enrollment (member_id, action, date_updated, user, program, reason, action_date)

jquery - Animate a div as slide changes -

jquery - Animate a div as slide changes - i'm trying create ones nowadays in first site [site-1][1] , [site-2][2]. thing want is, div should animate every time slides on site i'm working on revapi2.bind("revolution.slide.onloaded",function (e) { //alert("slider loaded"); }); revapi2.bind("revolution.slide.onchange",function (e,data) { //alert("slide changed to: "+data.slideindex); //data.slideindex index of li container in slider //data.slide current slide jquery object (the li element) }); revapi2.bind("revolution.slide.onpause",function (e,data) { //alert("timer paused"); }); revapi2.bind("revolution.slide.onresume",function (e,data) { //alert("timer resume"); }); revapi2.bind("revolution.slide.onvideoplay",function (e,data) { //alert("video play"); }); revapi2.bind("revolution.slide.onvideostop",function (e,data) {

JavaScript HTML5 CSS3 project template in Visual Studio 2013 -

JavaScript HTML5 CSS3 project template in Visual Studio 2013 - i've downloaded visual studio 2013 express web , want know how can deploy javascript, html5 , css3 projects? i can't find suitable template or way it. searched javascript templates online, still unsuccessful. i've tried download visual studio 2013 express windows 8. does know how can solve , start developing web using vs2013 express? hopefully, i've found blog post , download link pure html5/js/css3 project template . i've spent lot of time today, searching solution how start pure project without useless things never utilize in future. finally, found download link purehtml (codepen official link no longer exist) in article update 17-mar-15: uploaded dropbox, because previous link stopped working javascript html5 visual-studio css3 visual-studio-2013

javascript - Decrease Parse Push Requests with Array -

javascript - Decrease Parse Push Requests with Array - i'm using parse cloud code background job notify users when new missing pet found in specified radius. for illustration pet xyz gone missing users have force enabled , within specified radius getting force notification of new missing pet. my main problem is, if there lot of users near missing pet force notifications exceed api request limit of parse since i'm sending them 1 @ time. how improve this? thinking maybe using array users_ids should getting notification (text every pet same) here's (working) code far: main job function checking new pets parse.cloud.job("pushradius", function(request, response) { parse.cloud.usemasterkey(); console.log('pushradius'); var pet = parse.object.extend("pet"); var petquery = new parse.query(pet); petquery.equalto("initialpushsent", false); petquery.equalto("status", "missing");