Posts

Showing posts from April, 2010

google analytics - pandas.io.ga not working for me -

so have worked through hello analytics tutorial confirm oauth2 working expected me, i'm not having luck pandas.io.ga module. in particular, stuck error: in [1]: pandas.io import ga in [2]: df = ga.read_ga("pageviews", "pagepath", "2014-07-08") /usr/local/lib/python2.7/dist-packages/pandas/core/index.py:1162: futurewarning: using '-' provide set differences indexes deprecated, use .difference() "use .difference()",futurewarning) /usr/local/lib/python2.7/dist-packages/pandas/core/index.py:1147: futurewarning: using '+' provide set union indexes deprecated, use '|' or .union() "use '|' or .union()",futurewarning) --------------------------------------------------------------------------- typeerror traceback (most recent call last) <ipython-input-2-b5343faf9ae6> in <module>() ----> 1 df = ga.read_ga("pageviews", "pagepath", ...

api - WordPress new comment xmlrpc.php -

i've got problem: need post new comment using xmlrpc.php , post request. i read documentation , wrote xml request. sent blog/xmlrpc.php, there problem: faultcode -32700 parse error. not formed.i tried find solution, other xml not work too. my xml: <?xml version="1.0" encoding="utf-8"?> <methodcall> <methodname>wp.newcomment</methodname> <params> <param> <value> <int>1</int> </value> </param> <param> <value> <string>grinj</string> </value> </param> <param> <value> <string>0</string> </value> </param> <param> <value> <int>1406</int> </value> </param> ...

How to read outside of {% %} using nunjucks parser for creating an extension -

i trying create extension data binding. due unavailability of parse documentation, stuck. for below syntax, how check/read "type", i.e. how read outside of {% %}. <input type="text" id="categoryname" {% data-bind "category.name" %} /> <input type="checkbox" id="categoryistop" {% data-bind "category.istoplevel" %} /> the below syntaxes work fine , use if above not possible. {% input "id=categoryname, value=category.name, type=text" %} {% input "id=categoryistop, value=category.istoplevel, type=checkbox %} <input id="categoryname" {% data-bind "text category.name" %} /> <input id="categoryistop" {% data-bind "checkbox category.istoplevel" %} />

c# - Change color of a cell of a datagridview inside a tabpanel -

i got tabcontrol 2 tabpanels inside. tabpanels contains datagridview , i'm trying change color of cell. if change color of first datagrid contained in first tabpanel works. if same other tabpanel code didn't nothing. dgvinthefirsttabpanel.rows[0].cells[6].style.backcolor = color.yellow; this work fine, but... dgvinthesecondtabpanel.rows[0].cells[6].style.backcolor = color.yellow; this didn't work, think problem change of tab panel active. i solve problem, exist bug don't recognize tabs if didn't click inside 1 of them. solve can in load of form. in way can modify objects contain in others tab. private void main_load(object sender, eventargs e) { //scan tabs tabcontrol1.selectedtab = tabcontrol1.tabpages[1]; tabcontrol1.selectedtab = tabcontrol1.tabpages[2]; tabcontrol1.selectedtab = tabcontrol1.tabpages[0]; ... } best regards then can modify color of cell or property of da...

debugging - Cannot debug a javascript issue in Chrome Developer Tools/Firebug -

i have simple javascript syntax error in 1 of pages. in console chrome developer tools following message: uncaught syntaxerror: unexpected token ( ... my_file.php(line 1799) and failed load resource: net::err_cache_miss however, cannot inspect page's source. shows in blank, or not loaded. i looked resource tab, script file , searched affected line. line 1799 has commented instruction: //location.reload(); it doesn't make sense , not first time had report in chrome find out problem in line or file. in firebug nothing reported, despite fact javascript not work. what steps try figure out error coming from? i tried: refreshing page. it's common knowledge script loads after load page second time; inspecting file's script in source tab - shows in blank (regardless of how many times refresh); inspecting file's script in resources tab - error shows in commented line. line 1799 shows commented instruction; inspecting file's script in fire...

android - sending and receiving emoticons to webservice -

i have implemented https://github.com/ankushsachdeva/emojicon lib emoticons , emoticons displayed in edit text. have edit text takes in both text , emoticons. want text/emoticons entered in edit text sent web service. when text edit text can see '??' of emoticons on server.i know got convert emoticon unicode , send don't know how implement , how decode emoticons in edit text. please me. i text edit text , save in 'userstatus' string , pass json as list<namevaluepair> params = new arraylist<namevaluepair>(); log.d("userstatus",userstatus); params.add(new basicnamevaluepair("my_status",userstatus)); params.add(new basicnamevaluepair("user_id",userid)); try{ // getting json string url jsonobject json3 = jparser.makehttprequest(url_updateprofilestatus, "post", params); my json class public class jsonparser { static inputstream = null...

ActiveMq Inflight Count not decreasing -

i using activemq 5.5.0 version in project. i facing 1 problem due reason inflight count keep on increasing , rate of increment not high. after days become equal prefetch size queue stops responding. could can me how make inflight count 0 without deleting queue ? you can make in-flight count go 0 purging queue web console (there's purge link on each queue on queues page); delete messages in queue without deleting queue itself. that satisfy question you've asked it, though suspect it's not want , meant "without deleting messages queue". if i'm wrong , wanted, great; if not, answer questions in comment added , we'll go there.

BigQuery executing only one query -

Image
i'm trying run query in ui, error: error: 6.1 - 0.0: 1 query can executed @ time. i don't think there other queries running, , has lasted while now. surely can handle more 1 query @ time?? how long stuck? how can turn bigquery off , on again :p this error means query string has been parsed containing multiple queries. check not have multiple top-level select statements in query text box. from specific message, guess second query begins on or around line 6.

jsf - not load image to graphicImages -

Image
i want use h:graphicimage somehow not find correct source address image not appear where doing wrong? you must specify correct url of image. url depends on how deployed images folder, /your_application_context/resources/images/avatar.png

java - JavaScriptException when using DataTable.create() in JUnit with GWTTestCase -

for school project, have test 1 of classes. after writing , executing test, got following error message , stacktrace: com.google.gwt.core.client.javascriptexception: (null) @com.google.gwt.visualization.client.datatable::create()([]): null @ com.google.gwt.dev.shell.browserchannelserver.invokejavascript(browserchannelserver.java:249) @ com.google.gwt.dev.shell.modulespaceoophm.doinvoke(modulespaceoophm.java:136) @ com.google.gwt.dev.shell.modulespace.invokenative(modulespace.java:576) @ com.google.gwt.dev.shell.modulespace.invokenativeobject(modulespace.java:284) @ com.google.gwt.dev.shell.javascripthost.invokenativeobject(javascripthost.java:91) @ com.google.gwt.visualization.client.datatable$.create(datatable.java) @ com.gwt.client.vizualizationmanagertest.gwtsetup(vizualizationmanagertest.java:150) ... from read, problem method: datatable.create() , creates default datatable may later filled columns , rows. i want test if data being set correctly. in class, testing...

c++ - Ubuntu Qt link boost log -

i try link boost 1.55 log library qt *.pro file. includepath += $$system(echo ${boost_include_dir}) libs += -l$$system(echo ${boost_lib_dir}) libs += -lboost_system -lboost_filesystem -lboost_thread -lboost_log i reference error boost log , because didn't define -dboost_log_dyn_link can tell me how define inside *.pro file? in cmake file can use: add_definitions(-dboost_log_dyn_link) what corresponding command in qmake ? use defines : defines += boost_log_dyn_link

osx - Coverity and "Your request for analysis of Phonations/TravisTest failed" -

i'm trying add coverity scan static analysis qt mac project i'm not able submit build using travis. here coverity specific travis setup: addons: coverity_scan: project: name: phonations/travistest description: build submitted via travis ci notification_email: martin@phonations.com build_command_prepend: cov-configure --comptype clangcxx --compiler clang++ --template build_command_prepend: qmake qttest.pro build_command: make -j 4 branch_pattern: coverity and here result got mail: your request analysis of phonations/travistest failed. analysis status: failure please fix error , upload build again. error details: build uploaded has not been compiled fully. please fix compilation error. may have run bin/cov-configure described in article on coverity community. last few lines of cov-int/build-log.txt should indicate 85% or more compilation units ready analysis more detail explanation on error, please check: https:...

objective c - How to implement location search using google maps in ios? -

i building ios app.i using storyboards build screens , have integrated google map in project. i want location tap in map , want show location in label in airbnb app.i’m unable that,could help. here code: - (void)viewdidload { [super viewdidload]; gmscameraposition *camera = [gmscameraposition camerawithlatitude:-33.86 longitude:151.20 zoom:6]; mapview_ = [gmsmapview mapwithframe:cgrectzero camera:camera]; mapview_.mylocationenabled = yes; self.view = mapview_; gmsmarker *marker = [[gmsmarker alloc] init]; marker.position = cllocationcoordinate2dmake(-33.86, 151.20); marker.title = @"sydney"; marker.snippet = @"australia"; marker.map = mapview_; } help appreciated! you have use gmsmapviewdelegate protocol that. precisely, method mapview:didtapatcoordinate: require , detect tap on map , givin...

objective c - NSError no visible interface iOS 8.1 -

this piece of code working on ios 8. however, when build in release mode a no visible @interface 'nserror' declares selector 'code'. code found on nserror . can click , see that, however, don't understand why stopped working xcode 6.1 , ios 8.1 i tried building on 5.1.1 , built fine in release mode. +(bool) isresponseerror:(nsurlresponse *)response responsestring:(nsstring *)responsestring error:(nserror *__autoreleasing *)error { nsinteger statuscode = 0; if (*error) { statuscode = [*error code]; } if ([response iskindofclass:[nshttpurlresponse class]]) { statuscode = [(nshttpurlresponse *)response statuscode]; } if (statuscode >= 400 || statuscode <= kcfurlerrorunknown) { nsmutabledictionary *dic = [nsmutabledictionary dictionary]; [dic setvalue:[nshttpurlresponse localizedstringforstatuscode:statuscode] forkey:nslocalizeddescriptionkey]; return true; } else { id...

php - Symfony 2 apc caching error -

i moving symfony 2 project production environment on shared hosting. when execute file app.php error of fatal error: call undefined function doctrine\common\cache\apc_fetch() in /data/web/virtuals/53627/virtual/www/vendor/doctrine/cache/lib/doctrine/common/cache/apccache.php on line 40 i contacted hosting provider , told no longer user apc caching, seems outdated, moved further. is there way how omit apc caching using symfony + doctrine? thank you check out app/config.yml : doctrine cache drivers pretty configurable, , as doc states , set them array . pretty this: doctrine: orm: auto_mapping: true metadata_cache_driver: array query_cache_driver: array result_cache_driver: array also note default configuration, defaults must've been overridden.

java - FastDTW for Hand Gesture Pattern Recognition Example -

i using tri-axis accelerometer capture movements of hand. while coming through existing solutions, found fastdtw suitable 1 identifying patterns of time series data set. came across following libraries. https://code.google.com/p/fastdtw/ https://github.com/cscotta/fastdtw/tree/9322f2a74c96f9c38f253c702a57dd23a16cf777 i'm new , want know, whether there useful examples use start playing that. want give accelerometer singals input , identify pattern represent particular movement. highly appreciate if provide useful code example this. thank you. yes, dtw algorithm should work, getting consistent readings hard part.

html - Svg Tag Horizontal Gap -

i have 2 elements display side side. http://jsfiddle.net/m7y8h7wf/ <div style="background-color:#000000;font-size:0;padding:10px;"> <svg version="1.1" width="50" height="1"> <g stroke="white" > <line x1="50.5" y1=".5" x2=".5" y2=".5" stroke-width="1" shape-rendering="crispedges" /> </g> </svg> <svg version="1.1" width="50" height="1"> <g stroke="white" > <line x1="0.5" y1=".5" x2="50.5" y2=".5" stroke-width="1" shape-rendering="crispedges" /> </g> </...

c# - Get rid of extra \ in DataContractSerializer -

i have wcf process xml , returns response(as xml) client. method return response. public string processxml(commonlibrary.model.transferdata dto, bool authenticated) { datacontractserializer dcs = new datacontractserializer(typeof(responseback)); memorystream ms = new memorystream(); utility.utilities utl = new utility.utilities(); string xmlerrmessage = string.empty; if (authenticated) { if (!string.isnullorempty(dto.xml)) { xmlerrmessage = utl.validatexml(dto.xml, xsdfilepath, currentschema); if (string.isnullorempty(xmlerrmessage)) { dcs.writeobject(ms, new responseback() { statuscode = 101, statusdescription = "success" }); ms.position = 0; } else { dcs.writeobject(ms, new responseback() { statuscode = 201, statusdescription = ...

documentation - Can doxygen be used to document makefile templates and include *.mk file interfaces? -

Image
we have number of makefile templates, realize build actions setting few parameter makefile variables, , applying makefile template via inclusion generic_param1-y := parama generic_param2-y := paramb include $(make_tools)/doaction.mk and files doaction.mk contain make templates generate standard rule definitions applied when including action make step. now want document these interfaces *.mk snippets using doxygen like ## @file ## @brief doaction.mk purposed ... ## ## more detailed descriptions rules applied ... ## @param generic_param1-y parameter1 description ... ## @param generic_param2-y parameter2 description ... is there simple way achieve using valid doxygen syntax/configuration? "is there simple way achieve using valid doxygen syntax/configuration?" yes, can use doxygen's input_filter , file_patterns , filter_source_files configuration settings as stolen blog post put these settings in doxyfile configuration file_patterns = *...

three.js - Import Zip Files -

i'm using obj format, obj heavy download it, reason, upload obj files in zip, then, viewer unzip , call function objloader. know what's best way it? thanks, rafa problem solved : 1) add jszip script page 2) goto objmtlloader.js (about line 33) , place these 10 lines uncompress zip (assuming file.zip contains file.obj) inside loader.load function loader.load( url, function ( text ) { if (url.split('/').pop().split('.')[1] == 'zip'){ //- uncompress url e.g. http:// .... / ptero.zip -> ptero.obj - // zip should contain 1 file ! // uncompression object var new_zip = new jszip(); // uncompress new_zip.load(text); // single file name convention filename = url.split('/').pop().split('.')[0] + ".obj"; // file content t...

java - Spring - migrate from DAO-Service architecture to JPA -

i have web mvc written using spring. used separate dao , service classes. my old code: @repository public class roledaoimpl implements roledao { ... } @service @transactional public class rolemanagerimpl implements rolemanager { ... } @controller public class homecontroller { @autowired private rolemanager rolemanager; ... } now try spring jpa. can't rewrite testing project dao-service spring jpa. there project source on github https://github.com/martin159/springjpa after run project following error: warn : org.springframework.web.context.support.xmlwebapplicationcontext - exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.beancreationexception: error creating bean name 'entitymanagerfactory' defined in servletcontext resource [/web-inf/spring-servlet.xml]: invocation of init method failed; nested exception java.lang.illegalargumentexception: no persistenceprovider specified in entitym...

github - Caused by: java.lang.ClassCastException: org.apache.hadoop.io.LongWritable cannot be cast to org.apache.hadoop.io.Text -

i trying compile following github project https://github.com/digitalpebble/behemoth/tree/master/uima i following error java.lang.classcastexception: org.apache.hadoop.io.longwritable cannot cast org.apache.hadoop.io.text code has following output key , value class defined. behemothdocument custom class defined job.setinputformat(sequencefileinputformat.class); job.setoutputformat(sequencefileoutputformat.class); job.setmapoutputkeyclass(text.class); job.setmapoutputvalueclass(behemothdocument.class); job.setoutputkeyclass(text.class); job.setoutputvalueclass(behemothdocument.class); map class looks below public class uimamapper extends mapreducebase implements mapper<text, behemothdocument, text, behemothdocument> { and map function follows public void map(text id, behemothdocument behemoth, outputcollector<text, behemothdocument> output, report...

javascript - how to set certain column unclickable -

i have 20 columns in table , managed rows in table clickable. possible set first column until fifteenth not clickable. below code. $('#cdctracking-list tr td:not(:nth-child(1))').click( function () { //....rest of code }); firstly, when dealing table want click event on each cell, it's better use delegated event. because there 1 event handler (which on table) instead of 1 handler every td element. secondly, achieve need can inspect index() of clicked cell determine column. try this: $('#cdctracking-list').on('click', 'td', function () { if ($(this).index() > 15) { // something... } }); example fiddle

ios - xcode 6 simulator app Documents folder is inconsistent is there a fix? -

i have noticed big issues xcode 6. app data folder keeps switching , there couple of copies out there. don't know why xcode doing it's troublesome. big issue when start app looks @ 1 folder , another, if had saved data in data folder, data inconsistent between two. i use simpholders2 app find these folders. quite challenge already. question is, there safe , secure way save data in simulator make sure stays consistent?

Error inflating class android.support.v7.widget.Toolbar -

i trying use toolbar (android.support.v7.widget.toolbar) navigation drawer. shows exception "error inflating class android.support.v7.widget.toolbar". code working fine if don't use android.support.v7.widget.toolbar in xml. activity extending android.support.v7.app.actionbaractivity . here main_activity.xml <!-- main content view, view below consumes entire space available using match_parent in both dimensions. --> <framelayout android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" > <linearlayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <!-- use toolbar our drawer can displayed in front of action bar --> <android.support.v7.widget.toolbar ...

matlab - Is it possible that adding noise to a signal can increase detection possibility? -

i simulating feature detector in noisy environment consist of awgn noise , impulsive noise. getting strange result signal impulsive+awgn noise has better detection probability signal awgn. know wrong @ point. how possible signal more noise impulsive noise has better detection possibility. please share experience. yes, possible in case of stochastic resonance ( http://en.wikipedia.org/wiki/stochastic_resonance )

Spring Managed Schedulers Status -

is there way check list of schedulers managed in spring application context? have application have configured quartz scheduler , want check whether scheduler active ( not mean scheduler executing job). checking whether web resource active calling url of web resource , checking response (200 or 404). thanks. depending on needs may 1 of following: if need check during application startup, can check logs. quartz logs when starts. need configure logger have "org.springframework.scheduling.quartz" namespace logged in debug mode to check anytime if scheduler started, can use quartz jmx capabilities. enable adding "org.quartz.scheduler.jmx.export = true" in quartz properties file. can open jconsole targeting application, , when opens, there available "quartz" node underneath find various attributes , operations. first 1 "started" true if scheduler started asked, there many others too if not know how open jconsole, consult sun's...

c# - Calculate rotation acording to drag of one edge -

Image
my code in c# (silverlight) might have nothing it. i'm trying rotate element draging 1 of edges. in event got dx , dy values tried calculate vector rotation center drag start , other 1 center new location, , calculate angle between vectors, didn't work. correct way such thing? edit: mbo asked code try calculate angle between 2 vectors. lets v[vx, vy] vector rotation center draged edge, vc[vcx, vcy] vector of drag change. third vector v1[v1x, v1y] rotation center 'new' location of draged edge. normv = math.sqrt(vx * vx + vy * vy) normv1 = math.sqrt(v1x * v1x + v1y * v1y) vv1 = vx*v1x+vy*v1y // dot product of v , v1 vectors // fi angle shoudl fi = math.acos(vv1 / (normv * normv1)) your code gives angle in half-range 0..pi, necessary add angle sign cross product. let's (x0,y0) - initial captured point, (x1,y1) - after dragging, (cx, cy) - rotation center. dx0 = x0-cx dy0 = y0-cy dx1 = x1-cx dy1 = y1-cy rotationangle = math.atan2(dx0 * dy1 - dx...

Intervention image aspect ratio -

i want resize images through intervention image functionality in laravel 4, keep aspect ratio of image, code looks like: $image_make = image::make($main_picture->getrealpath())->fit('245', '245', function($constraint) { $constraint->aspectratio(); })->save('images/articles/'.$gender.'/thumbnails/245x245/'.$picture_name); problem doesn't keep aspect ratio of image, thanks. if need resize within constraints should use resize not fit . if need center image inside constraints, should create new canvas , insert resized image within that: // generate image transparent background // if need have background can pass third parameter (e.g: '#000000') $canvas = image::canvas(245, 245); $image = image::make($main_picture->getrealpath())->resize(245, 245, function($constraint) { $constraint->aspectratio(); }); $canvas->insert($image, 'center'); $canvas->save('images/articles/'...

python - Grabbing RGB values from a colorless pictures data (PIL) -

i need know if it's possible grab images rgb values it's (get)data if it's colorless. have piece of code looks (np=numpy): image image = image.open(path) n, m = image.size data = np.array(image.getdata()) r = np.zeros(n*m, dtype=np.float) g = np.zeros(n*m, dtype=np.float) b = np.zeros(n*m, dtype=np.float) x in range (0, n*m): rgb = data[x] r[x] = rgb[0] g[x] = rgb[1] b[x] = rgb[2] this lets me grab rgb-values. works color pictures, black/white pictures crashes when tries set r[x]. error: indexerror: invalid index scalar variable this error thrown @ line r[x] = rgb[0] you use: img = image.open(path) layeredimg = img.convert('rgb') you before converting numpy array. can find more info the docs pil.image (strictly speaking pillow, fork of pil). if want condtionally(i.e. if want use same code b/w , color images) this: img = image.open(path) if img.layers == 1: img = img.convert('rgb')

angularjs - Understanding what it takes to remove the hash # from angular routes -

before removing hash sign, had mainapp.config(function ($locationprovider, $routeprovider) { $routeprovider .when('/page', { controller: 'page', templateurl: 'templates/page.html' }) .when('/main', { controller: 'main', templateurl: 'templates/main.html' }) .otherwise({ redirectto: '/main'}); //$locationprovider.html5mode(true); }); and these worked fine http://localhost:8080/index.html#/main http://localhost:8080/index.html#/page after removing pound sign, added index.html <base href="/"> <script src="/vendor/bootstrap-dist/js/bootstrap.min.js"></script> <script src="/vendor/javascript/angular/angular.js"></script> <script src="/vendor/javascript/angular/angular-route.js"></script> <script src="/vendor/javascript/angular/ui-bootstrap-tpls-0.11.2.min.js">...

javascript - Strange behavior angularjs returning "TypeError: Cannot assign to read only property" -

i'm facing strange behavior angularjs. .factory('configservice', function($http){ var base = 'http://harold:pituca521zkjoidksjdiiqudjsdh120@localhost:3000/configuration/'; var getconfig = function(){ return $http.get(base + 'config'); }; var setconfig = function(config){ return $http.post(base + 'update', config); }; return { getconfig: getconfig, setconfig: setconfig }; }) .controller('configurationcontroller', function($scope, $http, $window, configservice){ $scope.config = {}; configservice.getconfig() .success(function(data, status, headers, config){ console.log(data); $scope.config = data; }); $scope.saveconfiguration = function(config){ configservice.getconfig(config) .success(function(data, status, headers, config){ $window.location.reload(); }); }; }); when co...

c# - Ignore a property in AutoMapper? -

i'm using automapper copy 1 object properties other , later update in database using ef. question how tell automapper copy every property ignore particular property (in case id). i'm new automapper , have done code. don't have other configurations or use of automap in project. mapper.map(lead, existinglead); i have downloaded automapper form here https://github.com/automapper/automapper on mapper.createmap<type1, type2>() can use either .forsourcemember(x => x.id, opt => opt.ignore()) or .formember(x => x.id, opt => opt.ignore())

jquery - How to display div next to table row? -

i have table displaying data query. right when click on #emp_namefirst# shows me #emp_cell# display on bottom of table. how can display div next table row click on #emp_namefirst#? <script language="javascript"> $(document).ready(function() { $('a').click(function () { //var statename = $(this).prop("detail"); var statename = $(this).attr("detail"); $('#maintext').show(); $('#output').html(statename); }); }); </script> <table class="table table-hover table-bordered table-sieve" > <thead><th >name</th><th >department</th></thead> <tbody> <cfloop query="corporate" > <cfoutput> <tr> <td ><span style="cursor:default"><a id="showdata" detail="cell: #emp_cell# ...

selenium webdriver - Chromedriver extension id does not match key in manifest.json -

i testing chrome extension using selenium webdriver.js , chromedriver. i've been able launch chrome, extension installed, extension id randomly generated instead of matching key property of manifest.json. makes impossible test extension pages options page. manifest.json // ... "key": "pjnhffdkdckcagdmfmidafhppbomjdjg", // id chrome web store // ... test.js var webdriver = require('selenium-webdriver'); var chrome = require('selenium-webdriver/chrome'); // load unpacked extension var chromeoptions = new chrome.options(); chromeoptions.addarguments('load-extension=/path/to/my/extension'); var service = new chrome.servicebuilder().build(); var driver = chrome.createdriver(chromeoptions, service) // page not available t_t driver.get('chrome-extension://pjnhffdkdckcagdmfmidafhppbomjdjg/html/options.html'); my assumption extension id match key (and when installing web store), not seem true loading extension via chromedr...

VB.net Datagridview, bind combobox with different datasources -

Image
i'm having hard time figuring out how bind items datasource in each row in each combobox in datagridview. basically, have 3 columns, 1st , 2nd rows texts while third row combobox. 1st row question category 2nd row question 3rd row answer each question the answer varies per question, that's why answer set combobox. this i've got far.. for each question crm.domain.entities.campaigndb.campaignquestion in questions 'get question category questioncategorystr = questioncategory.find(function(column) column.questioncategoryid = question.questioncategoryid) 'filter answers answerstr = answers.findall(function(column) column.campaignquestionid = question.campaignquestionid) dim dgvcc new datagridviewcomboboxcell dgvcc .datasource = answerstr .valuemember = "campaignanswerid" .displaymember = "answer" end 'this add rows question category , question, dgvsurveyque...

java - Add dynamic data to onClickListener of TextViews in Table Layout -

i have made dynamic table rows 2 textviews in each row different id (local variable in java file - see code). want open activity image name using same id of textview.(which can send using intent) but first, tried print toast same id assigned textview. // java code int id = 3; (int = 1; <= 3; i++) { tablerow row = new tablerow(tableactivity.this); // add layouts new row textview txt1 = new textview(tableactivity.this); txt1.settext("" + id); txt1.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub toast.maketext(getapplicationcontext(), "" + id, toast.length_short).show(); } }); id++; textview txt2 = new textview(tableactivity.this); txt2.settext("" + id); id++; row.addview(txt1); ...

c# - Owin use external forms authentication cookie -

so think issue going have 1 mvc website using standard forms authentication , 1 mvc geared more towards asp.net identity. what trying configure owin authentication read , accept auth cookie generated standard mvc forms auth site. configured below can't seem owin accept cookie. app.setdefaultsigninasauthenticationtype(defaultauthenticationtypes.externalcookie); app.usecookieauthentication(new cookieauthenticationoptions { authenticationtype = defaultauthenticationtypes.externalcookie, authenticationmode = authenticationmode.active, loginpath = new pathstring("/account/login"), cookiehttponly = true, cookiename = "myauthcookie", cookiedomain = ".mydomain.com", cookiepath = "/", provider = new cookieauthenticationprovider { // enables application validate security stamp when user logs in. // security feature used when change password or add external login account. onvalidateid...

android displaying multiple activity in saved state when notification click -

i have notification on app. works in foreground well. when i`m in other activity , press home button after click notification. opens given activity, need display previous activity in saved state. notification note = new notification(r.drawable.service_state_0, getresources().gettext(r.string.servicestarted), system.currenttimemillis()); intent = new intent(this, startingactivity_.class); i.setflags(intent.flag_activity_clear_top | intent.flag_activity_single_top); pendingintent pi = pendingintent.getactivity(this, 0, i, 0); note.setlatesteventinfo(this, getresources().gettext(r.string.app_name), getservicestatedescription(customservice.this), pi); note.flags |= notification.flag_no_clear; note.flags |= notification.flag_ongoing_event; startforeground(contextconstants.launcher_service_note_id, note); it shows startingactivity, question how call resuming activity when notification clicked. if a...

Angularjs test if scope variable is undefined or null -

my code controller: app.controller('testctrl', function ($scope, $http) { console.log("ctrl started"); if (angular.isdefined($scope.test)) <--------------- error { alert('undefinita'); loaddefault(); }; my html <select class="form-control" ng-options="people.id people.name people in peoples" ng-model="test" ng-change="loadanotherselect()"> <option value="">seleziona azienda...</option> </select> how know if test variable undefined???? thank's in advanced your code seems fine, error getting? as can see, code works, using angular.isdefined($scope.name) : var app = angular.module('plunker', []); app.controller('mainctrl', function($scope) { $scope.name = 'world'; if (angular.isdefined($scope.name)) { alert($scope.name); } }); <script src="https://ajax.goog...

android - This JSON object cannot be converted to JSON array -

i have tried , can't covert json object json array, throws json exception here logcat: 11-13 11:19:53.964: w/system.err(8642): @ org.json.json.typemismatch(json.java:111) 11-13 11:19:53.964: w/system.err(8642): @ org.json.jsonarray.(jsonarray.java:91) 11-13 11:19:53.964: w/system.err(8642): @ org.json.jsonarray.(jsonarray.java:103) here json file: {"getgisresult":[{"active":true,"categoryid":1,"createdate":null,"createuser":null,"description_ar":"التا","description_en":"هعلل","email":"لتتالت","lat":30.0764857,"long":31.30658,"mobile":"تالتال","sectionid":9,"sectionname_ar":"1","sectionname_en":"لاتا","updatedate":null,"updateuser":null},{"active":true,"categoryid":1,"createdate":null,"createuser...

ruby on rails - how to update DELAYED_JOB_ACTIVE_RECORD gem? -

in current project using delayed_job(4.0.4) , delayed_job_active_record(4.0.0) gems. want update delayed_job_active_record gem latest version. i checked official doc can upgrade delayed job using following command not delayed_job_active_record rails g delayed_job:upgrade. please let me know how need upgrade delayed_job_active_record gem. in gemfile add gem '#gem_name', '#gem_version' eg. if earlier was gem 'delayed_job_active_record', '4.0.0' change to gem 'delayed_job_active_record', '4.0.4' after run: bundle install

linux - Extracting %CPU usage from VMSTAT in a file -

i tried "vmstat > file.txt" -->works fine , output comes file. when tried extract column cpu ie "vmstat 5 | awk '{print $13}' > file.txt" -->didn't work , no output being written. how can extract column cpu usage file ? i had couple of problems. first vmstat columns can garbled if not use -w switch. secondly used cut data, buffering, had include stdbuf in command disable buffering vmstat 5 -w | stdbuf -o0 cut -c84- > file.txt

Spring + Thymeleaf + ElementProcessor + @autowired not working -

i trying use @autowired within elementprocessor. ( http://www.thymeleaf.org/doc/extendingthymeleaf.html#some-reasons-to-extend-thymeleaf ) @configurable(dependencycheck = true) public class auditlogelementprocessor extends abstractmarkupsubstitutionelementprocessor { @autowired(required = true) documentservice docservice; but somehow object docservice null. code definetely working. tried ltw , working exact same code(but i'm not allowed use ltw). do have ideas how can inject service elementprocessor? thanks! answer: found out myself. problem elementprocessor not access services because processors created when needed. solution: autowire services need in dialect (that creates processors) , pass services parameters processors. it works way

ios - ReloadData not working in my TableViewController -

good afternoon, i'm trying display data in uitableviewcontroller (cartableviewcontroller) , @ moment rows being populate correct info , refreshcontrol working fine (and fast, 1 second) first time entry in app data not displayed (i have move screen finger , data displayed). (i have wait +15 seconds until appears automatically, not showing). what can in order display data automatically , fast? i tried move reloaddata every method , it's same , don't know else do...! appreciated if can me that. cartableviewcontroller.m #import "cartableviewcontroller.h" #import "cartableviewcell.h" #import "cartableviewcontroller.h" #import "cardetailviewcontroller.h" #import <sdwebimage/uiimageview+webcache.h> @implementation cartableviewcontroller @synthesize carmakes = _carmakes; @synthesize carmodels = _carmodels; @synthesize carimages = _carimages; @synthesize likes = _likes; @synthesize comments = _comments; @synthesize us...