Posts

Showing posts from August, 2014

char - How to begin SAPI speaking a few characters back? -

i have small problem in code. have programmed program find word inside . txt file , want know how make sapi speaking 5000 characters place word found inside .txt file. if have position of word in file shouldn't challenge read next 5000 characters buffer can fed speech engine. it's possible hard 5000 character cutoff leave word broken @ end may want seek ahead past point next blank space or whatever make end smoother. without knowing specifics language , platform , sapi using impossible give more detailed advice.

java - Why isn't my method noticing what is being help by a spot in a 2d array? -

so writing program allow book seat on flight. asks user how many rows available, makes 2d array 4 columns , how ever many rows user specifies. program prompts user choose how man seats wants , row , column wants seats be. change value of position in array form "-" "x". works beautifuly, i'm running issues when trying use method cancel reserved seating. have props user, if wants cancel seat , how many, row , column wants cancle. checks see if spot in array has value of "-" or "x" if has "-" displays message saying need input seat reserved , if has "x" changes "-" show open. reason if put in position take or has "x" value says there isn't, did wrong? here code: this cancle method public void cancleseat(string[][] sc, string can, int c, int r, int seats, int an){ fillarray(sc); if (can.equals("no")){ system.out.println("ok, no cancelations you!"); } ...

javascript - Bookmarklet for clearing appcache/cookies/localstorage? -

i've been researching on place , can't find anything. find hard believe i'm first person think trying this, wonder if it's possible. i want clear cookies, app cache, local storage, associated site using bookmarklet can leave on toolbar. is possible? it possible, , easy implement simple solution. it can done following these steps: create bookmark , give descriptive name. example: "clear storage". change url javascript:(function(){ [your code] })(); replace [your code] 1 line of javascript desired clearing. for example: to clear local storage, use localstorage.clear(); . bookmark url like: javascript:(function(){ localstorage.clear() })(); or just javascript:localstorage.clear(); to delete cookies, use of solutions on question . opted craig smedley's solution because 1 liner (and ready bookmarklet). bookmark url like: javascript:(function(){ document.cookie.split(";").foreach(function(c) { document.cookie = ...

package - How not to repeat code using Bower and Gulp? -

i use bower manage front end packages on project , gulp minify , create single file css , js packages. saves file on assets folder, files on html. right now, bower list ├── cssfx#0.9.6 ├── font-awesome#4.3.0 ├── jquery#2.1.3 ├─┬ jquery.cookie#1.4.1 │ └── jquery#2.1.3 ├── jquery.ellipsis#0.7.1 ├── normalize.css#3.0.3 └─┬ semantic-ui#1.12.0 └── jquery#2.1.3 as can see, have semantic ui , normalize.css installed. problem semantic ui uses normalize.css reset, normalize.css included in semantic ui code. on css file generated gulp, normalize.css included twice, problem because: the code repeating, making file bigger semantic ui uses normalize.css v3.0.1 , , normalize.css installed bower v3.0.3 this first time happens me, let's use package includes package have installed, , situation same above. believe solution have valid packages. is there way remove automatically repeated code? in case above, remove normalize.css semantic ui , use installed normalize....

selenium webdriver - How to properly translate shadow DOM CSS selectors to non-shadow-DOM selectors -

i want test polymer applications non-shadow-dom capable browsers firefox, phantomjs, , maybe others using webdriver. webdriver commands firefox , phantomjs fail when use driver.findelement(const by.cssselector('* /deep/ #some-div')); are there rules how best translated/approximate these selectors when polyfills can not applied: /deep/ ::shadow :host() :host-context() :content i create function translates such selectors automatically non-shadow-dom selectors browsers don't support them before sending request , need know how translate them. question bit old, in case haven't figured out yourselves yet. /deep/ (deprecated): said in answer, removing should work in of cases. ::shadow (deprecated): can removed. replacing > might not work if node targeting not immediate child of host element's shadow root. :host() pseudo classes used select custom element inside shadow-dom, in non-supported browsers equal selecting parent child element...

Sharing youtube video from website via facebook -

Image
i'm struggling sharing youtoube videos website via facebook. i'm trying achieve following: want share video hosted on youtube. video should playable on facebook. next video need have title , description. title links website, people can share video. this: however end this: i can correct "layout" of share image on left, , text on right, og:image meta tag points non-existent image (404). as og:image meta tag points existing image, layout changes. why happen? i'm lost. is format of image? (470*236) purpose crucial image , text shared, since text (actually title) links website should shared. also strange, when i'm debugging "open graph object debugger" looks supposed to. sharer.php delivers correct "view" on 50% of ocasion. when shared, works when have 404 on og:image. this content of "og:video" tag: { "url": "http:\/\/www.youtube.com\/v\/7mavg2bfthc?autohide=1&version=3", "secu...

ember.js - How can I avoid scrolling to top of viewport when adding record using pushPayload? -

i'm adding records coming in via pusher store using pushpayload . actions: { upsertload: function(data) { this.store.pushpayload(data); } } when add records way, browser window scrolls top of viewport if template controller in view. how can avoided? if add records using createrecord window not scroll. believe underlying problem controller resorting array, i'm not sure , haven't been able stop behavior.

f# - How to force a constraint on a member's return type -

i trying force constraint on function such type of first parameter has member returns async<'t> follows: let inline private f (a : ^t) = (^t : (static member g : string -> ^t async) t) however, getting compiler error t not defined. possible define constraint in manner? you're using "member constraint invocation expression" , member requires string input, you've got unbound identifier. if want invoke method put string in place of identifier t . if want constrain type parameter not invoke member this: let inline private f (a : ^t when ^t : (static member g : string -> ^t async) = ... but you'll need fill in body something.

Issues summing up array using for loop in swift -

i'm trying iterate through array , sum values using generics so: func reducedaarray <t, u>(a: [t], startingvalue: u, summed: (u, t) -> u) -> u { var sum = 0 number in { sum = sum + number } return sum } reducedaarray([2,3,4,5,6], 2, +) //(22) it's giving me following errors: binary operator '+' cannot applied operands of type 'int' , 'a' regards line sum = sum + number and int not convertible 'u' regards line return sum i know accomplished better reduce method, wanted complete task using iteration instance practice. why these errors occurring? never explicitly stated t int. in reducedaarray() function, var sum = 0 declares integer instead of using given startingvalue . , sum = sum + number tries add generic array element integer, instead of using given summed closure. so meant is func reducedaarray <t, u>(a: [t], startingvalue: u, summed: (u, t) -> u) -> ...

c - Sending multiple SIGUSR1/SIGUSR2 signals -

i have following c files: parent & child. parent forks child, , sends multiple sigusr1/sigusr2 child, child receives them , prints output. receiver.c: void start_signalset(); void wypisz(int signo) { if (signo == sigusr1) printf("received signal1\n"); if (signo == sigusr2) printf("received signal2\n") start_signalset(); } void start_signalset() { if(signal(sigusr2, wypisz) == sig_err) { exit(0); } if(signal(sigusr1, wypisz) == sig_err) { exit(0); } } int main(int argc, char ** argv) { start_signalset(); while(is_active) { sigset_t pusty; sigemptyset(&pusty); sigsuspend(&pusty); } return 0; } parent.c: int main(int argc, char ** argv) { sigset_t nowy, stary; sigaddset(&nowy, sigusr1); sigaddset(&nowy, sigusr2); sigprocmask(sig_block, &nowy, &stary); pid_t pid; if((pid = fork()) == -1) {//error handling } else if(pid == 0) if(execlp(...

How to install php-gmp on OSX 10.10 -

so trying use php-gmp methods on mac, error " call undefined function gmp_init() ". i've seen this answer same question, question/answer outdated - example, suggested brew package not available formula @ time. brew install php56-gmp worked me on php 5.6 php -i | grep gmp - confirm don't forget restart webserver.

javascript - Anchor tag and link tag isn't working in Eclipse -

outside eclipse, double clicking on index.html, runs css , js given me designer when copied , pasted eclipse's directory, loads index page plain text only, no styling ensured linking looking fine also, anchor tags don't link specified html sites, gives error 404, resource not found error. folders webcontent *web-inf - web.xml *html -index.html -donate.html -and other html - projects (folder) --project 1 --project 2 --project 3 *css -bootstrap css elements *js -bootstrap js elements here's code index.html <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>people helping people foundation</title> <link href="../css/bootstrap.css" rel="stylesheet" type='t...

javascript - Hide elements inside div from 'elementFromPoint'-function -

i have div icon , string inside of it. when move mouse above div want div seen 'elementfrompoint' function - how can achieve this? here code example. <div id="rightgazeoption_0" class="gazelinkoption"> <i style="outline: 0px none;" class="gazelinkoptionicon fa fa-external-link"></i><span>elementname</span> </div> var myelement = document.elementfrompoint(/*center of div*/); now 'myelement' either "< >" or "< span >"-element want div - how can send < > , < span > background "elementfrompoint()" sees main div container? is possible? get parentnode : var myelement = document.elementfrompoint(/*center of div*/).parentnode; or adaneo suggested, can use closest() : var myelement = document.elementfrompoint(/*center of div*/).closest('div')

sql - How I can get an auto incremented value -

i have here table corresponds orders of customers. use auto_increment determine id of order. have sql code orders table: create table if not exists `orders` ( `order_id` int(11) not null auto_increment, `customer_id` int(11) not null, `customer_name` varchar(500) not null, `order_total_price` decimal(20, 2) not null, `order_date` varchar(100) not null, primary key (`order_id`) ) engine=innodb what need insert each of products of order in table foreign key order_id specify order products belongs to. sql code purchased_products table is: create table if not exists `purchased_products` ( `order_id` int (11) not null, foreign key (`order_id`) references orders(`order_id`), `product_name` varchar(500) not null, `product_price` decimal(20, 2) not null, `product_quantity` int(11) not null, primary key (`order_id`) ) when user buy something, use insert data in orders table: insert orders (customer_id, customer_name, order_total_price, order_date) val...

capistrano - Trying to connect to my Rails web app results in a directory listing -

rails 3.2.18 ruby 2.1.5 capistrano apache2 phusion passenger ubuntu 14.04.2 i have been using capistrano deploy application. set of commands capistrano executes (after connecting repo , copying files): cd /home/myapp/current rails_env=production rails_groups=assets bundle exec rake assets:precompile cp /home/myapp/shared/assets/manifest.yml /home/myapp/current/assets_manifest.yml touch /home/myapp/current/tmp/restart.txt echo \"deploy sidekiq reload $(date)\" >> /home/myapp/current/log/sidekiq.log screen -d -m sh -c 'cd /home/myapp/current && rails_env=production bundle exec sidekiq' cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:stop cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:start screen -d -m sh -c 'cd /home/myapp/current && rails_env=production bundle exec rake sunspot:solr:reindex' recently, following deployment, instead going web application, w...

c++ - cleaner alternative for conditional typedef using templates -

while playing around templates, remove macros in code, got following code, typedef std::conditional<sizeof(int) == sizeof(void*), int, std::conditional<sizeof(long int) == sizeof(void*), long int, std::enable_if<sizeof(long long int) == sizeof(void*), long long int>::type >::type >::type int; typedef std::conditional<sizeof(unsigned int) == sizeof(int), unsigned int, std::conditional<sizeof(unsigned long int) == sizeof(int), unsigned long int, std::enable_if<sizeof(unsigned long long int) == sizeof(int), unsigned long long int>::type >::type >::type uint; while trying replace, #if sizeof(int) == sizeof(void*) typedef int int; typedef unsigned int uint; #elif sizeof(long int) == sizeof(void*) typedef long int int; typedef unsigned long int uint; #elif sizeof(long long int) == sizeof(void*) typedef long long int int; typedef unsigned long long int uint; #else ...

ibm bluemix - What happened to the Watson visualize service? -

i noticed watson api personality insights can visualize profile in cool d3.js chart has been deprecated. plans support going forward? instead of api, have made available client side library. available in sample application code: https://github.com/watson-developer-cloud/personality-insights-nodejs . "the visualize api deprecated , removed entirely in future release. can use personality.js javascript file provided sample application achieve similar results client. textsummary.js javascript file provides additional formatting results of service"

php - Http server error on windows azure platform -

Image
i have bunch of websites running on windows azure in same region ( north central us ). problem 1 website. gives me http server error (503) . there application side or it's server issue? i have same website running on development server without kind of error. what possible solutions regarding this? how check error there in php application or error logs? the error getting in php this: php fatal error: failure in wincache[5784] free_memory: block 0x3d8188c not in use in d:\home\site\wwwroot\system\libraries\log.php on line 44

java - Spring boot setup logging before spring application starts -

i have project need logging mechanism before start springapplication. how can achieve that? i tried setup 1 logging mechanism (logmanager.getlogmanager().readconfiguration()), overridden when spring application starts. basically want use same logging mechanism everywhere. spring boot uses loggingapplicationlistener configure logging application. listener 1 of springapplication 's default listeners. use own already-configure logging system, need configure springapplication doesn't have listener. example, remove unwanted listener, while retaining of other default listeners: @springbootapplication public class customloggingapplication { public static void main(string[] args) { springapplication application = new springapplication(customloggingapplication.class); collection<applicationlistener<?>> listeners = new arraylist<applicationlistener<?>>(); (applicationliste...

windows - Dedicated Server restarts with a batch file -

i having troubles , hope can help. have game server running on dedicated server. have batch file running server. server needs restarted 4 hours after server starts. struggling statements batch file run restart batch file in 4 hours? if batch file says run restart batch in 4 hours life saved. here current batch file. @echo off if "%configdone%"=="1" ( goto :eof ) set configdone=0 set skbt_debug=2 set keepalive_database=1 set keepalive_bec=0 set keepalive_asm=0 set keepalive_ts=0 set keepalive_hc=0 set serverport=2302 set bindtoip=0 set serverip=118.217.115.72 set bec_flag_dsc=1 set teamspeak_port=2310 set asm_log_interval=5 set serverstarttimeout=10 set db_backup_interval=60 set use_zip_logs=1 set use_zip_backups=1 set databasebackupfolder="e:\overpoch server 1\backup" set logfilebackupfolder="c:\apps\epoch_log_backups" set manual_timeout_length=2 set auto_timeout_length=10 set auto_restart_delay=5 set cleanw...

linux - Is it possible to use "/" in a filename? -

i know not should ever done, there way use slash character separates directories within filename in linux? the answer can't, unless filesystem has bug. here's why: there system call renaming file defined in fs/namei.c called renameat : syscall_define4(renameat, int, olddfd, const char __user *, oldname, int, newdfd, const char __user *, newname) when system call gets invoked, path lookup ( do_path_lookup ) on name. keep tracing this, , link_path_walk has this: static int link_path_walk(const char *name, struct nameidata *nd) { struct path next; int err; unsigned int lookup_flags = nd->flags; while (*name=='/') name++; if (!*name) return 0; ... this code applies file system. what's mean? means if try pass parameter actual '/' character name of file using traditional means, not want. there no way escape character. if filesystem "supports" this...

sql server - Using a range with GETDATE & BETWEEN -

i'm new t-sql , still learning please bear me on one...i've tried several ways no luck. have 'current' , 90+ days it's 30 , 60 days i'm struggling with. why can't use 'between' clause? ,[current]=(select sum (cle.[amount]) [nisnav].[dbo].[nis$cust_ ledger entry] cl3 left outer join [nisnav].[dbo].[nis$detailed cust_ ledg_ entry] cle on cl3.[entry no_]=cle.[cust_ ledger entry no_] c.[no_]=cl3.[customer no_] , cl3.[open]='1' , cl3.[due date]>getdate()-30) ,[30 days]=(select sum (cle.[amount]) [nisnav].[dbo].[nis$cust_ ledger entry] cl3 left outer join [nisnav].[dbo].[nis$detailed cust_ ledg_ entry] cle on cl3.[entry no_]=cle.[cust_ ledger entry no_] c.[no_]=cl3.[customer no_] , cl3.[open]='1' , cl3.[due date]between getdate()-31 , getdate()-59) ,[60 days]=(select sum (cle.[amount]) [nisnav].[dbo].[nis$cust_ ledger entry] cl3 left outer join [nisnav].[dbo].[nis$detailed...

arrays - Matching Game, Making the photos match in C# -

i have been making card matching game in c#. has 12 card set (2 of each photo 6 photos in total) using picture array, , when press cards finds out if photos match using array (a int array numbers 1-6 repeated twice, same photos) use code randomize numbers image away; int tagger; (int = 1; < 13; i++) { cards[i].visible = true; away = pics[i]; tagger = tags[i]; int h = random.next(1, 6); pics[i] = pics[h]; tags[i] = tags[h]; pics[h] = away; tags[h] = tagger; } (int = 1; < 13; i++) { cards[i].image = pics[i]; } it works 4 of matches, says matches wrong rest... can help? here rest of code: using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using syste...

How to keep C# and Javascript Code in sync? -

i should think problem come anyone, i'm interested in ways of making best use of technology keep code-base dry , in sync. i'm developing asp.net mvc5 web application. have several variables need communicating client side. "pagetype", need tracked on client side using google analytics. intent may multifarious, simple application same purpose, illustration. i have c# class allows me specify various pagetypes , switch between them switch-casing, say: public static class pagetypes { public const string home = "home"; public const string aboutus = "aboutus"; public const string contactus = "contactus"; } this useful when check dynamic values, like: string pagetype = viewbag.pagetype; if(!string.isnullorwhitespace(pagetype)) { switch(pagetype) { case pagetypes.home: // here break; case pagetypes.aboutus: // else here break; ... ... or whe...

excel vba - VBA Conditional Formatting if Cell Not Between -

Image
i need apply conditional formatting cell using vbscript change background color of cell if it's value not between value of 2 other cells: code macro selection.formatconditions.add type:=xlcellvalue, operator:=xlnotbetween, _ formula1:="=$i$28", formula2:="=$j$28" selection.formatconditions(selection.formatconditions.count).setfirstpriority selection.formatconditions(1).interior .patterncolorindex = xlautomatic .color = 255 .tintandshade = 0 end selection.formatconditions(1).stopiftrue = false end sub my conversion vbscript isn't working pricerange = "k"&rownum + 2 objworksheet.range(pricerange).formatconditions.add type:=1, operator:=2, formula1:="=$i$"&finalrownum + 1&"", formula2:="=$j$"&finalrownum + 1&"" objworksheet.range(pricerange).formatconditions(objexcel.selection.formatconditions.count).setfirstpriority objworksheet.range(pricerange)...

ruby on rails - Redirect users who don't have accounts with devise_cas_authenticable? -

i'm trying use gem devise_cas_authenticable link devise cas sign-on page, , have option config.cas_create_user = false make sure people sign account specific app before signing in through cas. when user hasn't signed account authenticates through cas successfully, however, sent url /unregistered?username=<cas id> , blank page. is there way override route have redirect sign page if has not made account tries signing in first?

Subset n number of rows from a dataframe, based on a categorical variable, in R -

i have dataframe (say x) in r: > x height weight gender 5 60 m 5 70 m 6 80 m 4 90 m 4 60 m 5 70 f 5 80 f 6 60 f 4 90 f 4 60 f i need r code produce new dataframe, y, takes subset of x gender , first 3 rows of each gender (1:3) give result follows. >y height weight gender 5 60 m 5 70 m 6 80 m 5 70 f 5 80 f 6 60 f try slice dplyr library(dplyr) x %>% group_by(gender) %>% slice(1:3) or using data.table library(data.table) setdt(x)[,.sd[1:3] , gender]

mamp - Searching for .htaccess on Apple Mac -

i know question has been asked many times, , have looked through many of forum answers but: after using terminal retrieve hidden documents still cannot find .htaccess file. have used text wrangler , when went open , typed name in, there no .htaccess. therefore, missing trick? need create one? have found section change in apache>http.conf. not want php file found if type in url, instead want users access via login page. appreciated. # # allowoverride controls directives may placed in .htaccess files. # can "all", "none", or combination of keywords: # options fileinfo authconfig limit # allowoverride # # controls can stuff server. # order allow,deny allow </directory> # # directoryindex: sets file apache serve if directory # requested. # <ifmodule dir_module> directoryindex index.html index.php <ifmodule perl_module> directoryindex index.pl </ifmodule> <ifmodule wsgi_module> directoryindex index.wsgi index.py </ifm...

amazon web services - Install SOAP Extension PHP Config (AWS) -

i included extension=php_soap.dll @ bottom of php configuration file, error below. put command? "invalid command 'extension=php_soap.dll', perhaps misspelled or defined module not included in server configuration" using aws server for php 5.6 it's php56-soap , command goes this: $ sudo yum install php56-soap

ggplot2 - Matrix of Histograms Using ggplot in R -

i newbie @ r, , have been trying use 'attitude' dataset create histograms each of columns. i can achieve manually typing out: par(mfrow=c(1,7)) hist(attitude$rating) hist(attitude$complaints) hist(attitude$privileges) hist(attitude$learning) hist(attitude$raises) hist(attitude$critical) hist(attitude$advance) however, i'd use single function plot histograms, possibly using ggplot. command used after searching on stackoverflow: ggplot(attitude, aes(x=variable)) + geom_histogram() but seems i'm doing wrong since message: error in eval(expr, envir, enclos) : object 'variable' not found i appreciate pointers in regard. thank you. you need convert attitude data long data format first - e.g., using melt reshape2 : attitudem <- melt(attitude) then can facet ggplot variable , automatically create separate histograms each dimension. g <- ggplot(attitudem,aes(x=value)) g <- g + geom_histogram() g <- g + f...

asp.net - Add string values into array list after looping through gridview rows c# -

i using gridview bulk update. after make changes column , hit update button in page, foreach loop executed update. how can add these string values arraylist after looping protected void btnupdate_click(object sender, eventargs e) { try { foreach (gridviewrow row in gvdetails.rows) { string strid = ((label)row.findcontrol("lblid")).text; string strgroup = ((label)row.findcontrol("lblgrp")).text; string strvalue = ((textbox)row.findcontrol("txtvalue")).text; } arraylist allist = new arraylist(); allist.add(strid); allist.add(strgroup); allist.add(strvalue); } catch (exception ex) { } } but values of string after looping not getting inserted arraylist. van me through this. it looks code should be var allist = new list<string>(); foreach (gridviewrow row in gvdetails.rows) { string strid = ((label)row.findcontro...

asp.net - Request in C# Not working? -

hello looking use header push values unity project aspx string. wondering how this. can in php simple $_request(id) using like using unityengine; using system.collections; public class newsession : monobehaviour { string userloginfile = "http://local/unitysql/newsession.php?userid="; public unityengine.ui.text newsess; string userid = ""; string session = ""; void ongui() { session = newsess.text; userid = playerprefs.getstring ("userid"); } public void insert() { if (session == "") { application.openurl (userloginfile +userid); //startcoroutine (loginuser (userid)); ...

c# - Unknown Return Types from SQL Queries? -

Image
i have wpf application has methods pull t sql queries database table: public list<awardschartparameters> getawardschartparameters(string country, string articletype) { var query = (from in _context.tbquerytable a.articletype == articletype select a.colselection + " " + a.fromtable + " " + a.whereclause + " " + a.orderby); string queryresult = query.firstordefault().tostring(); return ((iobjectcontextadapter)_context).objectcontext.executestorequery<awardschartparameters>(queryresult).tolist(); } so depending on articletype passed in parameter ui, returns 1 of several result sets pivot query defined in table. i trying write class each possible result set e.g. public class awardschartparameters { public string operator_int_name { get; set; } public int countall { get; set; } } this specific query in table return list of s...

drop down menu - Show/hide div with JQuery -

i have code: $(document).ready(function() { $('#viewall').hide(); $('#viewproductiframe').hide(); $('#viewingredientiframe').hide(); $('#viewpackagingiframe').hide(); $.viewmap = { 'viewempty' : $('#viewempty'), 'viewall' : $('#viewall'), 'viewproductiframe' : $('#viewproductiframe'), 'viewingredientiframe' : $('#viewingredientiframe'), 'viewpackagingiframe' : $('#viewpackagingiframe') }; $('#viewselector').change(function() { // hide $.each($.viewmap, function() { this.hide(); }); // show current $.viewmap[$(this).val()].show(); }); }); it should show/hide set of divs. viewproductiframe div appea...

AngularJS Expression not evaluated over Windows Homegroup -

i working through angularjs code sample pluralsight course, angularjs .net developers. i've created simple website on windows 8.1 machine, named simma, on homegroup simple html page, hello.html, running on port 81: <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script> </head> <body ng-app> hello {{1 + 1}} world! </body> the expression {{1 + 1}} evaluated locally url, http://localhost:81/hello.html . however, not evaluate other machines using url, http://simba:81/hello.html . string, "hello {{1 + 1}} world!", displayed , expression not evaluated. missing? thank you

java - getPlaceById() fails to return data on Android google places API / resultCallback not getting called -

i cannot retrieve place details using google places api on android. i'm calling getplacybyid() specific place_id. inside android activity setup googleapiclient , call connect(). apiclient connects successfully. then testing purposes call getplacebyid() using hardcoded place_id , resultcallback. however, resultcallback never gets called. the hardcoded place_id tested through javascript (using javascript google maps api) , returns valid data. java code below fails return data. @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.some_activity_layout); butterknife.inject(this); if (getactionbar() != null) { getactionbar().setdisplayhomeasupenabled(true); } if (mgoogleapiclient == null) { rebuildgoogleapiclient(); } ..... code_for_activity_init ..... } protected synchronized void rebuildgoogleapiclient() { // when build googleapiclient specify ...

python - django on jython using django-jython -

i appreciate if read poor english i use : windows jython 2.7rc2 jdk-8u45 django 1.8 django-jython 1.7.0b2 i try jython startproject mysite , , succeed then try jython manage.py runserver 8080 , fail detail: in settings.py : in databases : 'engine': 'doj.db.backends.sqlite3' in installed_apps: add 'doj', the same https://pythonhosted.org/django-jython/index.html the results: raise improperlyconfigured(error_msg)django.core.exceptions.improperlyconfigured:'doj.db.backends.sqlite' isn't vailable database backend. try using 'django.db.backends.xxx', xxx 1 of: u'base', u'mysql', u'oracle', u'postgresql_psycopg2', u'sqlite3' error was: cannot import name basedatabasewrapper so try django.db.backends.sqlite instead of doj.db....

Gmail REST API get message function returns invalid historyId -

it seems there may serious issue in gmail rest api. call /userid/messages obtain list of message for each, call /userid/messages/id message obtain highest (or any) starthistoryid on each message object then call /userid/history/list passing starthistoryid parameter the result unexpected. gmail rest api returning 404 not found.. seems returned historyid not registered or valid. on calling /userid/profile, starthistoryid valid , can used in /userid/history/list call. com.google.api.client.googleapis.json.googlejsonresponseexception: 404 not found { "code" : 404, "errors" : [ { "domain" : "global", "message" : "not found", "reason" : "notfound" } ], "message" : "not found" } this not bug in api , documented @ https://developers.google.com/gmail/api/v1/reference/users/history/list specifically "history ids increase chronologically not con...

javascript - SAPUI5 TreeTable - Node expanding behavior -

Image
problem is: i'm trying keep nodes in treetable expanded, when i'm adding rows @ runtime. default behavior of treetable is, when happens it, get's rendered again , nodes collapsed. the api provides methods keep first level expanded, keep lower level nodes expanded, too. how can achieve that? before adding row: after adding row: expectation: [edit] i've tried to right behavior using expand(irowindex), in case, lifecycle of treetable (adding content, getting rerendered), not helpful. what i'm doing: i'm trying add data using drag&drop functions. soon, we're trying add content specific position treetable, have right positions of parent , child elements. unfortunately second+ level hidden after adding said content , messes drag&drop, because table rows have different ids, when they're collapsing. basically need treetable function ."setexpandfirstlevel(true)" other levels. it's bit dirty, use treetab...