Posts

Showing posts from July, 2015

Maven - invalid target release 1.7 with Java 1.7 -

everything seems correct, won't work. $ sudo mvn clean package ... [info] compilation failure failure executing javac, not parse error: javac: invalid target release: 1.7 versions : $ mvn -v apache maven 2.2.1 (r801777; 2009-08-06 20:16:01+0100) java version: 1.7.0_75 java home: /library/java/javavirtualmachines/jdk1.7.0_75.jdk/contents/home/jre $ java -version java version "1.7.0_75" java(tm) se runtime environment (build 1.7.0_75-b13) java hotspot(tm) 64-bit server vm (build 24.75-b04, mixed mode) $ echo $java_home /library/java/javavirtualmachines/jdk1.7.0_75.jdk/contents/home/ pom.xml : <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.0.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> for record : $ /usr/libexec/java_home

c# - Linq - Dynamic Condition -

i have following query :- i want add 1 more condition dynamic, if user passes dateofbirth should e.dateofbirth <= date . var data = ctx.employee.where(e => e.id == id && e.category == category && e.dateofjoining <= date) .select(e => e) .tolist(); how condition dynamically? you can use reflection solve problem there idea may helps you: var criteria = new dictionary<string, func<employee, bool>>(); var date = datetime.now; //or other value //initialize criterias criteria.add("dateofbirth", e => e.dateofbirth <= date); criteria.add("dateofjoining", e => e.dateofjoining <= date); var selectedvalue = "dateofbirth"; var data = ctx.employee.where(e => e.id == id && e.category == category &&a

Is it possible to Compare two columns in Microsoft SQL server so that the comparison skips punctuation marks and other character like %, ' etc? -

i have 2 columns having data below. column1 amc standard, school column2 amc standard school. in need compare these 2 columns such comparison made words , not additional, meaning above example column1 , columnc match due comma ",' , period sign "." simple comparison of column1 , column2 suggests mismatch. you can replace non comparable characters empty string (in case , , .)and compare them. this. select 1 replace('amc standard, school',',','') = replace('amc standard school.','.','') based on jarlh comments, should (if possible) update columns , remove punctuation marks if not using in comparison , display.

javascript - Videojs Vast Play Button -

we have problem play button (videojs + videojs vast plugin). if no commercial playing, big play button has no function, little play button. there workaround big play button working. example // init first player videojs('vid_673732', { "controls": true, "autoplay": true, "preload": "auto" }, function () { var videoplayer = this; videoplayer.muted(false); videoplayer.ads(); videoplayer.vast({ url: "http://ad3.adfarm1.adition.com/banner?sid=3108095&wpt=x", skip: "-1" }); // vast link delivering test ad videoplayer.ga(); videoplayer.on("loadedmetadata", function () { videoplayer.play(); }); }); // init second player videojs('vid_673662', { "controls": true, "autoplay": true, "preload": "auto" }, function () { var videoplayer = this; videoplayer.muted

jquery - Two dropdowns populate userform -

currently working on costing web application workplace, have 2 drop down boxes @ start of userform, 1 class (150,300,....)& 1 pipe size(1",2",3"...), once user has selected "select standard sizes" specified class , pipe size, want rest of form auto populate using dimensions stored in models tables. below code view, im looking auto fill kamm id, kamm od, spacer id ectttt correct dimension specified in users selection, example user selects 1" 150 in table data has kamm id of 15mm want auto put user form. @model ienumerable<webapplication4.models.coresheets> @{ viewbag.title = "iflexcst"; layout = "~/views/shared/_layout.cshtml"; } @scripts.render("~/bundles/jqueryui") @using (html.beginform("iflexcst", "costing", formmethod.post)) { <h2>enter dimensions:</h2> <h5> select standard sizes: </h5> @html.checkbox("standard&

.net - asyn example calling multiple method -

i learning async programming, not sure if going in right direction. want call multiple method async read asyn should start top level follow lowest level. @ top level when asyn method compiler complaining cannot wait string. public static async void method() { var classdemoasyn = new demoasyn(); var t = await classdemoasyn.dosomeimportantwork("start ").result; } public class demoasyn { public async task<string> dosomeimportantwork(string strdosomework) { strdosomework = strdosomework + " (1) enter => important work"; console.writeline("**********enter => important work******"); var t = await somecomplexoperation(strdosomework); console.writeline("***********end important work***********"); return t; } public task<string> somecomplexoperation(string strdosomecomplexwork) { string str =strdosomecomplexwork + "enter =>

java - Maven wagon error when trying to copy artifact -

i trying use maven wagon plugin copy artifacts server. i have set follows: <build> <extensions> <extension> <groupid>org.apache.maven.wagon</groupid> <artifactid>wagon-ssh</artifactid> <version>${maven.wagon.version}</version> </extension> </extensions> <plugins> <plugin> <groupid>org.apache.maven.wagon</groupid> <artifactid>wagon-maven-plugin</artifactid> <version>${maven.wagon.version}</version> <!-- <dependencies> <dependency> <groupid>org.apache.maven.wagon</groupid> <artifactid>wagon-ssh</artifactid> <version>${maven.wagon.version}</version> </dependency> </dependencies> -->

cron - Can i set cronjob for controller action in magento? -

i created module , has config.xml , controller. in need setup cron job action in controller named testaction().anyone pls me fix issue. set observer method redirect observer method $response1 = $observer->getresponse(); $url = 'http://www.website.com/'; $response1->setredirect($url); or can check $observer->getrequest()->setparam('return_url','http://www.google.com/');

c - Calculate execution time of all the function -

this project has many functions of them takes lot of time execute. now task find functions tasks of time. here steps: write macro calculate execution time #ifndef _calculate_exe_time_ #define _calculate_exe_time_ #include <time.h> #include <stdio.h> #define calculate_exe_time static clock_t cet_start_time, cet_end_time; \ static float cet_expend_time, cet_total_expend_time; \ static unsigned int cet_invoked_times = 0; \ cet_start_time = clock(); \ #define cet_before_return cet_end_time = clock(); \ cet_expend_time = (float)(cet_end_time - cet_start_time) / clocks_per_sec; \ cet_total_expend_time += cet_expend_time; \ printf("===%s:%s() invoked_times=%u expend_time=%.4fs total_expend_time=%.4fs\n", \ __file__, __function__, ++cet_invoked_times, cet_expend_time, cet_total_expend_time); #endif // _calculate_exe_time_ 2.put macros functions stati

c# - Npgsql.NpgsqlConnection doesn't implement interface System.Collections.IEnumerator -

in visual studio created simple vnext console app , installed npgsql install-package npgsql command. here code, program.cs , project.json using npgsql; using system; namespace consoleapp3 { public class program { public void main(string[] args) { console.writeline("hello postgresql!"); // specify connection options , open connection npgsqlconnection conn = new npgsqlconnection("server=myserv;user id=postgres;" + "password=postgres;database=mydb;"); conn.open(); // define query npgsqlcommand cmd = new npgsqlcommand("select name mytb", conn); // execute query npgsqldatareader dr = cmd.executereader(); // read rows , output first column in each row while (dr.read()) console.write("{0}\n", dr[0]); // close connection conn.close(); console.readline(); } } } { &q

hadoop - Oozie error when trying to run a workflow in Hue -

im having trouble getting oozie work on hadoop install. input appreciated i`m complete beginner in of this. use: hadoop 2.6.0 (with yarn), oozie 4.0.1, hive 1.0.0, hue 3.7.1, pig 0.12 local install run in pseudo distributed. installed tars , configured manually because sadly one-click install cloudera doesnt work in os x. hadoop+hive seem work fine far can tell, both in cli , hue. pig editor hue doesnt quite work yet, can access , use files hdfs error when try access hive tables hcatalog (error 2245: cannot schema loadfunc org.apache.hcatalog.pig.hcatloader). but right more important oozie scheduler works, doesn`t. when try run example shellscript in oozie workflow error: cannot run program "testscript.sh" (in directory "/volumes/ws2data/hadoop_hdfs/tmp/nm-local-dir/usercache/admin/appcache/application_1427878722813_0003/container_1427878722813_0003_01_000002"): error=2, no such file or directory now im trying understand what`s happening here:

ios - Table view cell reload first cell content -

this how table populated : - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { cellnewsinfo *cell = [tableview dequeuereusablecellwithidentifier:@"cell"]; if (!cell) { cell=[[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:@"cell"]; } // set cell int storyindex = [indexpath indexatposition: [indexpath length] - 1]; nsstring *titlearticle=[[stories objectatindex: storyindex] objectforkey: @"title"]; titlearticle = [titlearticle stringbytrimmingcharactersinset:[nscharacterset whitespaceandnewlinecharacterset]]; if (indexpath.row==0) { scr=[[uiscrollview alloc] initwithframe:cgrectmake(0, 0, 320, 200)]; scr.tag = 1; scr.autoresizingmask=uiviewautoresizingnone; [cell addsubview:scr]; [self setupscrollview:scr]; uipagecontrol *pgctr = [[uipagecontrol alloc] initwithframe:cgrectmake(1

How to assign values in popup menu item instead of choice 1 choice 2 in livecode -

how change choice 1, choice 2 ,choice 3 in popu menu special words (passing variables array). out using popup properties menu. means: contents of array svar[2] instead of choice 1 contents of array svar[3] instead of choice 2 .. on. each time value of choice 1, choice 2 differ. global searchstr global replacestr global ftext global myarraytobe global myarraylength global gvar on menupick pitemname put number of lines of (the keys of myarraytobe) myarraylength repeat i=1 myarraylength if myarraytobe[i] contains ftext put myarraytobe[i] svar answer svar split svar colon put svar[2] gvar answer gvar end if end repeat switch pitemname put gvar pitemname case gvar answer ftext break case "choice 2" answer "bye" break case "choice 3"answer "please" break end switch end menupick hard see in question asking for, can set menu options using the text of button if want change menu on fly when user clicks, can in on mousedown handler: on mo

How would I call a JavaScript function from a JSF Bean? -

i need java code, trying following, got stuck: uioutput js = new uioutput(); js.setrenderertype("javax.faces.resource.script"); js.getattributes().put("library", "js"); js.setvalue("alert(123);"); facescontext context = facescontext.getcurrentinstance(); context.getviewroot().addcomponentresource(context, js, "body"); i didn't error in server log, didn't see alert. any idea? edit: tried suggested solution, alleged duplicate, , didn't server error either, neither did see alert.. i'm assuming want jsf managedbean, not jsf component. i'm not sure there 'plain' jsf solution (meaning not adding framework or creating , maintaining specific java code). there @ least 2 solutions (the ones worked with): ajax.oncomplete("alert('hi'')") omnifaces utility framework requestcontext.getcurrentinstance().execute("alert('hi'')"

wordpress - Form Won't Submit With Javascript -

i trying add following code contact form 7 on wordpress: <div class="form"> <div class="f-name"> [text* your-name watermark "name *"] </div> <div class="f-email"> [email* your-email watermark "email *"] </div> <div class="f-subject"> [text your-subject watermark "phone"] </div> <div class="f-message"> [textarea* your-message watermark "message *"] </div> <div class="f-captcha"> <div class="f-captcha-insert"> [captchac captcha-886 size:l] </div> <div class="f-captcha-confirm"> [text* captchar captcha-886 size:m watermark "please enter characters above."] </div> </div> <div class="bt-contact"> <a class="btn-color btn-color-1d" href="javascript:;">[submit "send email"]</a> </div> </div>

cordova - 'Error capturing image' with Phonegap on Android -

i need capture image phonegap app. on ios works fine on android (via phonegap build) throws error "error capturing image". i added following lines config.xml doesn't change anything: <feature name="camera"> <param name="android-package" value="org.apache.cordova.camera.cameralauncher" /> </feature> <feature name="http://api.phonegap.com/1.0/device" /> <feature name="http://api.phonegap.com/1.0/camera" /> <feature name="http://api.phonegap.com/1.0/file" /> <feature name="http://api.phonegap.com/1.0/media" /> <feature name="http://api.phonegap.com/1.0/network" /> my api call looks that: $(document).on('click', '#camerapreview', function() { picturesource = navigator.camera.picturesourcetype; destinationtype = navigator.camera.destinationtype; navigator.camera.getpicture(ongetpicturesucces

php - why does count function return one row? -

i have query using pdo "select category.id id, category.static_name static_name, category.name name, count(training.id) trainings_count category join training on training.cat_id = category.id" when columns empty, count function returns 1 row , whole function return true. solution problem ? if don't group answers category, count returned , give 1 answer. way aggregate functions (count, sum, min, max, etc.) supposed function. so question is, want count of. add clause group <blah> <blah> item wanting count items of.

excel - Putting Labels and Error Handler in the right place -

i using error handler in vba , want use in error handler in code suggested many experts on here. sub test() =1 100 on error goto errhand: filename=dir() folder= workbooks.open(folder & filename) label1: code code close file errhand: application.getopenfilename() goto label1 next end sub i finding difficulties in running code in normal way. try pen file , if fails, call error handler , throw prompt select file , close file , same thing next files. 1 difficulty facing opened file never closes. in advance. in addition jeeped's excellent suggestion: sub test() on error goto errhand: =1 100 filename=dir() set folder= workbooks.open(folder & filename) 'label1: code code folder.close 'based on using 'folder', above next exit sub 'if don't this, code execution go right error handler errhand: if err.number = <something> application.getopenfilename() 'goto label1 resume next 'this simpler ver

IF THEN on a Dataframe in r with LAG -

i have dataframe multiple columns, 2 columns in particular interesting me. column1 contains values 0 , number (>0) column2 contains numbers well. i want create 21 new columns containing new information column2 given column1. so when column1 positive (not 0) want first new column, column01, take value column2 goes 10 back. , column02 goes 9 back,.. column11 exact same column2 value.. , column21 10 forward. for example column 1 column2 columns01 columns02.. columns11..columns20 columns21 0 5 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 1 3 0 0 3 5 4 0 10 0 0 0 0 0 0 83 0 0 0 0 0 0 2 0 0 0 0

javascript - Making my own filter not working -

i trying make own filter in angularjs , way wrong guess. not able left here , need update. any 1 me fix this?, guess need convert filter service? if correct way this? my js : angular.module('myapp', []) angular.module('myapp.filters', []) .filter('capitalize', function(capitalize) { return function(input) { if (input) return input[0].touppercase() + input.slice(1); } }); html: <div ng-app="myapp"> {{ "san francisco cloudy" | lowercase | capitalize }} </div> demo your filter has 1 issue, not sure if that's meant - in function have function(capitalize) makes angular believe have service/factory of name. if that's have somewhere fine, doesn't seem you're using it. you can open dev console , see if see errors - guess will. removing makes work: myapp.filter('capitalize', function() { return function(input) { if (input) return input[0

DLIB C++ object detection example training really slow -

i'm using dlib's object detection example , trying train using 7 images containing 14 images of bottle. these images around 200x300 pixels, although 2 larger (the 1500x2000 pixel realm). large images contain 1 example each, , although images big, bottles match same size of bottles in smaller training images. sliding window 70x240 average size of bounding boxes drew. it has been minimizing objective function 8+ hours on windows server machine 384gb of ram running windows 8 64bit. there's no way it's supposed take long. it's still going--it's on iteration 125... the documentation mentions training face detector on provided set of faces in "on order of 10 seconds." because i'm running in ms visual studio 2012 arguments passed debugger? when ran face detector example, took solid 30-45 minutes training--a lot more 10 seconds. has has similar issues , know how fix it? thanks help! did compile in debug mode? see: http://dlib.net/fa

php - Setting default value as empty on custom meta box when no value input? -

i have series of custom meta boxes configured per code below. works fine, when value hasn't been entered user, default value in boxes ". of course issue prints out on front end. if default blank nothing output on front end. any ideas? $video_url_1 = isset( $values['cf_private_meta_box_video_url_1'] ) ? esc_attr( $values['cf_private_meta_box_video_url_1'][0] ) : ”; $video_caption_1 = isset( $values['cf_private_meta_box_video_caption_1'] ) ? esc_attr( $values['cf_private_meta_box_video_caption_1'][0] ) : ”; <label for="cf_private_meta_box_video_url">video url 1</label> <input type="text" class="widefat" name="cf_private_meta_box_video_url_1" id="cf_private_meta_box_video_url_1" value="<?php echo $video_url_1; ?>" /> <label for="cf_private_meta_box_video_caption">video caption 1</label> <input type="text" class="wid

selenium - How to extract xpath from element name using Appium on iOS -

i'd find way extract full element's xpath using name. instance got this: name: moses type: uiastatictext xpath: "//uiaapplication[1]/uiawindow[1]/uiascrollview[1]/uiastatictext[3]" now i'd find full xpath using "moses" name tag. seleniumhelper.getelement("//uiastatictext[(@name='moses')]"); but doesn't seem work. cheers, pavel try this: mobileelement obj1 = (mobileelement)driver.findelementbyclassname("uiastatictext"); or: mobileelement obj1 = (mobileelement)driver.findelementbyclassname("uiawindow"); once object, then: obj1.getattribute("name"); if still see issue, please attach screen shot xml.

javascript - angularJS error: Error: n.replace is not a function -

i using third-party js file interact external api, tokenizes data before sending. in simple test page, function works fine , returns token. however, when try implement actual app uses angularjs, keeps failing error: "error: n.replace not function". here simple test script works: // click event handler $('#form-submit').click(function (e) { e.preventdefault(); $('#response').hide(); var payload = { api_id: 'abcde123', var1: $('#var1').val(), var2: $('#var2').val(), var3: $('#var3').val(), var4: $('#var4').val() }; // tokenize data vendorscript.createtoken(payload) .success(ontokencreated) .error(ontokenfailed); }); and here angular code throws error: app = angular.module 'myapp' myctrl = ($scope, $http, $window, $q) -> myformparams = -> api_id: 'abcde123' var1: $scope.var1 var2: $scope.v

sql - How do I combine 2 combined tables and then add a column that compares them? -

Image
i trying create report compares 2 sets of data. 1 training table listing have trained. other project table listing has participated in project. i want group trained , participants department know departments aren't participating after training. i wrote following 2 statements show me counted number of trainees , particpants department: shows participants counted department: select emp.dept_manual, count(pt.sso) partic projectteam pt, employees emp emp.sso = pt.sso group emp.dept_manual order emp.dept_manual desc shows trainees counted department: select emp.dept_manual, count(train.sso) trained trainingroster train, employees emp emp.sso = train.sso group emp.dept_manual order emp.dept_manual desc some info these 2 tables. both projectteam & trainingroster linked employees table via sso. employees table has field dept_manual. not every sso in trainingroster in projectteam (going forward be) not every sso in projectteam has associated dept_manual in employees

r - Load files from a list of file names in a data frame -

i have created program calculation excel worksheet. data worksheet comes machine. have set machine export given folder. want r program input data folder (data) , run code, export different folder (results). don't want code run on data done. have done: library(gdata) library (xlconnect) #################### data in ######################## setwd("c:/r/data/") datain <- list.files(pattern="*.xlsx", full.names=t, recursive=false) ##################### results in ################### setwd("c:/r/result/") results <- list.files(pattern="*.xlsx", full.names=t, recursive=false) ################## set wd data ################################# setwd("c:/r/c/") torun <- datain[!(datain %in% results)] ############################################################################ dataframtorun <- data.frame(torun) dataframtorun torun 1 ./343sdasd.xlsx 2 ./4ewwq.xlsx 3 ./tricarb.xlsx i want load 3 fil

javascript - Ciphering data value so that it cannot be seen when viewing html source code -

i'm developing online test. questions , answer choices , points associated answer choices taken mysql database php. , front-end of test done jquery. when output answer choices looks in html source: <li data-points="1">answer choice text</li> so quite easy user see points associated answers looking source of page. i somehow hide/mask/encrypt data-points value, must done php right after getting value mysql. after same html in page source: <li data-points="2f77668a9dfbf8d5848b9eeb4a7">answer choice text</li> then encrypted value must read in front-end jquery , decrypt actual points can calculated. i don't know how this, there simple solution? solution not need super secure don't want user can see right answer 1 click of "inspect element" or viewing source of page. if can point me right direction!

Securing Facebook Login through Javascript and PHP SDK -

what i'm trying achieve javascript checks if user logged in or not, if so, send code (either access_token or signedrequest) php securely deal logging in. php take code javascript , using app_secret, make sure code given javascript valid. using php sdk make graph api calls appsecret_proof can turn on "require proof on calls" in fb app. where i've got to 1) have javascript initialises when page loads, , assuming particular user logged in , authenticated in case, have access $helper = new facebookjavascriptloginhelper(); class, can session , make calls in php, pass in access token directly using $session = new facebooksession('access token here'); - great! 2) i've got snippet of php check signedrequest property of js response checks against app_secret - great! $signed_request = $_post['signedrequest']; list($encoded_sig, $payload) = explode('.', $signed_request, 2); $secret = "mysecret"; // use app secret here /

Post with CURL to API -

i'm having trouble sending post request via curl: curl -h "content-type: application/json" -x post -d '{"username":"test@test.com", "password":"testpassword", "verify":"testpassword", first_name="mo", last_name="lester"}' http://stuff.com/signup the error message i've received said server isn't getting password, , none of data @ all. i tried posting quotes around url, without luck. new curl, forgive ignorance. you forgot quotes around first_name , last_name elements , you've included = in assignments instead of json : character results in invalid json other end won't able parse. corrected valid json request: curl -h "content-type: application/json" -x post -d '{"username":"test@test.com", "password":"testpassword", "verify":"testpassword", "first_name": "

Modified dependencies in python package do not show up -

in python package have, in setup.py modified dependencies removing condition on version number: setup( name='mytool', version='0.1.5', author='myname', author_email='myname@myname.com', packages=['mytool'], scripts=['bin/my_tool.py'], url='https://pypi.python.org/pypi/mytool', license='license.txt', description='this tool.', long_description=open('readme.txt').read(), install_requires=[ "scipy", "numpy", "prettytable" ], ) i ran: $ python setup.py sdist $ python setup.py sdist upload but when run pip , refers previous requirements: $ sudo pip install mytool requirement satisfied (use --upgrade upgrade): mytool in /usr/local/lib/python2.7/dist-packages requirement satisfied (use --upgrade upgrade): scipy>=0.7.0 in /usr/local/lib/python2.7/dist-packages (from mytool) requirement satisfied (

ember.js - Meaning of ember init 'Yndh' -

what yndh mean when run ember init ? i this: installing [?] overwrite .editorconfig? (yndh) yn yes , no . know dh means? turning @damienmathieu's comment community answer: yndh stands yes , no , diff , help .

get TYPO3 Extbase Repository items in other languages -

how can items extbase respository in different language? what tested: findbyuid($childuid) $query->getquerysettings()->setrespectsyslanguage(false); $query->getquerysettings()->setsyslanguageuid(3); but result parent (lang) object. i tried "matching" , "statement" result query uses active language or searches sys_language_id in (0,-1) = (default/all). it seems bug in extbase not removed until typo3 7.1: https://forge.typo3.org/issues/45873 for me solves problem: https://forge.typo3.org/issues/45873#note-27 after modification possible translated objects repository (e.g byuid or in own query) (copied linked page, 07.04.2015) 1.hack extbase in extension (in ext_localconf.php) register "customqueryresult" class: // code below no public api! /** @var $extbaseobjectcontainer \typo3\cms\extbase\object\container\container */ $extbaseobjectcontainer = \typo3\cms\core\utility\generalutility::makeinstance('typo3\\c

Meteor Conditionally displaying nested templates -

i have template several sub nested templates should conditionally show based on data saved in templatec collection shown below, used if condition in template shown below, having sub templates displayed despite if condition return true or false. can please check code , tell me missing here? thanks var templatearray = ['false', 'false']; template.formbuilderpreview.created = function() { var cursor = templatesc.find({}, { sort: { templatecode: 1 }}); if (!cursor.count()) return; cursor.foreach(function (row) { //only case 1 return in switch below case 2 never exist switch(row.templatecode) { case 1: templatearray[0] = true; break; case 2: templatearray[1] = true; break; default: templatearray[0] = true; } }); }; template.formbuilderpreview.helpers({ template1bo

php - Recursive function to create a folder tree from array -

so have following: id => id of folder name => name of folder folder_id => null if it's in root, have "id" of it's parent if it's inside folder i have of these listed out in array so: (this $folder_array in example) array ( [1] => array ( [name] => folder1 [id] => 1 [folder_id] => null ) [2] => array ( [name] => folder2 [id] => 2 [folder_id] => null ) [3] => array ( [name] => folder3 [id] => 3 [folder_id] => 2 ) [4] => array ( [name] => folder4 [id] => 4 [folder_id] => 3 ) } i trying make array has folder tree of sorts, i'd like: array ( [1] => array ( [name] => folder1 [id] => 1 [folder_id] => null ) [2] => array ( [name] => folder2 [id] => 2 [folder_id] => nul

ios - Google+ & YouTube Integration -

i have ios app includes sharing links google+ , uploading videos on youtube. first completed sharing links on google+ (followed post: https://developers.google.com/+/mobile/ios/getting-started ) for uploading videos on youtube, followed tutorial (link: https://nsrover.wordpress.com/2014/04/23/youtube-api-on-ios/ ) the problem header files clash giving error “redefinition of enumerator” in xcode 5.1.1. how solve issue? following rather late here: google has restructured entire sdk. upgrading copy of google sign-in sdk version 2.4.0 fixed enum issues me. google recommends using cocoapods manage sdk dependency now, remove old sdk project , add new sdk via cocoapods: pod install google . if not using cocoapods, can manually install sign-in sdk downloading here , linking binary project.

Trying to convert from c# string to SQL binary -

i building c# application needs work binary(16) unique identifiers in our sql server db. currently, application storing these string. i hoping able pass unique id string varchar parameter , convert within sql statement, getting strange results. convert(binary(16), '0x6ec5cae61df38840b8efec2d5a158b3a', 1) --desired: 0x6ec5cae61df38840b8efec2d5a158b3a --actual: 0x307836454335434145363144463338383430423845464543324435413135 is there way convert in way? solution found in various places, haven't been able work. have tried other recommendations: convert(binary(16), '0x6ec5cae61df38840b8efec2d5a158b3a', [1-3]) convert(varbinary(16), '0x6ec5cae61df38840b8efec2d5a158b3a', [1-3]) convert(binary(16), '6ec5cae61df38840b8efec2d5a158b3a', [1-3]) convert(varbinary(16), '6ec5cae61df38840b8efec2d5a158b3a', [1-3]) cast('' xml).value('sql:variable("@variable")', 'binary(16)') to no

javascript - Interim message when downloading a file -

on website have option display data , download in csv format. of data quite large (20,000 - 900,000 rows in sql). when display on site use paging displays x amount of rows @ time, however, download link of course should , downloading entire report can take several seconds couple of minutes depending on file size. i'm wondering if there way create interim pop-up or message in-line says "gathering information..." additionally put animated gif user knows happening. creating shouldn't issue i'm not sure if there way trigger disappear once download pop-up appears. solutions i've seen on site suggest using timer, thats not option in case times vary lot. i'm using classic asp use either or javascipt. additionally use flash if makes difference. i wire "gathering info..." message hidden upon receipt of comet style message server sent out file ready download on end.

asp.net mvc 5 - MVC5 get area name when using attribute routing -

i have old mvc3 site able area of route using following code: object oarea; routedata.datatokens.trygetvalue("area", out aarea); i creating new mvc5 application , have started use attribute based routing follows: [routearea("area")] [routeprefix("test")] public testcontroller { public actionresult index() { return view("index"); } } unfortunately, appears when use attribute based routing routedata.datatokens collection empty. area information appears buried under routedata in "ms_directroutematches", data follows: routedata.values["ms_directroutematches"])[0].datatokens.trygetvalue("area", out oarea); however, wondering if there easier, safer or better way area data in mvc5. area name sub-tool name within larger application, used logic in base controller initialization. the "safe" way first check existence of ms_directroutematches , probe area if exists, fa

git - Automation commits from Google code to Github -

i have project on google code : project on google code . resently, exported github : project on github . how can automate sending commits google code github ? i.e. want continue working google code, new commits should authomatically sent github repo? how can that? google code doesnt belong you, have access github repo. clone repo on computer. 1.git clone https://github.com/velkerr/code--review.git 2.try add new file test.foo in same directory on computer 3. git add --all 4.git commit -am "testing foo" 5. git push origin master should solve it.

c# - Expression Encoder Free version vs Pro version -

i evaluating media encode/playback technology media project[i need stuff clipping/trimming/joining video, screen capture, add overlays etc], wpf/c# based project. have gone through expression encoder/media foundation.net/directshow.net , found out expression encoder seems have clear , easy use api. confused capabilities free version offers, not found article differentiate available in free version , not. expression encoder pro 4 available sale now, if how cost, allow access full api development purpose? can has worked on these technologies suggest technology suitable project , whats difference in 2 encoder versions in terms of capibilities? suggestions welcome. thanks in advance.

javascript - how can I get the current url using protractor? -

i testing website using protractor, , jasmine. know current url in order verify test. i have tried function waitforurltochangeto(urlregex) { var currenturl; return browser.getcurrenturl().then(function storecurrenturl(url) { currenturl = url; } ).then(function waitforurltochangeto() { return browser.wait(function waitforurltochangeto() { return browser.getcurrenturl().then(function comparecurrenturl(url) { return urlregex.test(url); }); }); } ); } and using function in way it('should log', function() { //element(by.model('user.username')).sendkeys('asd'); //element(by.model('user.password')).sendkeys('asd'); element(by.linktext('acceder')).click(); waitforurltochangeto("http://localhost:9000/#/solicitudes"); }); here working code based on example provided author of expecte

javascript - Clicking on link does not work on firefox -

i use firefox 36 on windows 7. seeing strange problem product work on, javascript stops working on ff 36. not see errors in console when stops working too. eg: empty drop down list, missing hover icons, unable click on links, links or button disappearing. same on ie11 , chrome work fine. there way can figure out why problem on ff-36? i seeing above problem because had firebug turned on , disabled javascript on page. disabling firebug , refreshing page enabled javascript again.

How do I extract properties from Entities in Google App Engine Datastore using Java -

Image
i using google app engine , trying query / pull data datastores. have followed 20 different tutorials without luck. here picture of datastore , respective sample data have stored in there: here of code have pull data: //to obtain keys final datastoreservice dss=datastoreservicefactory.getdatastoreservice(); final query query=new query("coupon"); list<key> keys = new arraylist<key>(); //put keys list iteration (final entity entity : dss.prepare(query).asiterable(fetchoptions.builder.withlimit(100000))) { keys.add(entity.getkey()); } try { (int = 0; < keys.size(); i++){ entity myentity = new entity("coupon", keys.get(i)); system.out.println("size of keys array = " + keys.size()); string description = (string) myentity.getproperty("desc"); string enddate = (string) myentity.getproperty("enddate"); system.out.println("description = " + description);