Posts

Showing posts from July, 2012

How to increase daily Email capacity in google appengine -

i working on project using google appengine. using appengine can send email daily upto 100 1 application id. want increase email capacity. how shall increase email capacity. , if increase email capacity 1 application id impact on application id also? , want purchase email packs monthy basis possible how can purchase? help? in advance you'll have enable billing in order go beyond original 100 email limit. billing on 20k emails free, if app needs send more 20,000 messages per day, can sign support package entitles ask higher quota.

Trace route walking or driving in android google maps api v2 using not deprecated methods -

i want make task , i´ve found libraries here tyczj , here akexorcist . these solutions libraries use httpclient , deprecated, there others?. thanks. it useful. make own http request directions information the google directions api , overview_polyline string response. decode string using android-maps-utils library polyutil.decode method. add decoded points map: list<latlng> decodedpoints = polyutil.decode(polylinestring); polylineoptions options = new polylineoptions(); options.width(6); options.color(color.red); options.addall(decodedpoints); map.addpolyline(options);

python - Plotting histrogram from numpy array -

i need create histograms 2d arrays obtain convolving input array , filter. bins should range of values in array. i tried following example: how numpy.histogram() work? code this: import matplotlib.pyplot plt import numpy np plt.hist(result, bins = (np.min(result), np.max(result),1)) plt.show() i error message: attributeerror: bins must increase monotonically. thanks help. what doing specifying 3 bins first bin np.min(result) , second bin np.max(result) , third bin 1 . need provide want bins located in histogram, , must in increasing order. guess want choose bins np.min(result) np.max(result) . 1 seems bit odd, i'm going ignore it. also, want plot 1d histogram of values, yet input 2d . if you'd plot distribution of data on unique values in 1d, you'll need unravel 2d array when using np.histogram . use np.ravel that. now, i'd refer np.linspace . can specify minimum , maximum value , many points want in between uniformly spaced. so:

asp.net - c# Bundle Transform Break cache -

i create bundle transform modifies bundle content , triggers cache break, not able break cache. so far have following code:- public class bundleconfig { public static void registerbundles(bundlecollection bundles) { stylebundle bundle = new stylebundle("~/content/global"); bundle.transforms.add(new cachebreaktransform()); bundle.include("~/css/main.css"); bundles.add(bundle); } } public class cachbreaktransform : ibundletransform { void ibundletransform.process(bundlecontext context, bundleresponse response) { if(updateneeded()) { response.content = getupdatedcontent(response.content); //cache break needed here } } } i can update content of bundle, if file included in bundle hasn't changed bundle still cached , updated content not used. able break bundle cache updated content used. two options set context.httpcontext.response.cache.setre

excel - Web Query from URL in Cell -

i believe have thoroughly researched question (sorry if have seen answer, please patient me). truly newcomer vba/macros , not understand "put" codes provided in these message boards, why prefer formula. my sheet has cells feed hyperlink (i.e. a1=jfk, b1:cvg, c1=hyperlink(" http://www.gcmap.com/dist?p= "&a1&"-"&b1,"my flight"). if visit link ( http://www.gcmap.com/dist?p=jfk-cvg ) shows flying distance between these 2 points - 589 mi. what trying do web query in excel based off link provided in cell c1, , have web query point total distance included in link - , populate cell on sheet (d1) distance. any , appreciated! how's this: sub getmiles() 'thanks http://stackoverflow.com/questions/16975506/how-to-download-source-code-from-a-website-with-vba idea dim k long, s dim url2 string dim ws worksheet, newws worksheet set ws = activesheet application.screenupdating = false url2 = ws.cells(1, 3)

What is the time taken by Quicksort? -

if minimum time taken quicksort algorithm sort 1000 elements 100 seconds, minimum time taken sort 100 elements? the correct answer don't know. o(n log n) behaviour describes highest order part of time dependency. if assume implementation looking @ follows time = k * n * log n (that is, assume there no lower order parts), answer be: 100 * 100 / 1000 * log 100 / log 1000 = 20/3 or approx 6.7 seconds

c# - error when requesting xml document as xml via web api call -

i have xml document want return via web api call. i want allow user option of response via content negotiation. [httpget] public httpresponsemessage get() { var doc = new xmldocument(); doc.loadxml("<myexport someproperty='some value'></myexport>"); return request.createresponse(httpstatuscode.ok, doc); } when request accept header of application/xml error: <error> <message>an error has occurred.</message> <exceptionmessage>the 'objectcontent`1' type failed serialize response body content type 'application/xml; charset=utf-8'.</exceptionmessage> <exceptiontype>system.invalidoperationexception</exceptiontype> what doing wrong thought should handled via content negotiation? the problem here returning xml (or, more accurately, xmldocument object)---so pre-empting sensible content negotiation. if client asks json, server returns xml, there's

system verilog - Usage of non continuous values in 'dist' for constraint random stimulus -

system verilog support continuous range inside 'dist'. example y dist { [1:1000] :/ 40, 1500 :/ 60 } does support multiple random elements. example {1,3,2,6} :/ 40 is possible use 'inside' in 'dist' ? the answer both questions is: no. have @ constraint distribution syntax in systemverilog 3.1a language reference manual (12.4.4 distribution)

htaccess rewrite rule for changing html and htm extensions to php -

i changing website has pages ending .htm , pages ending .html php. all site names, folders , structures remain same , extension change .htm , .html .php. what correct rewrite rule .htaccess file in regards? after research came following , want make sure correct: rewriterule ^(.*).htm /$1.php [r=301,l] rewriterule ^(.*).html /$1.php [r=301,l] would above code in .htaccess file correct , there else have include? your rules fine, have turn rewrite engine on first.. rewriteengine on then add rules: rewriterule ^(.*)\.htm /$1.php [r=301,l] rewriterule ^(.*)\.html /$1.php [r=301,l]

PHP Heredoc unexpected end of file error -

this question has answer here: why these heredoc , nowdoc cause errors? 5 answers i'm using heredoc in order save large block of html variable can send email. however, keep getting unexpected end of file syntax error. i've checked whitespace before closing heredoc tag , other common issues. appreciated! here's full code: <?php include("init.php"); $email = "matthew910@gmail.com"; $body = <<<heredoc <!doctype html> <html lang="en" style="height: 100%; font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; background-color: transparent !important; color: #000 !important; -webkit-box-shadow: none !important; box-shadow: none !important; text-shadow: none !important; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; font-size: 10p

php - How to remove � sign from whole site in wordpress -

i have uploaded wordpress site on live , 1 "�" sign being appearing in between content , fine in local. how remove please suggest me ? not able fix problem. example - frédèric becomes fr�d�ric. ensure web page uses utf-8 encoding: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> if use php, can send own headers in way (you have put before other output): <?php header('content-type: text/html; charset=utf-8'); ?>

c# - When does foreach resolve the container? -

foreach(value v in mydictionary[key]) in scenario, compiler able determine mydictionary[key] same , not hash [key] every iteration of foreach? foreach(value v in myenumerable.where(s => s.istrue)) i know enumerables lazy, suspect in case, .where resolves once , returns full collection foreach hunch. judging this question, foreach doing .getenumerable in scenario 1, return of used therefore resolves once , not on every iteration. foreach in c# syntactic sugar . foreach (v v in x) embedded-statement gets expanded { e e = ((c)(x)).getenumerator(); try { while (e.movenext()) { v v = (v)(t)e.current; embedded-statement } } { … // dispose e } } as can see, x used once, enumerator calling getenumerator on it. dictionary lookup executed once. later on care enumerator, not came from.

javascript - Use CoffeeScript class in AngularJS controller -

i have presenter class written in coffeescript. it's in file loaded before angularjs controller. can't use class there. how use it? presenter: class companypresenter constructor: (company) -> @company = company location: -> if @company.business.city && @company.country_id @company.business.city + ', ' + @company.country_id else if @company.business.city @company.business.city else if @company.country_id @company.country_id else undefined controller: @sim.controller 'companyshowctrl', ['$scope', '$http', '$stateparams', 'language' ($scope, $http, $stateparams, language) -> $http.get('businesses/' + $stateparams.id).success((businessattributes) -> $scope.business = businessattributes # doesn't work :( $scope.businesspresenter = new companypresenter($scope.business) ) i tried avoid using service or factory ,

c++ - Is deleting every index individually the only way? -

i trying make array of pointers of class data type pool deleting if array not work. this code: struct pool { /* in reality, complicated stuff here */ int size; }; pool* createlargepool() { return new pool{100}; } pool* createmediumpool() { return new pool{20}; } pool* createsmallpool() { return new pool{5}; } int main() { using namespace std; enum epool{ small, medium, large, last }; pool *pools[epool::last] = { createlargepool() , createmediumpool() , createsmallpool() }; //individually works. delete pools[0]; delete pools[1]; delete pools[2]; //delete[] pools;// error. (assertion error?) system("pause"); return 0; } to understanding, line pool *pools[] creating array of pool pointers. , ide saying i'm doing. i'm running code without problems until reach delete statement. for reason delete[] causing me problems, deleting each 1 individu

apache - How to integrate hadoop with zookeeper and hbase -

i have set single node cluster of hadoop 2.6 need integrate zookeeper , hbase it. beginner no prior experience in big data tools. how set zookeeper coordinate hadoop cluster , how use hbase on hdfs? how combine make ecosystem? for standalone mode, follow steps provided in hbase guide: http://hbase.apache.org/book.html#quickstart hbase has standalone mode makes easy starters going. in standalone mode hbase,hdfs, , zk runs in single jvm process.

access vba - Multiple Values for a field (Link Master fields) -

i trying use link master fields value form in order filter of data , show remaining on chart. works fine when want select more 1 value (using listbox select multiple values field), chart returns nothing. i know how can address multiple values field in chart filters values on chart "or" function in sql. imagine want have sql with: [mytable].[field1]= selected values in listbox. it seems sql selects values in listbox 1 value/and function. you need via vba. use change event on list box update subforms recordsource. make sure execute code in forms current event, display correctly when moving records, , on initial opening.

android - getCount() NullPointerException Fragment -

i'm newbie @ android programming, please me: need count of specific record, code: public int countfiltered(string selection){ cursor cursor = database.query(denverdbopenhelper.table_denvers, denverallcolumns, selection, null, null, null, null); log.i(logtag, "get " + cursor.getcount() + " rows"); int countitem = cursor.getcount(); if(cursor==null) { return 0; }else return countitem; } and call on other activity: public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { // inflate layout fragment view rootview = inflater.inflate(r.layout.fragment_baby, container, false); txtpass = (textview)rootview.findviewbyid(r.id.txtpass); int countpass = datasource.countfiltered("score == 1"); txtpass.settext(countpass);} countpass show nullpinterexception and score column type integer, dbopenhelper: public class denverdbopenh

action - Cocos2d JS 3.7 Physics Sprite move -

i'm trying move physics sprite in cocos2d js 3.7(using chipmunk) using moving action won't work, manually set position , still wont work. physics sprite in cocos2d js 3.7 allow setposition function? or wrong. are trying move sprite or it's attached physics body? note when dealing physicsprite s can't change it's coordinates , rotation. instead should dealing ps.body.p . p has x , y properties should deal with.

java - Using JavaFX to build a GUI for an ATM but having trouble getting primary stage to change scene -

trying use event handlers sync specific button pushes advance next "screen" on atm by: hiding stage, updating stage scene button push creates, , reshowing stage. i curious if process can taken deep since button newcheckingsaccounts isn't doing should, can go backwards on page , used same code more or less try keep going forward. import java.awt.insets; import java.util.arraylist; import java.util.scanner; import javafx.application.application; import javafx.event.actionevent; import javafx.event.eventhandler; import javafx.geometry.pos; import javafx.scene.scene; import javafx.scene.control.button; import javafx.scene.control.textfield; import javafx.scene.layout.gridpane; import javafx.scene.layout.stackpane; import javafx.scene.layout.hbox; import javafx.scene.layout.borderpane; import javafx.scene.paint.color; import javafx.scene.shape.circle; import javafx.stage.stage; public class testaccount extends application { //creates arrays store accounts arraylist&

c# - How can I change what group and sub-group a DirectShow push source filter appears in? -

i using code create c# directshow push source filter following open source article, builds filter called virtualcam : http://www.codeproject.com/articles/437617/directshow-virtual-video-capture-source-filter-in the graphedit utility can find , shows in video capture sources group name csharp virtual camera , , can build filter graph , it works fine . skype can find too. however, other software want use can't find because not show in device enumeration call when using videoinputsource main group. believe class id group: /// <summary> clsid_videoinputdevicecategory, video capture category </summary> public static readonly guid videoinputdevice = new guid(0x860bb310, 0x5d01, 0x11d0, 0xbd, 0x3b, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86); i got class id open source utility scans video input devices. it's 1 of apps can't find virtualcam filter either. these apps can find devices web cam (in other words, virtualcam not show in available device list).

java - Run same class 5 times -

i've wrote complicated algorithm in java code. however, want run code class 5 times without doing self. called t1 class t2 class , put t1 class in loop 5 times. problem java save old values code , use them in next loop. question how run t1 class 5 times every time each time new values (without using 0 static variables) @ end of t1 code. here simple example i've done: package test; public class t1 { public static int n, m, o, i, j; public static double t; public static int[][] v = new int[100][100]; public static int[] c = new int [100]; public static void main(string[] args){ m=o+1; n=o+1; o=m+n; for(j = 0 ; j < n ; j++){ for(i = 0 ; < m ; i++){ v[i][j] = i+j+o; system.out.print(v[i][j]+" "); } system.out.print("\n"); } system.out.println("--------"); for(j = 0 ; j < n ; j++){

angularjs - Trigger click programatically on a single element of a list in Angular/JavaScript -

i writing test want click on second item in list , check has changed. i have bullet list element: <ul> <li>item 1</li> <li>item 2</li> <li>item 3</li> </ul> i have tried following ( element angular element containing entire list): var li = element.find('li'); li.triggerhandler('click'); //clicks elements li[1].triggerhandler('click'); //error: li[1].triggerhandler not function none of these works. first attempt clicks items , second throws error. any ideas how trigger click on second item? triggerhandler works on jquery (or builtin jqlite) elements. element.find returns jquery element ( li ) li[1] is dom node , not jquery wrapped element. use element.find('li:eq(1)') (if use jquery) or element.find('li').eq(1) (with builtin jqlite) instead.

c# - How to check and ignore message from serial port? -

i want ignore messages came serial port except unique. add each message hashset , when new message arrive check messages not contains in hashset, if message not contains want print him, right program think each messages arrived unique , don't understand why comparing code not working, maybe can me. here code: using system; using system.collections.generic; using system.linq; using system.text; using system.io.ports; namespace mysniffer { class program { static void main(string[] args) { hashset<string> messages = new hashset<string>(); serialport comport = new serialport(); comport.baudrate = 115200; comport.portname = "com4"; comport.open(); while (true) { string rx = comport.readline(); //reading com port messages.add(rx); // add new incoming message hashset if (!messages.contains(rx))

sqlclr - SQL Server custom CLR fails with error "Could not load file or assembly or one of its dependencies. The system cannot find the file specified." -

i have created sql clr references windows dll, windowsbase. part clr works fine if windowsbase gets updated in gac error " assembly in host store has different signature assembly in gac. ". to address built clr reference version of windowsbase not in gac. when run clr error " could not load file or assembly 'windowsbase, version=4.0.0.0, ...' or 1 of dependencies. system cannot find file specified. " i set fuslogvw see what's going on , following output the system cannot find file specified. assembly manager loaded from: c:\windows\microsoft.net\framework64\v4.0.30319\clr.dll running under executable c:\program files\microsoft sql server\mssql11.mssqlserver\mssql\binn\sqlservr.exe --- detailed error log follows. === pre-bind state information === log: displayname = windowsbase, version=4.0.0.0 log: appbase = file:///c:/program files/microsoft sql server/mssql11.mssqlserver/mssql/binn/ log: initial privatepath = null log

Strange behaviour when filtering by date in Oracle -

i'm on oracle database, following query: select codi_belf, data_elab,id_inte,anno mimsspam_tab id_inte = 504; retrieves 6 records e924 05-ago-15 504 2015 d458 05-ago-15 504 2015 d458 05-ago-15 504 2015 b275 05-ago-15 504 2015 e924 05-ago-15 504 2015 b275 05-ago-15 504 2015 where "data_elab" field of type date , ago italian locale aug. i try filter date this: select codi_belf, data_elab,id_inte,anno mimsspam_tab id_inte = 504 , data_elab = to_date('05/08/2015','dd/mm/yyyy'); and no results.. moreover if filter way: select codi_belf, data_elab,id_inte,anno mimsspam_tab id_inte = 504 , to_char(data_elab,'dd/mm/yyyy')='05/08/2015'; i got 6 records back! shouldn't 2 ways of filtering equivalent? why aren't? , why first eats 6 records? depend on weird configuration of oracle installation i'm querying to? what see in first query database default date format, determi

php - Wordpress plugin, can't echo the array -

i'm trying remove css files , out put full path, i'm trying: $cssarray = array(); add_action( 'wp_print_styles', 'removestyles', 100 ); function removestyles() { global $wp_styles; foreach( $wp_styles->queue $handle ){ wp_dequeue_style($handle); $src = $wp_styles->registered[$handle]->src; array_push($cssarray, $src); } } add_action('wp_head','hook_css'); function hook_css() { $output = "<tag1>"; foreach ($cssarray $csses => $css) { $output .= $css; } $output .= "</tag1>"; } the result <tag1></tag1> . i tried print_r $cssarray array, looks empty. doing wrong? as per comment, think $cssarray you've declared isn't available functions. try making global.

xcode - How can I use Chartboost with Cocoapods in Swift? -

Image
this podfile platform :ios, 8.0 use_frameworks! pod "chartboostsdk" pod "svprogresshud" svprogresshud being turning framework, reason chartboost not. that of course makes import chartboost not working in code. the library chartboostsdk not supported swift directly using cocoapods, need integrate manually in following way: 1.first, unzip sdk package , drop chartboost framework xcode project. sure you've linked these frameworks: storekit foundation coregraphics uikit 2.then need add swift bridging header allows communicate old objective-c classes swift classes.you need 1 if plan keep portions of codebase in objective-c. can create manually in following way: add new file xcode (file > new > file), select “source” , click “header file“ . name file “yourprojectname-bridging-header.h”. navigate project build settings , find “swift compiler – code generation” section. may find faster type in “swift compiler” search b

angularjs - show dygraph in list items -

can body tell me how display dygraph in listview using json response. here response need make dygraph..i goggled did'nt clue it. http://piratepad.net/ep/pad/view/ro.y8pksmhlihk/latest this how doing :- in index.html :- <script src="lib/ionic/js/ionic.bundle.js"></script> <!-- cordova script (this 404 during development) --> <script src="cordova.js"></script> <script src="js/dygraph-combined-dev.js"></script> <script src="js/dygraph-combined.js"></script> <!-- app's js --> <script src="js/app.js"></script> <script src="js/controllers.js"></script> <script src="js/services.js"></script> in home.html :- <div ng-repeat="entry in listnew"> <div class="bar bar-dark bar-head"> <h2>basestation {{entry.baseid}} {{entry.nickname}}</h2> </div>

c# - Add New Usercontrol On button Click Command In WPF MVVM -

hi trying display usercontrol dynamically not working ...please me improve code . in cunstructor of mainwindowviewmodel tried set initial property of contentcontrol. thank in advance <window x:class="wpfapplication1.mainwindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vm="clr-namespace:wpfapplication1.viewmodel" xmlns:view="clr-namespace:wpfapplication1.view" title="mainwindow" height="350" width="525"> <window.resources> <datatemplate datatype="{x:type vm:firstcontrolviewmodel}"> <view:firstcontrol></view:firstcontrol> </datatemplate> <datatemplate datatype="{x:type vm:secondcontrolviewmodel}"> <view:secondcont

android - How to disambiguate the JSON weather forecast provided by the Open Weather Map API? -

unlike yahoo weather api, weather forecast response open weather (json in particular) contains no details day , date. list of forecast data. how supposed know forecast corresponds day? list contain forecast of specific number of days (7 consecutive days?) including today , onward, or tomorrow , onward? here link documentation daily weather forecast: http://openweathermap.org/forecast16 here json editor view json response : http://www.jsoneditoronline.org/ here example response: {"city":{"id":1172451,"name":"lahore","coord":{"lon":74.343613,"lat":31.549721},"country":"pk","population":0},"cod":"200","message":0.0099,"cnt":5,"list":[{"dt":1438758000,"temp":{"day":31.45,"min":26.37,"max":31.45,"night":26.37,"eve":30.71,"morn":31.45},"pressure

java - can i use selenium grid on single machine -

i don't have multiple machines @ job. have 1 window , 1 mac script execution. wondering if can use selenium grid script execution on single machine.i never used selenium grid. article, links or suggestion highly appreciated. yes, can start selenium gird multiple node on single machine, ram should @ least 8gb because running test suites more 4 browser instance need more ram if not browser gets closed. http://selenium-release.storage.googleapis.com/index.html download standalone jar. java -jar selenium-server-standalone-2.45.0.jar -role hub it start hub . to start nodes open different cmd , type following command start 'n' number nodes. java -jar lib/selenium-server-standalone-2.43.1.jar -role node -hub http://localhost:4444/grid/register -port 5555 java -jar lib/selenium-server-standalone-2.43.1.jar -role node -hub http://localhost:4444/grid/register -port 6666 java -jar lib/selenium-server-standalone-2.43.1.jar -role node -hub http://localhos

Eclipse OSGi Bundle Console Exception -

i using eclipse juno run osgi. while running not able see console , getting below error: i'm trying run bundle osgi framework got following output , don't know mistake: !session 2015-08-05 17:54:16.831 ----------------------------------------------- eclipse.buildid=unknown java.version=1.7.0_65 java.vendor=oracle corporation bootloader constants: os=win32, arch=x86_64, ws=win32, nl=en_us command-line arguments: -console -configuration runtime !entry org.eclipse.osgi 4 0 2015-08-05 17:54:17.182 !message not find bundle: unknown !stack 0 org.osgi.framework.bundleexception: not find bundle: unknown @ org.eclipse.core.runtime.internal.adaptor.consolemanager.checkforconsolebundle(consolemanager.java:58) @ org.eclipse.core.runtime.adaptor.eclipsestarter.startup(eclipsestarter.java:331) @ org.eclipse.core.runtime.adaptor.eclipsestarter.run(eclipsestarter.java:231) @ org.eclipse.core.runtime.adaptor.eclipsestarter.main(eclipsestarter.java:208) !entry org.ecli

ng tags input - ngTagsInput - Requirements -

i interested in using ngtagsinput, need support older browsers. can explain why older browsers not work it? best regards , many in advance, oliver from project's github page : requirements angularjs 1.3+ a modern browser (chrome 31+, firefox 29+, safari 7+, opera 12+, ie 10+) that should answer what part of question. why part more complicated, because ngtagsinput has supported modern browsers since day 1. don't know parts of code incompatible older browsers. you might want check out this fork , though. goal provide basic support ie8, , perhaps can understand needs done in order support older browsers.

What is an URI in android -

i have come across android object makes no sense me. can't understand uri? well checked official documentation , said: immutable uri reference. uri reference includes uri , fragment, component of uri following '#'. builds , parses uri references conform rfc 2396. the problem is, can't use uri explain uri! totally confused. i did research , came across this article . said uri nothing could please explain me mean! q: "uri"? a: technical meaning of "uri" defined in rfc 2396 : a uniform resource identifier (uri) compact sequence of characters identifies abstract or physical resource. q: android "uri" class? a: here javadoc android.net.uri q: need android "uri" class for? a: @ "content providers" section of android documentation: http://developer.android.com/guide/topics/providers/content-providers.html content providers manage access structured set of dat