Posts

Showing posts from February, 2015

visual studio - Adding scrollbar to an activeX control in MFC -

i'm trying create activex control using microsoft foundation class library. i have created control. it's graph control. have placed buttons on control well. i trying add scrollbar control using cscrollbar class. i create control using cscrollbar::create method. can see control when use activex control in application. i have added onhscroll method control class. derives colecontrol class . when scroll use cscrollbar::getscrollpos scroll position returns zero. here code creating scrollbar in activex control. code control in mainclass.h file: private: cscrollbar m_hscrollbar; protected: afx_msg void onhscroll(uint nsbcode, uint npos, cscrollbar* pscrollbar); declare_message_map() code control in mainclass.cpp in oncreate() method creating scrollbar: m_hscrollbar.create(sbs_horz | ws_child| ws_visible , crect(rcbottomstrip.left , rcbottomstrip.bottom , rcbottomstrip.right , rcbottomstrip.bottom + (theight*3)/125),this, 315); m_hscrollbar.setscrol...

php - I am unable to initialize a property of a class in OPP -

very quick question. how initialize property in class. i trying use property class; wish use in zend form keep error message; notice: undefined property: ep_tableproductssample::$comments below context in attempted use property $comments you note transferred table class zend form class , attempted access $comments variable. i able access variable if property has value; however, run problems when property not have value. i tried initializing class , property such: class ep3d_form_product_productsample extends ep3d_form_abstract { private $_samplesoure = ''; private $comments =''; i attempted use class such: ->setvalue($this->_samplesource->comments) i.e: $e = new zend_form_element_textarea('comments'); $e ->setlabel('comments:') ->setdecorators($this->_buttondecorators) ->setattrib('rows', 3) ->setvalue($this->_samplesource->comments) ->setattrib('cols', 1...

model view controller - Javascript MVC Design Feedback -

i share design of mvc via js. what think it? tried not use mvc framework want clear structure , decoupled organisation. next step me evaluating require.js rid of ordering within index file the code: http://nopaste.info/2547415f71_nl.html i think should bind click events in view. controller can made "pure logic, no dom". also, in view - instead of var uicomponents = { contactlist: "#contactlist" }; you - var uicomponents = { contactlist: $("#contactlist") }; which traverse dom once , cache element use elsewhere. model looks clean (no coupling view or controller).

c# - storing multiple possibilities in settings -

i have scenario cant work out best way approach in head, want give me maximum extendability , avoid magic number coding. essentially simplified example this. user inputs number (lets 5326) system round number down or nearest "acceptable value" comes list. want list configurable. note also, different variables have different lists e.g. acceptableheight: 1000,2000,3000,4000 acceptablelength: 500,600,700,800 the best way can think store values this: <appsettings> <add key="acceptableheight" value="1000,2000,3000,4000" /> <add key="acceptablelength" value="500,600,700,800" /> </appsettings> the logic can think of is get value config split comma list of integers sort list (just in case) some sort of search find nearest value (or use end values) but not 100% sure how... you can store string , parse suggested. int[] acceptableheight = appsetting["acceptableheight"].s...

jquery - IndexedDBShim.js error : JavaScript runtime error: Assignment to read-only properties is not allowed in strict mode -

i experimenting indexeddb jquery api indexeddb isnt compatible safari / ipad. ive started using , got error when running html , im not able use in files. files im refering indexeddbshim my html looks like <!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script src="javascript1.js" type="text/javascript"></script> <script src="/scripts/indexeddbshim.js" type="text/javascript"></script> <script src="/scripts/indexeddbshim.min.js" type="text/javascript"></script> <script src="/scripts/jquery.indexeddb.js" type="text/javascript"></script> <script src="/scripts/jquery.indexeddb.min.js" type="text/javascript"></script> </head> <body> <button onclick="test()">create database</button> <...

javascript - How to change font color of google maps marker clusterer -

could please tell me how change font color of markerclusterer marker. current code styling marker mcoptions = {styles: [{ height: 27, url: "image.png", width: 35 }], maxzoom: 8 } var markercluster = new markerclusterer(map, markers, mcoptions); you can check documentation marker clusterer under class clustericonstyle there option named textcolor sets color of label text shown on cluster icon.

blackberry 10 - Add elements to Drop down bb 10 cascades -

i have drop down in qml file like... dropdown { enabled: true // text option { text: "eur/usd" } } and database base read function like... qlist databaseoperations::readrecords(qstring tablename){ qlist<qstring> sym_id_list; // 1. local db connection. note, called database() // automatically open connection database qsqldatabase database = qsqldatabase::database(); // opens default database. // 2. create query search records qsqlquery query(database); const qstring sqlquery = "select * "+tablename; if (query.exec(sqlquery)) { // field indexes. know order of fields, , skip step. // still work if fi changeldse order in query string. const int customeridfield = query.record().indexof("symbolid"); // 3. start navigating through records calling 'next' function. ...

ios - Cocos2dx changing sprite size and texture uv without using plist file -

i using cocos2dx. testing device ipad2 want sprite size independent of texture size because cant afford 1 one mapping. here example suppose have texture dimensions 1024,1024 want use portion of 0,0 300,300 want sprite draw 100,100 200,200 how can acheive this i have tried setting quad manualy giving weird behaviour quad vertices are quad.bl.vertices = 0,0 quad.br.vertices = 1024,0 quad.tr.vertices = 1024,1024 quad.tl.vertices = 0,1024 nothing displayed on screen but when change them quad.bl.vertices = 0,0 quad.br.vertices = 2048,0 quad.tr.vertices = 2048,2048 quad.tl.vertices = 0,2048 then portion of sprite displayed on screen. after changing vertices bit seems if coocs 2d assuming bottom left corner of ipad @ 1024, 1024 regards i think need ccrect requiredportion = ccrectmake(0, 0, 300, 300); ccrect drawarea = ccrectmake(100, 100, 100, 100); ccimage *image = new ccimage(); image->initwithimagefile("texture.png...

php - Mysql Field Data not displaying when a link is clicked? -

i'm trying data database if link clicked. i used example codes suggested example - getting mysql field data when link clicked? but doesn't work when click on link nothing comes up. main.php <?php include('conn.php'); $sql2 = "select title addpromo"; $result2 = mysql_query($sql2); echo "<div id=\"links\">\n"; echo "<ul>\n"; while ($row2 = mysql_fetch_assoc($result2)) { echo "<li> <a href=\"fullproject.php?title=\"" . urlencode($row2['title']) . "\">" . htmlentities($row2['title']) . "</a>\n</li>"; } echo "</ul>"; echo "</div>"; ?> this displaying correct.but when click @ link nothing showing in fullproject.php, blank page. fullproject.php <?php // connect server. include('conn.php'); $projectname = isset($_get['title']); $sql1 = "sele...

ajax - Optional field with minimum length validation in JSF -

i have registration form optional field if enter value should more 2 characters. how skip validation if user leaves field blank? <h:inputtext id ="fooid" maxlength="50" tabindex="4" value="#{registrationbean.foo}" validatormessage="please enter 2 or more characters"> <f:validateregex pattern="^[a-za-z-_./\s]{2,50}$"/> <f:ajax event="blur" render="foopanel" /> </h:inputtext> any appreciated. it works intented if add following context parameter: <context-param> <param-name>javax.faces.interpret_empty_string_submitted_values_as_null</param-name> <param-value>true</param-value> </context-param> this tell jsf interpret empty string submitted values null . if value null , required="true" validator triggered , other validators not. additional advantage keeps model free of cluttered empty strings when enduser di...

.htaccess - gzip compression code in htaccess not working -

i want compress webpage contents using gzip compression , purpose, using following code in .htaccess file, not working # begin compress text files <ifmodule mod_gzip.c> mod_gzip_on yes mod_gzip_dechunk yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^content-encoding:.*gzip.* </ifmodule> # end compress text files i using this tool test gzip compression, tool tell there no gzip compression in webpage. is there thing wrong code ? or problem somewhere else. # 480 weeks ####################################### ### apache configuration directives ### ### mod_gzip 1.3.26.1a ### ####################################### ########################## ### loading module ### ########################## # ----------------------...

Is it possible to handle all Errors in Java? -

i know error throwable (so can handled) , error handling isn't best practice suppose have requirement catch error . it possible in general? mean errors can appear in daemon threads? crash jvm , won't know it. and can miss error if surround main(string... args) try-catch? you can catch uncaught exceptions via thread.setuncaughtexceptionhandler() set default handler invoked when thread abruptly terminates due uncaught exception, , no other handler has been defined thread. uncaught exception handling controlled first thread, thread's threadgroup object , default uncaught exception handler. if thread not have explicit uncaught exception handler set, , thread's thread group (including parent thread groups) not specialize uncaughtexception method, default handler's uncaughtexception method invoked. whether that's idea question (!). may want clear resources, shut down connections etc., log issue and/or alert user. if hav...

php - Why does time() not return the same value as strtotime("2013-08-28 06:38:47") -

i ran time() @ 6:38:47 , returned different value strtotime of same time. why this? it should absolutely return same value. run code: <?php $time = time(); $string = date('y-m-d h:i:s', $time); $strtotime = strtotime($string); print "time = $time\n"; print "string = $string\n"; print "strtotime = $strtotime\n"; print "difference = ".($time-$strtotime)."\n"; ?> my output right now: time = 1377686839 string = 2013-08-28 12:47:19 strtotime = 1377686839 difference = 0 are getting difference this? post test code, maybe there's mistake in there.

java - load the css from tiles definition xml -

how can load css tiles definition file in springs? jsp: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> <%@ page language="java" contenttype="text/html; charset=utf-8" pageencoding="utf-8"%> <%-- <tiles:importattribute name="csslist" /> --%> <tiles:useattribute id = "styleslist" name="styles" classname="java.util.list"/> <!doctype html public "-//w3c//dtd html 4.01 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <%-- <link href="<c:url value="/styles/cssreset-min.css"/>" rel="stylesheet" type="text/css" /> --%> <%-- <link type=...

geolocation - Android Geofencing (Polygon) -

how create polygon geofence multiple geo locations(long,lat values) . how track user entering geofence region or exiting region on android. a geofence array of lat/long points form polygon. once have list of lat/long points, can use point-inside-polygon check see if location within polygon. this code have used in own projects perform point-in-polygon checks large concave polygons (20k+ vertices): public class polygontest { class latlng { double latitude; double longitude; latlng(double lat, double lon) { latitude = lat; longitude = lon; } } bool pointisinregion(double x, double y, latlng[] thepath) { int crossings = 0; latlng point = new latlng (x, y); int count = thepath.length; // each edge (var i=0; < count; i++) { var = thepath [i]; var j = + 1; if (j >= count) { ...

payment gateway - unable to add invoice fee tax in magento order total -

Image
i working on magento 1.7. working on payment gateway have added invoice fee have add tax of invoice fee in tax group please solve problem here following code have tried add tax amount in taxes still not working may doing wrong <?php class ***_******_model_quote_taxtotal extends mage_sales_model_quote_address_total_tax { public function collect(mage_sales_model_quote_address $address) { $quote = $address->getquote(); if (($quote->getid() == null) || ($address->getaddresstype() != "shipping") ) { return $this; } $payment = $quote->getpayment(); if (($payment->getmethod() != 'invoice') && (!count($quote->getpaymentscollection())) ) { return $this; } try { /** * instead of relying on hasmethodinstance not * work when i.e order total reloaded coupon codes, ...

ios - Multi-Context Core Data - Duplicate issues when importing from a background context -

i have typical multi-context coredata stack setup - master moc on private queue (attached psc), has child on main queue , used app's main context. finally, bulk import operations (find-or-create) passed off onto third moc using background queue (new context created each operation). once operation complete saves propagated psc. i'd been suffering issues duplicate objects being created, presumably because these operations executing concurrently. operation 1 start. if object didn't exist, created in operation 1. @ same time operation 2 concurrently running. because operation 1 hadn't completed, operation 2 couldn't possibly know newly created object, proceed create new object, hence duplicates. to resolve this, funnelled find-or-create operation serial nsoperationqueue ensure operations executed 1 @ time: - (void) performblock: (void(^)(player *player, nsmanagedobjectcontext *managedobjectcontext)) operation onsuccess: (void(^)()) successcallback onerror:(vo...

ruby on rails - Issue with displaying sample d3 graph bar chart on IE 8 -

i've been referring sample bar chart screencast , i'm trying see how d3.js work on ie 8. i've copied sample code present in screencast tutorial , i've placed same in file in app. based on wiki of d3 i've tried including aight (aight.js , aight.d3.js) in rails app, in layout . when i've tried hitting sample url /companies/company_division_stats on ie 8, nothing shows up. works on chrome , firefox. i understand aight.js might have limited support in terms of functions wrt ie 8 browser. because of reason d3 graph doesn't show on ie 8 , shows on other browsers or code ? my code present on github. can 1 please tell me in case i'm missing something. for ie8, need limit manipulating regular html dom nodes d3. example linked uses svg, not supported ie8: http://caniuse.com/svg from d3 wiki linked: you'll need modern browser use svg , css3 transitions. d3 not compatibility layer, if browser doesn't support standards, you...

deployment - Git command to checkout any branch and overwrite local changes -

is there git command (or short sequence of commands) safely , surely following: get rid of local changes, fetch given branch origin if necessary, checkout given branch? currently i'm stuck with: git fetch -p git stash git stash drop git checkout $branch git pull but it's bothering me because i'm asked password 2 times (by fetch , pull ). generally happy solution long password needed once. a couple of notes: it's part of homebrewed deployment script application (the code hosted on github), there should no difference if branch fetched origin or not (i.e. first deployment of new branch shouldn't ideally require additional steps), the script located on remote machine can accessed several people, hence no credentials stored , user/password must entered (but once if possible), i don't care local changes, want pristine copy of given branch (the further part of deployment script produces local changes), i can't clone or export fresh reposit...

c# - Request.Querystring == null from inside Iframe -

i have simple mvc page being loaded in iframe on tab of account record in dynamics crm, set pass parameters through. this works fine, page loads , if right-click - properties, url+parameters expected e.g. - http://myserver.com/?type=1&typename=account&id={816e90be-7dbc-dd11-9e0b-001c25cfae82}&orgname=myorg&userlcid=1033&orglcid=1033 however, in controller have request.querystring["id"] and returns null, request.querystring null if load page in browser without iframe request.querystring["id"] has guid expected. what stupid thing have missed? i don't believe can way want because request application coming iframe instead of user. in order need pass parameters in source of iframe so: <iframe id="thepage" src="mypage.aspx?id={816e90be-7dbc-dd11-9e0b-001c25cfae82}"></iframe> you can think of request being proxied. if jack tells jon , jon tells jill, jill has no knowledge of jack unles...

wcf - Activate non default site with NetMsmqActivator -

is possible have netmsmqactivator service activate site running on port 80? as far know can't specify port number on net.msmq uri can't think of way netmsmqactivator able find correct site if runs on other port default 1 (80). can confirm this?

__call, __callStatic and calling scope in PHP -

i read calling scope , scope resolution operator (::) in php. there 2 variations: instance calling , statical calling. consider folowing listeng: <?php class { public function __call($method, $parameters) { echo "i'm __call() magic method".php_eol; } public static function __callstatic($method, $parameters) { echo "i'm __callstatic() magic method".php_eol; } } class b extends { public function bar() { a::foo(); } } class c { public function bar() { a::foo(); } } a::foo(); (new a)->foo(); b::bar(); (new b)->bar(); c::bar(); (new c)->bar(); the result of execution (php 5.4.9-4ubuntu2.2) is: i'm __callstatic() magic method i'm __call() magic method i'm __callstatic() magic method i'm __call() magic method i'm __callstatic() magic method i'm __callstatic() magic method i don't understand why (new c)->bar(); execute __callstatic() of a ?...

java - Iterate on all weeks between start, finish date -

i have 2 date objects, start , finish. want iterate them on weekly basis, i.e. if there 4 weeks in between (calendar weeks, not 7 days after each other), want 4 iterations , in each iteration want actual start , end dates. i'm hacking iterable purpose, i'm thinking if can achieved example joda time or smart custom method. in advance! edit: must repeat need weeks in calendar, not 7 days after each other. if start date on random day in week (for example friday), first iteration should contain [friday,sunday] not [friday,friday+7 days]. solution posted answer. to calculate using calendar , week_of_year: int startweek; int finishweek; int diff; simpledateformat sdf; calendar cal; calendar startcountingcal; date startdate; date finishdate; string startdates = "01/01/2013"; string finishdates = "01/05/2013"; sdf = new simpledateformat("dd/mm/yyyy"); startdate = sdf.parse(startdates); finishdate = sdf.parse(finishdates); ...

mvvm - MvvmCross: Deserilization Error for JSON -

i'm trying create simple application through lesson 6 in n+1 days of mvvmcross application sample. failed in simplerestservice while converting json data serialization. private t deserialize<t>(string responsebody) { // error here deserilizing var toreturn = _jsonconverter.deserializeobject<t>(responsebody); return toreturn; } my json data through browser : [{"desc":"all","id":"0"},{"desc":"assigned","id":"2"},{"desc":"in progress","id":"3"},{"desc":"resolved","id":"4"},{"desc":"closed","id":"5"},{"desc":"hold","id":"6"},{"desc":"低","id":"8"},{"desc":"waiting approval","id":"9"},{"desc":"cancelled","id":...

python - How to disable/remove the input box in wx.lib.filebrowsebutton.FileBrowseButton? -

looks there's no built-in option disable/remove inputbox/textctrl part in wx.lib.filebrowsebutton.filebrowsebutton , did come workaround set labeltext blank , size down fit button itself, way visually can tell no difference normal button, don't think it's nice enough go with. so there way disable/remove inputbox part? or maybe way bind normal button file browser function? if don't need textctrl , don't need wx.lib.filebrowsebutton . can have normal wx.button launches wx.filedialog instance. in fact, that's wx.lib.filebrowsbbutton does. here's relevant source code, whole thing can viewed here: https://github.com/wxwidgets/wxpython/blob/master/wx/lib/filebrowsebutton.py def onbrowse (self, event = none): """ going browse file... """ current = self.getvalue() directory = os.path.split(current) if os.path.isdir( current): directory = current current = ...

javascript - Using .click instead of onclick and getting a variable value -

i have seen inline/html events onclick, mouseover etc being used less , less , advised register events using javascript. i have html like: <ul id="supported-locations"> <li onclick="setlocationid(32);">mexico</li> <li onclick="setlocationid(35);">mongolia</li> </ul> which works fine want without "onclick" in html still able retrieve id number. the <li> elements retrieved via ajax while user types input box queries database , retrieve data without loading page. when user clicks on 1 of countries run setlocationid function sets hidden html form element id of selected country can use once form submitted. how register event listener these <li> 's when countries , id's different , changing depending on user types box? use data attribute hold number. on onclick event, read attribute on element clicked. html: <ul id="supported-locations"> ...

c# - On button click outlook window doesn't open -

i have button on asp.net page when click on it should open outlook window following error. retrieving com class factory component clsid {0006f03a-0000-0000-c000-000000000046} failed due following error: 80040154. i'm using in c# page: using microsoft.office.interop.outlook;// version 12.0.0 in web.config: <add assembly="microsoft.office.interop.outlook, version=12.0.0.0, culture=neutral, publickeytoken=71e9bce111e9429c"/> it gives error @ line: updated code per request, trying open new instance. application oapp = new application(); _mailitem omailitem = (_mailitem)oapp.createitem(microsoft.office.interop.outlook.olitemtype.olmailitem); just fyi, when run on pc it's working ok, on live environment gives me error. and if problem iis how can solve it thanks in advance. no office app, outlook included, can used in service (such iis). extended mapi (c++ or delphi) can used in service. can use cdo 1.21 (it no longer include...

python - "Least Astonishment" and the Mutable Default Argument -

anyone tinkering python long enough has been bitten (or torn pieces) following issue: def foo(a=[]): a.append(5) return python novices expect function return list 1 element: [5] . result instead different, , astonishing (for novice): >>> foo() [5] >>> foo() [5, 5] >>> foo() [5, 5, 5] >>> foo() [5, 5, 5, 5] >>> foo() a manager of mine once had first encounter feature, , called "a dramatic design flaw" of language. replied behavior had underlying explanation, , indeed puzzling , unexpected if don't understand internals. however, not able answer (to myself) following question: reason binding default argument @ function definition, , not @ function execution? doubt experienced behavior has practical use (who used static variables in c, without breeding bugs?) edit : baczek made interesting example. of comments , utaal's in particular, elaborated further: >>> def a(): ... print("a exec...

android - Unable to load page with InAppBrowser -

i have weird problem inappbrowser: display error message when trying load web url. here code: var twittershareurl = "https://twitter.com/intent/tweet/?" + "text=" + encodeuricomponent("a fancy message") + "&url=" + encodeuricomponent("http://myurl.com"); var browser = window.open(twittershareurl, '_blank', "location=no"); browser.addeventlistener('loadstart', function (e) { if (/\/complete/.test(e.url)) { browser.close(); } }); cordova 2.4, have use version because of plugin. problem solved: because phone did not have sim card (i using wifi tests). don't knows how things related inserting sim solved problem (and unlocked series of things email checking on gmail).

c++ - Including white spaces using sscanf -

code sscanf(szbuf, "%s %c %s", sztmp1, &szchar, sztmp2); where szubuff fetch_query = select name table1 szchar = szbuf , sztmp1 , sztmp2 character arrays. problem sztmp2 storing select , ignoring rest. need complete select name table1 inside sztmp2 #include <stdio.h> #include <string.h> int main(int argc, const char **argv) { char str[] = "fetch_query = select name table1"; char *qry, *sql; qry = strtok(str, "="); sql = strtok(0, "="); printf("%s -- %s\n", qry, sql); return 0; } output: fetch_query -- select name table1

node.js - Node Package Summary Badges -

as learn node.js, 1 thing has jumped out of me use of badges on package pages. example of such badges can seen here . badges i'm referring build status, coverage, , npm module number. i'm curious these badges. are these badges provided single entity? or, standard format various entities have decided standardize on? there other informational badges available? thank you! they're images provided ci (continuous integration) systems, in case travis ci. other ci systems, like jenkins , provide badges too; they're meant embedding. there's no "standard format." i imagine they're inspired real-life build light indicators.

java - Selecting Arrival and exit time using time picker in android -

here selecting arrival , exit time using imageview of timepickerfragment, dialogfragment. question how select exit time..when selecting exit time show in arrival time text box only. how solve problem me. here code arrival , exit time using 2 text box , 2 image view button. import java.util.calendar; import android.os.bundle; import android.annotation.suppresslint; import android.app.dialog; import android.app.timepickerdialog; import android.support.v4.app.dialogfragment; import android.support.v4.app.fragmentactivity; import android.text.format.dateformat; import android.view.menu; import android.view.view; import android.widget.edittext; import android.widget.timepicker; @suppresslint("validfragment") public class mainactivity extends fragmentactivity { edittext arrtime,exittime; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); } public void selectarrivaltime(view v...

javascript - How to run the event load on click? -

i'm trying deal transfer of data server. my problem: ext.onready(function(){ ext.define('person', { extend: 'ext.data.model', idproperty: 'personid', fields: [{ name: 'personid', type: 'int' }, .......], proxy: { type: 'ajax', api: { read: '1.php?id=90', create: 'create.php', update: 'upd.php', destroy: 'delete.php' } } }); person.load(1, { //callback который будет выполнен когда запрос пройдет.... callback: function(p, operation){ //p -это текущий объект alert(p.get('name')) console.log(p.get('personid')); //1 console.log(p.get('salary')) //300 //document.getelementsbytagna...

javascript in pdf form if(this.getField("Global Region").value !=null){} -

i trying lock down pdf form if "global region" field populated. it's long process test code. make sure correct syntax check not null in global region field. if(this.getfield("global region").value !=null) { // code here } the posted code correct , works. left out first curly bracket , that's why not working. if(this.getfield("global region").value !=null) { // code here }

gchart - SAS 9.3 goptions ignores gsfname -

sorry bad english :) i need export gif picture sas proc gchart: filename graphout "&path.\file.gif"; goptions gsfname=graphout dev=gif gsfmode=replace; proc gchart data=work.temp; /*forming chart*/ run; quit; filename graphout clear; but export occurs in work directory. what's problem? i can't figure out problem option, recommend not using create graphics in event. ods easier use. there lot of ways in ods; html destination easiest: ods html gpath="c:\temp\" path="c:\temp\"; proc gchart data=sashelp.class; vbar age/group=sex name="mychart"; run; quit;

scp - rsync - create all missing parent directories? -

i'm looking rsync -like program create missing parent directories on remote side. for example, if have /top/a/b/c/d on 1 server , /top/a exists on remote server, want copy d remote server , have b , c directories created well. the command: rsync /top/a/b/c/d remote:/top/a/b/c won't work because /tmp/a/b doesn't exist on remote server. , if did exist file d copied path /top/a/b/c . this possible rsync using --include , --exclude switches, involved, e.g.: rsync -v -r dest:dir \ --include 'a/b' \ --include 'a/b/c' \ --include 'a/b/c/d' \ --include 'a/b/c/d/e' \ --exclude 'a/*' \ --exclude 'a/b/*' \ --exclude 'a/b/c/*' \ --exclude 'a/b/c/d/*' will copy a/b/c/d/e dest:dir/a/b/c/d/e if intermediate directories have files. (note - includes must precede excludes.) are there other options? you may looking rsync -ar for example: rsyn...

Sorting array of XYZ coordinates into table in Python -

i'm new python , can't figure out how solve problem. have array lots of x,y,z coordinates , need create output file import them exel. i imported stl file , put created 2d array file right array this: example = [[x1,y1,z1],[x1,y2,z2],[x2,y1,z3],[x2,y2,z4]] the x , y coordinates repeat alot , z different. what need sort them layout save .csv file: example, y1, y2 x1, z1, z2 x2, z3, z4 so put x coordinates rows, y columns , z in corresponding place can me out this? in advance. you can break problem following steps: get unique x , y coordinates construct table/matrix of appropriate size assign x , y coordinates along top , left edges iterate through array, grab z coordinate, , map correct location in matrix according x , y coordinates output resulting matrix csv file. i'm making following assumptions: if given x, y, z coordinate not exist in array, has space available within matrix, corresponding spot in matrix have value "0...

html - jquery click triggering on unbound element not clicked -

html <b class="ke">some text <b class="x">x</b></b> javascript function key_tag_click() { $('.ke').not('.x').unbind().bind('click', function () { console.log('.ke'); $(this).unbind(); $(this).children('.x').show(); x_click(); }); return; } function x_click() { $('.x').unbind().bind('click', function () { console.log('.x'); $(this).unbind(); $(this).hide(); key_tag_click(); }); return; } key_tag_click(); first click on .ke the console logs ke then click .x the console logs x ke why?? triggering .ke click event? @ point .key unbinded! when click on element, event first triggered on element, elements parent, elements parent, etc way document. why clicking on .x results in click handler .ke getting triggered. prevent it, either return false, stop propagatio...