Posts

Showing posts from April, 2010

database - VBA Excel 2003 disconnecting to DB object -

i have watched code execute. executes 'close' 'setting nothing'. returns the 'close' , throws error 91 "object variable block not set". public sub closeitdown() ' clean , shut down cnxrptrs.close set cnxrptrs = nothing end sub i have used code in many 'applications'. time using , start routine several times connecting , disconnecting db. clear temp tables , start different set of circumstance. around problem , want finish. set cnxrptrs = new adodb.connection cnxrptrs.open strforcnx 'open connection. ... the first time through there no problem on second time when problem happens. if call close related object (conn, command, , rs objects set nothing). specific rules in help. don't this set cnxrptrs = nothing and don't that set cnxrptrs = new adodb.connection what trying do, make boy of you, know it's at. just close , (re) rs.open. command object check conn propery set.

php - yii, show records from different tables with same structure -

ok, thing making setup wordpress multisite setup using yii so, here instead of site, have "shops" there super admin creates shops, each shop has own table of products "shop_1_product", "shop_2_product", ..and on now, if shop owners want see list of products there individual tables, easy using cactiverecord/models but stuck super user(who creates shops), wants see list of products each table .there different products in each table no row duplication, little in stuff, appreciated :) approaches thinking: ->1 using native php data each table collectively. or -> like, init model, table name, , records using model()->findall , re-init same model different table name, if thats possible? on how re-init please. :) you should able create big query , use data provider. http://www.yiiframework.com/doc-2.0/yii-db-query.html#union()-detail i did in yii1, search on different models. should little easier because tables should have same fo

java - Getting an unexpected error when trying to load files into a JList -

i'm trying build java-based network manager unix-based systems, ran trouble cant quite find source of: exception in thread "main" java.lang.nullpointerexception @ net.argvarg.networkmanual.selectconfdialog.loadconflist(selectconfdialog.java:51) @ net.argvarg.networkmanual.selectconfdialog.<init>(selectconfdialog.java:20) @ net.argvarg.networkmanual.main.run(main.java:16) @ net.argvarg.networkmanual.main.main(main.java:7) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ com.intellij.rt.execution.application.appmain.main(appmain.java:134) here the parts of file giving error: package net.argvarg.networkmanual; import j

python - Create plot with Pandas and show similar output as with Matplotlib directly -

Image
i have query run outputs list of data consisting of date string , count: date_cnts = [(u'2014-06-27', 1), (u'2014-06-29', 3), (u'2014-06-30', 1), (u'2014-07-01', 1), (u'2014-07-02', 1), (u'2014-07-09', 1), (u'2014-07-10', 3), (u'2014-07-11', 1), (u'2014-07-12', 2), (u'2014-07-14', 1), (u'2014-07-15', 2), (u'2014-07-17', 3), (u'2014-07-18', 1), (u'2014-07-20', 1), (u'2014-07-21', 1), (u'2014-07-23', 2), (u'2014-07-26', 2), (u'2014-07-27', 2), (u'2014-07-28', 7), (u'2014-07-29', 3), (u'2014-07-31', 2), (u'2014-08-01', 1), (u'2014-08-05', 4), (u'2014-08-07', 2), (u'2014-08-08', 1), (u'2014-08-13', 1), (u'2014-08-14', 3), (u'2014-08-15', 1), (u'2014-08-16', 6), (u'2014-08-17', 1), (u'2014-08-18', 1), (u'20

Not able to connect my device with Eclipse for running Android Application -

Image
i developing android application eclipse. have installed google usb driver sdk manager. trying connect samsung gt-i9300, can see device on computer list eclipse dont open dialog select device, still running application on emulator virtual device. using windows 7 professional service pack 1 please check screen shots below : any highly appreciated !! thanks.. edit now can see device can not select it. target unknown. first, make device mtp connection(connected camera), reinstall device driver usuing following way: choose device [device manager]. update driver ----> browse computer driver software ----> let me pick list... ----> have disk. browse , choose proper driver, press ok. restart adb.

sql server - Issues while Processing Large Strings in Grails Application -

Image
i working on grails application. getting issues in processing string length greater 255 characters. when try update record string greater 255 characters exception: nested exception org.hibernate.exception.dataexception: not update: caused by: org.hibernate.exception.dataexception: not update: [com.ef.apps.mediasense.recordings.calls#1] caused by: java.sql.datatruncation: data truncation this attribute in strore large string: static mapping = { tag column:'sessiontag' } and, constraint applying on this: static constraints = { tag (nullable:true, maxsize:1000) } and, if see design of table, looks this attribute: so, seems fine why it's not allowing me store string having characters greater 255. i have tried approach too, no luck: static mapping = { tag column:'sessiontag', type: 'text' } with constraint: static constraints = { tag (nullable:true, maxsize:1000) } and if see design, looks this: but still ge

php - yii import extension not finding class -

i using facebook sdk php. added facebook php sdk in yii app protected/extension folder , imported in config/main.php follow. 'import' => array( 'application.extensions.facebook.*', ), my problem app not finding classes in sdk when create object follows: $session = new facebooksession($access_token); it giving error follow: fatal error: class 'facebooksession' not found .... if try using include_once() or require_once() giving error below: fatal error: cannot redeclare class facebook\facebooksession in d:\localhost\protected\extensions\facebook\facebooksession.php on line 36 what going wrong? solved adding set_include_path(yii::app()->baseurl . directory_separator . 'protected' . directory_separator . 'extensions' . directory_separator . 'facebook'); require_once (yii::app()->baseurl . directory_separator . 'protected' . directory_separator . 'extensions' . directory_separato

ios - How to set image for bar button with swift? -

Image
i trying set image bar button item have image like: with resolution 30 * 30 while assign image bar button looks like: i have assigned image way : and if try way making iboutlet button , set image programatically form this question , code is: // outlet bar button @iboutlet weak var fbbutton: uibarbuttonitem! // set image bar button var backimg: uiimage = uiimage(named: "fb.png")! fbbutton.setbackgroundimage(backimg, forstate: .normal, barmetrics: .default) but nothing happend this, can tell me doing wrong? or batter way this? i have achieved programatically code: import uikit class viewcontroller: uiviewcontroller { override func viewdidload() { super.viewdidload() //create new button let button: uibutton = uibutton.buttonwithtype(uibuttontype.custom) as! uibutton //set image button button.setimage(uiimage(named: "fb.png"), forstate: uicontrolstate.normal) //add function butt

c# - Screen height gets smaller when using UIInput and Android -

i trying create input field ngui , unity android app. when keyboard appears on screen ngui screen mashes in height? how can avoid this? when building ios not problem seems android related? hoping in matter , in advance :-) as far know unity creates project eclipse before compiling project open androidmanifest.xml activity want avoid behaviour declare android:windowsoftinputmode="adjustpan" may somewhere in android compile settings find preferences.

android - How to get villagename, district and subdistrict from latitude longitude -

i have latitude , longitude co-ordinate , want village name district , sub district that. searched , found reverse geocode not give village name. there api or codebase getting exact location lat long. want show in android app. geocoder geocoder = new geocoder(this, locale.getdefault()); string result = null; try { list<address> addresslist = geocoder.getfromlocation( 25.882456,83.174279, 1); if (addresslist != null && addresslist.size() > 0) { address address = addresslist.get(0); stringbuilder sb = new stringbuilder(); (int = 0; < address.getmaxaddresslineindex(); i++) { sb.append(address.getaddressline(i)).append("\n");//adress } sb.append(address.getlocality()).append("\n");//village sb.append(address.getpostalcode()).append("\n"); sb.app

c# - Sorting List by DateTime -

i have tried solutions have found , cannot seem make work me. i have class: public class invokegetreportrequestlistresponse { public marketplacewebserviceexception error { get; set; } public bool callstatus { get; set; } public list<requestedreport> reports { get; set; } } public class requestedreport { public string reportrequestid; public string reporttype; public datetime? startdate; public datetime? enddate; public boolean scheduled; public datetime? submitteddate; public string reportprocessingstatus; public string generatedreportid; public datetime? startedprocessingdate; public datetime? completeddate; } i make call service: invokegetreportrequestlistresponse callresponse = invokegetreportrequestlist(callrequest); and want sort reports list in callresponse completeddate callresponse.reports.sort((x, y) => datetime.compare(x.completeddate, y.completeddate)); this returns error: cannot convert lamb

delphi - how to connect UNC-located database to embedded server? -

i have next specific situation. have application using firebird embedded server. files: application executive, database, fbembed.dll located in same folder. , working good. now client says so: i place application file on server , run via local network workstations. so see start application on server , starts. database connection string looks like: //server/share/db.fdb yes, know conventions allowed firebird paths here: faq: what's connection string? i not understand should use embedded server? possible @ all? if want access firebird database on network, need install firebird server , connect through server. can't (at least not default) access database network path, , shouldn't (although there config option allow it), can lead database corruption due insufficient or incorrect filelocking support on network. so: don't use firebird embedded, install firebird server , configure clients connect firebird server.

Magento Order Comments -

and have form in url link checkout/cart, , in page have forms has following textbox of name email telephone number comments company , deadline project. in form works , data send email. want comments data send admin panel in sales/orders. on path app/design/adminhtml/default/default/template/sales/order/view info.phtml file. have found sample code , im using it. , ive found out sample code im looking doesnt work out. reference link im using http://www.magecorner.com/magento-order-comments/ can me figured thing out? ive been stuck in here since last week muchly appreciated you can try using events. add below code config.xml. hope have idea of dealing observer , events. <events> <sales_order_place_after> <!-- identifier of event want catch --> <observers> <sales_order_place_after_handler> <!-- identifier of event handler --> <type>model</type> <!-- class method call type; valid model, object , singl

c# - HttpWebRequest + GetResponseStream encoding -

how can decode http stream response? i error message: there error deserializing object of type test.rootobject '�yl�' contains invalid utf8 bytes. here code: httpwebrequest request = webrequest.create(urlrequest) httpwebrequest; //request.headers.add(httprequestheader.acceptcharset, "utf-8"); // cannot work! using (httpwebresponse response = request.getresponse() httpwebresponse) { if (response.statuscode != httpstatuscode.ok) { throw new exception(string.format("server error (http {0}: {1}).", response.statuscode, response.statusdescription)); } datacontractjsonserializersettings settings = new datacontractjsonserializersettings(); datacontractjsonserializer jsonserializer = new datacontractjsonserializer(typeof(rootobject)); object objresponse = jsonserializer.readobject(response.getresponses

javascript - d3.js: enter(), update, exit() with group element in between -

my dom structure looks this, when rendered visualization d3.js , enter, update, exit pattern: g rect ... g rect ... g rect ... i working multiple elements , nested selections in groups, simplicity demonstrate rects. dom gets done by: group = d3.select('.svg-content') .selectall('g') .data(items, function (item) { return item.id; }); groupenter = group.enter() .append('svg:g') .attr('class','group-content'); // enter groupenter.append('svg:rect') .style('fill', '#000') .attr('x', function (item) { return item.x }) .attr('y', function (item) { return item.y; }) .attr('width', function (item) { return item.width; }) .attr('height', function (item) { return item.height; }); // update group.select('rect') .attr('x', function (item) { return item.x }) .attr('width', function (item) { return item.width; })

android - System bar icons as VectorDrawables -

i lg g3 user , updated phone lollipop. develop themes lg system in order change ui design stock android. struggling navigation bar because: - lgsystemui cannot decompiled recently; - navbar icons defined vectordrawables within lgsystemui.apk. can point me right direction might find stock lollipop system bar icons in vectordrawable format, or @ least in svg format containing right path information can converted vectordrawable? you might able find these in material design icons library: https://github.com/google/material-design-icons they have started adding vector drawables it.

jquery - spservices raising an error as soon as I try to use functions -

i'm trying use spservices current user accesses page. problem there "syntax error, unrecognized expression" when try that. the code throws error is: var thisuseraccount = $().spservices.spgetcurrentuser({ fieldname: "name", debug: false }); the same error occurs when following alert($().spservices.spgetcurrentuser()); i'm using: jquery.spservices-2014.01.min when use developer tools ie , put in watchpoints see spservices exists , spgetcurrentuser exists. if use: alert($().spservices.spgetcurrentuser); i whole prototype spgetcurrentuser printed alert. so not undefined. question though doing wrong there can't use function (the error message shows nothing else aside unrecognized expression , doesnt go details expression in question is). edit: small detail var thissite = $().spservices.spgetcurrentsite(); works in not throw errors when use alert(thissite) shows empty string. and bit of testing around saw that: var lastid

Excel VBA to search for specific text in cell and then copy to another sheet -

Image
i want make macro copy date cell j5 , copy invoice no. cell h6 , copy consumer name merged cells a6 , copy amount of items under product description cell range (b11:b21) items in invoice sheet , paste values sheet name invoice-record there table headers consumer name, date, invoice no. items (sub headers of item1, item2, item3, item4, item6, item7, item8, item9, item10, item11, item12) i want macro copy these values invoice sheet , paste under headers of each in table in invoice-record sheet. elaborate better, giving link of workbook: https://www.dropbox.com/s/6wu69cgn3qfvr67/invoice.xlsx?dl=0 start moving data know moves setting values in beginning. tricky part checking each item. since know there 12 of them, long example provided how it's going laid out, loop through count of 12 , each one, compare items in invoice product number, if it's on invoice, set in appropriate column on target sheet. tested: using example sheet, see screenshots. sub i

C++ high precision time measurement in Windows -

i'm interested in measuring specific point in time down nanosecond using c++ in windows. possible? if isn't, possible specific time in microseconds @ least?. library should do, unless suppose it's possible managed code. thanks if have threaded application running on multicore computer queryperformancecounter can (and will) return different values depending on core code executing on. see this msdn article. ( rdtsc has same problem) this not theoretical problem; ran our application , had conclude reliable time source timegettime has ms precision (which fortunately sufficient in our case). tried fixating thread affinity our threads guarantee each thread got consistent value queryperformancecounter , worked absolutely killed performance in application. to sum things there isn't reliable timer on windows can used time thing micro second precision (at least not when running on multicore computer).

string - Adding formated JLabel to JList -

yesterday created class list available font in jlist , need... string fonts[] = graphicsenvironment.getlocalgraphicsenvironment().getavailablefontfamilynames(); jlist<object> list = new jlist<object>(fonts); scrollpane = new jscrollpane(list); getcontentpane().add(scrollpane, borderlayout.center); i started work on class creates jlabel name , format of font , gets added panel, it's supose too. string fonts[] = graphicsenvironment.getlocalgraphicsenvironment().getavailablefontfamilynames(); ( int = 0; < fonts.length; i++ ) { jlabel lname = new jlabel((fonts[i])); font fname = new font ((fonts[i]), font.plain,18); lname.setfont(fname); mainpanel.add(lname); } what want use jlabel format , add list reason alwasy loose format or content not display. can advise how can join 2 , create jlist formated jlabels? many thanks

java - Struts2 excludePattern for rest implementation -

i have application halfway completed rest web services calls implemented bypassing struts2 filter dispatcher. the web.xml implemented below. <?xml version="1.0" encoding="utf-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="webapp_id" version="2.5"> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.strutsprepareandexecutefilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>*.action</url-pattern> </filter-mapping> <session-config> <session-timeout>10</ses

linux - Find command not working as expected in centOS -

i using centos linux release 7.0.1406 on virtual box. trying find files using find command. this find command not giving response: find . -name "orm.properties" my current working directory /eserver6 . file orm.properties present in /eserver6/share/system/config/cluster , find command not able find file. i have tried other combinations find . -name "orm.*" find . -name 'orm*' this finding few files staring orm not files present inside current working directory. the command line looks correct , should find file. reasons why might fail: you don't have permission enter 1 of folders in path /eserver6/share/system/config/cluster . you made typo the file system remote , remote file system behaves oddly there simlink somewhere in path. default, find doesn't follow symlinks avoid recursive loops. use find /eserver6 -l ... tell find @ target of link , follow if it's folder. the command find /eserver6 -name "or

stored procedures - How to display date as column name in a SQL Server table -

i worked on stored procedure in sql server few days ago. created stored procedure code: alter procedure [dbo].[getemployeehours] (@currentdate datetime) begin declare @startdate datetime declare @enddate datetime set @startdate = dateadd(day, 1 - datepart(weekday, @currentdate), cast(@currentdate date)) set @enddate = dateadd(day, 7 - datepart(weekday, @currentdate), cast(@currentdate date)) --select @startdate --select @enddate select case when grouping(a.firstname +' '+a.lastname)=1 'total day' else a.firstname +' '+a.lastname end [employeename] , sum(case when datename(dw,workdate)='monday' [hours] else 0 end) monday, sum(case when datename(dw,workdate)='tuesday' [hours] else 0 end) tuesday, sum(case when datename(dw,workdate)='wednesday' [hours] else 0 end) wednesday, sum(case when datename(dw,workdate)='thursday' [hours] else 0 end) thursd

javascript - Can we carry selection from one page to another using jquery -

i making simple web application in html. need is, have themes option. have written following code working fine. problem is, when user selects theme , goes page using link in page, theme not carried other pages in application. is there way in jquery, when user selects option in page selection can carried next page theme may take effect in other pages also. here have. (this written in .dwt file pages can use this.) <link rel="stylesheet" type="text/css" title="theme" href="css/styles_brown.css" /> <script> $(function() { $('#themes').change( function() { var rel = $('link[title="theme"]'); switch($(this).val()) { case "brown": { rel.attr('href', 'css/styles_brown.css'); break; } case "blue": {

php - error in SQL syntax with html checkbox value -

surely stupid issue, can not find error. from form value of checkbox (0 or 1), query generates error. "you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'check)" <form action="processcategory.php?action=add" method="post" enctype="multipart/form-data" name="frmcategory" id="frmcategory"> <input type="hidden" name="check" value="0" /> <input type="checkbox" name="check" value="1" /> </form> php $checkboxvalue = (isset($_post['check'])) ? intval($_post['check']) : 0; // returns 0 or 1 $sql = "insert tbl_category (cat_parent_id, cat_name, cat_description, check) values ($parentid, '$name', '$description', $checkboxvalue)"; $result = dbquery($sql) or die('cannot add category' . mysql_error()); mysql field: check

c# - Passing DataContext in Telerik RadGridView -

i use c# .net 4.5 , wpf radcontrols telerik. on mainwindow have radtabcontrol , in code behind bind mainviewmodel this: this.datacontext = new mainviewmodel(); the itemsource of radtabcontrol bound in xaml: <telerik:radtabcontrol ... itemssourc={binding tabs} .. /> i use contentselector load different contents tabs. these contents usercontrols . on 1 usercontrol use radgridview it's own itemssource bind in code behind: testgridview.itemssource = tasks.gettasks(); the radgridview columns bound it's own style: <telerik:radgridview.columns> <telerik:gridviewdatacolumn datamemberbinding="{binding id}" width="*" cellstyle="{staticresource cellstyle}" /> </telerik:radgridview.columns> <style x:key="cellstyle" targettype="{x:type telerik:gridviewcell}"> <setter property="borderthickness" value="0" /> <setter property=&quo

python - Convert Pandas DatetimeIndex to fractional day of year -

is there easy way convert datetimeindex array of day of years, including fraction hour, minute, etc. components? for example, converting pd.date_range("2014-01-01 00:00", periods=4, freq="12h") should give me [1.0, 1.5, 2.0, 2.5] . this requires 0.15.0 timedelta functionaility. have full precision of dates. in [19]: s out[19]: <class 'pandas.tseries.index.datetimeindex'> [2014-01-01 00:00:00, ..., 2014-01-02 12:00:00] length: 4, freq: 12h, timezone: none in [21]: s-s[0] out[21]: <class 'pandas.tseries.tdi.timedeltaindex'> ['0 days 00:00:00', ..., '1 days 12:00:00'] length: 4, freq: none in [22]: ((s-s[0]) / pd.timedelta(1.0,unit='d')) + 1 out[22]: float64index([1.0, 1.5, 2.0, 2.5], dtype='float64') dividing timedeltaindex timedelta gives (float) fraction. dates 0 based add 1. the above 'assumes' of dates in same year. here more robust way (datetimeindex subtraction not dir

android - Clear Cache memory of Picasso -

i'm trying clear cache memory of picasso via android coding. can please me in issue..? i have tried using following code, not useful in case: picasso.with(getactivity()).load(data.get(pos).getfeed_thumb_image()).skipmemorycache().into(image); use instead : picasso.with(getcontext()).load(data.get(pos).getfeed_thumb_image()).memorypolicy(memorypolicy.no_cache).into(image);

android - Passing "this" from Java Interface to another Class -

giving following class of android project : preview extends surfaceview implements surfaceholder.callback and a extends doc i don't know how ask , know not want preview, call abstract method of doc. in doc's method, have call method of previous object of preview. this example : from preview.java : doc _doc = new a(); private void mymethod() { this._doc.process(this) } from a.java : @override public void process(preview p) { p.processa(); } the problem got error : the method process(preview) in type doc not applicable arguments (new camera.previewcallback(){}) however, can't change judging fact want call method preview. tried many thing such cast etc. none of them works. thanks ! ps : on eclipse under windows. assuming calling a.process(this) anonymous inner class (of type camera.previewcallback presume, hence error message), have write a.process(preview.this) , since standalone this refers inner class , no

asp.net Identity - GeneratePasswordResetTokenAsync Method When Passed to View Token Changes? -

when use usermanager generate password reset token, once gets passed razor view token changing. an example is: var resettoken = await usermanager.generatepasswordresettokenasync(userid); if (registersuccess) { var model = new resetmodel { token = resettoken, userid = userid }; return this.view(model); } i can see when debugging value of reset token is aqaaancmnd8bfderjhoawe/cl+sbaaaamfru4hd3q0wlianc7dsekqaaaaacaaaaaaadzgaawaaaabaaaab1q/fgovgsh+0ssllyskrfaaaaaasaaacgaaaaeaaaafmvfxsy24plghsoiqfo/yraaaaayll/7e8qwrh5jefhmkgvhne4czm3tfwvl4lre7jhm/i6ckktdlohofac054ergy7btwtv9om7ila3f/ti90idbqaaabafr8pdgz2ebxq/sgw0qvp6pqlwg== but once rendered on view has changed aqaaancmnd8bfderjhoawe/cl+sbaaaamfru4hd3q0wlianc7dsekqaaaaacaaaaaaadzgaawaaaabaaaacdu0qqzkc65kqa58ift5nbaaaaaasaaacgaaaaeaaaaggy5flp6xtr7cgzkvronnpaaaaaha1ip7uxqd6kskbwbofdxm1kaznoekiytsad6/zkejock5cdd1fk/jdxks0rx9rheqtjpz

How to retrieve/display title, units, copyright along with JSON data in Highcharts -

i have implemented code jsonp request, retrieving data multiple countries , displaying them lines in chart. however, need title, units, copyright etc. json well, able display elements on graph too. now, wonder how done. the json response this: [ [ "series", [ { "data": [ [ 2007, 2239300 ], [ 2008, 2237490 ], [ 2009, 2167070 ], [ 2010, 2204450 ] ], "name": "france" },

java - How to process all nodes in a Nodelist -

i trying process nodes in node list , replace special characters in text. the issue face need return object contains values replaced. if use recursion not possible return value right? how can iterate xml nodelist processing elements , removing special characters? apporach @ moment this public static ixmldatagram removeillegalcharsfromdatagram(ixmldatagram dg, string[] illegalvalues) { nodelist nodelist = dg.getasdomelement().getelementsbytagname("*"); (int = 0 ; < nodelist.getlength() ; i++) { node node = nodelist.item(i); if (node.getnodetype() == node.element_node) { for(string replacechar : illegalvalues) { // current element if(node.gettextcontent().contains(replacechar)) { node.settextcontent(node.gettextcontent().replace(replacechar, "")); } } } } return dg; } but doesn't

php - How to add geopoint array, via PDO to crate* -

i have crateio set , it's working fine using pdo class. i'm, trying set of geopoints db using binds. i have tried foreach doesn't seem work, i've tried - doesn't work. the geopoint column set geo_point_array. $route="[[30.33333, -6.13336],[30.33333, -6.13336]]"; $db = new database; $db->query("insert geopoints (id, longlat, name) values ('33',?,'pat')"); $db->bind(1, $route); $db->execute(); how add set of cordinates db? thanks geopoint not supported native type in crate's pdo driver yet, can use double array . from crate documentation: columns geo_point represented , inserted using double array in following format: [lon_value, lat_value] i recommend parameter substitution other values. use crate\pdo\pdo; $route = [[30.33333, -6.13336], [30.33333, -6.13336]]; $db = new pdo('crate:...'); $stmt = $db->query("insert geopoints (id, longlat, name) values (?,

python - How to extend `psycopg2.extras.DictCursor`? -

i want use python3-psycopg2 (2.5.4) cursor can: 1) access query result in dict-like manner 2) log every sql executed cursor logging module automatically i tried following code, didn't work, did wrong? can extend psycopg2.extensions.cursor , not allow me 1). class loggingcursor(psycopg2.extras.dictcursor): def __init__(self, *args, **kwargs): # didn't work or super().__init__(*args, **kwargs) # without these 2 lines def execute(self, sql, args=none): beautiful import app # logger = blah blah logger.debug(self.mogrify(sql, args).decode()) psycopg2.extensions.cursor.execute(self, sql, args) cursor = db_conn.cursor(cursor_factory=loggingcursor) when cursor.execute(some_sql) , gives me: file "some_file.py", line 123, in some_function some_var = cursor.fetchone() file "/usr/local/lib/python3.4/dist-packages/psycopg2/extras.py", line 63, in fetchone res = super(dictcursorbase, self).fetchone()

python - PySide in windows - remove padding from corners -

Image
for example if add qstatusbar window, see wide corner: self.stat = qtgui.qstatusbar() widlayout = qtgui.qvboxlayout() widlayout.addwidget(some_pannel) widlayout.addwidget(self.stat) self.setlayout(widlayout) from official documentation : pyside.qtgui.qlayout.setcontentsmargins() sets width of outer border on each side of widget. width of reserved space along each of pyside.qtgui.qboxlayout ‘s 4 sides. pyside.qtgui.qboxlayout.setspacing() sets width between neighboring boxes. (you can use pyside.qtgui.qboxlayout.addspacing() more space @ particular spot.) so, basically: widlayout.setspacing(0) widlayout.setcontentsmargins(0, 0, 0, 0)

Both XML and SQL as datasource in Crystal Report -

is possible have multiple datasources in crystal reports? far have googled , searched on stackoverflow, not possbile have similar kind of datasource multiple times (they must have common end points). but, comes questions, can have 1 datasource xml , other sql , query both @ same time? searched no link confirm same. link appreciated.

javascript - Need help adding Chart.js chart to a Modal window (I'm Using AngularJS) -

i'm new things web development related. i've been building prototype website past couple of weeks using angularjs. due flawed understanding of how angular works redirecting webpages , breaking app; @ time didn't matter quick prototype ideas down. however, want build more realistic, , app must run on 1 page. instead of redirects using in original prototype i've decided implement modals display data within app. has been going far, can click on item in list , modal window opens , displays correct data related item selected, except is, graphs. i'm not sure how should implement graphs in model, or more accurate, how can select canvas element add graph it. i'm using templateurl modal, , controller handle modal functionality. since knowledge of javascript dodgy @ best, i've spend of today going on basics of javascript , jquery (i've been working angular couple of weeks now). on static pages use charts described in chart.js documentation. <s

dynamics crm 2013 - Edit opportunity navigation pane -

Image
is possible add links in opportunity navigation pane ? want move process (prospecting (active), pre-quota,...) navigation marked area. see in picture mean. no can't this. logic of process flow controlled workflow can change. however, display within ui done crm platform , cannot changed. the area want move command bar (it used called ribbon in crm 2011). can customized adding or removing buttons nothing extensive moving entire sections of form around. might able mimic of functionality of process flow custom buttons in command bar. however, think unlikely yield benefit amount of work involved.

spring - java.lang.NoClassDefFoundError: org/springframework/aop/framework/AopInfrastructureBean -

i have project done in grails 2.4.3 , when try refresh dependencies receive next error: |loading grails 2.4.3 |configuring classpath . |environment set development .......... |compiling 210 source files [groovyc] org.codehaus.groovy.control.multiplecompilationerrorsexception: startup failed: .error | compilation error: startup failed: general error during conversion: java.lang.noclassdeffounderror: org/springframework/aop/framework/aopinfrastructurebean java.lang.runtimeexception: java.lang.noclassdeffounderror: org/springframework/aop/framework/aopinfrastructurebean at org.codehaus.groovy.control.compilationunit.convertuncaughtexceptiontocompilationerror(compilationunit.java:1083) at org.codehaus.groovy.control.compilationunit.applytoprimaryclassnodes(compilationunit.java:1061) at org.codehaus.groovy.runtime.callsite.callsitearray.defaultcall(callsitearray.java:45) at org.codehaus.groovy.runtime.callsite.abstractcallsite.call(abstractcallsite.java:108