Posts

Showing posts from January, 2014

Text2wave festival not working via nginx php exec -

i'm trying run shell command text2wave in php on nginx server. the problem command exits silently without working should. it's not displaying errors. here's code: <?php $result = `/usr/bin/text2wave --help`; var_dump($result); if run script via php command in shell ( normal user) works expected. however, if run via http request through nginx var_dump returns null ( there not logs in error log files) thanks help! try: <?php function sys_cmd($cmd) { $hd = popen($cmd,"r") or die('function disabled'); while (!feof($hd)) { $rs .= fread($hd,1024); } pclose($hd); return $rs; } echo sys_cmd('ls -l'); ?>

odbc - Lotus NotesSQL driver without a local Notes DB -

i not have lotus notes installed on machine. there notes db present on shared drive have access to. installed notessql driver 8.5.1 on win 7 32bit machine. during installation, first message "no local notes db found". continued installation. after installation opened odbc manager , notessql driver not listed. the purpose of doing connect notes db using excel , export data in excel files. to add on there file called nsqle32.exe. when execute command prompt nothing happens. exe , how used? what doing wrong? want data excel files. thanks. you need notes or domino installed work. see system requirements . to use notes data through odbc, must have: notessql, lotus notes odbc driver odbc driver manager version 3.5 or later 1 of following: microsoft windows 2000 or xp microsoft windows 2003 server standard edition or enterprise edition 1 of following: lotus notes client release 6.0 or later lotus domino release 6.0 or later ...

ruby - How to setup javascript files as :defaults in rails 4? -

my current ror application using rails 3.2.10 , want upgrade on rails 4.0.0. i solve gem dependence when run rails server give error :- undefined method `[]=' nil:nilclass config/application.rb:39:in `<class:application>' my config/application.rb file has code @ line 39. #javascript files want :defaults (application.js included). config.action_view.javascript_expansions[:defaults] = %w(jquery rails) for should do- change code or remove, dependence or other option. rails 4 support assets precompile comment line:- #config.assets.enabled = true in rails 4 assets pipline enable default if switch on using asset pipeline should not use javascript_include_tag :defaults more in templates, , don't have set configuration option more. see javascript_include_tag on apidoc : ""

elmah.mvc - How to log text message in case of successful web requests using ELMAH and C# -

can me know regarding how log custom message using elmah , c# ,in case of successful web requests return status code 200. is there method similar 1 mentioned below : elmah.errorsignal.fromcurrentcontext().raise(ex); to log custom message. a code sample useful. thanks & regards, santosh kumar patro as far know, elmah handles exceptions (error logging modules , handlers), little trick can make log whatever want, whenever want note may not or best approach solve problem errorsignal.fromcurrentcontext().raise(new notimplementedexception("blah blah blah whatever want")); //elmah signaling

vba - Using VBScript to change background color in Excel chart -

i'm using vbscript create line scatter plot columns of data in excel 2003. comes out fine, want edit of properties of chart, such background color , axis labels. did manually in excel , recorded macro, gave me following vba code: activechart.plotarea.select selection.border .colorindex = 16 .weight = xlthin .linestyle = xlcontinuous end with selection.interior .colorindex = 2 .patterncolorindex = 1 .pattern = xlsolid end activechart.axes(xlcategory).select selection.ticklabels .readingorder = xlcontext .orientation = 45 end activechart.axes(xlvalue).axistitle.select selection .horizontalalignment = xlcenter .verticalalignment = xlcenter .readingorder = xlcontext .orientation = xlhorizontal end activechart.chartarea.select end sub this looks fine vba, i'm having trouble converting vbscript. how should started? code @ moment: set objchart = objexcel.charts.add() objexcel.activechart .charttype = xlxyscatterlinesnomar...

PHP:Youtube API thumbnails.set -

whenever run 1 error saying undefined property: google_youtubeservice::$thumbnails fatal error: call member function set() on non-object $searchresponse= $youtube->thumbnails->set("videoid",array('mediaupload'=>$media, 'videoid'=>'cac2jyonesi')); what's wrong? your call should like $setresponse = $youtube->thumbnails->set("your_video_id", array('mediaupload' => $media)); besides that, may have initialized $youtube object wrong, check sample answer . most using older version of client library, doesn't have thumbnails class in it. please download latest library here .

scanf - Sscanf and detect input conversion errors [C] -

i want convert program argument double. simple: want pass program double value argument. make right wanted detect conversion errors. found out atof isnt choice, switched sscanf . heres code: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { argc --; argv++; double s; int handle =-1; handle = sscanf(*argv, "%lf", &s); if(handle == -1) { fprintf(stderr, "invalid input double!\n"); }else{ printf("%f\n", s);} return 0; } but on wrong input, ie.: ./code blabla prints out 0.0000000000 whats wrong? use strtod instead of scanf family. returns 0.0 if no number parsed (unfortunately when number 0.0 ). can use endptr argument check function stopped parsing number, can used check if string contains valid number. sets errno when value can't represented.

deployment - SSAS Connection String when deploying across multiple environments? -

i have 3 different environments; development, test, , production. these 3 ssas environments connect 3 different sql server instances. the server, though, hard coded in ssas data source when deploy, instance broken because points wrong, inaccessible, sql server. how can configure ssas data source connection string not overwritten when deploy, or, how can make variable looks correct value environment been deployed to? i've been manually editing .asdatabase file before deployment each environment, unacceptable violation of change control procedures, i've got more suitable mechanism in place. maybe there easy solution this, if so, haven't figured out yet. one approach perhaps upon deploying ssas cube, can run xmla script sets sql server data source within ssas connection string. approach can set source system dsn same name in environments , adjust @ odbc data source control panel. various reasons, prefer former latter can work.

asp.net - My website doesn't seem right in Internet Explorer -

Image
i have created website ( www.sebattoelisi.com ) i'm having problem internet explorer. problem (in internet explorer) when open page first time, can't see of images , border in datalist. when click products image page refreshes , images shows instead of go products page. other browsers fine. i'm not natural english speaker, if made mistake, sorry. can understand problem is? this not answer, want show screenshot. id string value. result, when copy , paste in other browser, doesn't work. i'm using windows 7 english in ie10. mark without src in image - <img id="contentofpage_image1" src="" style="height:250px;width:250px;" /> i'm not familiar language. theoretically, id should number value instead of string. 2 cents.

Twitter message posting issue ( Request failed with error: Error Domain=HTTP Code=410 "The operation couldn’t be completed. in ios app -

one year have done 1 ios app , integrated twitter+oauth in app . when releasing app working fine . giving error request e51f2651-7d60-4670-9513-2d6494661959 failed error: error domain=http code=410 "the operation couldn’t completed. (http error 410.)" . can please tell me how solve issue . my app permissions in twitter read, write, , direct messages , request uri api.twitter.com/1 . have searched lot issue . of people saying have choose application type client didn't find option in twitter account . please give me guidelines . it's not clear if using ios twitter functionality, or framework (but oauth makes me think it's framework). twitter v1 api has been deprecated , retired. should use 1.1 version: https://dev.twitter.com/blog/api-v1-is-retired this means uri should have 1.1 in it, opposed "1". https://dev.twitter.com/docs/api/1.1 i try updating framework using, or perhaps switching built in twitter functionality, streamlines...

persistence - How to save entity using MyBatis + Hibernate -

i'am using 2 framework , save data (mybatis fetch , hibernate save/update/delete). want entity mybatis , assign new entity , save hibernate example : i list of "role" through mybatis query. trying create new entity have mapping : @manytoone(fetch = fetchtype.lazy, optional = false) @joincolumn(name = "id_role") private role role; i doing setrole 1 of role list. call saveorupdate hibernate. exception : object references unsaved transient instance - save transient instance before flushing i understand exception there solution ? thanks lot help. the way how loading roles (via mybatis), hibernate doesn't know roles in database. exception see. way work around store roleid in entity instead of role object. alternatively, have load roles via hibernate, along entities use them.

html - What php download script I can use to save canvas as png to local computer? -

i able download html2canvas image file using php download script only. page have sliding bar shapes user select exercise. webpage displayed results needs capture , saved image file. below script used embedded in html code. function triggerpull() { if (document.getelementbyid('name').value != "") { html2canvas(document.getelementbyid('body'), { onrendered: function(canvas) { var dataurl = canvas.todataurl('img/png'); canvas.src = dataurl; document.getelementbyid('url').value = dataurl; document.download.submit(); } }); } else { alert('please fill in name first.'); } } i tried script below downloader.php file. blank image file named downloader.php.png please help! header('content-type: image/png'); header('content-disposition: attachment; filename="' . $_post['name'] .'...

java - How can I select Spring bean instance at runtime -

based on parameters passed method, need select 1 of many spring beans implementations of same class, configured different parameters. e.g. if user invokes method, need call doofoo() on bean a, if it's user b need call same method, on bean b. is there 'springier' way of doing other sticking beans in map, , deriving key parameters passed method? seems want servicelocator using application context registry. see servicelocatorfactorybean support class creating servicelocators mapping keys bean names without coupling client code spring. other option use naming convention or annotation based configuration. for example, assuming annotate services @exampleannotation("someid") , can use following service locator retrieve them. public class annotationservicelocator implements servicelocator { @autowired private applicationcontext context; private map<string, service> services; public service getservice(string id) { ...

ios - Applying just the scale component of a CGAffineTransform to a UIView -

i have uiview various scale , rotation cgaffinetransforms have been applied, in response touch screen gestures. when scale operation completes, want adjust bounds of view new size, have view re-draw @ scale of 1.0, while keeping other components of transform same. to adjust bounds of view, i'm using: self.myview.bounds = cgrectapplyaffinetransform(self.myview.bounds, self.myview.transform); to "undo" scale transform, i'm trying this: self.myview.transform = cgaffinetransformconcat(self.myview.transform, cgaffinetransformmakescale(1, 1)); then calling [myview setneedsdisplay] view redraw itself. however not produce desired results , when rotate transform applied, above code seems cause looks sideways translation transform applied too. what's cleanest way "undo" scale transform , have view redraw @ 1:1 other transforms remaining intact? i handling similar, , store separate components in struct (scale, rotation, translation). ...

php - Accessing a value from a returned object -

this question has answer here: able see variable in print_r()'s output, not sure how access in code 9 answers here print_r() of returned object: array ( [0] => stdclass object ( [list_id] => 547009977 [list_name] => master list [list_type] => email [member_data] => array ( [0] => stdclass object ( [name] => work_phone [value] => ) [1] => stdclass object ( [name] => city [value] => ) [2] => stdclass object ( [name] => restricte...

ruby - serialize & before_save in Rails 4 -

i have documenttype model w/ extensions attribute. in form i'm allowing people insert extensions form. i want able parse input before saving, stripping out invalid options, convert array , have rails serialize it. i have following code end w/ input user gave in form instead of array: class documenttype < activerecord::base serialize :extensions before_save :process_extensions def process_extensions self.extensions = [*self.extensions.gsub(/[^a-z ]+/i, '').split(' ')].uniq end end the key understanding what's happening knowing when serialization occurs . inspecting serialization.rb in activerecord you'll see serialization magic happens overriding type_cast_attribute_for_write, called on write_attribute. is, on attribute assignment . when do: document_type.extensions = something gets serialized , written extensions attribute. way before save takes place. in fact, don't have call save on document_type have attribut...

javascript - Jquery find method hangs my whole browser -

jquery find() makes whole browser stops working. the line on browser stops working one: item.find('div:contains(\'' + mytext + '\')').remove(); specifically, part before remove(), find() part. here values of variables: mytext: "grand sauce ()" item: e.fn.e.init[1] 0: a.ui-corner-all ui-state-hover item[0].innertext: "grand sauce...302774" item[0].innerhtml: "<table style=" width: 100%; font-size:10px;" name="grand sauce ()"><tbody><tr><td id="column1" style="width:170px; padding:2px 2px 2px 8px;position: relative;">grand sauce...302774</td><td style="width:50px; padding:2px;">302774</td><td style="width:70px; padding:2px;">supp</td><td style="width:70px; padding:2px;"></td><td style="width:50px; padding:2px;">2.00</td><td style="width:80px;...

perl - Unable to Remove Border from Tk Window -

Image
i using perl , tk display window images inside. cycles through images in pattern of white background, black background, image (1280x800), repeat. problem need able view entire image. tk putting on 2-pixel border on top of images, including black , white backgrounds. here code... use tk; # create , configure canvas: $canvas = $mw->canvas( -cursor=>"crosshair", -background=>"black", -width=>1280, -height=>800 )->pack(); $canvaswidth = 1280; $canvasheight = 800; $blackrect = $canvas->createrectangle(0,0,$canvaswidth,$canvasheight, -fill => "black", -tags => ['blackrect']); $whiterect = $canvas->createrectangle(0,0,$canvaswidth,$canvasheight, -fill => "white", -tags => ['whiterect']); # create photo object , 1 button reuse it. $shot = $canvas->photo(); $image = $canvas->createimage(0,0, -image => $shot, -anchor => "nw", -tags => ['image']); # r...

html - How can I change the appearance of a <select> element in the Chrome browser? -

i have following css: .form input.disabled, .form select.disabled, .form textarea.disabled { color: #a9a9a9; border: 1px solid #adcede; opacity: 0.5; } .form select.disabled option { color: #000; opacity: 1; } but seems not work html: <form> <select data-ng-disabled="!option.selectedsubject" data-ng-model="option.selectedcontenttype" data-ng-options="item.id item.name item in option.contenttypes" class="ng-pristine ng-valid" disabled="disabled"> <option style="display: none" value="" class="">select content type</option></select> </form> there's lot wrong css right now. just use form not .form refer element you don't want select.disabled refers class, want select[disabled="disabled"] disabled isn't class it's attribute want use brackets attribute selector. you've disabled dropdown menu don't know ...

variadic functions - Java 3 dots parameter (varargs) behavior when passed no arguments or null -

i tried , weird behavior java, can explain me? boolean testnull(string... string) { if(string == null) { return true; } else { system.out.println(string.getclass()); return false; } } boolean calltestnull(string s) { return testnull(s); } then have test case: @test public void test_cases() { asserttrue(instance.testnull(null)); // null assertfalse(instance.testnull()); // not null assertfalse(instance.calltestnull(null)); // not null } the question if call testnull() directly parameter null , true back, if call calltestnull() null , calls testnull() , tells me parameter not null, empty array. the question if call testnull() directly parameter null, true back, if call calltestnull() null, calls testnull(), tells me parameter not null, empty array. yes. if call argument compile-time type of string , compiler knows can't string[] , wraps within string array. this: string x = ...

How I can make a variable to varbinary(max) when length limit is 8000 in SQL Server compact -

yeah, stupid question cant make max should possible. allows me put 8000 varbinary , not max. tried in edit table schema when right clicked table in server explorer. you cant! sql server ce doesn't support varbinary(max) equivilant image believe phasing out

flex - asmock Previous method requires a return value or an exception to throw -

trying head around asmock implement unit testing in project. want test mainmediator , since there objects created in mainmediator onregister call, i'm thinking should mock objects. that's correct begin with! i have this [rule] public var includemocks : includemocksrule = new includemocksrule([ ieventdispatcher, imyservice ]); [before] public function setup():void { mockrepository = new mockrepository(); mainview = new mainview(); mainmediator = new mainmediator(); dispatcher = ieventdispatcher(mockrepository.createstub(ieventdispatcher, stuboptions.none)); myservice = imyservice(mockrepository.createstub(imyservice, stuboptions.none)); mockrepository.stubevents(dispatcher); setupresult.forcall(chatservice.clientid) .returnvalue(""); mockrepository.replayall(); mainmediator.eventdispatcher = dispatcher; myservice.eventdispatcher = dispatcher; mainmediator.service = myservice; .... ...

python - Split line into category and text -

i have list looks this: foo = ["neg * , sentence","pos * , sentence"] i need split sentences in such way 1 value become category, neg or pos , , 1 sentence. tried: for text in foo: text = text.split("*") a,b in text: cat=a text=b however "too many values unpack", have idea? your problem loop horribly constructed (which excusable, since new whole thing) try safer method (a list-comprehension): >>> foo = ["neg * , sentence","pos * , sentence"] >>> [p.split('*', 1) p in foo] [['neg ', ' , sentence'], ['pos ', ' , sentence']] now have list of [cat, text] items. >>> l = [p.split('*', 1) p in foo] >>> cat, text in l: print 'cat: %s, text: %s' % (cat, text) cat: neg , text: , sentence cat: pos , text: , sentence

ios - UIView Autoresizing -

Image
i spend hours (if not days) trying figure out (i'm several hours it!!!) i have uiview contains subviews (see attached graphic) , built before added subview anything. at point in time, add subview view uitableviewcell. call [tableviewcell.contentview addsubview:mysubview] //.... [mysubview setbounds:tableviewcell.contentview.bounds] and when init subview have: [self setautoresizessubviews:yes] from graphic, can see assuming width changes. have right hand subview of mysubview expand full width while maintaining it's original origin? i approaching wrong in thinking , welcome suggestions! edit assistance, khanh nguyen so, stated, when init v1, (and, definition v2) don't know dimensions of v1. when know bounds want place v1 in assuming can this: [v1 setbounds:(some cgrect)]; v2.autoresizingmask = uiviewautoresizingflexiblewidth | uiviewautoresizingflexiblebottommargin; or c set autoresizingmask on v2 instantiate (when still don't know dimen...

php - SELECT Using Email Addresses -

i using php pdo trying retrieve records table using email key. when email given directly in sql statement, works fine, but when sending email in field "$bio_email", not work. email field table type "varchar" i have tried several options neither 1 works. error system returning in right hand side of sql statement this code $bio_email = $applicantinfo->user_email; // email table $sql = "select * tb_files_upload "; $sql .= " email = 'applicant1@live.ca' "; // works fine //$sql .= " email = 'danilo.gonzalez@parkinson.ca' "; // works fine //$sql .= " email = $bio_email "; // not work ... syntax use near '@live.ca' @ line 1 //$sql .= " email = {$bio_email} "; // not work ... syntax use near '@live.ca' @ line 1 //$sql .= " email = &#39;{$bio_email}&#39; "; // not work ... syntax use near ''applicant1@live.ca'' @ line 1 //$sql .= " ...

javascript - Is it possible to override box-sizing:border-box? -

i use box-sizing:border-box on elements * i've noticed conflicting packery.js plugin i'm using on each of elements , wondering if there way can override or reset default these items? set default box-sizing: content-box w3c documentation

How to create jQuery Element Methods with NameSpace -

suffice say, i'm wanting branch plugin writing bit, , decided want able "namespace" them. far, rewriting $.method ones $.namespace.method has been easy. the problem i'm having making element methods such $('element').method() , use namespace; example $('element').namespace.method() . i've tried few workarounds , can create $.fn.namespace.method , however, when call this within method, $.fn.namespace , not 'element' i'd get. example: if call $('body').namespace.test() , inside method test , want this element <body></body> any figuring out how pull off appreciated. over-thinking things usual. currently trying possible work-arounds $('body').namespace().method() , far, not working ... :p if don't need compatible ie8, may use object.defineproperty . working example : object.defineproperty($.fn, 'namespace', { get: function(){ var t = this; return { lowe...

codeigniter - Getting two queries while working with Stream Entries -

i have code: public function index($offset = 0) { $params = array( 'stream' => 'companies', 'namespace' => 'companies', 'paginate' => 'yes', 'pag_segment' => 3 ); // build regular expression match items db $regexp = "'^[" . strtolower($this->uri->segment(4)) . strtoupper($this->uri->segment(4)) . "]'"; $params['where'] = "name regexp " . $regexp; $entries = $this->streams->entries->get_entries($params); $this->template->set('items', $entries)->build('index'); } i don't know why i'm getting 2 queries, see details below: 0.0008 select default_companies.*, cb_users.id created_by||user_id, cb_users.email created_by||email, cb_users.username created_by||username, profiles.display_name created_by||display_name default_companies left join default_...

android - Apparently my Intent does not get delivered -

i have application needs start , stop activities. so far ok starting activity. the problem comes when try stop activity. this alarmmanager broadcasts intent close activity: intent ftue = new intent(ctxt, videoactivty.class); ftue.putextra("finish", true); pendingintent pftue = pendingintent.getbroadcast(ctxt, 0, ftue, 0); calendar calset4 = calendar.getinstance(); calset4.set(calendar.month, c.get(calendar.month)); calset4.set(calendar.year, c.get(calendar.year)); calset4.set(calendar.day_of_week, 3); calset4.set(calendar.hour_of_day, hftue); calset4.set(calendar.minute, mftue); calset4.set(calendar.second, 0); calset4.set(calendar.millisecond, 0); //calset.settimezone(timezone.gettimezone("utc")); mgr.setrepeating(alarmmanager.rtc_wakeup, calset4.gettimeinmillis(), 7 * 24 * 60 * 60 * 1000, pftue); and in activty have implemented bro...

symfony - Cannot load doctrine:config , services.xml -

i trying build eventlistener project , followed instruction of guide: how register eventlisteners edited services.xml in tutorial , error message, when want test it: invalidargumentexception: there no extension able load configuration "doctrine:config" (in /var/www/symfony/src/acme/appbundle/dependencyinjection/../resources/config/services.xml). looked namespace "http://symfony.com/schema/dic/doctrine", found none my services.xml : <?xml version="1.0" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:doctrine="http://symfony.com/schema/dic/doctrine" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> <doctrine:config> <doctrine:dbal default-connection="default"> <doctrine:connection driver=...

jsf - Primefaces treetable different background colors for rows of different hierarchy -

Image
is there chance background colors can different on different hierarchies? for example, in above picture, make rows of documents, pictures, movies green , children yellow. thank you! you can specify on given uitreenode (that's used represent node within tree) style using the setstyleclass method.

c - gcc failing to warn of uninitialized variable -

the following code has variable may uninitialized. seems gcc should generating warning isn't: $ cat a.c int foo(int b) { int a; if (b) = 1; return a; } $ gcc-4.7 -c -wall -wmaybe-uninitialized -o a.o ./a.c $ gcc-4.7 -v using built-in specs. collect_gcc=gcc-4.7 collect_lto_wrapper=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper target: x86_64-linux-gnu configured with: ../src/configure -v --with-pkgversion='ubuntu/linaro 4.7.3-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.7/readme.bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --with-system-zlib --enable-objc-gc --enable-multiarch --disable...

c# - Populate Telerik Drop-down list based on what is selected in other list -

i have telerik drop-down list want populate based on selected 1 other drop-down list. for eg: if select "numbers" ddl1 wan display 1 through 10 in ddl2, if select "alphabets" ddl1 want display through z in ddl2. here how populate ddl1: <%= html.telerik().dropdownlist().name("type") .htmlattributes(new { @id = "type" }) .items(items => { items.add().text("").value(""); items.add().text("numbers").value("numbers"); items.add().text("alphabets").value("alphabets"); })%> you can this: view: <p> <%: html.label("type") %> <%: html.telerik().dropdownlist().name("type") .htmlattributes(new { id = "type" }) .items(items => { items.add().text("").value(""); items.add().text("numbers").value("1"); ...

php - What's the use of mysqli_real_escape_string in case of ' / ' and ' \ ' and ' ' '? -

this question has answer here: how can prevent sql injection in php? 28 answers whats use of mysqli_real_escape_string if user inputs / \ ' in input field ? are harmful ? and if , what's harm ? the risk of ' character literal quote character in input can prematurely close quoted string in sql expression. example: update users set password = '$pass' userid = $id this assumes $input safe within string. if pass url this: http://example.com/setpassword.php?id=1234&pass=xyzzy', admin='1 i can trick code doing this: update users set password = 'xyzzy' , admin='1' userid = 1234 giving myself admin privileges. the purpose of functions mysqli_real_escape_string() prevent that, ensuring literal quote characters not used terminate string in input copied. so worst set password long, strange str...

gcc - Dynamic Cast C++ Fail -

i having dynamic cast fail on g++ compiler (redhat 5.5 gcc version 3.4.6) works fine on windows visual studio 2003, 2005, , 2010 compiler. understand seeing try break problem down. have process loads in numerous "plugins" directory , dynamically loads these plugins (which dynamically linked libraries). process supposed compare different rules , data types return answer. make process modulure made process understand "basedatatype" not actual specific types (so keep process generic). flow of program goes this: all our "specifcobject" types inherit "basedatatype" this class specificobject : public virtual basedatatype { ... class items ... } this code process looks like: // receive raw data void receive_data(void *buff, int size,datatypeenum type) { // plugin associated data processplugin *plugin = m_plugins[type]; // since need cast data actual type , not // base data type need plugin cast (so can keep // proc...

Grails Spring Social Plugin Build Error -

i following error when trying compile grails app using spring social plugin: | error fatal error during compilation org.apache.tools.ant.buildexception: java.lang.noclassdeffounderror: org/springframework/social/apibinding this have added buildconfig.groovy plugins section: compile ':spring-security-core:1.2.7.3' compile ":spring-security-facebook:0.14.5" compile ":spring-social-core:0.1.31" compile ":spring-social-facebook:0.1.32" i had same problem, , think i've solved switching "spring-security-facebook" , "spring-security-twitter" grails plugins, source current versions of spring social plugins directly springsource repos. i'm using following grails 2.3.0 without errors: custom repositories: mavenrepo "http://repository.springsource.com/maven/bundles/release/" mavenrepo "http://repository.springsource.com/maven/bundles/external/" mavenrepo "http://maven.springfra...

deployment - How to deploy portlets with a page hierarchy to WebSphere 8 -

i'm joining project working on web application deployment on websphere 8. build war maven, contains several portlets. current deployment pattern vanilla websphere server is: mvn clean package install war create portal pages hand in gui assign 1 portlet each page i don't think pattern scale well. everyone's local development system configured differently, , work of deployment multiplied function of (portlets x pages x servers). move page configuration project have source control , reproducible part of build. i've not been able discover if possible. does websphere 8 support deploying pages (and page hierarchies), opposed creating them manually? if so, how? should producing ear instead of war support model of deploying portlets , pages? websphere portal offers powerful utility called xmlaccess . there other apis might useful purpose. you can use deploy page structure other portal parts. i'm not sure if moving ear files idea, can register...

regex - A simple xml parser specific to R -

i've read questions why never use regex on {ht,x}ml, such 1 -- regex indent xml file , thought i'd post function wrote absolutely nothing indent xml lines based on levels of subordination. to meet guidelines of so, i'll jeopardy - ize solution :-) , so-- what go wrong when start using function format xml files unnamed bad person sent sans indents? xmlit <- function(x,indchar = '\t'){ # require x vector of char strings, 1 # per line of xml file. # add indent every line below 1 starting "<[!/]" , # remove indent every line below "</" indit <-'' y<-vector('character',length(x)) for(j in 1:length(x) ) { # first add whatever indent we're y[j] <- paste(indit,x[j],collapse='',sep='') # check openers: '<' not '</' or '/>' if( grepl('<[^/?!]' ,x[j]) & !grepl('/>', x[j]) & !grepl('</',x[j]) ) { ...

c# - mvvm confusion with canexecute and binding commands -

i'm having hard time wrapping head around logic in tutorials , posts subject. i'm trying implement in wpf application i'm writing. basically, i'm using listbox display tostring of objects in list , allowing users add , remove list , corresponding listbox via add , remove button. problem i'm having implementation of remove button. want button disabled if no listbox item selected, 1 of things pattern for. i'm lost how implement condition. at moment, button not enabling when highlight listbox item. suppose canexecutechanged event isn't firing.. how need change this? my commandshandler class: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using system.windows.input; namespace techopstools { public class commandhandler : icommand { private action<object> _execute; private bool _canexecute; public commandhandler(action<object> execu...

xslt - Processing a GPX file with xsl (probably a namespace issue) -

this question looks duplicate of xpath query gpx files namespaces? , must missing because can't seem simple style sheet work. have input: <?xml version="1.0" encoding="utf-8"?> <gpx xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" version="1.0" creator="groundspeak pocket query" xsi:schemalocation="http://www.topografix.com/gpx/1/0 http://www.topografix.com/gpx/1/0/gpx.xsd http://www.groundspeak.com/cache/1/0 http://www.groundspeak.com/cache/1/0/cache.xsd" xmlns="http://www.topografix.com/gpx/1/0"> <name>ottawa pocket query</name> <wpt lat="45.348517" lon="-75.825933"> <name>gc3hxaz</name> <desc>craft maker box fishdetective, traditional cache (2/2.5)</desc> <url>http://www.geocaching.com/seek/cache_details.aspx?guid=e86ce3f5-9e75-48a6-b47e-9415101fc658...

uitableview - xcode tableview error pointing on main file -

i trying display record mysql database connecting , fatching data through php the error pointing in following line int main(int argc, char *argv[]) { @autoreleasepool { return uiapplicationmain(argc, argv, nil, nsstringfromclass([appdelegate class])); } } error output 2013-07-17 20:42:51.148 plan[738:11303] *** assertion failure in -[uitableview dequeuereusablecellwithidentifier:forindexpath:], /sourcecache/uikit_sim/uikit- 2380.17/uitableview.m:4460 2013-07-17 20:42:51.158 plan[738:11303] *** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'unable dequeue cell identifier cell - must register nib or class identifier or connect prototype cell in storyboard' *** first throw call stack: (0x1c91012 0x10cee7e 0x1c90e78 0xb64665 0xc46c4 0x2c78 0xcd8fb 0xcd9cf 0xb61bb 0xc6b4b 0x632dd 0x10e26b0 0x228dfc0 0x228233c 0x228deaf 0x1022bd 0x4ab56 0x4966f 0x49589 0x487e4 0x4...

javascript - getElementById can't find rendered div -

i have in function success handler google wallet (for digital goods): var elem = document.getelementbyid(div1); i checked debugger , value of variable div1 same id of div see 'inspector' (in firefox) know it's rendered. besides, page shown, , after clicking button google wallet popup appear. so why elem null? (and how solve this?) thanks comment sergio found value of variable not correct 1 - instead of being "abc" "abc ". (-with space @ end.)

scrollable window ncurses ruby -

i created class trying make simulate richtextbox, sort of, on windows forms. means when add new data form/richtextbox added bottom of box/window , rest scrolled 1 line. ive tried enable scrollok() , not seem want scroll. not sure if it's bugged or way of implementing wrong. class textpad attr_accessor :data, :name, :window def initialize(name, height, width, startx, starty) @data = [] @name = name @height = height @width = width @startx = startx @starty = starty ncurses.refresh @window = ncurses.newwin(height, width, starty, startx) @window.scrollok true @window.wrefresh end def add(packetid, username, message) @data.push [time.new.strftime('[%t]'), packetid, username, message] @data.shift if @data.length > 500 end def d...

scala - NotSerializableException for `Map[String, String]` alias -

i'm trying send object remote actor , got exception: error akka.remote.endpointwriter - transient association error (association remains live) java.io.notserializableexception: scala.collection.immutable.maplike$$anon$2 the object being serialized case class: case class locationreport(idn: string, report: string, timestamp: option[string], location: attr, status: attr, alarms: attr, network: attr, sensors: attr) extends message(idn) { val ts = timestamp getorelse location("fix_timestamp") def json = (report -> ("time" -> ts) ~ ("location" -> location) ~ ("alarms" -> alarms) ~ ("network" -> network) ~ ("sensors" -> ((status ++ sensors) + ("customclock" -> report.decodetimestamp(ts))))) } and attr type re-definition: type attr = map[string, string] the message class pretty simple: abstract class message(idn: string) { def topic = idn...

python - Plotting timestamps (hour/minute/seconds) with Matplotlib -

Image
i want plot timestamps (year-month-day hour-minute-second format). using following code, doesn't show hour-minute-second information, shows them 00-00-00. double checked date array, , can see snippet below, not zero. do have idea why getting 00-00-00's? import matplotlib.pyplot plt import matplotlib.dates md import dateutil dates = [dateutil.parser.parse(s) s in datestrings] # datestrings = ['2012-02-21 11:28:17.980000', '2012-02-21 12:15:32.453000', '2012-02-21 23:26:23.734000', '2012-02-26 17:42:15.804000'] plt.subplots_adjust(bottom=0.2) plt.xticks( rotation= 80 ) ax=plt.gca() xfmt = md.dateformatter('%y-%m-%d %h:%m:%s') ax.xaxis.set_major_formatter(xfmt) plt.plot(dates[0:10],plt_data[0:10], "o-") plt.show() try zooming in on graph, see datetimes expand x axis scale changes. plotting unix timestamps in matplotlib i had annoying problem when trying plot heatmaps of positive selection on chromosomes. if z...

sql - SSIS Date Function -

i stuck on on date part in ssis package i created 3 variabels in package & used these expression 1) @days - 8 2) @datediff - (dt_wstr,4)year(getdate()) + "-" + right("0" + (dt_wstr,2)month(getdate()), 2)+ "-"+ right("0" + (dt_wstr,2)day(dateadd("dd", - @[user::days] , getdate())), 2) 3) @datestarted - datediff("dd", (dt_dbtimestamp) @[user::diffdate],(dt_dbtimestamp) @[user::patdate] ) here patcon same getdate(). here if changed day upto 30 not take me tht 2013-06-17 show me same date 2013-07-17 (suppose gatedate() 2013-07-17). i want expression dynamically change date suppose if placed days - 50 should change month also. , if days - 500 change month year. please let me know further detail.appreciated time , help.i wnat develope in package side not t-sql side. --343 you're applying dateadd portion day substring taken, need apply month , year if want them affected. believe it: (...

javascript - How can my ASP.NET page go back and forth from client to server code and back several times? -

ok, tite seems little confusing, i'll try explain more thoroughly... the process page follows following sequence: - user clicks button - server-side code goes retrieve data db , exposes said data client using, populating, let's say, hidden fields. - client-side code uses data fire activex component performs few tasks data provided. and works fine, however, need optimize process because activex component not fit handle high volumes of data. need send data "blocks" component, rather them send data @ once done today. however, hit roadblock here, on how can make page go , forth server client code multiple times? like... "user clicks button, server retrieves first block of data, sends client, client executes activex first block, client requests next block, server retrieves second block, sends client, client executes activex second block, client requests third block... , on"? can't past first request, since can't register client script block 2 ti...

android - Alarm Manager setRepeating not waiting till time to go off -

i'm setting alarm go off @ x , current time y , sending alarm @ time y not waiting till time x go off... can tell me why not waiting till proper time go off? sample logcat: 07-17 16:27:13.779: i/projectcaruso(13305): reminder set 07-17 16:27:13.789: i/projectcaruso(13305): setting alarm 07-17 16:27:13.789: i/projectcaruso(13305): zone_offset: 15 07-17 16:27:13.789: i/projectcaruso(13305): sincemidnight: 77233802 07-17 16:27:13.789: i/projectcaruso(13305): test now: 21:27:13 07-17 16:27:13.789: i/projectcaruso(13305): now: 77233802 07-17 16:27:13.789: i/projectcaruso(13305): test send: 16:28:0 07-17 16:27:13.789: i/projectcaruso(13305): send: 59280000 07-17 16:27:13.789: i/projectcaruso(13305): when kick off: 68446198 07-17 16:27:13.979: i/projectcaruso(13455): onreceive 07-17 16:27:13.989: i/projectcaruso(13455): current time: 21:27:14 07-17 16:27:13.989: i/projectcaruso(13455): current mills: 1374096434004 class: public class alarm extends broadcastreceiver { ...