Posts

Showing posts from August, 2011

node.js - dynamodb get item call using aws sdk -

node.js - dynamodb get item call using aws sdk - i using next code node.js item dynamodb var params = { attributestoget: [ "password" ], tablename : 'foo', key : { "username" : { "s" : "bar" }, } } db.getitem(params, function(err, data) { if (err) { console.log(err); // error occurred } else { console.log(data); // successful response res.send(data); } homecoming next(); }); but there cases not know key value fetching items. want know whether can fetch items based on attribute values. next : var params = { attributestoget: [ "password" ], tablename : 'foo', attribute : { "userlocation" : { "s" : "europe" }, } } you can create global secondary indexes on additional attributes want query. http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/gsi.html node.js amazon-web-services amazon-dynamodb

javascript - Why variable in $scope does not update? -

javascript - Why variable in $scope does not update? - code in plunker. have 2 controllers. in first controller have handler button in view $scope.click = function () { $location.url("/some"); console.log("clicked"); } in handler alter url. configured $routeprovider. var app = angular.module('plunker', []).config( function ($routeprovider) { $routeprovider.when('/some', {template: " counter {{n}}</br> <button ng-click='click()'>click load new url still \"loading cntl\"</button>", controller: "loading"}) .when("/second",{controller: "loading"}); }); here have 2 different routes have same controller - loading controller after url changed /some new button appears in view. have handler button in loading controller. app.controller("loading", function ($scope,$location) { $scope.n= $scope.n || 0; console.log("at begining n "...

explode - Convert string of months with data into a two dimensional array -

explode - Convert string of months with data into a two dimensional array - good morning! i have string number of various months each month followed series of numbers. need break string 2 dimensional array: months in first column columns of numbers after them. i've worked out solutions using strtok, explode , month lookup table. solutions seem cumbersome. appreciate elegant, simple solution real coding experience use. string , hoped 2d array result below. thank expertise , time! dec 14 1938.50 1964.50 1935.75 1959.75 21.75 1960.25 1551405 2751445 mar 15 1931.00 1956.2 1928.0 1952.0 21.75 1952.50 2244 5495 jun 15 1920.25 1949.0 1920.25 1945.0 22.00 1945.50 88 350 sep 15 1925.00 1937.7 1925.00 1937.7 21.75 1938.75 6 204 dec 15 1935.75 1935.75 1935.75 1935.75 22.00 1932.75 1 212 ends being: dec 14 1938.50 1964.50 1935.75 1959.75 21.75 1960.25 1551405 2751445 mar 15 1931.00 1956.2 1928.0 1952.0 21.75 1952.50 2244 5495 etc... the next should trick: class=...

Undefined first element in array javascript -

Undefined first element in array javascript - i new javascript / ajax if obvious please don't harsh. as far know(i may wrong) have javascript reads xml file , extracts between time tags. problem is, no matter how code first list item output undefined. able explain why happening , possible solution please ? if else massively wrong please allow me know i have tried if(x[0] !== 'undefined'){txt=txt + "<li class=\"result\">" + x[i].firstchild.nodevalue + "</li>";} if(x !== 'undefined'){txt=txt + "<li class=\"result\">" + x[i].firstchild.nodevalue + "</li>";} if(x[0].firstchild.nodevalue !== 'undefined'){txt=txt + "<li class=\"result\">" + x[i].firstchild.nodevalue + "</li>";} if(x[i].firstchild.nodevalue !== 'undefined'){txt=txt + "<li class=\"result\">" + x[i].firstchild.nodevalue + "...

java - The constructor (constructor name) is undefined -

java - The constructor (constructor name) is undefined - i'm trying create code able calculate area , perimeter of rectangles dimensions user input. of when seek phone call rectangle class create new rectangle, compiler says rectangle constructor undefined. import java.util.scanner; public class rectangles { public class rectangle { public rectangle() {} public int length; public int width; public rectangle(int len, int wid) { length = len; width = wid; } } public void runner() { scanner scanner = new scanner(system.in); string input1 = scanner.nextline(); string input2 = scanner.nextline(); rectangle first = new rectangle(input1, input2); //error here system.out.println(first); scanner.close(); } public static void main(string[] args) {} } the error "the constructor rectangles.rectangle(java.lang.string, java.lang.string) undefined" the error compiler has stated - have declared ...

objective c - Load a custom XIB for expanded cell in tableView iOS? -

objective c - Load a custom XIB for expanded cell in tableView iOS? - i trying load expanded cell xib uitableviewcell when selected.the content of normal cell , expanded cell same except space populate views in expanded cell.now differentiate between normal cell , expanded cell have changed uilabel colors within expanded cells different color.i able load expanded cell xib on clicking cell however problem every cell getting replaced expanded cell xib .the difference height of clicked cell more others .and when click expanded cell, normal cell xib 's loaded again.how can load expanded cell xib clicked cell? or there improve way accomplish thing? here's how expanding cell. -(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath{ if ([self.expandedcells containsobject:indexpath]) { [self.expandedcells removeallobjects]; isexpanded = no; [self.bustableview beginupdates]; [self.bustableview reloaddata]; [self.b...

xcode - ionic Failed to load webpage with error: Could not connect to the server -

xcode - ionic Failed to load webpage with error: Could not connect to the server - i'm having issue ionic projects after updating xcode 6 , ios 8. when trying run projects next error in xcode: failed load webpage error: not connect server. the total log is: 2014-10-11 14:08:29.468 test[23293:109668] apache cordova native platform version 3.6.3 starting. 2014-10-11 14:08:29.469 test[23293:109668] multi-tasking -> device: yes, app: yes 2014-10-11 14:08:29.495 test[23293:109668] unlimited access network resources 2014-10-11 14:08:29.866 test[23293:109668] [cdvtimer][keyboard] 0.079989ms 2014-10-11 14:08:29.866 test[23293:109668] [cdvtimer][totalpluginstartup] 0.284970ms 2014-10-11 14:08:30.721 test[23293:109668] resetting plugins due page load. 2014-10-11 14:08:30.764 test[23293:109668] failed load webpage error: not connect server. even when trying update ionic , cordova , starting new project error keeps popping up. i couldn't find threads particular er...

ios - LocationServicesEnabled: APIs deprecated -

ios - LocationServicesEnabled: APIs deprecated - i utilize code here: import uikit import corelocation @uiapplicationmain class appdelegate: uiresponder, uiapplicationdelegate, cllocationmanagerdelegate { var window: uiwindow? var locationmanager: cllocationmanager! var seenerror : bool = false var locationfixachieved : bool = false var locationstatus : nsstring = "not started" func application(application: uiapplication, didfinishlaunchingwithoptions launchoptions: nsdictionary?) -> bool { initlocationmanager(); homecoming true } // location manager helper stuff func initlocationmanager() { seenerror = false locationfixachieved = false locationmanager = cllocationmanager() locationmanager.delegate = self locationmanager.locationservicesenabled locationmanager.desiredaccuracy = kcllocationaccuracybest locationmanager.requestalwaysauthorization() } // location manager delegate stuff func locationmanager(manager: cllocat...

cups printing multiple files from c++ using intermediate file -

cups printing multiple files from c++ using intermediate file - i trying send big image custom printer. due memory restrictions , fact image processed total color, image has chunked in smaller sections sent printer. since not images have same size (or feed/cutmedia options), have print them separately, each own alternative set jobid = cupsprintfile(...) each image (instead of jobid = cupsprintfiles ) if multiple jobs sent printer or multiple users sending jobs, there risk jobs go between chunks current job. the solution can come with, send print jobs file instead of printer, using options (and going through filters), take print jobs created , send them batch printer, single jobid... are both of these steps possible ? i can "print file" if set lpoptions -o file="/home/me/abcd.prn" ....but... 1) how do through c++ code ? 2) how create happen different files abcd1.prn, abcd2.prn, abcd3.prn during same print session ? 3) how send files ab...

c++ convert string with dashes to integer -

c++ convert string with dashes to integer - using c++, if have string str ="0-7637-2129-8" how can convert 1 big integer? 763721298 strings in format. more examples: 1-2344-3457-8 = 1234434578 0-0002-0020-0 = 200200 you utilize erase-remove idiom rid of '-' characters. #include <iostream> #include <string> #include <algorithm> int main() { std::string mystr = "0-7637-2129-8"; mystr.erase(std::remove(mystr.begin(), mystr.end(), '-'), mystr.end()); long mylong = std::atol(mystr.c_str()); // convert long std::cout << "your number " << mylong << std::endl; homecoming 0; } working example c++ string integer

How to get transfer function (approximation) of unknown system in matlab/simulink? -

How to get transfer function (approximation) of unknown system in matlab/simulink? - i have unknown scheme in simulink model (non-linear) , dont know how tf describe in interval of input data. im sorry im asking such abstract question im lost. i tried 'tfest(data,number_of_poles,number_of_zeroes)' tried 'ident' , import input , output ident gui , click estimate tf. both returned me transfer function behave completly different system. im not sure input should generate system, should imput noise? appreciate kind of advice or help here. if have simulink command design, can utilize frequency response estimation functionality or linearise simulink model around operating point. you need provide more info (data, code, etc...) why tfest , ident didn't work. there lot of different models , options available within scheme identifcation gui, may matter of choosing right one. matlab simulink system-identification

mysql - Table with FK refer to a table with two PK -

mysql - Table with FK refer to a table with two PK - i have table1 id , name columns both pk, table2 have fk refer table1 column: name, when create fk in mysql workbench, error: error 1215: cannot add together foreign key constraint table1: level, id enum(), name varchar(20) both pk. table2: class, id bigint pk autoincrement, level_name varchar(20), number int. level_name fk pk name adding foreign key need care somethings in case in table1 level have made primary key (id,name) , in sec table referencing level_name foreign key wrong need refer pair of columns class table in order create foreign key add together level_id of same type of id column table1 level , reference pair foreign key (level_id, level_name) table level see below sample schema tables create table `level` ( `id` enum('1','2','3','4','5') not null, `name` varchar(20) not null, primary key (`id`,`name`) ) engine=innodb default charset=lati...

java - RegEx validation name with underscore -

java - RegEx validation name with underscore - i had validation like, string can contains alphanumeric , _ in between. string can start , end _ string can _ i wrote regex ^(_)?([a-za-z0-9]+)?([a-za-z0-9])+?(_)?$ my unit testes assertequals(false, utilityfunction.isalphanumeric("__")); assertequals(true, utilityfunction.isalphanumeric("a")); assertequals(true, utilityfunction.isalphanumeric("_a")); assertequals(true, utilityfunction.isalphanumeric("a_")); assertequals(true, utilityfunction.isalphanumeric("_a_")); assertequals(true, utilityfunction.isalphanumeric("_a_a")); assertequals(true, utilityfunction.isalphanumeric("_a_a")); assertequals(false, utilityfunction.isalphanumeric("_a__a")); assertequals(true, utilityfunction.isalphanumeric("_a_a_")); assertequals(true, utilityfunction.isalphanumeric("a_a")); getting failed @ ...

javascript - Customizing a password strength validator plugin -

javascript - Customizing a password strength validator plugin - i using plugin called pstrength.jquery.js , reason not submitting form have, or submitting form if not supposed (when changed code) the code using is: $(document).ready(function () { $('#myform').submit(function () { homecoming false; }); $('#myelement1, #myelement2').pstrength({ 'changebackground': false, 'onpasswordstrengthchanged': function (passwordstrength, strengthpercentage) { if ($(this).val()) { $.fn.pstrength('changebackground', this, passwordstrength); } else { $.fn.pstrength('resetstyle', this); } $('#' + $(this).data('display')).html('your password strength ' + strengthpercentage + '%'); }, 'onvalidatepassword': function (strengthpercentage) { $('#' + $(this).da...

HTML Footer on my website -

HTML Footer on my website - i'm working on website: click here on every page made footer. can't footer centered , locked on bottom of page. hope of guys can help me. tried stuff found on stackoverflow won't work.... regards, matthijs the class using on div ( .grid_4 ) has float:left value. if rid of float , add together text-align: center on div, content centered. for sticky footer, check out this link html

r - Installing & using the asbio package under OS X -

r - Installing & using the asbio package under OS X - i'm ta in statistics class, , students supposed utilize "asbio" bundle in r multiple comparisons. of have osx complaining asbio not load. cannot reproduce error on own mac. here errors 1 of students seeing: >library(asbio) loading required package: tcltk error : .onload failed in loadnamespace() 'tcltk', details: call: dyn.load(file, dllpath = dllpath, ...) error: unable load shared object '/library/frameworks/r.framework/versions/3.1/resources/library/tcltk/libs/tcltk.so': dlopen(/library/frameworks/r.framework/versions/3.1/resources/library/tcltk/libs/tcltk.so, 10): library not loaded: /opt/x11/lib/libx11.6.dylib referenced from: /library/frameworks/r.framework/versions/3.1/resources/library/tcltk/libs/tcltk.so reason: image not found error: bundle ‘tcltk’ not loaded > install.packages("tcltk") warning in install.packages : bundle ‘tcltk’ not available (...

powershell - How to add a user in a folder security tab -

powershell - How to add a user in a folder security tab - hi have shared folder on have given next permissions net share $networksharepath '/grant:administrators,full' '/grant:iis_iusrs,full' | out-null but creates user on shared permission tab add together iis user in security tab dont have clue how that $networkshare_name = 'media' $networkshare_path = 'media=c:\_projects\mediafolder' net share $networksharepath '/grant:administrators,full' '/grant:iis_iusrs,full' | out-null $acl = get-acl $networksharepath $rule = new-object system.security.accesscontrol.filesystemaccessrule("iis_iusrs","fullcontrol", "containerinherit,objectinherit", "none", "allow") $acl.addaccessrule($rule) set-acl $networksharepath $acl still no luck this $folder = "c:\_projects\mediafolder" $acl = get-acl $folder $permission = "ii...

linux - Raspberry Pi - Gateway IP Defaults to 0.0.0.0 at every reboot, how do I prevent this -

linux - Raspberry Pi - Gateway IP Defaults to 0.0.0.0 at every reboot, how do I prevent this - title says all. seems @ every re-boot (or may @ random), gateway ip sets 0.0.0.0. i viewing in sudo route -n. when happens, right sudo route add together default gw 192.168.1.1 does know why happening, , how prevent it? i new raspberry pi , programming. have 2 reddish lights on raspberry pi; when problem arose seems 1 of them turns green. these lights mean? thank you! linux connection ip raspberry-pi gateway

asp.net routing cannot find method -

asp.net routing cannot find method - i have folder crated in application called admin within controllers, folder construction looks this -models | -views | -controller | |-homecontroller.cs | |-admin | |-homecontroller.cs <-- in controller, have methods add,delete,view i needed created route if type url http://localhost:2336/admin/add , execute add together method of home controller, 404 error. public static void registerroutes(routecollection routes) { routes.ignoreroute("{resource}.axd/{*pathinfo}"); routes.maproute( name: "admin", url: "admin/{controller}/{action}/{id}", defaults: new { controller = "home", action = "index", id = urlparameter.optional }, namespaces: new[] { "fms.controllers.admin" } ); routes.maproute( "default", // route name ...

jquery - Toggle between stylesheets with one button -

jquery - Toggle between stylesheets with one button - i'd toggle between 2 stylesheets using single button. code have is: <link id="style1" rel="stylesheet" type="text/css" href="style.css" /> <link id="style2" rel="stylesheet" type="text/css" href="styleinvert.css" disabled="disabled" /> <script> function toggle() { var el1 = document.getelementbyid("style1"), el2 = document.getelementbyid("style2"); if( el1.disabled == "disabled" ) { el1.disabled = undefined; el2.disabled = "disabled"; } else { el1.disabled = "disabled"; el2.disabled = undefined; } } </script> <a href="#" onclick="toggle()">invert</a> however causes stylesheet temporarily disappear between deactivating first 1...

javascript - AngularJS route like SammyJS, Grapnel or Satnav? -

javascript - AngularJS route like SammyJS, Grapnel or Satnav? - how can create route in angularjs sammyjs? example: .config(function($routeprovider) { $routeprovider .when('/photos/:date', { controller: function($scope) { // foo }); }); i don't need template or ng-view, need execute ajax request , open modal, example. any idea? tks guys .config(function($routeprovider) { $routeprovider .when('/photos/:date', { templateurl: 'someview.html', controller: function($scope,$http) { $http.get('/someulr').then(function(res){}); }); }); try this javascript angularjs routes

c# - Visual Studio Prevent Changes to Linked File -

c# - Visual Studio Prevent Changes to Linked File - in visual studio can add together link source file in project. there way enforce preventing changes beingness performed on linked source file (ie: link them project 'read only', prevent accidental modifications folks don't realize linked, , not local project)? i have 2 projects, 1 of dll, other exe. dll contains windows serviceinstaller , servicebase classes. link these classes exe (there multiple flavors of exe) dll in order exe installable service , me not have replicate servicebase , serviceinstaller in of exes. not want inadvertently able create changes linked classes within context of exe project. not via visual studio-supported mechanism, no. imho, general rule should not using linked file that. yes, feature exists in vs, reason mention others, it's great way create code maintenance headaches. note own scenario solved exposing shared types in assembly , referencing assembly need them. i....

How do ansible host_vars work? -

How do ansible host_vars work? - i created repo reproduce scenario. essentially loading inventory our hosts, can override values per-host via inventory without issue seek , utilize host_vars. i'm not 100% clear on how host vars matched host. read ansible repo examples cannot seem work documented i'm looking scrutiny of our setup. when run command ansible-playbook -i ansible.inventory site.yml -clocal in illustration repo expect host_vars/{{ ansible_hostname }} file read , override set in vars not appear happening. can please point me @ working illustration can see going wrong? since documentation not specific on topic here order of precedence vars in current version of ansible: vars set on command line -e foo=set_on_cmd_line vars set in vars_files: block in play vars set in vars: block in play vars set in host_vars/ vars set in group_vars/ role default vars roles/.../defaults/main.yml you should think of host_vars , group_vars more defaults rather ...

symfony2 - Add prefix to twig trans filter -

symfony2 - Add prefix to twig trans filter - i have messages.de.yml looks like ... profile: ... availability: ... 4_week: vier mal pro woche ... ... (the ... not of import example) i have user class has field called availability. want display field in user's profile , translate it. let's assume value of user.availability "4_week" this code working: {{ ("profile.availability." ~ user.availability)|trans }} but recommended way? tried using profile.availability / messages.profile.availability domain: {{ user.availability|trans({}, "profile.availability") }} but output 4_week , not "vier mal pro woche" expected. simon yes, recommended way. symfony2 dns twig translation yaml

c - Weird issue with returning empty struct instead of NULL -

c - Weird issue with returning empty struct instead of NULL - context i working on consumer & producer multi-threaded program. programme has shared variable num_elem incremented in producer , decremented in consumer. num elem providing info circular buffer using struct queue , such queue stores arrays of words beingness read file. if increment changed beingness within of producer beingness function called producer, communication between producer , consumer fixed. else, if code producer called function (as consumer is), then used boolean changed true, when in fact not beingness used. the code each below. problem if increment called outside of producer, values used changed true. why beingness changed when beingness called within of producer, , not when called function within of producer? code producer item_t *item = null; (i = 0; < queue_size; i++) { if (queue[(next_index + i) % queue_size].used == false) { item = &queue[(next_i...

html - jquery draggable element fit within the exact size of droppable element -

html - jquery draggable element fit within the exact size of droppable element - how can create draggable item fit within droppable item, when drag img1 should fit within preg1 <div id="droppable"> <span id="img1"> <img src="img/img1.png" class="respues" alt="img1"/></span> <span id="img2"> <img src="img/img2.png" class="respues" alt="img2"/></span> </div> <div id="draggable"> <article class="preg1"> </article> <article class="prega"> </article> </div> generally speaking, alter dropped item part of droppable's drop() callback. // set draggable items $("#droppable > span").draggable(); // set droppable regions , methods $("#draggable").droppable({ accept: "#droppable > span", drop: func...

excel - Look for specific values and multiply them -

excel - Look for specific values and multiply them - i using excel calculate cash amount each year. usually doing that: as can see looking every year hand , multypling cash * amount . how implement in excel? i appreciate answer! this sumproduct built for. going test see if status (or conditions) true. if going math, , add together results go downwards range testing conditions: =sumproduct(($c$2:$c$19=g2)*($a$2:$a$19)*($b$2:$b$19)) put in h2 . test if c2:c19 same year g2 . if it's true, multiple cell in column cell in column b. add together each row's result true , give answer. excel excel-formula spreadsheet

znodes - Expiration of zookeeper persistent node -

znodes - Expiration of zookeeper persistent node - i not able find info regarding automatic expiration of persistent node in zookeeper. persistent node expire when zookeeper server shut downwards or can expired before before ?. if yes, possible reason. here asking automatic expiration not manually deleting node. persistent zk nodes saved on disk , preserved on service restarts , deleted request. ephemeral nodes deleted automatically on client disconnection. zookeeper znodes

angularjs - UI-router redirect to different url? -

angularjs - UI-router redirect to different url? - this might not possible, i'm going seek anyway. in website have couple of states defined ui-router . 1 of these states should link domain. possible? $stateprovider .state('index', { url: "/index", templateurl: "views/home.html", controller: "maincontroller", ncybreadcrumb: { label: 'home' } }) .state('about', { url: "/about", templateurl: "views/about.html", controller: "aboutcontroller", ncybreadcrumb: { label: 'about', parent: 'index' } }) .state('us', { url: "/us", parent: "about", views : { '@': { templateurl: 'views/us.html', }, } }) .when('contact', 'http://www.example.com') ui router handling internal application url's. anyway can acc...

ruby on rails 3 - jquery-fileupload: getting "TypeError undefined function" error in production environment only -

ruby on rails 3 - jquery-fileupload: getting "TypeError undefined function" error in production environment only - i'm using latest version of blueimp's jquery-fileupload library in rails 3.2.18 application. everything working correctly in development environment, when deploy production environment, next error: typeerror: undefined not function (evaluating 'fu._adjustmaxnumberoffiles(-files.length)') this related alter in json result handling in jquery-fileupload library. necessary fixes applied codebase (at least, working in development) i assumed issue may related asset pipeline -- js files not beingness included page, far can tell not case. differences between development , production result in type of jscript error? this due changes in jquery-fileupload library. basically, referencing private function (_adjustmaxnumberoffiles) appears have been deprecated in newer versions of code. removing line caused code function across enviro...

mpich - Force MPI to not use network adapter -

mpich - Force MPI to not use network adapter - i running multi-process calculations using mpich2 argonne national laboratory. run on single machine, -localonly alternative of mpiexec used. works. if network adapter enabled when run starts, , if disable during run, run fails error stating: op_read error on left context: error = -1 op_read error on parent context: error = -1 unable read cmd header on left context, error = -1 . unable read cmd header on parent context, error = -1 . error posting readv, existing connection forcibly closed remote host.(10054) connection parent broken, aborting. state machine failed. however, if network adapter disabled when run started, can enable/disable adapter many times want, , run still proceeds end. is there way run mpiexec or modify smpd configuration such mpich2 not using network adapter inter-process communication local runs if adapter available when run starts? update the platform windows 7 professional. the version o...

html - IE not applying styles from stylesheet -

html - IE not applying styles from stylesheet - good day everyone. having weird issue ie. ie loading stylesheets correctly, not applying styles specific grouping of pseudo selectors. i using foundation , icon font (icomoon) loads 1 stylesheet , has styles applied them another. chrome/safari/firefox correctly apply styles 'class':before elements. ie not. using f12 tools can see stylesheet loads , have verified using fiddler. the css not beingness applied is: .icon-bookmarks:before, .icon-blog:before, .icon-bullhorn:before, .icon-info2:before, .icon-lab:before, .icon-bookmarks2:before, .icon-bullhorn2:before, .icon-mail:before, .icon-blog2:before, .icon-graduation:before, .icon-user:before, .icon-users2:before { color: #fff; font-size: 6rem; position: absolute; top: 2.5rem; left: 38%; left: calc(50% - 5.5rem); border: 5px solid white; padding: 2.5rem; margin-top: 2.5rem; border-radius: 50%; } .icon-bullhorn:before, .icon-info2:before, .icon-lab:before, .icon-bookma...

geolocation - Mysql Join on three tables containing spatial data -

geolocation - Mysql Join on three tables containing spatial data - i have 3 tables outlets (shopid, shopname,shoplatitude,shoplongitude,g) (450 rows) g of type geometry , contains value point(latitude longitude) offers (offerid,offername,offerdescription) (450 rows) offer_outlets (offerid,shopid) (503 rows) i want fetch offers , shop details within particular radius, next tutorial implementing spatial queries. here query using working fine few 100's of records, above mentioned number of items in each table taking 34s homecoming results. how can efficiently write query? select distinct ofr.offerid,ofr_otl.shopid,ofr.isdeleted,ofr.offer_title,ofr.offer_icon, ofr.offer_description,ofr.categoryid,ofr.offer_terms, ofr.start_date,ofr.end_date, ofr.price_description, otl.shop_name,otl.shop_address,otl.shop_city, otl.shop_phone,otl.shop_icon, otl.shop_latitude,otl.shop_...

How to get access to Google Cloud Save APIs in android studio? -

How to get access to Google Cloud Save APIs in android studio? - i trying utilize google cloud save store info on cloud android app. have seen every possible tutorial can't access google cloud save apis in android studio(beta) 0.9.1. tried seek trial version of cloud save @ developer's site here . inquire me sign free trial shows me page in end says "thank signing up! trusted tester programme closed we'll notify when google cloud save available." .. how acquire access google cloud save apis in android studio? google cloud save in private beta, , we're gathering feedback our trial partners announced @ i/o -- please see additional information: http://googlecloudplatform.blogspot.com/2014/06/reimagining-developer-productivity-and-data-analytics-in-the-cloud-news-from-google-io.html android google-app-engine

javascript - Using a HTML button to call and pass information to a PHP function -

javascript - Using a HTML button to call and pass information to a PHP function - i have next code in trying display info sql database, print , have button next info allow me phone call php function. aware can not phone call php function html php server side. of other answers seem assume knowledge of ajax/ javascript not have. code follows: while ($row = $results->fetcharray()){ /* homecoming results */ $links .= 'website name: '. $row['title'].'<br>'; $links .= "link : <a href= " . $row['link'] . " > " . $row['link'] ." </a> </br>"; $links .= "recommendations: " . $row['recommendations'] . "</br></br>"; } homecoming $links; i add together each bit of information, pre formatted, $links variable , homecoming accessed in different file. originally, though...

express - Parse Hosting and Requests Per Second -

express - Parse Hosting and Requests Per Second - i have written little website non-profit. website handles 500 visitors per day, site pretty simple. uses expressjs , serves .ejs files updated weekly. not have user/admin login functionality , not save data. create couple separate requests parse core fetch images, urls, , other text. has few forms submit info using mandrill. first off, serving .ejs web page constitute request? second, , beingness overly cautious, want sure can host website using parse , maintain free pricing plan @ 30/req per-second. think can? let me know if can more specific description of how website setup. had same question. parse.com team told me counting api requests against 30/req limit not hosted file requests. otherwise wouldn't create sense anyway web site request trigger several more requests images etc. express parse.com request requests-per-second

Convert LinQ var into a DataTable in C# getting 'specified cast is not valid' Exception -

Convert LinQ var into a DataTable in C# getting 'specified cast is not valid' Exception - i'm trying load linq datatable in c#. used below code while compiling i'm getting specified cast not valid exception. datatable dt = new datatable(); dt.columns.add("id", typeof(int)); dt.columns.add("name", typeof(int)); dt.columns.add("mobilenumber", typeof(int)); dt.columns.add("address", typeof(int)); dt.columns.add("fathername", typeof(int)); var results = table1 in tree.asenumerable() bring together table2 in direct.asenumerable() on (int)table1["id"] equals (int)table2["id"] select new { id = (int)table1["id"], name = (int)table1["name"], mobilenumber = (int)table1["mobilenumber"], address = (int)table2["address"], fathername = (int)table2["fathername"], }; foreach (var item in results) { datarow dr = dt.new...

android - Can I use an Application subclass as a global variable container? -

android - Can I use an Application subclass as a global variable container? - i found , read lot of articles talking global variables in android, of them suggests using subclass of application + declare in manifest file glbal variable container. but articles mentioned class killed when scheme memory gets low, correct? so, 100% reliable utilize application subclass global variable container? , give me link documents explaining life cycle of application in android (not activity)? edit: thanks answers, think need explain bit more of question. the situation is, want share global string variable, activity modifies it, , activity b reads it. when b visible , user receives call, if , b killed application maintain untouched (is google calls empty process?), i'm ok it. if a, b, , application class killed , when user come app gets clean start, i'm ok it. which i'm not ok is, killed including application class, when user come app doesn't start fresh, mean, st...

Draw on Picture in android -

Draw on Picture in android - i working on custom imageview can draw line on it, problem drawing area size not bitmap size. for example, in other app, looks like: however, in app, looks like here program, seems bitmap not fit canvas. helping public class drawingview extends view { //drawing path private path drawpath; //drawing , canvas paint private paint drawpaint, canvaspaint; //initial color private int paintcolor = 0xff660000; //canvas private canvas drawcanvas; //canvas bitmap private bitmap canvasbitmap; public drawingview(context context, attributeset attrs){ super(context, attrs); setupdrawing(); } //setup drawing private void setupdrawing(){ //prepare drawing , setup paint stroke properties drawpath = new path(); drawpaint = new paint(); drawpaint.setcolor(paintcolor); drawpaint.setantialias(true); drawpaint.setstrokewidth(15.0f); ...

mysql - Can JavaFX be included on a Java SE project? -

mysql - Can JavaFX be included on a Java SE project? - i'm trying create inventory project , have graphs on it. i'd graph created thru javafx , phone call on java main class. possible add together javafx class java project? i'm using netbeans btw. javafx java 7 different javafx on java 8. advice go java 8. maybe netbeans 8 too. javafx , swing/awt have different event threads, though under java 8 there seems improve integration. javafx , java swing 2 separate worlds. 1 might embed javafx in swing. though if @ start of new project, might go pure javafx. javafx uses "properties", wrapped values can have alter listeners on them / info binding. separation components makes dealing model-view-controller paradigm bit nicer / different. javafx components more difficult, swing provides total api total of setters. can hard create column right-aligned first time. thing makes javafx harder, utilize of callbacks generic types, lambda expressions. gi...

scalability - Should I use an array of pointers or a PFRelation? (parse.com) -

scalability - Should I use an array of pointers or a PFRelation? (parse.com) - as far can tell, reason might utilize array of pointers preserve ordering, pfrelation instance not back upwards ordering. otherwise, appear behave identically, albeit pfrelation more scalable , has nifty built-in 'query' method restrict query objects in pfrelation instance, super helpful sometimes. pfrelation *relation = ... pfquery *query = [relation query]; context: building app in each pfuser instance has many tennisgame instances (could big number), , tennisgame instances has many pfuser instances (either 2 or 4, depending on whether singles game or doubles game). question: best way organise info on parse.com ? considering pfrelation in pfuser class (to tennisgame instances), array or 2 or 4 pointers in tennisgame class (to pfuser instances). need both? if not, best? the question how access data. case, can think these questions: do need include user's tennisgames ...

.ssh/config file for windows (git) -

.ssh/config file for windows (git) - i've been looking solution on how can utilize multiple ssh keys , figured out, work config file in .ssh directory, doesn't work on windows. my problem i'm using private key access git server, looks this: ssh://git@example.com/directory , works fine when i'm using tortoisegit, 'cause there possibility take private key. but want utilize git rep in intellij thought , there alternative utilize git native shell , works, if set key, called id_rsa ,into .ssh folder. want utilize multiple ssh keys (so key name "id_rsa_test", how configure .ssh/config file under windows, works usual git server? the examples found yet utilize github. there alternative identityfile can utilize in ~/.ssh/config file , specify key file each host. host host_with_key1.net identityfile ~/.ssh/id_rsa host host_with_key2.net identityfile ~/.ssh/id_rsa_test more info: http://linux.die.net/man/5/ssh_config also @...

c - What's Causing This Strange Warning When I Compile My Kernel? Passing incompatible pointer type, expected struct * but got struct * -

c - What's Causing This Strange Warning When I Compile My Kernel? Passing incompatible pointer type, expected struct * but got struct * - i'm hoping might able explain me. i'm writing own os, , getting writing memory manager. maintain getting weird warning when compile kernel. warning quite paradoxical me. function getting type of parameter expects, complaining if otherwise. runs fine, , i'm able info need initialize memory manager. can tell me what's causing this? $home/opt/cross/bin/i686-elf-gcc -c -ffreestanding -o2 -wall -wextra -std=gnu99 -ggdb -isystem src/h -o build/kernel.c.o src/c/kernel.c src/c/kernel.c: in function 'kernel_main': src/c/kernel.c:29:2: warning: passing argument 1 of 'memory_manager_initialize' incompatible pointer type memory_manager_initialize(mboot_ptr); // wtf cause warning? in file included src/h/system.h:39:0, src/h/multiboot.h:4, src/c/kernel.c:1: src/h/memory.h:35:6: note: expecte...

javascript - JQuery - how to store each data received -

javascript - JQuery - how to store each data received - how store info received below jquery farther use. $('#div').find('a').each(function() { console.log($(this).attr('href')); }); http://jsfiddle.net/mvm6o208/ can find code here. make array , force values it. like var store = []; $('#div').find('a').each(function() { store.push($(this).attr('href')); }); update : according html in fiddle have posted, selector should $('div').find('a') instead of $('#div').find('a') , dont have div id div . see working fiddle here. also per the inputs comments below, faster approach force array via store[store.length] = $(this).attr('href'); javascript jquery arrays

angularjs - Angular, ng-init doesn't initialize -

angularjs - Angular, ng-init doesn't initialize - trying initial text box ng-init text box blank? <form ng-app="theapp" ng-init="email='test@test.com'"> <div> <label>email: </label> &nbsp;<input type="text" ng-model="email"> </div> </form> i don't know if you're starting angular correctly. dropping ="theapp" makes work. see fiddle. in app.js, defining angular module theapp ? i.e. angular.module('theapp', []) <form ng-app ng-init="email = 'test@test.com'"> <div> <label>email: </label> &nbsp;<input type="text" ng-model="email"> </div> </form> angularjs angularjs-directive

iphone - What does the runtime warning "This will cause the effect to appear broken until opacity returns to 1" when setting UIVisualEffectView alpha mean? -

iphone - What does the runtime warning "This will cause the effect to appear broken until opacity returns to 1" when setting UIVisualEffectView alpha mean? - i have prototype cell , set uivisualeffectview within contentview . visual effect view's blur style dark , vibrancy off. set alpha of visual effect view 0,5 using ib. then on runtime, warning says: <uivisualeffectview ...> beingness asked animate opacity. cause effect appear broken until opacity returns 1. i couldn't understand why warning there , how can set alpha property properly. as far can remember cannot alter alpha of visual effect view. alpha has one. iphone ios8 uiblureffect uivisualeffectview

google oauth - Can't edit redirect URLs in new API console -

google oauth - Can't edit redirect URLs in new API console - i have long standing app, want add together additional redirect url new test server. when click edit settings web app, modal box containing existing redirect url, blank textarea existing javascript origins. if paste existing javascript origins textarea, it's colored reddish , update button disabled. just repeat, long standing app. want add together 1 new redirect url if want add together new redirect url, need add together in text area "authorized redirect uri". text area "authorized javascript origins" not redirect uri, contains origins app allowed access google apis.(origins cannot contain wildcard or path) google-oauth

jquery - Submitting variables from an external Javascript file using JSP -

jquery - Submitting variables from an external Javascript file using JSP - i have written timer function , want output results on separate page. function works having jsp file phone call functions separate js file , i've been trying output results screen shown below: instruction in jsp file: <button type="button" onclick="display()">try it</button> instruction in js file: function display(){ document.writeln(timer); } whilst works when set function in jsp file, jsp apparently cannot execute document.write(ln) functions when it's in separate file. suspect may due document.write()'s general unreliability function in general. have suggestions regarding how can output external js files onto screen using jsp? never mind. turns out needed refresh simulation in order read code properly. javascript jquery jsp

Hibernate JPA how to convert list-index hbm attribute to annotations? -

Hibernate JPA how to convert list-index hbm attribute to annotations? - i want convert existing hbm file jpa entity via annotations. next hbm code want convert annotation: <list name="typescourriers" table="types_comparutions2types_courriers" inverse="false"> <key foreign-key="type_courrier_types_comparutions_fkc"> <column name="types_comparutions_fk" sql-type="bigint"/> </key> <list-index column="type_comparution_courrier_types_courriers_idx"/> <many-to-many class="typecourrier" foreign-key="type_comparution_courrier_types_courriec"> <column name="types_courriers_fk" sql-type="bigint"/> </many-to-many> </list> my problem attribute list-index, tried utilize indexes element jointable got exception @manytomany(...

ext.net - how to fix "Element.alignToXY with an element that doesn't exist" javascript error -

ext.net - how to fix "Element.alignToXY with an element that doesn't exist" javascript error - on ext.net grid panel mouse hoover getting java script error says..exception thrown not caught..like while debugging code breaks @ " throw "element.aligntoxy element doesn't exist";" thanks in advance. javascript ext.net gridpanel

Deserialize JSON C# Json.net -

Deserialize JSON C# Json.net - this question has reply here: how can parse json string cause illegal c# identifiers? 2 answers i trying deserialize json response api. the info looks this { "response": { "6112": { "id": 6112, "title": "additionalphotos" }, "5982": { "id": 5982, "title": "bikeride" }, "total_records": "20", "returned_count": 10, "returned_records": "1-10" } } c# class: public class products { public class product { public string id { get; set; } public string title { get; set; } } public product product { get; set; } } public class ss { public dictionary<string, products.product> response { get; set; } ...

delphi - What is the difference between Ansichar and char? -

delphi - What is the difference between Ansichar and char? - this question has reply here: what difference between widechar , ansichar? 2 answers i ran info type mismatch. never saw before. hope explain these , how different. error got f2063. [dcc error] e2010 incompatible types: 'ansichar' , 'char' historically in delphi, char type synonym ansichar type. is, single byte representing character ansi codepage. note: this simplification ignores complications arising multibyte characters encountered in ansi string suffice answer. this corresponded fact string type synonym ansistring. in delphi 2009 onward, changed. with delphi 2009, string , char types became synonyms unicodestring (a widestring additional capabilities) , widechar, respectively, reflecting transition unicode native format string , character types. widechar 2 byte value re...

php - Match two arrays based on dates -

php - Match two arrays based on dates - i seek match arrays based on dates. first array generated function (getdaterange), sec array comes wordpress database. function getdaterange($startdate, $enddate, $format="y-m-d") { //create output variable $datesarray = array(); //calculate number of days in range $total_days = round(abs(strtotime($enddate) - strtotime($startdate)) / 86400, 0) + 1; if($total_days<0) { homecoming false; } //populate array of weekdays , counts for($day=0; $day<$total_days; $day++) { $datesarray[] = date($format, strtotime("{$startdate} + {$day} days")); } //return results array homecoming $datesarray; } $sql = "select date(datetime) date, sum(amount) amount sales grouping 1"; $results = $wpdb->get_results($sql, array_a); // generate date range $daterange = getdaterange('2014-10-01', '2014-10...

c# - How do I build up an html string to display within a div using razor mvc? -

c# - How do I build up an html string to display within a div using razor mvc? - i'm using razor mvc , want build html string can display within div, in php this: $htmlstring = ''; foreach ($item $items) { $htmlstring .= '<p>'.$item.'</p>'; } <div> <? echo $htmlstring; ?> </div> how equivalent in razor mvc? you stick code within foreach loop on razor view <div> @foreach ( var item in model.items ){ <p>@item</p> } </div> assuming model pass in has property called items collection of type. c# asp.net-mvc razor

c++ - getting default email client mac OSX cpp -

c++ - getting default email client mac OSX cpp - here problem, have create multi-platform app in c++ in wich there button open defqult mail service client send mail. yeah, managed windows, , have mac osx don't seems find anyway so. :/ so there way (syscall or this) open default mail service client few parameters passed? (just email adresse juste fine) thanks in advance answers, have day. if can utilize objective-c++ seek this: [[nsworkspace sharedworkspace] openurl:[nsurl urlwithstring:@"mailto:my@mail.com"]] otherwise seek url default email client using function launch services reference: lscopydefaultapplicationurlforcontenttype c++ osx email