Posts

Showing posts from February, 2013

python - django-nonrel for AppEngine on Windows -

i'm having trouble should relatively simply- getting django-nonrel project off ground on windows machine. have downloaded , unzipped required files http://djangoappengine.readthedocs.org/en/latest/installation.html , added required modules projects root folder c:\djangoapp, such folder hierarchy (note each module contains correct files, , have been omitted sake of brevity) djangoapp/ autoload/ dbindexer/ django/ djangoappengine/ djangotoolbox/ now when cd c:\djangoapp, need know command run. given command: pythonpath=. python django/bin/django-admin.py startproject \ --name=app.yaml --template=djangoappengine/conf/project_template myapp . is *nix os , won't work on windows. doing, python django/bin/django-admin.py startproject \ --name=app.yaml --template=djangoappengine/conf/project_template myapp returns error: traceback (most recent call last): file "django/bin/django-admin.py", line 2, in <module> django.core impo

send and receive a file in python sockets -

this has part been answered here have been trying modify server (to send) , client (to receive) feedback server upon receipt of entire file. below client server code; presently both client , server hang. ie. indefintely go "busy" state (both client , server nothing, until ctrl-c on server reports failure here "l = sc.recv(1024)" , ctrl-c on client reports failure here "reply =s.recv(1024)") import socket import sys s = socket.socket() s.bind(("localhost",3000)) s.listen(10) i=1 while true: sc, address = s.accept() print address f = open('tranmit.jpg",'wb') #open in binary l = 1 while(l): l = sc.recv(1024) while (l): f.write(l) l = sc.recv(1024) f.close() sc.send("received") # send response sc.close() s.close() ------------------------------------------------------------ #client s = socket.socket() s.connect(("localhost"

ios - Populate a UITableView with videos in my Vimeo account -

how can populate uitableview videos in vimeo account using swift? i haven't tried yet since don't know start. start looking through documentation: vimnetworking sample app code can found here: pegasus after authenticate , connect, make api call grab videos, display them json response uitableview. (there plenty of tutorials on how populate uitableview json response (etc)...

Weird Function Object Behavior in Scala - Mutable Function Variables are Resetting -

this functor represents act of moving associated (mutable) x-position , y-position: final class moving(var xpos: int, var ypos: int) extends function2[int, int, unit] { override def apply(dx: int, dy: int): unit = { xpos += dx ypos += dy println("xpos: " + xpos + " ypos: " + ypos) } } the problem not behave expected. when run code: def move = new moving(0, 0) def main(args: array[string]) { move.apply(1,1) move.apply(2,2) move.apply(3,3) } i output: xpos: 1 ypos: 1 xpos: 2 ypos: 2 xpos: 3 ypos: 3 the x-position , y-position appear going initial value before being modified. want output this: xpos: 1 ypos: 1 xpos: 3 ypos: 3 xpos: 6 ypos: 6 why isn't function behaving expected? * solution * val motion = new moving(0, 0) def move = motion // returns function object def main(args: array[string]) { move.apply(1,1) move.apply(2,2) move.apply(3,3) } it's because declare move

r - ggplot2: Save individual facet_wrap facets as separate plot objects -

Image
i big fan of facet_wrap . though fast split big data frame , plot several plots , explore within r, it's not best tool presenting in paper or power point. find myself wasting lot of time scales, binwidths , font sizes , modifying on inkscape plot. sometimes subset data frame many data frames , plot individually each one. later join them multiplot or hand. i wondering if there might way of making ggplot call in same way (one big df factor column used faceting) or way make ggplot read list-like data frame separated faceting factor. ideal output should multiple single plots i'll edit later on inkscape (and use free_y scales make less painful) to clear, df<-mtcars ggplot(df,aes(df$mpg,df$disp,color=factor(cyl)))+ geom_point(aes(df$mpg,df$disp))+ facet_wrap( ~cyl) produces 1 plot. desired output in case 3 plots, 1 each facet. you can use lapply create list 1 plot each value of cyl : # create separate plot each value of cyl, , store each plot in

javascript - Parsing JSON array into Google Charts DataTable -

i've done quite bit of searching , have found solutions issues similar problem nothing has worked far. appreciated. i attempting create google line chart data querying database , parsing json. query , json looks when insert datatable web page blank. this json output have: [["date","percentage"],["0000-00-00 00:00:00",28.18],["2015-01-06 06:00:01",93.65],["2015-01-07 06:00:01",85.9],["2015-01-08 06:08:43",89.25],["2015-01-09 06:08:42",99.26],["2015-01-10 14:50:37",99.48],["2015-02-06 06:00:01",93.88],["2015-02-07 06:00:01",89.15],["2015-02-08 06:08:51",89.55],["2015-02-09 06:09:25",98.94],["2015-02-09 17:26:50",98.94],["2015-02-10 06:10:55",99.06],["2015-03-07 06:11:32",85.7],["2015-03-08 06:07:58",89.86],["2015-03-10 06:11:04",99.06],["2015-04-06 14:19:26",82.17],["2015-04-07 06:11:47"

jquery - Javascript array elements not being displayed in div tag -

i've created program reads json data concert event. json file has 1 object named global has band name , venue. there tickets object containing of available tickets concert, getting ticket price, section, , row (for seats). when using console.log() print out specific attributes parsed json, getting correct output. have function reads parsedjson object different arrays (one ticketinfo , general event info). in function, use jquery functionality add contents of arrays div on page, nothing being displayed when page loads. i'm new jquery have simple mistake causing problem can tell code wrong? the relevant code below: <div id="container"> container div </div> <script> var concertdata = {}; var eventinfo = {}; var ticketinfo = {}; function makeinvite() { var metainfo = concertdata['global'][0]; eventinfo['venue'] = metainfo['maptitle']; eventinfo['band'] = metainfo['productionname']; (var

c++ - program_options - "invalid option value" when has to read array from file -

i'm trying read array configuration file shows message: " in option 'param_array': invalid option value ". the topic doesn't helps me because reads array command line. the code (only important lines) this: typedef boost::numeric::ublas::bounded_vector<double,6> vec6; po::options_description parameters("options"); parameters.add_options() ("param_array", po::value< vec6 >(&configparameters.param_array), "parameters array comment") ; then have lines too: po::options_description config_file_options; config_file_options.add(parameters); // parser command line options po::variables_map vm; po::store(po::command_line_parser(ac, av). options(cmdline_options).run(), vm); po::notify(vm); // verify if config file passed option if (vm.count("config")) { const std::vector<std::string> &config_files = vm["config"].as< std::vector<std::string> >();

C++ Entering Multiple Values into Element of 2D Array -

my question regarding entering information elements of array. have created [2][3] array , attempting add age, id, , salary each element of array. bottom of code tried setting values in first element of array , underlines "employeearray" , says expression must have value type. setting values correctly wondering if missing of initialization, pointer, etc somewhere else in code. attached complete code below class employee { private: int age; int id; float salary; public: employee() { age = 0; id = 0; salary = 0; } void setage(int x) { age = x; } void setid(int x) { id = x; } void setsalary(float x) { salary = x; } int getage(); int getid(); float getsalary(); }; int employee::getage() { return age; } int employee::getid() { return id; } float employee::getsalary() { return salary; } int main() { const int rows = 2; const int columns = 3; int employeearray[rows][columns]; employeearray[0][1].setage(30);

c# - Cast IDbSet<Foo> to IDbSet<dynamic> -

i have utility method looks this void apply<t>(iqueryable<t> queryable) t : class {...} i doing reflection instance of idbset<x> know x fits constraints. i'd cast idbset<dynamic> compiler let through doing dbset ibset<dynamic> returns null. how can this? i realize cast whole thing dynamic there few other reasons prefer avoid doing that.

c++ using functions within functions -

i new c++ working on project dealing doing different operations sets , 1 of them prints out if set finite. sos object being used stands set of strings , has vector of strings , boolean data members. created function check if set finite , trying call in print function keep getting error saying "no member named "isfinite." heres have, appreciated. void sos::print() const{ if (m_vos.isfinite() == true){ (int = 0; < m_vos.size(); i++){ cout << m_vos[i]<< endl; } } else{ cout << "complement of:"<< endl; (int = 0; i< m_vos.size(); i++){ cout << m_vos[i]<< endl; } } } bool sos::isfinite() const{ if (isfinite(m_vos.size()){ return true; } return false; } the problem attempting call sos::isfinite() on std::vector<std::string> ( m_vos ). std::vector has no such member. can call sos::isfinite() on object of

Excel output from an Access query to include an excel formula in the cell -

i have database query results saved excel file. once there, need add column , insert formula make interactive worksheet. is there way of having formula created in data base output? note not want results entered. want excel formula in cell. example in 1 cell enter =iferror(today()-i14+1,0) results in excel spreadsheet change base on date information viewed. use cell formula property dynamically add formula: range("a1").formula = "=text(now(),""mmm dd yyyy"")" ref: https://msdn.microsoft.com/en-us/library/office/ff838835.aspx

qmake adds '-g' flag to compile under redhat 6 -

i have bash script compiles program or without symbols based on flag. first makes makefile 1 of these commands $qmake -makefile config-=release config+=debug $basedir/project/myproj.pro $qmake -makefile config-=debug config+=release $basedir/project/myproj.pro this works fine under fedora, under redhat 6 notice makefile has -g parameter added compiler option. (regarless of of above commands issue). under rh6 latter line produces: cflags = -pipe -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -o2 -wall -w -d_reentrant -fpie $(defines) while under fedora 20 produces: cflags = -pipe -o2 -wall -w -d_reentrant -fpie $(defines) can explain why qmake produces different makefiles under 2 versions of linux, , how fix this? (so latter command not add -g parameter compiler)

Jquery loop through each cart and grab the data of its class -

i have class called cartrow , contains classes title, session, date, etc , i'm trying grab each of data individually, why includes index such __0 or __1 or __2 assigned it. can jquery expert assist me can individually alert data? <div class="row cartrow"> <div class="col-xs-12 cartitemheader"> <h3 class="title__0">hello world 1</h3> </div> <div class="col-xs-12 cartitemdetail"> <div class="col-xs-7 col-sm-5"> <div class="row no-gutter"> <div class="col-xs-12"> <span class="session__0">fall</span> </div> <div class="col-xs-12"> <span class="dates__0">november</span> </div> <div class="col-xs-12">

java - SQL Variable not returning the correct sum -

i have 3 variables in current report writing , variables -total wo -total -grand total the totalwo , totalso variables correctly adding quantity parameters being passed ever reason when make grandtotal variable , pass variable expression: ($v{totalwo_qty} + $v{totalso_qty}) when report prints displays 3 variables this" total wo: 352 total so: 1009 grand total: 16421 i can't figure out why doing beacuse in grandtotal variable expression i'm passing , adding 2 variable. if me figure out please let me know. thank you! i can post code like also using ireports write these reports @amir in comments helped me figure out (indirectly). issue 'increment type' wo , totals needed set 'none' , grand total needed set 'column'. before grandtotal variable set 'increment type: none'. still not sure why has way know working now. what helpe me amir's wording saying "probably it's accumulating rather displaying last val

responseXML.xml empty string after POSTing to WCF Service -

i calling wcf service in following way: dim soapresponse, soaprequest, serviceurl, strresult serviceurl = "https://api.mydomain/services/myapiservice.svc" set soaprequest = server.createobject("msxml2.serverxmlhttp.6.0") soaprequest = "this xml gets built" dim oxmlhttp : set oxmlhttp = createobject("msxml2.serverxmlhttp.6.0") oxmlhttp.setoption 2, 13056 oxmlhttp.open "post", serviceurl, false oxmlhttp.setrequestheader "content-type", "application/soap+xml; charset=utf-8; action=""http://tempuri.org/imyapiservice/insertperson""" oxmlhttp.setrequestheader "content-length", len(soaprequest) oxmlhttp.setrequestheader "soapaction", "http://tempuri.org/imyapiservice/insertperson" oxmlhttp.send soaprequest the soaprequest builds valid soap envelope, , posts server. issue when post service, xmlhttp.responsetext valid , contains soap reply, xmlhttp.responsexml.xml

android - How To Create AppWidget to display JSON Parse Images and Text -

i'm new android development , don't understand how create appwidget application parse json data , display in list. i solved problem using link ( https://laaptu.wordpress.com/2013/07/19/android-app-widget-with-listview/ ). it has series of tutorials (1.app widget listview 2.populate app widget listview data web 3.download images , show on imageview of appwidget listview 4.setting update interval on appwidget listview 5.how make appwidget update work after phone reboot) to use simple json url fetch images , texts, made following changes in remotefetchservice.java third tutorial, import java.util.arraylist; import org.json.jsonarray; import org.json.jsonexception; import org.json.jsonobject; import android.app.service; import android.appwidget.appwidgetmanager; import android.content.intent; import android.graphics.bitmap; import android.os.asynctask; import android.os.ibinder; import android.util.log; import com.androidquery.aquery; import com.androidquery.

Spark: How to kill running process without exiting shell? -

how can kill running process in spark shell on local osx machine without exiting? for example, if simple .count() on rdd, can take while , want kill it. however, if ctrl c kills whole shell. is there way kill process not shell? you can use master web interface kill or visualize job. find other things there log file or cluster working chart...

java - I want to add a header to Http Response, based on the Http Status code in Spring MVC -

i have add cache-control headers rest api designed in spring mvc, based on http response code. if response code 200, add header else dont add. i dont want client cache response, in case not 200. it's not possible in filters/interceptors, response committed controller, can't change response state. is there other way add header after controller? you can extend org.springframework.web.filter.onceperrequestfilter add cache-control header. public class cachecontrolheaderfilter extends onceperrequestfilter { @override protected void dofilterinternal(httpservletrequest request, httpservletresponse response, filterchain filterchain) { // add header here based on response code } } declare filter spring bean in configuration. <bean id="cachecontrolheaderfilter" class="*.*.cachecontrolheaderfilter" /> plugin filter in web.xml: <filter> <filter-name>cachecontrolheader

chart.js - Load ChartJS via VueJS - ChartJS empty and 0px dimension -

alright, trying create chartjs instance via vuejs update data via ajax requests inside component. basically working, chartjs instance gets created empty , has height , width of 0 , when resize via console still empty. so best way of creating "chartjs component" vuejs or fault in code below? the basic way want load chart this. <chart :resource="'https://httpbin.org/get'"></chart> this basic component var vue = require('vue'); vue.component('chart', { template: require('./template.html'), props: ['resource'], data: function() { return { startingdata: {}, latestlabel: {}, } }, ready: function() { // here load js data , set startingdata }, }); this directive use pass down data component. way this.el can context of it vue.directive('loaddata', function(value) { var startingdata = { labels: [1, 2, 3, 4,

eclipse - Java : convert a String to Int (Unknown Source) -

this question has answer here: how convert string int in java? 31 answers integer.parseint(“9999999990”); [duplicate] 2 answers in java try convert string value integer, removing 4 last characters, tried : string filename1="98597598684.txt"; int id = integer.parseint(filename1.substring(0, filename1.length()-4)); but error, , don't understand why : java.lang.numberformatexception: input string: "98597598684" @ java.lang.numberformatexception.forinputstring(unknown source) it's sthg simple makes me crazy since 1 hour, idea? 98597598684 greater integer.max_value . use long id = long.parselong(filename1.substring(0, filename1.length() - 4));

encryption - Need help implementing key management scheme -

scheme has following requirements client application should perform encryption/decryption using component 1, component 2 , zpk (zone pin key. client should key host in encrypted form). host application should perform encryption/decryption using key mk (master key formed component 1 , component 2) , zpk. here how i'm generating components online-auth>gc enter lmk id [0-2]: 0 enter key length [1,2,3]: 2 enter key type: 002 enter key scheme: u clear component: **** **** **** **** **** **** **** **** encrypted component: uxxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx key check value: xxxxxx online-auth>gc enter lmk id [0-2]: 0 enter key length [1,2,3]: 2 enter key type: 002 enter key scheme: u clear component: **** **** **** **** **** **** **** **** encrypted component: uyyyy yyyy yyyy yyyy yyyy yyyy yyyy yyyy key check value: yyyyyy online-auth>fk enter lmk id [0-2]: 0 enter key length [1,2,3]: 2 enter key type: 002 enter key scheme: u enter component type [x,h,t,

arrays - How to create a javascript function that output a list of object with a list of the object's property? -

i have piece of javascript looks following var set = [{ name: 'a', property1: '', property2: '', }, { name: 'b', property1: '', property2: '', }, { name: 'c', property1: '', property2: '', }]; since property1 , property2 both empty objects, want automate such need keep track of name. like: namelist = ['a', 'b', 'c']; magicfunction(namelist); that magicfunction can return set mentioned above. new javascript, if think rudimentary stackoverflow, please give me few keywords know should searching for. thanks! you can use map to set namelist var namelist = ['a', 'b', 'c']; var set = namelist.map(function(e) { return { name: e, property1: 0, property2: 0 }}); function magicfunction(arr) { return arr.map(function(e) { return { name: e, property1: 0, property2: 0 } }); } var namelist

php - Returning a View from a Model in Laravel 5 -

my controller creates instance of class, soapwrapper.php , contains function retrieves data web service. web service allows gather 100 records per query, finding out total number of records query , looping , calling web service query every 100 records data. to give kind of feedback user request being processed (a loading screen of sorts), return view displays html box text says loading record x of y , y total number of records, , x updated @ each iteration of loop. here current model , soapwrapper.php : <?php namespace app\models; use soapclient; use illuminate\http\redirectresponse; use redirect; class soapwrapper { // soap exchange wos authentication public $auth_client; public $auth_response; // soap exchange wos search public $search_client; public $search_response; // number of records found public $len; // xml data send soap request wos public $data; // array store records public $records = []; // function it

php - Twitter User Time Line Feed using date parameter -

i working on sentiment analysis need twitter feed. have implemented php code json feed , parse wanted. problem not find way json feed per date specified. $query = array( 'screen_name' => 'twitterapi', 'count' => '5' ); using above syntax have specify number of tweets requirement feed specific date. possible pass date parameter instead of count. using $path = '/1.1/statuses/user_timeline.json'; i have implemented mechanism manually filter date have provide large count older dates unnecessarily slows down code. there 2 ways can this. firstly, read documentation api call you're making. can't pass date - can request 200 tweets and, if isn't enough, page through 3,200 of recent tweets. secondly, read documentation searching twitter , can use until parameter search older tweets. twitter's search api goes ~7 days. say: please note twitter’s search service and, extension, search api not mea

javascript - how to delay a jquery hover event -

i trying delay jquery hover event. code below code using. $(document).ready(function(){ $('ul.tabs li').hover(function(){ var tab_id = $(this).attr('data-tab'); $('ul.tabs li').removeclass('current'); $('.tab-content').removeclass('current'); $(this).addclass('current'); $("#"+tab_id).addclass('current'); }) }) i have tried changing following code no avail. var delay=1000, settimeoutconst; $('ul.tabs li').on('hover', function() { settimeoutconst = settimeout(function(){ var tab_id = $(this).attr('data-tab'); $('ul.tabs li').removeclass('current'); $('.tab-content').removeclass('current'); $(this).addclass('current'); $("#"+tab_id).addclass('current'); }, delay); },

Run Tomcat with domain name and without port number on Windows running IIS -

i have windows 2008 server , few websites serving iis 7.0. each of website configured use different domain names. have jsp application on same server running apache tomcat 6.. can configured jsp application use different domain name , runs fine on port 8080. problem - need configure jsp application run using domain name without port number. when configure port 80, application not run , 404 error shown. on console, states port 80 taken application. how can configure jsp application run on port 80? since have custom domain name, don't think port should important factor running website.

android - Using Google Play Quests in Unity 4 -

is possible use google play games quests in versions of unity below 5? using unity 4.5.2f1, , using latest google play games plugin. when add code show quests: playgamesplatform.instance.quests.showallquestsui( (questuiresult result, iquest quest, iquestmilestone milestone) => { // ... }); the scipts referenced(questuiresult,iques , iquesmilestone) don't exist in current context. am doing wrong? any appreciated, thanks. i think should work in 4.5. issue have experienced importing sample unitypackages not work well, adding source manually worked. from trivalquest sample, should able call like: using googleplaygames; using googleplaygames.basicapi; using googleplaygames.basicapi.quests; public void viewquests() { debug.log("clicked:viewquests"); playgamesplatform.instance.quests.showallquestsui( (questuiresult result, iquest quest, iquestmilestone milestone) => {

java - Which .jar file i need to add to remove errors from thease line in netbeans -

which .jar file need add remove errors thease line in netbeans. error lines are import org.apache.http.httpentity; import org.apache.http.httpresponse; import org.apache.http.client.clientprotocolexception; import org.apache.http.client.cookiestore; import org.apache.http.client.httpclient; import org.apache.http.client.methods.httpget; import org.apache.http.client.protocol.clientcontext; import org.apache.http.cookie.cookie; import org.apache.http.impl.client.basiccookiestore; import org.apache.http.impl.client.defaulthttpclient; import org.apache.http.protocol.basichttpcontext; import org.apache.http.protocol.httpcontext; import org.apache.http.util.entityutils; and download .jar file? in advance. you need apache http client . take on linked site , find download. alternatively if want use 1 of popular build tools manage dependencies (e.g. maven or gradle) add http client dependencies.

Does Python support short-circuiting? -

does python support short-circuiting in boolean expressions? yep, both and , or operators short-circuit -- see the docs .

How do I enable the TypeScript tab of a Visual Studio project that's a console or windows service that's self-hosting web-pages -

using visual studio 2015 created console application self-host owin embedded static files. since visual studio doesn't know it's web-site project, ignores typescript files. when go project properties, typescript tab's typically there in web projects missing. how enabled typescript tab can configure typescript , use visual studio 2015's built-in capabilities compile typescript. open .csproj file in text editor , add following line <import project="$(msbuildextensionspath32)\microsoft\visualstudio\v$(visualstudioversion)\typescript\microsoft.typescript.targets" /> i added after command: <import project="$(msbuildtoolspath)\microsoft.csharp.targets" />

xcode - Changing default SKScene -

i have class called introlayer i'm trying load inital scene when game launched. after changing gamescene introscene described in these simple steps, introscene isn't being loaded. set breakpoints on if let scene see skips on it, , set breakpoints in actual introscene verify didmovetoview not being called. ideas? i changed let scene gamescene introscene in gameviewcontroller so: import uikit import spritekit class gameviewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() if let scene = introscene(filenamed:"introscene") { // configure view. let skview = self.view as! skview skview.showsfps = true skview.showsnodecount = true /* sprite kit applies additional optimizations improve rendering performance */ skview.ignoressiblingorder = true /* set scale mode scale fit window */ scene.scalemode = .aspectfill

linux - How do I put Yocto-generated image on a hard drive and boot it? -

i have run bitbake core-image-minimal-dev configured genericx86 machine. bitbake generates bootia32.efi , bzimage--<stuff>.bin , .hddimg , .iso , .rootfs.ext3 , .rootfs.ext4 , .rootfs.tar.bz2 , , core-image-initramfs-<stuff>.rootfs.cpio.gz . i'm interested in method of how dd 1 or more of these onto hard disk of target machine , boot hard disk. dd if=path/to/imagefile/imagename.hddimg of=/dev/usbdevicename you'll find correct usb device name e.g. plugging in usb disk , looking @ dmesg|tail output -- not guess mistakes fatal hard disk. practical example build machine: sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-sato-intel-corei7-64.hddimg \ of=/dev/sdb \ bs=4096 note want use intel-corei7-64 machine unless know genericx86 correct hardware: despite name former common intel bsp that's not ancient (that includes big cores, xeons, atoms ...). how boot image depends on target device: may need go bios settings sele

jquery - How to get cell value to confirm on javascript? -

this question has answer here: how create dialog “yes” , “no” options? 9 answers i have html code , want when click delete delete current row, show confirm " want delete [name]?" so, how can name value confirm when click delete using jquery? <table id="tblinfo"> <thead> <tr> <th>#</th> <th>name</th> <th>birthday</th> <th></th> </tr> </thead> <tbody> <tr> <td>1</td> <td>name1</td> <td>01/01/1990</td> <td> <a href="#" class="btnview" >view</a> <a href="#" class="btndelete">delete</a> </td> </tr> <tr>

c# - XtraGrid binding inherited object -

i have 1 base class , 2 inherited classes. according configuration of application must bind customer1 or customer2 xtragrid: public abstract class mybase { public int itemid { get; set; } } public class customer1 : mybase { public string name { get; set; } public datetime birthdate { get; set; } } public class customer2 : mybase { public string name { get; set; } } now, binding code: customer1 c1 = new customer1(); c1.itemid = 1; c1.name = "n1"; c1.birthdate = datetime.now; bindinglist<mybase> tmplist = new bindinglist<mybase>(); tmplist.add(c1); gridcontrol1.datasource = tmplist; but grid display itemid field derived mybase class. could pls help? thanks. the simple answer - cannot that. not specific xtragrid , controls use list data binding. when use list<t> , bindinglist<t> etc. typeof(t) extracted , used item type retrieve bindable properties. note none of these classes (and i

How to update Nodes within a random manner in Neo4j -

how can update random set of nodes in neo4j. tried folowing: match (firstgraph) id(firstgraph) id return firstgraph.name, firstgraph.version,id(firstgraph) order rand(); match (g1:firstgraph) id(g1)=id set g1.version=5 my idea random set update it, got error: expected 1 statement per query got: 2 thanks help. let's find out what's problem here, first of all, error expected 1 statement per query got: 2 this coming query, if check it, see did 2 queries in same sentence, that's why error. match (firstgraph) id(firstgraph) id return firstgraph.name, firstgraph.version,id(firstgraph) order rand(); match (g1:firstgraph) id(g1)=id set g1.version=5 this not query, because can't use ; in query sentence, it's query end marker, can't query after this, can use union : match (firstgraph) id(firstgraph) id return firstgraph.name, firstgraph.version,id(firstgraph) order rand() union match (g1:firstgraph) id(g1)=id set g1.version=5

excel vba - VBA Web Scraping: How do you save a pdf doc to your personal folder -

is there away save pdf document opened in ie web browser personal desktop folder using vba? sorry, don't have code, because don't know start. thanks. you can try sendkeys. sure able resolve problem. click here more details sendkeys

android - ExpandableListView does not call OnItemSelectedListener -

i've set onitemselectedlistener in custom expandablelistview : setonitemselectedlistener(new onitemselectedlistener() { @override public void onitemselected(adapterview<?> parent, view view, int position, long id) { log.debug(tag, "item selected"); // stuff } @override public void onnothingselected(adapterview<?> parent) { log.debug(tag, "nothing selected"); // stuff } }); this listener never called, whether touching items or calling setselected(int) or setselectedgroup(int) . there other q&as going 2010 onitemselectedlistener not working listview . couldn't find 1 explains how working. common answer use click listener instead. want avoid if possible, because need know when nothing selected (i.e., list empty) , want take advantage of feature of onitemselectedlistener#onitemselected(...) : this callback invoked when newly selected position different select

r - reorder facets by multiple variables in ggplot -

Image
i have data frame following column names/header: date time id datetime site origin species genus sex pp repro i trying ggplot faceted figure y-axis being of "id"s, in order of "sex" , in order of "repro"... ideally female "ids" @ top , in order of repro status, , under male "ids", grouped repro status (females - pregnant, females - non pregnant, males - reproducing, males -non - in order). ggplot code looks currently: presence<-ggplot(data, aes(x=date,y=reorder(sex,repro)))+ geom_point(aes(x=date,y=presence,colour=sex))+facet_grid(id~.)+ theme()+ ylab("\n")+ theme(legend.position="none", axis.text.y= element_blank(), strip.text.y=element_text(angle=0)) reordering 2 variables here didn't work... in case useful... here's more information dput: structure(list(date = structure(c(16439, 16439, 16443, 16444

Can't find background image -

i might bit dumb or something, can't find background image of site: http://www.deineschatzkammer.com can find or tell me how find easily? have searched chrome devtools , firebug , searched code gifs, jpgs , pngs... :( it easy find background image. here 3 solutions how find using firebug (it works similar in chrome , firefox devtools): via css panel switch css panel . type jpg search field. hover matched url(...) see preview of image. if it's not right one, hit enter , repeat step 3. via html panel right-click background image , choose inspect element firebug context menu see element within html panel . switch style side panel. check whether 1 of rules contains background-image property. if there isn't background-image property containing related image, means element containing image overlayed 1 inspected. delete element pressing del on selected element or right-clicking , choosing delete element context menu. repeat step 3.

call c dll from delphi with strings -

i trying call dll delphi xe5. i have spent day or googling things "call c dll delphi" , found number of pages nothing helped me. i have received examples of how call dll in vb: declare function ixcommand lib "ixxdll.dll" (byval command string, byval mailbox string) integer ... sub command1_click () dim command string * 135 dim mailbox string * 135 command = "move:a,1000" ixcommand( command, mailbox) end sub also calling dll in vc 6.0: #include "stdafx.h" #include "windows.h" #include "stdio.h" #include "string.h" typedef uint (callback* lpfnixdllfunc)(char *ixstr, char *mbstr); int main(int argc, char* argv[]) { hinstance hdll; // handle dll lpfnixdllfunc lpfnixdllfunc; // function pointer hdll = loadlibrary( "ixxdll.dll" ); if (hdll == null) // fails load indexer lpt { printf("can't open ixxdll