Posts

Showing posts from January, 2013

How to track installs of mobile application with Facebook ADS in Windows Phone 8.1 C# -

i've installed 'facebook sdk windows & windows phone' v. 6.0.10.0 outercurve foundation through nuget , followed steps in docs: http://facebooksdk.net/docs/windows/config/ app registered on facebook (although when run https://developers.facebook.com/tools/app-ads-helper/ tells me 'you haven't set mobile app platforms app. can add supported platforms in app settings.'). i've added platform 'windows app' , filled in 'windows store sid' now don't know next. how track installs? can't find in docs here http://facebooksdk.net/docs/ regarding tracking of installs... not care facebook login , samples seem focus on using authentication , using user's account. unfortunately, trying achieve not possible. facebook not consider windows (phone) applications mobile applications. as can see here: https://developers.facebook.com/docs/app-ads/resources/faqs there several references "apple app store" , "goo

jquery - Fastclick not working when clicking edge of element (iOS) -

i'm using fastclick 0.6.2 ftlabs, , i'd love work, remove 300 ms delay on ios, in application, detects clicks when click on edge of href block, , nothing happens. here's simple demo page, has random number generator js, , 2 page links: http://nicmar.nu/fastclick/fastclick2b.htm (open in ios browser) if click upper or lower edge of first green field, gray webkit-tap-highlight-color shows, doesn't run code test() on href. the same happens on second green field, has link page itself. the third green field, link page. when click upper or lower edge here, address bar shows, gives user indication happening, isn't. the issue happening on iphone 4 , iphone 5 in ios 6.1, , on ipad ios 6.0. without fastclick, works expected, 300 ms delay. here's video shows what's going on: http://youtu.be/34kavjxc9xg ps. use jsfiddle, couldn't display correctly on ios meta/viewport scale working, due jsfiddle showing "fake fullscreen" iframe. if can

ruby - Rails devise user architecture for social network -

im creating social network app rails , devise user authentication gem. have more 1 type of user , dont know how proceed. my usertype1 , usertype2 have little in common dont know if sti way go. should have both user types inherit devise user or should create each 1 devise. last, should create social fields in user type or create profile model type of info any appreciated the first type of user customer has basic fields first name, last name, profile photo, , home address. the second type of user agent has many other fields, first name, last name, profile photo, business informations(address, phone ..etc), specialty, category, title, website, social accts, , other fields. the difference in functionality between 2 great, agent user act friend, tag, create events, listings etc... , customer create lsitings, contact agents, , search listings. i rethink idea of having 2 models user types. instead, consider having slim user model , use associations (like user.profil

javascript - Loading animation disappear before second ajax call -

i showing loading animation whenever ajax call gets started , stops once ajax call completed. works fine when use 1 ajax call in function. if have 2 ajax calls within same function, seems loading animation disappears after first ajax call complete. how can make stay until ajax call complete? thanks. javascript in main.js file: //show loading image on ajax start $(document).ajaxstart(function() { showpleasewait(); }); //hide loading image on ajax complete $(document).ajaxcomplete(function() { hidepleasewait(); }); javascript in employee page: <script type="text/javascript"> $(document).ready(function () { $("#ddlemployeenumber").change(function () { $("#log").ajaxerror(function (event, jqxhr, settings, exception) { alert(exception); }); var employeenumberselected = $("select option:selected").first().text()

android - how to implement feature like applock advance protection in my app -

i want make app similar applock in android.app lock has advance protection feature stops uninstalling application.it works out rooting phone. tried hours , tried many solutions of similar kind of question stackoverflow not make through it. while doing came across "device admin rights". can thing want using admin rights. if not how applock advance protection works mean how restricting user uninstall application. you need make app device owner-it has higher privileges device admin app. for more info refer- http://florent-dupont.blogspot.com/2015/02/10-things-to-know-about-device-owner.html , here https://source.android.com/devices/tech/admin/provision.html you can set policy using admins/owner app prevent uninstallation. you can have @ mdm solution provided oems. samsung has powerful apis manage every aspect of device- https://www.samsungknox.com/en/partners/mobile-device-managers

javascript - floatThead and bootstrap downdrop -

so trying have dropdown in fixed header. floatthead works fixing top, dropdown can display elements fit in header of table because of wrapping overflow:hidden part of floatthead. here jsfiddle . tried upping/downing z-index no avail. possible or should rid of dropdown? (it isn't necessary, nice bonus if work). $(document).ready(function() { $('.sticky-header').floatthead({zindex: 1001}); }); you set .floatthead-container have overflow: visible , use !important override inline styling. div.floatthead-container { overflow: visible !important; } jsfiddle

How to remove strings from in between brackets with regex...python -

i need pull out single string containing words extracted fields: [[cat]][[dog]][[mouse]][[apple]][[banana]][[pear]][[plum]][[pool]] so need: cat dog mouse apple banana pear plum pool . i've been trying 2 hours make regular expression this. the best (?<=[[]\s)(.*)(?=]]) gets me: cat]][[dog]][[mouse]][[apple]][[banana]][[pear]][[plum]][[pool any ideas? thanks! here's solution re.finditer . let string s . assumes there can in between [[ , ]]. otherwise, comment @noob applies. >>> [x.group(1) x in re.finditer('\[\[(.*?)\]\]', s)] ['cat', 'dog', 'mouse', 'apple', 'banana', 'pear', 'plum', 'pool'] alternatively, lookarounds , re.findall : >>> re.findall('(?<=\[\[).*?(?=\]\])', s) ['cat', 'dog', 'mouse', 'apple', 'banana', 'pear', 'plum', 'pool'] for large strings, finditer version se

phpmyadmin - SQL with 2 variables -

im doing sql give me show date of specific cinema specific movie i did , working cinema. mean show me show date of specific cinema...i need way show show date of specific cinema , specific movie select show.show_datetime `cinema` join `theater` on `theater`.`cinema_id` = `cinema`.`cinema_id` join `show` on `show`.`theater_id` = `theater`.`theater_id` `cinema`.`cinema_id` = 1 please note have table movie , pk movie_id i can see there relation between show , movie table on movie_id. use below query , let me know select show.show_datetime `cinema` join `theater` on `theater`.`cinema_id` = `cinema`.`cinema_id` join `show` on `show`.`theater_id` = `theater`.`theater_id` join 'movie' on `show`.`movie_id` = `movie`.`movie_id` = `cinema`.`cinema_id` = 1 , `movie`.`movie_id` = 2 change movie id 2 whatever need

c# - Assert in code - Asserting in try catch -

i using assert in code verify assumptions , throw give me nice messages, this: int integerdivide ( int dividend , int divisor ) { debug.assert ( divisor != 0 ); return ( dividend / divisor ); } (exemple assertions in managed code ). now wondering if use check code should not throw exceptions. do: try { //code } catch (exceptionthatshouldnthappen ex) { debug.assert(false,"this exception should never happen!") } is done? mean, makes sense code has exceptions caught down line, or break anyway. point, imagine calling code catch wide range of exceptions, aren't meant happen. make sure exceptions break, @ lest in debug, no matter how caller catching them. i'll go more detailed example: suppose have data access class. can throw sorts of exceptions. the calling code therefore catch exceptions. (or times?), calling code won't have information enough, or care, exceptions possible. mean, findrecord() fails failed, no matter how.

java - suspended JVM, "jstack -F pid" only fix -

jvm gurus, need help. have jvm/app getting "suspended" state. sounds similar older thread: how jstack -f affect running java process? ...but i'm looking further suggestions/guidance. its commercial java app (when seemingly idle - middle of night, etc) becomes unresponsive. "kill -3 " hangs, no response in console. verbose gc log won't written @ all. 'top' shows pid having low (almost no) cpu or memory utilization, low file descriptors, etc. jvm remains in state indefinitely (we left 10 hrs once), until... "jstack -f " issued, kickstarts jvm/app. gc logging resumes, application starts responding again, etc. issue has been occurring few weeks, near daily, 30 independent jvms (spread across 10 rhel 6.6 vms). sometimes happens in matter of hours after startup. app can unused during time. we've have been using oracle jvm 1.8.0_31 linux x64 date. have upgraded latest public (1.8.0_72) , see if issue goes away. anyone p

javascript - How to duplicate a Firebase child with many records without downloading and uploading the data? -

i have firebase child 500k records. want duplicate child in order create backup of data (within same firebase). so, if child called lines , want duplicate new name such lines_backup_02_02_2016 . once done want original lines left is. is there way without grabbing datasnapshot via javascript (downloading data) , using set() create copy? example: fb.child("lines").once('value', function(snapshot) { fb.child("lines_backup_02_02_2016").set(snapshot.val()); }); with 500k records i'm finding takes longer i've been able wait far (for example, i've typed question while still waiting finish). trying access/query node 500k child records bad idea. it's not need synchronize 500k lines users. please work hard on separating active historical data. current approach of creating backup copy great start that. delete nodes while you're writing them new location. to data going "a bit involved". indeed involves first g

How to ensure that apache-ant apply-tasks finish before further execution -

i use following code resolve php includes , create static html file. when done, want delete source php file: <apply executable="php" parallel="false" dir="${prod.dir}" output="${prod.dir}/index.html"> <fileset dir="${prod.dir}" includes="index.php"/> </apply> <delete file="${prod.dir}/index.php"/> apparently, index.php gets deleted while php running. how can make sure delete task executed after php completed? i know wait second or so, rather not want rely on this. thanks stefan if property spawn set false ( default false ), ant should wait till complete. delete called after php complete. apply task manual

java - how i can name all my objectes in array of objectes with Jtextfield -

http://i.stack.imgur.com/68ou3.png have class named trader , have class named product . task is: the trader should buy many products (an object array of class product ) now want user enter name of product in jtextfield (using product k=new product(); ) want jtextfield find corresponding object product objects (somehow using/implementing equals(k) method) , stored in array of objects has bought ( product ) in trader every time adds product way. how can implemented? you can't expect user enter variable name of object jtextfield , add object accordingly. if can reflection, not used in manner. you can perhaps create product class name attribute within product class: class product { private string name; //your other attributes here.. public product(string name){ this.name = name; } } as user enters name of product textfield , click button, can add product according name such: @override actionperformed(actionevent e){

c++ - Does each QT widget have a 'show' signal? -

i wanted action when dialog shows when opens or when maximizes minimal status or moves out of screen. does qt have such signal? not sure find if qt has list of signals defined. does each qt widget have 'show' signal? if @ qt source code find qwidget::show slot: public q_slots: // widget management functions virtual void setvisible(bool visible); void sethidden(bool hidden); void show(); the slot us, programmers make able connect signals specific purposes clicking button created widget. windows or mac os, have app serving events coming system via event loop. , qwidget reacts on 'signals' in form of system events coming , yes, may, execute show() or showmaximized() or showminimized slots then. but can assume want overload virtual void showevent(qshowevent *); virtual void hideevent(qhideevent *); like: void mywidget::showevent(qshowevent *e) { if (ismaximized()) { if (e->spontaneous()) {

javascript - Make table cell value red if value is >= 0 -

how can make table cell value if it's >= 0 makes table rows background color red?. , way value fetched database. using vanilla js, after edit: ( here working fiddle) ( in 1 entire row gets colored red ) window.onload = function(){ // after contents has loaded var cells=document.getelementsbytagname("td"); //select table cell tags for(var i=0;i<cells.length;i++){ //iterate through each of them //check if content more 0 if(parsefloat(cells[i].textcontent || cells[i].innertext)>=0){ cells[i].style.backgroundcolor="red"; //change background red } } }; if need support modern browsers, think this solution prettier: window.addeventlistener("domcontentloaded", function(e) { document.getelementsbytagname("td").filter(function(elem){ return parsefloat(elem.textcontent) >= 0; }).foreach(function(elem){ elem.style.backgroundcolor="red"; })

Python duplicate code removal -

according codeclimate, 2 methods in simplified class below duplicates of 1 mass of 40. what's best way refactor remove duplication? equivalent dictionary comprehension has marginally lower mass, otherwise identical. class dataadaptor: def __init__(self): self._feeds = {'field1': 'temperature', 'field2': 'humidity'} def parse_data(self, data): content = {} field, feed in self._feeds.items(): if feed in data: content[field] = data[feed] return content def parse_content(self, content): data = {} field, feed in self._feeds.items(): if field in content: data[feed] = content[field] return data clarification : version dictionary comprehensions has same duplication mass think it's less clear. class dataadaptor: def __init__(self): self._feeds = {'field1': 'temperature', '

java - How to programatically login to j_security_check -

i have jsp web application uses j_security_check . possible login specific user j_security_check programatically via jsp page if know userid , password? tried pass variables url parameters way... response.sendredirect(www.mydomain.com/j_security_check?j_username=someusername&j_password=somepassword ) ...but doesnt work. there way it? edit: here login page works fine right now. trimmed of code security reasons. <form name="signon" method="post" action="/j_security_check"> <table width="100%" cellpadding="4" cellspacing="0"> <tr> <td valign="top" colspan="4"> <h2><%= ui.tr(null, "login_details") %> </h2> </td> </tr> <tr> <td valign="top" width="150px"> <%= ui.tr(null, "login_id") %>

c - Order of variable declaration in asm x86? -

Image
here piece of code : int main() { char buffer[64]; int check; ... as can see, check declared after buffer , in stack, must have check above buffer in stack right? however, when disassembly (x86) gdb, got : --> check @ 0xbffff4f8 --> buffer @ 0xbffff4b8 my question : there specific order in stack local variable? also, have tell tried same thing on computer (x86 too, same gcc compilation options, different gdb version , linux distrib), , order not same...:s thanks ! ps: if want more details, please see screenshot : (left computer 1 , right computer 2) there -fstack-protect in gcc reorder stack variables, turned on default in linux os variant 10 years, ubuntu, redhat, gentoo. default since gcc 4.8.3 ("4.9 , later enable -fstack-protector-strong.") ubuntu page gcc defaults: https://wiki.ubuntu.com/toolchain/compilerflags ubuntu-specific default compiler flags in toolchain used provide additional security features ubuntu.

function - Nested `ifelse` statements in R -

i have data in following format , trying create new variable includes total number of deaths each observation, "present" indicates ongoing event: birth1 death1 birth2 death2 birth3 death3 birth4 death4 birth5 death5 birth6 death6 1 1990 present 2 1984 1986 1986 present 3 1985 1988 1988 present 4 1987 1991 1991 1994 1996 present 5 1987 1989 1989 present i tried data$num.deaths <- ifelse(data$death1=="present", 0, 1) doesn't @ observations have more 1 death event. tried nested ifelse got same result. can point me fast , efficient way of doing this? extract columns represent deaths giving deaths , in each row add number of elements not na, not empty strings , not equal "present" . no packages used. deaths <- data[gre

batch file - MATLAB function to get svn repo rev# -

i want query subversion repository revision # within matlab program (.m file), can include in output file i'm generating. need able programmatically, no gui tools require point , click retrieve info. i'm thinking i'll create batch file this @echo off svn info --show-item revision [url] and call batch file matlab program system command. are there other ways accomplish task? how compare idea? there gui can download mathworks: http://www.mathworks.com/matlabcentral/fileexchange/23508-subversion-gui but honestly, said - write system call native svn.

python-cloudant query error -

i using python-cloudant library, trying query: import cloudant my_database = client['database'] query = cloudant.query.query(my_database,selector={'selector': {'$gt': 0}},fields=['doi']) doc in query(limit=100, skip=100)['docs']: print doc this gives me error: httperror: 400 client error: bad request url: https://myurl.com/mydatabase/_find with error when try loading page in browser: {"error":"method_not_allowed","reason":"only post allowed"} what missing here? unless have index on field named selector query won't work. so assuming meant use primary index on _id field if change selector={'selector': {'$gt': 0}} selector={'_id': {'$gt': 0}} query should work. as in: import cloudant client = cloudant.cloudant(user, pwd, account=account) client.connect() my_database = client['database'] query = cloudant.query.query(my_database,

java - The method getBytes() is undefined for the type TextView -

i'm attempting use following example add multiple records 1 ndefmessage when attempt - i'm getting error stating "the method getbytes() undefined type textview " example: example source: public class viewcountry extends activity implements createndefmessagecallback, onndefpushcompletecallback { nfcadapter mnfcadapter; // textview timetv; private static final int message_sent = 1; private long rowid; private textview nametv; private textview captv; private textview codetv; private textview timetv; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.view_country); setupviews(); bundle extras = getintent().getextras(); rowid = extras.getlong(countrylist.row_id); } private void setupviews() { nametv = (textview) findviewbyid(r.id.na

excel 2010 vba pivot table report filter update -

i have 16 pivot tables on same sheet, "analytics admin", recorded , cleaned macro below (the code right before updates info pivot tables source). it's same code 16 times, thing changes pivot table name ( msp, msp30, fsp, fsp30, etc). possible change report filter pivot tables @ once? worksheets("analytics admin").activate 'refreshes data, clears filters filters 0 , blanks out of custom range pareto pivot tables activesheet.pivottables("msp").pivotcache.refresh activesheet.pivottables("msp").pivotfields("count").clearallfilters activesheet.pivottables("msp").pivotfields("count").showallitems = true activesheet.pivottables("msp").pivotfields("count") .pivotitems("0").visible = false .pivotitems("(blank)").visible = false end activesheet.pivottables("msp").pivotcache.refresh activesheet.pivottables("fsp")

webpage - How to create simple Node Red Web Page to display "HTTP In" node data from my device -

i can push json formatted sensor data using http post out of arduino uno/adafruit cc3000 wifi shield bluemix , see on node red debug console using "http in" , "debug node". works perfectly! ( had use http post since out of memory on arduino uno , http post leanest way move data. ) my question: within node red, how take output of "http in" node , put on web page served bluemix displays last 5 sets of sensor data pushed out every 5 minutes. web page should not need manually refreshed visitor page. there many possible ways depending on how want store history of sensor readings or server basic html file. i'll outline idea keeping values in memory. basically simplest way enable static file serving (see node-red doc here ) , serve basic html file javascript can connect websocket. your original http-in (post) should connected function node push values global context , http-out close out post properly. want branch flow websocket-out (listen)

blackberry - Delete Persistent Store data when App is uninstalled/deleted -

i have blackberry application starts (app load) registration screen when app first installed. later, app load home screen. registration screen appears on first load. achieving storing boolean value in persistentstore . if value exists, registration screen not appear. persistentstorehelper.persistenthashtable.put("flagged",boolean.true); persistentstorehelper.persistentobject.commit(); uiapplication.getuiapplication().pushscreen(new myscreen()); i aware of fact in order delete persistent store on deleting/uninstalling app, have make hashtable subclass of own , therefore have declared hashtable in separate class: public class persistentstorehelper extends hashtable implements persistable{ public static persistentobject persistentobject; public static final long key = 0x9df9f961bc6d6dal; public static hashtable persistenthashtable; } however has not helped , boolean value of flag not cleared persistentstore . please advice. edit : when change abov

c# - I use XLABS to pick images from a gallery. How to get the filepath of the image? -

using xlabs in xamarin forms project , try reach underlying data of image not sure how current code. have viewmodel , page use function , function works fine. can pick image , it. want path/filedata. my viewmodel: public imagesource imagesource { { return _imagesource; } set { setproperty (ref _imagesource, value); } } private byte[] imagedata; public byte[] imagedata { { return imagedata; } } private byte[] readstream(stream input) { byte[] buffer = new byte[16*1024]; using (memorystream ms = new memorystream()) { int read; while ((read = input.read(buffer, 0, buffer.length)) > 0) { ms.write(buffer, 0, read); } return ms.toarray(); } } public async task selectpicture() { setup (); imagesource = null; try { var mediafile = await _mediapicker.selectphotoasync(new cameramed

javascript - How to resize a Java Script element to fit its container window -

Image
i facing issue can't understand. i have webview (on android , ios) can have 1 of 3 possible sizes depending on showing it. (for example 600 x 50 or 500 x 45) using css have managed make image appear fill 100% of webview. there element have make fill 100% of container. element loaded following code: <div class='amoad_native' data-sid='123456789'></div> <script src='http://j.amoad.com/js/n.js' type='text/javascript' charset='utf-8'></script> and apply following css it: position: absolute; z-index: 2; left: 0; top: 0; but if add width:100% , height:100% seems unaffected it. thing seems change "size" viewport: <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> but seems render differently depending on device im using. this how looks on iphone 5: and how looks on iphone 6s plus

javascript - Display Half Portion of Google Charts -

Image
i using following code display chart. size of chart 500x500 . want display half portion of chart. 500x250 . when change values in div, instead of showing half resizing whole chart. what need hide area shows 'yellow', (i don't want make transparent) <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>website code analyzer</title> <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/> <script src="js/boostrap.js"></script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.l

php - Passing javascript value to html -

this related previous question: retrieving video database using php on previous question pass speedmbps in javascript using ajax form , $( "#speed" ).val( html ); expect return value unable embed html code in viewvideo.php. i thought of different way pass speedmbps php. passing value speedmbps html form can used method post sent data php file. var imageaddr = "testimage.jpg"; var downloadsize = 2097152; //bytes window.onload = function() { var oprogress = document.getelementbyid("speed"); oprogress.value = "loading image, please wait..."; window.settimeout(measureconnectionspeed, 1); }; function measureconnectionspeed() { var oprogress = document.getelementbyid("speed"); var starttime, endtime; var download = new image(); download.onload = function () { endtime = (new date()).gettime(); showresults(); } download.onerror = function (err, msg) { oprogress.value

php - Bootstrap typeahead not working -

i pulling stock symbols yahoo finance in json object , trying show them drop-down menu while user starts typing name of company or symbol in search box . typeahead not working drop down menu search box. think doing right.this code have far. appreciated. quote.js $(document).ready(function() { // create autocomplete $('#form-quote input[name=symbol]').typeahead({ // load autocomplete data suggest.php source: function(query, callback) { $.ajax({ url: '../suggest.php', type: 'post', datatype: 'json', data: { symbol: query }, success: function(response) { callback(response.symbols); } }); } }); // load data via ajax when form submitted $('#form-quote').on('click', function() { // determine symbol var symbol = $('#form-quote input[name=

c# - Remote running msiexec on Win32_Process -

the main task of short part computer name , install on pc needed software (throught msiexec.exe) i { credential creds = new credential(); userattr usercredential = new userattr(); usercredential = creds.defaultflagstest(); connectionoptions connection = new connectionoptions(); connection.username = usercredential.username; connection.password = usercredential.password; connection.authentication = authenticationlevel.packetprivacy; connection.authority = "ntlmdomain:tcc1"; managementscope scope = new managementscope( "\\\\"+computername+"\\root\\cimv2", connection); scope.connect(); managementclass classinstance = new managementclass(scope, new managementpath("win32_process"), null); managementbaseobject

how to use dcast on a dataframe that has only 1 row in R -

hi have dataframe start <- c("a") end <- c("c") days <- c("day1") df2 <- data.frame(start,end,days) i trying use dcast df2 <- dcast(df2,days ~ end,value.var="days") but returns days c 1 day1 day1 my desired output count days c 1 day1 1 what missing here? kindly provide inputs on this. there better way using dplyr? we can create sequence column of 1 , use dcast dcast(transform(df2, i1=1), days~end, value.var='i1') # days c #1 day1 1 or option using fun.aggregate dcast(df2, days~end, length) # days c #1 day1 1 as op mentioned dplyr , involves using first method doesn't have fun.aggregate library(dplyr) df2 %>% mutate(c=1) %>% select(days:c)

Possible git bug (`git checkout` failure) -

this closest can come minimal example. (granted, example weird, that's par-for-the-course minimal examples.) run following script in suitable scratch directory (e.g. /tmp). script create directory demo`, , initialize repo in it. create *two entirely distinct branches, having nothing in common.* these branches populated content coming out of 2 github repos. #!/bin/bash rm -rf demo mkdir demo cd demo git init git commit -m 'root commit' --allow-empty url in https://github.com/octocat/spoon-knife \ https://github.com/octocat/hello-worid rm -rf content basename=$(basename $url) branch_name=${basename%.git} git branch $branch_name git checkout $branch_name git clone $url content rm -rf content/.git git add content git commit -m $branch_name git checkout master done git branch -a git checkout spoon-knife at end of script, current branch spoon-knife . if 1 issues command git checkout hello-world , git fails er

java - Permission denied for creating a search index GAE Geoespacial Query -

i have include geoespacial query check if geopt inside circle , have created index it. when try deploy gae, i'm getting following error: creating index failed entity_type: "myentity" ancestor: falseproperty { name: "name"}property { name: "location" mode: 3}: permission denied creating search index this code i'm executing geopt center = new geopt((float) platitude, (float) plongitude); double radius = pdistancekm*1000; query.filter f = new stcontainsfilter("location", new circle(center, radius)); items = ofy().load().type(myentity.class).filter(f).filter("name", tmpname).list(); i have created index according documentation : this index: <datastore-index kind="myentity" source="manual"> <property name="name" /> <property name="location" mode="geospatial"/> </datastore-index> does have idea o

How to display the result of Lucene indexsearcher pagewise in JSP -

i have built web interface in jsp user can type query , interface records user's query along present location , these passed lucene index searcher searchdb parameters. want display result of search pagewise in same jsp. code of jsp , lucene index searcher, have written taking of other posts, follows: result.jsp <%@ page language="java" contenttype="text/html; charset=utf-8" pageencoding="utf-8" import="java.util.*,java.io.*,parser.searchdb,org.apache.lucene.analysis.*" %> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <%! string myquery; string city; string latitude; string longitude; %> <% myquery=request.getparameter("myquery"); city=request.getparameter("city"); latitude=request.getparameter("latitude"); longitude=request.getparameter("longitude"); cookie cookie

running bash piped comand from mono linux -

i trying run bash command pipe using mono process start here code snippet trying single commands works, pipe commands fails run, missing here ? processstartinfo oinfo = new processstartinfo(command, args); oinfo.useshellexecute = false; oinfo.createnowindow = true; oinfo.redirectstandardoutput = true; oinfo.redirectstandarderror = true; streamreader sroutput = null; streamreader srerror = null; process proc = system.diagnostics.process.start(oinfo); proc.waitforexit(); i tried running "ps -aux" runs fine. ps -aux | grep gnome command failed. i tried these scenarios scenario 1: command = ps argument = -aux | grep gnome scenario 2: command = ps argument = "-c ' -aux | grep gnome ' " scenario 3 : command = ps argument = " -c \" -aux | grep gnome \" " all these failed error: garbage

How to execute PowerShell script as Azure Automation Runbook from InlineScript inside PSWorkflow runbook? -

in powershell workflow activity, can call native powershell script using inlinescript: workflow test { inlinescript { .\script.ps1 } } but in azure automation, dot-path (at least in tests) returning c:\windows\system32 , , script-as-runbook in azure automation did not exist there (or rather, failed execute because not find script). is possible execute native ps runbook stored in aauto this? if so, how specify path file? is bug/oversight in azure automation's parsing/compilation process of workflow runbooks & inlinescript activities, preventing dependent runbook being copied worker? i did little hunting, , found when native ps runbooks executed: they first inspected other runbook references. as part of deployment worker execution, randomly-named folder created under c:\temp\ referenced runbooks copied folder. if runbooks not found referenced, not copied temp directory. the root runbook not appear copied folder. the dynamically-named fo

backbone.js - How to share model between modules -

i trying develop backbone marionette application. need able edit model have no idea how model edit form. i using modules each "responsibility" in app. example 1 module listing users , 1 handling editing users. what best way of sharing model between list module , edit module? need support both opening edit form programatically , route. thankful regarding crud marionette in general too. i'd suggest reconsider separating "list" , "edit" tasks separate modules. think of module family of related features constitute single deliverable. ever edit user without out listing users? not likely. separation of concerns important, separation can still occur within module. example, you've identified @ least 4 different things, each own responsibilities, related 'user': userlistview -> collectionview useritemview -> itemview usereditview -> layout or itemview usercontroller -> controller userrouter -> approuter star

Moving from Selenium IDE to what? -

i have been given following job boss: three years ago former employee created selenium tests our project , committed them via eclipse now have update tests due fact software has changed through time. i created new ide tests, instead of editing old ones. i have committed them through cvs in project folder , access them via browser (selenium has folder in project) when run these tests via ide, run fine, when run them via testrunner in old selenium installation, there lot of errors. should install new version of selenium in project folder , should be? or should run tests ide instead? (i read somewhere testrunner deprecated) how tests made in ide run through web driver? have looked @ selenium builder ? supports migrating existing scripts, works sauce labs , there jenkins plugin]( https://wiki.jenkins-ci.org/display/jenkins/selenium+builder+plugin ) available.

excel - Issue with conditional formatting -

=and(indirect(address(row(), column()-1))=1, true) when use in excel formula, correctly evaluates true or false, depending on previous column value. but when try use part of formula of conditional formatting, returns false , unable set conditional formatting based on value. the same conditional formatting works excel 2003 i believe need try =indirect(address(row(), column()-1))=1 instead of =and(indirect(address(row(), column()-1))=1, true)

html - Javascript navigation hover effect -

does know how implement navigation hover effect displayed on this web page html/css document? aforementioned page using wordpress theme, add green effect generic web page , able change color well. p.s. have never used javascript before. (be nice.) try this: css ul li{ list-style:none; } ul li a{ transition:all 0.2s ease-out; padding:5px; border-radius:5px } ul li a:hover{ background-color:#&dcc0e; } html: <ul> <li> <a>hello</a> </li> </ul>

Android getView : Why getView not called? -

i add 2 buttons (add , delete) control list view, when delete item, item won't disappear in listview, when slide on listview, new item disappears. getview() in adapter won't called after delete item unless touch screen or slide on listview. can tell me why? my xml <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/locationlist_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >" <relativelayout android:id="@+id/locationlisttitle_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center_vertical" android:background="#add8e6"> <imageview android:id="@+id/iv_menu