Posts

Showing posts from June, 2012

What It Feels Like To Wake Up At 32 With Everything You've Ever Wanted

Cerilli grew up in Rhode Island and he was always a hustler.  He isn't a coder, he's a salesman, and Cerilli perfected his technique by selling flowers, lemonade and T-shirts to the Brown University community with his friend, Irving Fain. Fain says they'd walk away some weekends with thousands of dollars in their pockets. "If you can sell roses to people on a hot day during college graduation, you can sell anything," says Fain. "Wiley can sell effortlessly. He is the type of person who walks into a store to sell someone, and within minutes they're trying to sell him, asking to be his customer. Cerilli learned a lot from his father, who died of cancer when Cerilli was 16. A real estate developer, Cerilli's father constructed multiple large buildings in Providence, one of which had no windows. He hired an artist from RISD to paint beautiful bay windows on it that could be seen from the highway. "I wanted to be like that and paint windows on my

Top Ten Business Blog To Subscribe

http://www.zerohedge.com/  http://www.techcrunch.com  http://www.businessinsider.com http://www.seomoz.org/blog  http://thenextweb.com  http://googleblog.blogspot.com  http://www.goodfinancialcents.com  http://www.inc.com  http://onecentatatime.com  http://blogs.reuters.com/felix-salmon/  So here the my list of the top business blog . My person favorute is business insider

javascript - Promises for promises that are yet to be created without using the deferred [anti]pattern -

problem 1: 1 api request allowed @ given time, real network requests queued while there's 1 has not been completed yet. app can call api level anytime , expecting promise in return. when api call queued, promise network request created @ point in future - return app? that's how can solved deferred "proxy" promise: var queue = []; function callapi (params) { if (api_available) { api_available = false; return dorealnetrequest(params).then(function(data){ api_available = true; continuerequests(); return data; }); } else { var deferred = promise.defer(); function makerequest() { api_available = false; dorealnetrequest(params).then(function(data) { deferred.resolve(data); api_available = true; continuerequests(); }, deferred.reject); } queue.push(makerequest); return deferred.promise; } } function continuerequests() { if (queue.length) { var makerequest = queue.sh

c# - How do I append objects to a JSON variable? -

the issue here instance of class "obj" re-created every time run through loop @ end of loop, have 1 set of object. should have several. foreach (var project in projectsdictionary) { foreach (var season in seasonsdictionary) { foreach (var episode in episodesdictionary) { obj = new parent { title = project.value, link = "1", children = new list<parent> { new parent { title = season.value, link = "1", children = new list<parent> { new parent { title = episode.value, link = "1", children = null } } } } }; } } } var responsebody = jsonconvert.serializeobject(obj); return

forms - Sending POST request on an already open url in python -

basically want send post request following form. <form method="post" action=""> 449 * 803 - 433 * 406 = <input size=6 type="text" name="answer" /> <input type="submit" name="submitbtn" value="submit" /> </form> what want read through page, find out equation in form, calculate answer, enter answer parameter send post request, without opening new url page, new equation comes every time page opened, hence obtained result becomes obsolete. want obtain page comes result of sending post request. i'm stuck @ part have send post request without opening new url instance. also, appreciate on how read through page again after post request. (would calling read() suffice?) the python code have looks this. import urllib, urllib2 link = "http://www.websitetoaccess.com" f = urllib2.urlopen(link) line = f.readline().strip() equation = '' result = '' file1 = open (&#

c# - What would cause a property get on an interface to fail? -

i have interface property, , class implements interface. cast instance of class interface, attempt read property , doesn't retrieve value. can see why? interface: public interface ifoo { int objectid { get; } } class: public class bar : ifoo { public int objectid { get; set; } } usage: ... bar mybar = new bar() { objectid = 5 }; ifoo myfoo = mybar ifoo; int myid = myfoo.objectid; //value of myfoo.objectid 5 in watch, myid remains @ 0 after statement ... this oversimplified, i'm doing. why can see value of myfoo.objectid in watch window, assignment myid fails (value 0 before , after assignment)? you might have manipulated data on watch through manual intervention or statement changed value. i did quick test on code in console application , value of myid 5. class program { static void main(string[] args) { bar mybar = new bar() { objectid = 5 }; ifoo myfoo = mybar ifoo; int myid = myfoo.objectid;

plot - Matlab Function fails due to : 'Error using Eval', works fine when used in Command Window -

when plotting data .mat file, if enter lines script one-by-one, works fine... when try running script, fails. function test (filename) varname = load (filename) %or load filename matobj = matfile(filename); varlist = (matobj); %or varlist = fieldnames (varname) field1 = eval ( varlist {1} ) field2 = eval ( varlist {2} ) x1 = field1.x_values.start_value:field1.x_values.increment:field1.x_values.increment*field1.x_values.number_of_values; x2 = field2.x_values.start_value:field2.x_values.increment:field2.x_values.increment*field2.x_values.number_of_values; figure hold %support yyaxis left/right not avaiable, use plotyy plotyy (x1, field1.y_values.values, x2, field2.y_values.values) end when invoke script (test ('1.mat')), matlab shows error on field1 = line : error using eval undefined function or variable 'signal'. the 'signal' 1 of data set names in

ios - Cannot invoke "Append" with Argument list of type '(String)' -

i'm working extensions in swift, , have created extension string follows: extension string { func reverse() -> string { let chars = array(arrayliteral: self).reverse() var reversed = "" char in chars { reversed.append(char) } return reversed } } name = "faisal syed" name.reverse() on line says reversed.append(char) i error saying can't invoke "append" argument list of type string. how work around this?

concurrency - What is the difference between commute and alter in Clojure? -

i trying write simple code shows different results between commute , alter in clojure. can create example purpose? simpler better understand difference. assuming commute used correctly, there should no difference in observed values of refs, except insofar using commute may transaction commit in high-contention scenario difficult alter . of course when applies rather significant difference in outcome… it's easier illustrate how things differ using side effects. here's single-threaded example illustrate basic property that alter called once per "transaction try" (possibly once), commute called once per "transaction try" (while commute not cause them, may involved in retries if alter used within same dosync block) , 1 final time compute committed value (so @ least twice, though again, not cause retries on own): user=> (def r (ref nil)) #'user/r user=> (dosync (alter r prn)) nil nil user=> (dosync (commute r prn)) ni

ios - NSTextAlignmentCenter still not working -

through this question i've learned in order center align text in uilabel via nstextalignmentcenter must disable "letter tighten spacing" , this guy agrees . they mention disabling option in interface builder, however, uilabel isn't accessible in ib far know. because trying change "textlabel" of cell in uitableview. proceeded attempt try disabling things in code: cell.textlabel.numberoflines = 1; cell.textlabel.adjustsfontsizetofitwidth = no; cell.textlabel.adjustsletterspacingtofitwidth = no; cell.textlabel.textalignment = nstextalignmentcenter; cell.textlabel.text = @"my centered text"; however, none of these seem have effect. text still left aligned. found problem! had change cell style uitableviewcellstyledefault: cell = [[uitableviewcell alloc] initwithstyle:uitableviewcellstyledefault reuseidentifier:simpletableidentifier];

Select / SelectAll delete Not working in PHP MySQL / AJAX Jquery -

good day, can't seem understand why isn't working. i've set files able read database, won't delete. managed select button work, won't let me delete. here's code. php delete <?php session_start(); include_once('dbconfig.php'); if(isset($_post['bulk_delete_submit'])){ $idarr = $_post['checked_id']; foreach($idarr $id){ mysqli_query($conn,"delete appointments id=".$id); } $_session['success_msg'] = 'users have been deleted successfully.'; header("location:display.php"); } ?> here's data being sent display page. <html> <head> <script type="text/javascript" src="delete.js"></script> </head> <body> <?php session_start(); if(!empty($_session['success_msg'])){ ?> <div class="alert alert-success"><?php echo $_session['success_msg'

RadListView drag and drop - Winforms C# -

i have been working on issue month can't seem solve it. trying drag item radlistview1 radlistview2. don't want move or copy item radlistview2. want combine item item on when release mouse button on radlistview2 , display in radlistview3. example. drag song name on singer , combine singer , songname radlistview3. i can't figure out drag events , how item dragged in radlistview2. didn't confuse heck out of you. any appreciated. i've looked @ telerik docs forever can't it. thanks. i can't work private void dragdropservice_previewdragover(object sender, raddragovereventargs e) { e.candrop = e.hittarget detaillistviewdatacellelement || e.hittarget detaillistviewelement; debug.writeline("previewdragover triggered"); } private void dragdropservice_previewdragdrop(object sender, raddropeventargs e) { baselistviewvisualitem draggeditem = e.draginstance baselistviewvisualitem; detaillistviewdatac

javascript - Input field is not working in IE11. How can I troubleshoot? -

in angular application, have simple input field nested inside dropdown menu. in firefox, works normally, can enter text when click inside input field. the problem in ie11 not work. when not work, mean input field can't clicked, can't enter text area. here code have utilized: main.html <span class="dropdown hidden-xs"> <i class="tcm-chevron glyphicon glyphicon-chevron-down expand-icon dropdown-toggle" aria-hidden="true" role="button" aria-labledby="expand application experience summary dropdown menu" ng-src="{{dropdown_appexperience}}" data-toggle="dropdown" alt="expand application experience summary dropdown menu"></i> <ul class="dropdown-menu appexperience tilecontextmenu"> <li class="gridster-form" role="form" aria-labeledby="gridster layout f

c - Pthread not executing function -

i have been trying figure out why thread created in c, using pthread library not executing fucntion pthread_create recieves. here code: void* escucharcpus (void* arg){ t_escucha* cpu= (t_escucha*) arg; listen(cpu->servidor,cpu->cantconexiones); printf("estoy esperando cpus"); t_cpu* newcpu=malloc(sizeof(t_cpu)); while(1){ int cliente2 = recibircliente(cpu->servidor); printf("recibí una conexión en %d!!\n", cliente2); inicializarcpu(newcpu); list_add(listacpus,newcpu); } } //this function pthread_create recieves. typedef struct{ int servidor; int cantconexiones; }t_escucha; //this 1 above auxiliar function networking, put info. //this goes inside main t_escucha* cpu; cpu=malloc(sizeof(t_escucha)); //and, here thread creation pthread_t hiloescuchacpus; pthread_attr_init(&atributo); pthread_attr_setdetachstate(&atributo,pthre

Random access contents of Jekyll collection -

i'm using jekyll collection generate reveal.js presentation. each file in collection represents 1 slide , named sequentially, eg 01.md, 02.md, etc. works fine want find more flexible method order slides. if can randomly access files in collection, rather sequentially iterate through them, maintain order of slides external collection - like: [0,1,3,2,4]. where collection defined as: collections: reality: title: reality slide deck output: false i can content of item 3 of collection with: {{site.reality[3].content}} how access front matter? thanks in advance. any front matter's variable available under own name. {{site.reality[3].title}} or {{site.reality[3].variablename}}

unity3d - Where to start developing VR apps for Android? -

can please recommend me sdk start vr(from list of cardboard sdk,daydream,unity sdk , oculus)keeping in mind i'm @ java , have developed apps using android studio. reference links much.thanks. for unity, google cardboard best now. google cardboard introduction unity cardboard sdk , samples another tutorial i'm @ java , have developed apps using android studio you have learn c#, unity api . similar java still need learn it.

How to pick between two forms using python requests library? -

Image
i trying use requests library submit post request website contains 2 forms. site https://itsapps.unc.edu/dir/dirsearch/view.htm , trying access advanced search form. the html of forms looks like: ... <div id="basicsearch" class="yui-hidden"> <form onsubmit="return false;" method="post" accept-charset="utf-8"> ... </form> </div> <div id="advancedsearch"><!-- advanced search --> <form onsubmit="return false;" method="post" accept-charset="utf-8"> <table class="section"> <tr> <td colspan="2"><label for="affiliation">search ... how go doing this? there way specify form id/name? right have is: url = 'https://itsapps.unc.edu/dir/dirsearch/search' form_data = {'affiliation':'students', &#

c++ - Template and using (#define) in class constructor -

i've implemented stack process.this program supposed work same real stack memory.moreover i'm trying use template , make the program more generic. i've got problem in using #define default_size 10 argument of class constructor. first of when put default_size in prototype of constructor goes smoothly: #define default_size 10 template<typename t> class stack { public: stack(int size=default_size); private: t *elements; int size; int count; }; template<typename t> stack<t>::stack(int s) { cout << "--constructor called\n"; size = s; elements = new t[size]; count = 0; } but when put default_size in outline definition of class constructor error: no appropriate default constructor available #define default_size 10 template<typename t> class stack { public: stack(int size); private: t *elements; int size; int count; }; template<typename t> stack<t>::stack(int s=default_size) {

swift - Calculate the quality of the GPS signal iPhone -

i developing application similar runtastic. have problem understand quality of gps signal. if understand need use property horizontalaccuracy don't understand range quality of signal can considered excellent, good, or no signal. can me ? have found several examples on internet when go apply values don't want. code: dispatch_async(dispatch_get_main_queue()) { //assign new image if(newlocation.horizontalaccuracy < 0){ //no signal self.qualitasegnale.text = "\(newlocation.horizontalaccuracy)"; self.imagegps.image = uiimage(named: "gps_signal_ko"); } else if(newlocation.horizontalaccuracy > 163){ self.qualitasegnale.text = "\(newlocation.horizontalaccuracy)"; self.imagegps.image = uiimage(named: "gps_signal_peer"); } else if (newlocation.horizontalaccuracy > 48){

playframework - Error:could not find implicit value for parameter p: scala.slick.jdbc.SetParameter[java.util.UUID] -

inserting row in postgres database table using scala produce following error. could not find implicit value parameter p: scala.slick.jdbc.setparameter[java.util.uuid] signupprocess.scala case class signupprocess(subscriber_uuid:uuid,firstname:string,lastname:string,jobtitle:string,phone:string,email:string,password:string,company_name:string,no_of_employees:int,my_schema_name:string,my_date:date,my_time:time) object signupprocess{ // _ip -> input parameter def signup(firstname_ip: string, lastname_ip: string, jobtitle_ip: string, phone_ip: string, email_ip: string, password_ip: string, companyname_ip: string, employeescount_ip: int) : string = { database.forurl("jdbc:postgresql://localhost:5432/my_db", "postgres", "mypassword",null, driver="org.postgresql.driver") withsession{ def insert(c: signupprocess) = (q.u + "insert my_schema.my_table(subscriber_uuid,firstname,lastname,jobtitle,phone,email,

compression - How can i read/write Bytes/Bits to a new file in C++ -

my first post ill stick guide lines best can! im trying make method of editing file on binary level. have way read bytes(unfortunatly not in large formats) im stuck how can write bytes new file. figured can convert bytes hex , write file way step id avoid. there method writing bytes file suggest? if possible allow write in large format 5gb. here code im using converting file bytes: #include "stdafx.h" #include <iostream> #include <fstream> using namespace std; //variables const unsigned long long size = 64ull * 1024ull * 1024ull; unsigned long long file[size]; class bytemanager { char const* input; public: void set_values(char const*); char* converttobytes() { ifstream streamdata(input); streamdata.seekg(0, ios::end); size_t len = streamdata.tellg(); char* bytes = new char[len]; streamdata.seekg(0, ios::beg); streamdata.read(bytes, len); streamdata.close(); return bytes;

sap - Class definition not found,Prior initialization failed -

Image
in sap/pi, while upgrading sap newer version 7.5, got error: noclassdeffound: cannot initialize class because prior initialization attempt failed. can tell i'm going wrong? as jms channel says it's missing classes driver library trying use in channel. make sure have adapter libs deployed contain jars class described missing there (com.ibm.mq.jms.mqqueueconnectionfactory).

selenium webdriver - Getting Fatal error during transformation Java.net.connectException connection timed out:connect .While executing testng xslt report through ant -

<target name="testng-xslt-report"> <delete dir="${basedir}/testng-xslt"> </delete> <mkdir dir="${basedir}/testng-xslt"> </mkdir> <xslt in="${basedir}/testingtestng.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html" classpathref="testingtestng.classpath" processor="saxonliaison" > <param expression="${basedir}/testng-xslt/" name="testngxslt.outputdir" /> <param expression="true" name="testngxslt.sorttestcaselinks" /> <param expression="fail,skip,pass,conf,by_class" name="testngxslt.testdetailsfilter" /> <param expression="true" name="testngxslt.showruntimetotals" /> </xslt> </target> this build.xml. have saxon-8.7.jar , saxonliaison.jar f

makefile - Linux out of tree module build issue -

obj-m := $(modname).o ccflags-y := $(ccflags) src_files := $(wildcard $(foreach pat,*.c *.cpp *.s,src/$(pat) src/$(modname)/$(pat))) $(modname)-objs := $(addsuffix .o, $(basename $(src_files))) all: make -c $(kdir) m=$(shell pwd) modules clean: make -c $(kdir) m=$(shell pwd) clean i have make file building kernel modules. whenever run it, error saying there no rule make target .c. .c not source file. if remove "if [ -d src ]" check error saying src doesn't exists on recursive make call kernel build system. if specify full path src gives same output saying can't find (which weird). if hard code src_files works (if didn't copy , paste wrong). have idea going on? in makefile expect current directory 1 contained given makefile. when file executed kbuild context, no longer true: current directory directory kernel sources . that why content of src_files variable becomes wrong: wildcard cannot find files under src/ in kernel sources. may u

ruby on rails 3 - access associated record in view (show page) -

i have following association setup: class image < activerecord::base belongs_to :imageable, polymorphic: true attr_accessible :photo has_attached_file :photo, :styles => { :small_blog => "250x250#", :large_blog => "680x224#", :thumb => "95x95#" } end class post < activerecord::base has_many :images, as: :imageable accepts_nested_attributes_for :images attr_accessible :comments, :title, :images_attributes end to access image post within index page, example, put code in block , loop through using each : <% @posts.each |p| %> <% p.images.each |i| %> <%= image_tag(i.photo.url(:large_blog), :class => 'image') %> <% end %> <% end %> so when comes accessing post in show view accessing 1 record thought access image so: <%= image_tag(@post.image.photo.url(:large_blog), :class => 'image') %> but seems if can't error like: undefined method 'imag

java - WebClient - Jira rest api, with unexpected result -

i'm trying fetch issues jira through jira rest api. when use curl it's no problem, , issues want. problem want through java code (i use maven changes plugin, small modifications), plugin doesn't find issues. 200 status response, response doesn't contain issues. here snippet java code (the authentication done in setup): webclient client = setupwebclient(jiraurl); dosessionauth(client); client.replacepath("/rest/api/2/search"); client.type(mediatype.application_json_type); client.accept(mediatype.application_json_type); client.query("key", "<issue-key>"); response res = client.get(); this gives me 200 response json: {"startat":0,"maxresults":50,"total":0,"issues":[]} this curl request gives me expected ressult: curl -u user:password -x -h "content-type:application/json" https://bankid.atlassian.net/rest/api/2/search?key=<issue-key>&m

javascript - Converting custom encoding to ascii -

i have string in following form \u0000n \u0000u...... when try display in browser shows nothing (empty string). found reason using http://r12a.github.io/apps/conversion/ shows \u0000n gets converted \0n null character encountered before end of actual string. my question still want print string without null character there workaround or should trim 0's after \u character.

c# - Changing the functionality of get;set; keywords -

in order avoid coding implemented dictionary store properties values: public class mainviewmodel { public list<person> people { get; set; } public person boss { get; set; } int = -1; public mainviewmodel() { boss = new person() { name = "the boss" }; people = new list<person>(); while (++i < 10) { people.add(new person() { name = $"person {i}" }); } update(); } private async void update() { await task.delay(1000); boss.name = $"the boss {++i}"; update(); } } public class person : model { public string name { { return getproperty<string>(); } set { setproperty(value); } } } public class model : inotifypropertychanged { private dictionary<string, object> properties; public event propertychangedeventhandler propertychanged; public model() { proper

jboss - Could not find or load main class org.picketbox.datasource.security.SecureIdentityLoginModule - Wildfly 10 -

i wanted encrypt password in configuration of connections database. stuck @ stage of generating encrypted password i wrote script bat, content of is: java -cp c:\servers\wildfly-10.0.0.final\modules\system\layers\base\org\jboss\logging\main\jboss-logging-3.3.0.final.jar:c:\servers\wildfly-10.0.0.final\modules\system\layers\base\org\picketbox\main\picketbox-4.9.4.final.jar:c:\servers\wildfly-10.0.0.final\modules\system\layers\base\org\picketbox\main\picketbox-commons-1.0.0.final.jar:c:\servers\wildfly-10.0.0.final\modules\system\layers\base\org\picketbox\main\picketbox-infinispan-4.9.4.final.jar org.picketbox.datasource.security.secureidentityloginmodule password unfortunately, when start script getting error: c:\>test.bat c:\>java -cp c:\servers\wildfly-10.0.0.final\modules\system\layer s\base\org\jboss\logging\main\jboss-logging-3.3.0.final.jar:c:\ads\jpk\wildfly_1 0_jpk\wildfly-10.0.0.final\modules\system\layers\base\org\picketbox\main\picketb ox-4.9.4.final.jar:c:

Python equivalent of Java Timer java.util.Timer -

java se has scalable timer object that, using 1 single thread, allows large numbers of concurrently scheduled tasks (thousands should present no problem). internally uses binary heap represent task queue. is there python equivalent? standard or in popular library preferable. yes, have @ sched module. utilizes binary heap (from heapq ) well.

ssl - HTTPS issue "Your connection is not private", Ngnix -

i'm trying https work on subdomains using"nginx", receive: this server not prove api.wokcraft.com; security certificate not trusted computer's operating system. may caused misconfiguration or attacker intercepting connection. url: https://api.wokcraft.com/ can 1 inform missing? thx edit: followed instructions: https://support.comodo.com/index.php?/default/knowledgebase/article/view/1091/0/certificate-installation--nginx nginx doesn't send correct list of intermediate certificates: https://www.ssllabs.com/ssltest/analyze.html?d=api.wokcraft.com&latest

PySide and Qt Properties: Connecting signals from Python to QML -

i trying run simple pyside appliccation design made in qml. call function in qml python in separated thread. i have following qml view: import qt 4.7 rectangle { visible: true width: 100; height: 100 color: "lightgrey" text { id: datestr objectname: "datestr" x: 10 y: 10 text: "init text" font.pixelsize: 12 function updatedata(text) { datestr.text = qstr(text) console.log("you said: " + text) } } } here application: some imports.... #!/usr/bin/python import sys import time pyside import qtdeclarative, qtcore pyside.qtgui import qapplication pyside.qtdeclarative import qdeclarativeview the qthread worker.... #worker thread class worker(qtcore.qthread): updateprogress = qtcore.signal(int) def __init__(self, child): qtcore.qthread.__init__(self) self.child = child def run(self):

mysql - sql join two tables, one summary the other is detail -

when join 2 tables, not sure how join following tables exact wanted. table a: -------------------------------------- | id | name | buy time | total | -------------------------------------- | 1 | | 3 | 30 | -------------------------------------- | 2 | b | 1 | 10 | -------------------------------------- table b: ------------------------------- | id | orderid | price | ------------------------------- | 1 | 1 | 10 | ------------------------------- | 1 | 2 | 10 | ------------------------------- | 1 | 3 | 10 | ------------------------------- | 2 | 4 | 10 | ------------------------------- join table c --------------------------------------------------------- | id | name | buy time | total | orderid | price | --------------------------------------------------------- | 1 | | 3 | 30 | | | ----------------------------------------------

How to call Add New Item window inside an Visual Studio Extension -

Image
i developing visual studio extension. part of need call "add new item" window of visual studio. after prompting need user input file name. how achieve ? i got code. job var type = typeof(vsconstants.vsstd97cmdid); var commandid = new commandid(type.guid, (int)vsconstants.vsstd97cmdid.addclass); var olemenucommandservice = getservice(typeof(imenucommandservice)) olemenucommandservice; olemenucommandservice.globalinvoke(commandid); reference :- link here

ruby - jekyll tag plugin works offline but not on github pages -

there might seem other dupes this, this post closest hacky solution. i got theme uses tag plugin here : http://charliepark.org/tags-in-jekyll/ here my site repo on github . it's hosted here : http://www.gideondsouza.com tags don't work online work offline. on local machine see _/site/tag/.. folders each tag. tag folder isn't generated on github? in fact don't see _site folder, maybe understanding off. perhaps need install github-pages gem? i fix in post mentioned earlier, hacky, have remember copy generated tags folder root. anything i'm missing? github pages support selected plugins ( see documentation here ). if want use plugin, have generate locally , push _site content online.

Gray box map api -

i have problem google map, have website have introduced map using api , problem map when initialized comes in gray, blamed resizing , can not solve. map hidden , , jquery clicking on field in table shown. enter code here <!doctype html> <html> <head> <style type="text/css"> #googlemap { width: 100%; height: 470px; margin-top: 6.5%; overflow: visible; max-width: none !important; } </style> </head> <div id="googlemap"></div> <script src="https://maps.googleapis.com/maps/api/js?key=[key]&signed_in=false&"> </script> <script> var mycenter = new google.maps.latlng(39.287649, -0.422548); var mycenterverd = new google.maps.latlng(39.287413, -0.422255); var mycenterroig = new google.maps.latlng(39.288497, -0.423953); var mycentergroc = new google.maps.latlng(39.287766, -0.421604); function initialize() { var mapoptions = { center: new google.maps.latlng(39.287

error handling - how to capture bulletin messages in apache nifi -

i want know if there way capture bulletin messages(basically errors) appear on nifi ui , store in attribute/file can looked upon later. screen gets refreshed every 5 min , if there failure in of processors want know reason it. i not particularly talking logging part here. as know, bulletins reflect messages logged. content stored in {nifi_home}/logs/nifi-app.log. however, if wanted consume bulletin directly have couple different options. you consume bulletins rest api. there couple endpoints accessing bulletins. http[s]://{host}:{port}/nifi-api/controller/process-groups/{process-group-id}/status?recursive=true this request status (including bulletins) of components under specified process group. can use alias 'root' root level process group. recursive flag indicate whether or not return children of process group or descendant components. http[s]://{host}:{port}/nifi-api/controller/status this request status (including bulletins) of controller

arrays - PHP - Replace string src value with data uri -

good day. i have array holds data uri of img. $var = array( [0] => data:image/png;base64,ivborw0kggoaa... [1] => data:image/png;base64,rw0kkggoaswaa... ); and have string. $foo = '<p>test 7/31/2</p> <p>&nbsp;<img src="/media/1.png" alt="" /></p> <p><img src="/media/2.png" alt="" /></p>'; how can replace src in $foo data uri array in $var ? result like. $foo = '<p>test 7/31/2</p> <p>&nbsp;<img src="data:image/png;base64,ivborw0kggoaa..." alt="" /></p> <p><img src="data:image/png;base64,rw0kkggoaswaa..." alt="" /></p>'; any ideas do! try this: $images = [ "/media/1.png" => 'data:image/png;base64,ivborw0kggoaa...', "/media/2.png" => 'data:image/png;base64,rw0kkggoaswaa...' ]; $url = '<p>test 7/

How to get a data I put when I start intent for TweetComposer on onActivirtResult in android -

i'm using tweetcomposert.builder share link intent below. intent intent= new tweetcomposer.builder(activity) .text("http://travel.asiaone.com/travel/destinations/5-ways-singaporeans-can-discover-iceland-budget") .createintent() intent.putextra("abcd", refno); activity.startactivityforresult(intent, constants.request_twitter_share ); result should go onactivityresult in mymainactivity. protected void onactivityresult(int requestcode, int resultcode, intent data) {...} i expected can data put when executed 'startactivityforresult' data.getintextra("abcd", 0), there nothing. is there idea it? thanks. you puts data activity started. if want result, should set result in activity started. link method setresult() . read twitter documentation. may doesn't return data in intent.

web services - send complex object json to webservice with jquery -

Image
i'm trying send json object webservice in asp.net $.ajax can't retrive nested object array. client code: var fiscaldocument = { "datetime": "2013-08-07 17:37:41", "operatorname": "admin", "total": 21800 , "fiscallines": [ { "id": 254, "itemid": "3", "amount": 1000, "price": 2832, "description": "acqua", "categoryid": 1, "sequence": 0, "type": 1, "categoryname": "bevande", "taxrate": 21000 }, { "id": 255, "itemid": "3", "amount": 1000, "price": 5024, "description": "acqua", "categoryid": 1, "sequence": 0, "type": 1, "categoryname": "bevande", "taxrate": 21000 }, ],

java - Not receiving the complete Base64 string sent from PHP -

i have application , need receive images database (before asks, yes needs database). in php file send full complete string, in android receive half of string or so. guys have tip on why happening? can me? code serverrequest.java: public void fetchservicofotodatainbackground(int codservico, getservicofotocallback usercallback) { new fetchservicofotodataasynctasck(codservico, usercallback).execute(); } public class fetchservicofotodataasynctasck extends asynctask<void, void, arraylist<string>> { arraylist<string> ltservico; int codservico; getservicofotocallback servcallback; public fetchservicofotodataasynctasck(int codservico, getservicofotocallback servicocallback) { this.codservico = codservico; this.servcallback = servicocallback; } @override protected arraylist<string> doinbackground(void... params) { arraylist<string> returnedservico = null; try { url url = new u

How train my own svm in opencv using C++? -

i want train own svm features extracted images,so extract features sequence of images(720x576) wich contain persons. want use svm classify object detected such person or other object. piece of features.dat: [-0.00011304629, -0.0012236957, 0.00027119479, 0.0012647118, -0.0018265223, -0.018638615, 0.0098637585, 0.020142596, -0.0012514826, -0.0067296866, 0.0043024337, 0.0080097318, 0.0011584486, -0.00077929819, 0.0013905426, 0.00095518644, 0.0017369018, 0.0079498151, 0.0018530694, 0.0085842144, 0.15540655, 0.23714867, 0.15860459, 0.23714867, -0.028113011, 0.25352797, 0.268282, 0.279008, -0.037383422, 0.02249903, 0.042661294, 0.02340897, 0.0013400698, 0.0048319609, 0.0021884302, 0.0056850719, 0.37904194, -0.066282742, 0.41964364, 0.080511056, -0.23055254, 0.010807713, 0.46629098, 0.049539972, -0.041018508, 0.0058587855, 0.045177955, 0.0067843986, -0.00016448426, 0.0008450991, 0.0019716914, 0.0026907444, 0.053080089, -0.0070953579, 0.057075631, 0.0085162139, -0.03202837, 0.0012674