Posts

Showing posts from 2013

Twitter Typeahead.js with Yahoo Finance in AJAX -

i trying couple new version of typeahead.js , using json needs pulled ajax , not json file have in examples. can't work, don't want cache json result or anything, want pull live yahoo. my html input <input type="text" id="symbol" name="symbol" autofocus autocomplete="off" placeholder="symbol" onkeyup="onsymbolchange(this.value)" /> my ajax/php file has retrieve data (this part work, tested firebug) header('content-type:text/html; charset=utf-8;'); $action = (isset($_get['action'])) ? $_get['action'] : null; $symbol = (isset($_get['symbol'])) ? $_get['symbol'] : null; switch($action) { case 'autocjson': getyahoosymbolautocomplete($symbol); break; } function getyahoosymbolautocompletejson($symbolchar) { $data = @file_get_contents("http://d.yimg.com/aq/autoc?callback=yahoo.util.scriptnodedatasource.callbacks&query=$symbol...

inheritance - Is there a good trick for instantiating a subclass with an instance of its superclass? -

preferably in java, there way instantiate subclass instance of superclass? say have classb subclasses classa, here constructor classa: public classa(){ } i want like: public class classb extends classa{ public classb(classa aclassa){ super(aclassa); } } is there way instance of subclass instance of superclass, when subclass might have 1 field superclass, , therefore there isn't difference between them? for instance, classa = new classa(); classb b = a; (the compiler going want me this: classb b = (classb)a; ... not going work.) how do this? is there way instance of subclass instance of superclass no , superclass instance doesn't contain subclass instance . trying cast object referenced superclass type reference variable object of subclass. classb b = (classb)a; it dangerous , may fail if a didn't refer instance of classb @ run time. remember instances of classb instanceof classa , reverse not true. ...

__PACKAGE__ equivalent in tcl -

is there way(a method call) find out name of current package in tcl?? eg: package provides abc proc { // need print package name abc. } i know class name here "abc" still want print out using tcl command. i'm working on debug modules , hence need this. (similar perl provides: __ package __ ) i not aware of that. however, can work around: set __package__ foo package provide $__package__ 1.0 # use can use variable $__package__ on

css - Overriding Jquery Mobile styles -

im working on small mobile splash ive imported jquery , trying change css. change isnt changing styles. js files loaded web while im putting new styles inline. im using !important declaration still nothing changing. because time loads in browser overriding local css? background of header , footer black , use "data-role=header" chaging style getting changes in dreamweaver when load not there when loads online files replaces code. anyway override display inline css? great. we can override jqm styles following cascading order while including css files in page. jquery mobile should included after have keep style sheet. to check whether modified styles getting applied or not using firebug or developer toolbar in chrome. please refer below link know how override customizes themes in jquery mobile: http://jquerymobile.com/demos/1.0rc2/docs/api/themes.html

php - a while loop inside a for loop not working in codeigniter view file -

so have codeigniter view file has code inside this: <?php for($i=1; $i <= count($headings); ): ?> <div class="row"> <?php while(($i%3) != 0 ): ?> <div class="span4"> <?php $heading = current($headings); ?> <h2><?= key($headings); ?></h2> <p><?= $heading['description']; ?></p> <p><a class="btn" href="<?= $heading['link']; ?>">view details &raquo;</a></p> <?php next($headings); ?> <?php $i++; ?> </div> <!-- end of div.span4 --> <?php endwhile; ?> </div> <!-- end of div.row --> <?php endfor; ?> what want achieve here loop through array ($headings) three's. want produce this: <div class="row"> <div class=...

python - Urllib Request only working for one user -

im writing web bot , ive ran problem basically bot logs in buys , sells shares in game works when put in username , pass when put in differnt 1 error saying ive been directed wrong page though used referer header here login code: def login(self): while true: self.cookiejar = cookielib.lwpcookiejar() self.opener = urllib2.build_opener( urllib2.httpcookieprocessor(self.cookiejar), urllib2.httpredirecthandler(), urllib2.httphandler(debuglevel=0)) self.opener.addheaders = [('user-agent', "mozilla/5.0 (windows nt 5.1) applewebkit/537.36 (khtml, gecko) chrome/28.0.1500.72 safari/537.36")] forms = {"username": self.username, "password": self.password } data = urllib.urlencode(forms) req = urllib2.request('http://www.example.com/login.phtml',data) res = self...

java - Error opening trace file: No such file or directory(2) (1) no such table: ContactListTable Tried for hours can't find solution -

i new android , java. tried check code against example somehow application keeps forced close while example works well. need please! in advance! new logcat 07-31 16:51:02.145: e/trace(16532): error opening trace file: no such file or directory (2) 07-31 16:51:02.175: d/androidruntime(16532): shutting down vm 07-31 16:51:02.180: w/dalvikvm(16532): threadid=1: thread exiting uncaught exception (group=0x40fdb2a0) 07-31 16:51:02.180: e/androidruntime(16532): fatal exception: main 07-31 16:51:02.180: e/androidruntime(16532): java.lang.runtimeexception: unable create application com.elson.projectversion.contactsactivityapplication: java.lang.nullpointerexception 07-31 16:51:02.180: e/androidruntime(16532): @ android.app.activitythread.handlebindapplication(activitythread.java:4254) 07-31 16:51:02.180: e/androidruntime(16532): @ android.app.activitythread.access$1400(activitythread.java:140) 07-31 16:51:02.180: e/androidruntime(16532): @ android.app.activitythread$h.handlemes...

image processing - surfnorm function more efficient way Matlab -

Image
after constructing point cloud want normal of each point , used built-in matlab function surfnorm takes lot of processing time. if assist me better , more efficient way. i wonder if following code you. there 3 steps here. create 500 randomly spaced points (x,y), , compute corresponding value z (the height of surface) chose sinc function resample random points using triscatteredinterp function - permits me obtain points on evenly sampled grid "roughly correspond" initial surface compute normal "some points" on grid (since there 480x640 points, computing normal @ every point create impossibly dense "forest of vectors"; sampling "every 10th point" can see doing the code used follows: randomx = rand(1,500); randomy = rand(1,500); r = 5*sqrt(randomx.^2 + randomy.^2); randomz = sin(r) ./ r; % resample data: [xx yy] = meshgrid(linspace(0,1,640), linspace(0,1,480)); f = triscatteredinterp(randomx(:), randomy(:), randomz(:)); zz ...

ios - Problems setting view for header in a grouped table -

Image
i'm trying customize headers sections in grouped table. view set first section in table looks fine, subsequent section headers cropped @ top , @ bottom (in screenshot shown @ top): i've been trying different x , y values frame.size.origin , remains looking same. code: - (uiview *)tableview:(uitableview *)tableview viewforheaderinsection:(nsinteger)section { if (section == 1) { uiview *wrapper = [[uiview alloc] initwithframe:cgrectmake(0, 0, self.tableview.frame.size.width, 70)]; [wrapper setbackgroundcolor:[uicolor clearcolor]]; uilabel *label = [[uilabel alloc] initwithframe:cgrectmake(10, 20, self.tableview.frame.size.width, 20)]; label.text = nslocalizedstring(@"section 2 header", @""); [label setfont:[uifont boldsystemfontofsize:15]]; [label setbackgroundcolor:[uicolor clearcolor]]; [wrapper addsubview:label]; return wrapper; } else return nil...

asp.net - Convert Changing string to DateTime in C# -

this question has answer here: parse string datetime in c# 6 answers i have 1 date in string "18/07/2013 04:25:28 pm".how convert string datetime in c#.when trying convert date time getting error "input string not in correct date format" datetime.parseexact( "4/4/2010 4:20:00 pm", "m/d/yyyy h:mm:ss tt", cultureinfo.invariantculture);

java - ArrayIndexOutOfBoundException when run my simple code -

i write simple code understanding passing value manually, there code public class coba{ public static void main (string[] args){ int a; int b; a= integer.parseint(args [0]); b= integer.parseint(args [1]); int c=0; c= a+b; system.out.println("jumlah "+c); } } why arrayindexoutofboundexception?? , how solve can pass values of , b manually? answer :) well presumably you're not passing in 2 command-line arguments. should fine if run with: java coba 10 20 for example. you can validate @ start using args.length : public static void main (string[] args){ if (args.length < 2) { system.out.println("i need 2 command line arguments!"); return; } int = integer.parseint(args[0]); int b = integer.parseint(args[1]); int c = + b; system.out.println("jumlah "+c); }

xml - XSLT to wrap all chid elements in parent tag -

i have xml document this: <catalogs> <catalog> <code>x</code> <name>ox</name> <categories> <category> <id>9245</id> <name>a</name> <category> <id>9247</id> <name>x</name> </category> </category> <category> <id>9250</id> <name>x</name> <category> <id>9252</id> <name>x</name> </category> <category> <id>9258</id> <name>x</name> <category> <id>9260</id> <name>x</...

android - Slim Spinner when i use FILL_PARENT (or MATCH_PARENT) as WIDTH -

Image
i've strange problem when set android:layout_width="fill_parent" in spinner: the clickable area reduced line (red square) , pressing on line possibile show elements of spinner: if use android:layout_width="wrap_content" obtain correct area: i same thing using "fill_parent" the elements of spinner correctly visualized.. problem clicking on spinner. possible problem? <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#040404" android:gravity="center" android:paddingtop="2dp" android:weightsum="4" > <textview android:id="@+id/mpp_movimento_lbl" ...

linux - php script just filled up harddrive with junk how do i find it? -

i ran php script filled nix servers harddrive 15gb of sort of junk, how find junk can delete it? i'm not sure if it's huge error_doc file or what one option use find command. find / -type f -size +50m will search downwards root directory items files larger 50mb. if want limit how many subdirectories want search, can use -maxdepth switch. find / -maxdepth 3 -type f -size +50m will files larger 50mb, recurse 3 directories down. this assumes know files created larger size, , can pick them out if displayed. you might able make use of knowledge files created recently. find / -type f -mmin 60 should find files modified in past hour.

java - Stop flickering in swing when i repaint too much -

i making rpg tilemap. generate tilemap loop through 2 dimensional array means when repaint have each time. if repaint screen flickers how stop this. package sexycyborgfromanotherdimension; import java.awt.color; import java.awt.graphics; import java.awt.graphics2d; import java.awt.renderinghints; import java.awt.event.keyadapter; import java.awt.event.keyevent; import java.io.bufferedreader; import java.io.ioexception; import java.io.inputstreamreader; import java.util.timer; import java.util.timertask; import javax.swing.jpanel; @suppresswarnings("serial") public class game extends jpanel { keylis listener; int mapx = 20; int mapy = 20; boolean = false; boolean down = false; boolean right = false; boolean left = false; string[][] map; public game() { super(); try { map = load("/maps/map1.txt"); } catch (ioexception e) { // todo auto-generate...

c# - Liskov Substitution Principle and Redundant Methods -

i have interface called irepository. interface defines set of generic methods such as: iqueryable<t> get<t>() t : class; void add<t>(t obj) t : class; void update<t>(t obj) t : class; void savechanges(); i have class implements interface. class uses entity framework implement these methods. method update redundant entity framework tracks changes made entities retrieved entity want, update call savechanges. in future may want replace concrete implementation of irepository else. won't track changes entity framework does. i'm thinking want leave update method in interface, in concrete implementation of interface leave method in doing nothing. e.g. public void update<t>(t obj) t : class { } this seems fit liskov substitution principle, can replace implementation of interface else. it's somethings might not need implement methods defined on interface. is approach. thinking okay maybe mark method obsolete in implementation of irepos...

crop and align inserted BMP in Delphi -

i want crop , align inserted bmp clipboard. i'm trying 2 days still nothing workable... procedure tform1.act1execute(sender: tobject); var bmp : tbitmap; begin bmp := tbitmap.create; bmp.assign(clipboard); bmp.setsize(400,200); img1.picture.graphic := bmp; bmp.free; end; procedure tform1.act1update(sender: tobject); begin (sender taction).enabled := clipboard.hasformat(cf_bitmap); end; end. if understand right, need center bitmap in image control? it's simple - set img1.center := true to crop bitmap need code this: procedure cropbitmap(bmp: tbitmap; const croprect: trect); var cropbmp: tbitmap; begin cropbmp := tbitmap.create; try cropbmp.width := croprect.right - croprect.left; cropbmp.height := croprect.bottom - croprect.top; cropbmp.canvas.copyrect( rect(0, 0, cropbmp.width, cropbmp.height), bmp.canvas, croprect ); bmp.assign(cropbmp); crop...

javascript - Loading .js file in UIWebview from bundle downloaded as a zip -

i want show "complete website" (which packaged in bundle) in uiwebview. when put bundle in xcode , adding "compile stuff", loaded, js files works fine. unfortunately, permit update website, need 1 downloaded zip server... can zip, extract , put in bundle when load index page in uiwebview, js files aren't working ! how can set make code executable or ? here part load bundle created : nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes); nsstring *documentsdirectory = [paths objectatindex:0]; nsstring *test = [[nsbundle bundlewithpath:documentsdirectory] pathforresource:@"contentnewversion.bundle/index" oftype:@"html"]; [_webview loadrequest:[nsurlrequest requestwithurl:[nsurl fileurlwithpath:test isdirectory:no]]]; the location of index : /var/mobile/applications/a2b602c3-dec0-40fe-9469-288f666196a7/documents/contentnewversion.bundle/index.html ` // try this nsstring *t...

debugging - GWT Debugger loses control -

i managed link gwt debugger remote application, think there wrong in configuration. in arguments specified -startupurl , debugging works url. move page (of same application), module unloaded , no more in "dbugging" mode. debug different pages of application have change -startupurl , restart gwt development mode, disrupt normal flow. any advise? thanks to debug app, needs run in devmode (code runs java in jvm, , communicates browser through plugin installed there). to trigger devmode in browser, url needs contain gwt.codesvr in query string value being host , port devmode app listening on. -startupurl passed devmode makes easier urls right, devmode append appropriate gwt.codesvr url , can copy/paste resulting url browser (or ask devmode directly open url in browser). if have several html host pages , move between them, seamless experience have propagate gwt.codesvr part of url other page. see http://www.gwtproject.org/doc/latest/devguidecompilin...

jQuery on hover image change opacity/fadeout and text fade in -

i complete novice when comes jquery , know there lot of questions on site similar mine couldn't find 1 close enough wanted. what when mouse hovers on image, image reduce in opacity (or fadeout completely) , text fade in on top of image was. text link position on same page (i'm sure can manage though). if put in jsfiddle me appreciated not capable enough yet of being able modify jquery existing examples need. thanks! try this, may you: html: <img class="image" src="" alt="testimage"></img><a id="link">this link content</a> css: #link { display: none; } script: $(".image").hover(function(e) { e.preventdefault(); $(this).fadeout('slow', function(e) { $('#link').fadein('slow'); }); }); $("#link").mouseout(function(e) { e.preventdefault(); $(this).fadeout('slow', function(e) { $(...

java - Use Image from outside plugin for splash screen in eclipse RCP -

currently loading splash screen image tool plugin.is possible load splash screen image outside plugin[from other hard drive path]?.my requirement give option user change splash screen image product itself.if possible please brief me example. in advance! try create custom splash screen, using following thread example: eclipse rcp application - custom splash screen . use following extention point register splashhandler: <extension point="org.eclipse.ui.splashhandlers"> <splashhandler class="com.example.application.splash.slideshowsplashhandler" id="splash.slideshow"> </splashhandler> <splashhandlerproductbinding productid="com.example.application.product" splashid="com.example.application.splash.slideshow"> </splashhandlerproductbinding> </extension> in splash handler create composite image, taken location, defined user.

How to make a transparent web view in windows phone 8 -

i want display local html file on web view control. problem background of web view control in white. is there way solve problem? try placing target control on of webview or bring webview infront (rt click -> order -> bring front) , change opacity of webview. xaml (example) <grid x:name="contentpanel" grid.row="1" margin="12,0,12,0"> <button content="button" horizontalalignment="left" margin="88,181,0,0" verticalalignment="top" height="88" width="279" background="#ffd35a5a"/> <phone:webbrowser x:name="webview" horizontalalignment="left" margin="48,49,0,0" verticalalignment="top" height="345" width="319" opacity="0.5"/> </grid>

How to get bluetooth RSSI on android after connection -

i'm trying write program can read signal strength(rssi) of bluetooth device linked app however doesnt seem android exposes anyway rssi while during discovery. is there other way signal strength of device after device has been linked(not pairing) any appreciated.

sql server 2008 r2 - An axis number cannot be repeated in a query -

i use ssas , sql server 2008 r2. i writed query in ssas select measures.[internet sales amount] on columns , [measures].[internet freight cost] on columns [adventure works] ( [date].[calendar].[calendar quarter]. & [2003] & [2], [product].[product line].[mountain], [customer].[country].[australia] ) i got error executing query ... an axis number cannot repeated in query. execution complete how can select 2 columns in mdx query? you don't need specify axis each measure: select { [measures].[internet sales amount], [measures].[internet freight cost] }on columns [adventure works] ( [date].[calendar].[calendar quarter]. & [2003] & [2], [product].[product line].[mountain], [customer].[country].[australia] )

postgresql - Rails 4 / Ruby2 / PG9.3: ActiveRecord confuses tables on SQL subselect -

in rails app projects assigned users via assignments. want retrieve unassigned projects specific user. sql query: select * projects id not in (select project_id assignments user_id = 1 lists unassigned projects user 1 when entered in pgadmin. here rails code: class user < activerecord::base has_many :assignments, dependent: :destroy has_many :assigned_projects, through: :assignments, source: :project has_many :unassigned_projects, :class_name => 'project', :finder_sql => proc { ["select * projects id not in (select project_id assignments user_id = ? )", self.id] } this raises: activerecord::statementinvalid - pg::error: error: column projects.user_id not exist line 1: select 1 one "projects" "projects"."user_id" = $1 which no surprise, because correct column "assignments.user_id". apparently rails not respect second from. wrong code? update: inspecting "unassigned_projects"-colle...

sql - Non Deterministic issues with Persisted Columns whilst working with datetime -

as i've spent 2 hours trying fix , couldn't find answer on so, i've decided add new question. in hindsight, answer can answered on so, if you're looking in right place. problem: whilst trying persist calculated column (which in case includes cast('2013-09-30 23:59:59' datetime) in sql server error advising cannot persisted non-deterministic . solution: use convert rather cast , specify style , example convert(datetime,'2013-09-30 23:59:59',120) . in example, 120 style , refers yyyy-mm-dd hh:mi:ss format. caveat: have seen posts suggesting styles can non-deterministic, check out http://msdn.microsoft.com/en-us/library/ms187928.aspx full run down on styles.

php - How to dynamically switch databases at loadtime in Wordpress? -

what i'd have 2 or more wp databses under same instalation, each own posts, , dynamically switch between them @ loading time. for example, instead of directly plugging wp when visitor loads site, first run php script geo-location , based on script's result tell wp database load up. i know switch_blog understand it's backend technique it's expensive run on front-end. thanks

file - python fcntl does not lock as expected (2) -

i'd use lock_ex prevent other processes modify file under modification. process a: from fcntl import flock, lock_ex, lock_nb time import sleep f=open("tmp.txt", "w") flock(f.fileno(), lock_ex|lock_nb) f.write("xxxx") f.flush() sleep(20) f.close() 5 seconds after starts, process b: f=open("tmp.txt", "w") f.close() and "tmp.txt" emptied process b... no ioerror raised in process b. how can 1 prevent "tmp.txt" modified 2 processes using exclusive access ? note: "innocent" process b not use flock(), fopen() create new file. what's use of exclusive lock on file if else can modify file ? of course, if b uses flock() well, raises ioerror, if not ??? by default, flock advisory locking mechanism. more details, see this question .

javascript - Change template for Kendo Mobile ListView on setDataSource? -

i changing datasource using setdatasource method, need change template too. changing template dynamically doesn't seems work though. below have , jsfiddle here: http://jsfiddle.net/mfsup . notice doesn't change "template 2" in "onfilter" event when clicking on button group. bug or doing wrong? new kendo.mobile.application(); var ds1 = new kendo.data.datasource({ data: [{ stagename: "ds1 a", b: "1b" }, { stagename: "ds1 b", b: "2b" }] }); var ds2 = new kendo.data.datasource({ data: [{ stagename: "ds2 a", b: "1b" }, { stagename: "ds2 b", b: "2b" }] }); var onfilter = function (e) { var lv = $("#stages_listview") .data('kendomobilelistview'); //change template doesn't work lv.options.template = this.selectedindex == 0 ? $("#stages...

How can I assign HTML attribute values using handlebars.js? -

let's have following html code - <input type="text" placeholder="name" /> which want convert to <input type="{{type}}" placeholder="{{text}}" /> how can using handlebars.js?

Laravel custom helper class not found -

i've created custom php helper class use in laravel 4 project. the sashelper.php file in app/libraries/elf/sas , after adding libraries composer.json file i've done composer dumpautoload. autload_classmap (last line only): 'elf\\sas\\sashelper' => $basedir . '/app/libraries/elf/sas/sashelper.php', helper class (simplified brevity): <?php namespace elf\sas; class sashelper { static public function supportinttotext($status) { return 'supported'; } static public function lictypetotext($lic) { return '32-bit'; } } when attempt call either static method controller: $statustext = sashelper::supportinttotext($client->supportstatus); at point fiddler reporting: "class sashelper not found." did try global.php? doesn't need composer dump-autoload, , loads class – trying tobemyself rahul i've tried it: (app_path() .'/libraries' , app_path() .'/libraries/elf/sas...

ios - Objective-C return subclass based on Xcode project target? -

i have xcode project compile 2 targets, sake of simplicity we'll call them 'foo' , 'bar'. have superclass , 2 subclasses, how can cleanly ensure variable returned different subclass based on project target? so example, have following... viewmanager.h //super class fooviewmanager.h //foo subclass barviewmanager.h //bar subclass ... viewmanager * viewmanager; #if target_foo viewmanager = [[fooviewmanager alloc] init]; #elif target_bar viewmanager = [[barviewmanager alloc] init]; #else viewmanager = [[viewmanager alloc] init]; #endif ... is there way can make code cleaner, in caller class dont need compiler #if statements, , have initialize superclass, , maybe superclass init method can take care of switching based on current project target, , return correct subclass within viewmanager variable? i'm sure there's standard pattern doing in objective-c i'm missing, appreciated! it possible locate required subclass d...

mysql - PHP Loop with multiple rows -

i have php code: $number = substr_replace($_post["number"],"44",0,1); $sql="select * channel_did did '%".$number."%' , (client_id = '' or client_id null or client_id = '611') , (extension_id = '' or extension_id null) "; $rs=mysql_query($sql,$pbx01_conn) or die(mysql_error()); while($result=mysql_fetch_array($rs)) { $numbers_list = $result["did"].'<br>'; $email_body = '<font face="arial"> hello, here numbers have requested.<br><br> please aware these numbers in public pool , not reservered, therefore assigned client @ time.<br><br> please make choice possible guarantee number require.<br><br> '.$numbers_list.'<br><br> kind regards,<br><br> customer services<br> integra digital<br><br> tel: 01702 66 77 27<br> email: support@domain.c...

c# - Panel and ScrollBar in Windows forms -

i using panel display image in windows forms drawing image in panel in panel_paint event follows: graphics g = panel1.creategraphics(); image im = new bitmap(@"../../data/#3_page2.png"); g.drawimage(im,new point(10,10)); now, image drawn expected, part of bottom of image not displaying height greater forms height. have added vscrollbar now. how make panel view rest of image of vscrollbar. this solution works, if image large enough, there little flicker when scroll (however it's acceptable). first have add vscrollbar right on right of panel , hscrollbar right under bottom of panel. demo requires have vscrollbar named vscrollbar1 , hscrollbar named hscrollbar1 , button named buttonopenimage allow user open image, panel named panel1 used main area draw image: public partial class form1 : form { public form1() { initializecomponent(); //to prevent/eliminate flicker, typeof(panel).getproperty("doubleb...

activemq - How We can Store JMS Persistence in DIsk Using Wso2 -

i using wso2esb 4.7.0 , activemq or wso2message borker 2.1.0 <proxy xmlns="http://ws.apache.org/ns/synapse" name="message" transports="https,http" statistics="disable" trace="disable" startonload="true"> <target> <insequence> <log level="full"/> <property name="faisal" value="faisal" scope="default" type="string"/> <property name="target.endpoint" value="jmschecking" scope="default" type="string"/> <store messagestore="faisal5"/> </insequence> <outsequence> <log level="full"/> </outsequence> </target> <description></description> </proxy i wish store messages in system disk how can provide manual store message stor e active mq or mwso2 message brok...

c# - Quartz.net setting the timezone for ITrigger? -

itrigger crontrigger = triggerbuilder.create() .withidentity("trigger1", "group1") .withcronschedule(0 0/1 * 1/1 * ? *) .build(); this code sets time run hour before want to, rather running @ 1:40 runs @ 12:40. can set timezone of itrigger work uk time ? there should timezone option when creating trigger. this: .intimezone(timezone.currenttimezone); the above take server's current timezone. if not uk based server, should work. timezoneinfo.findsystemtimezonebyid("gmt standard time"); here link: http://quartz-scheduler.org/documentation/quartz-2.x/tutorials/tutorial-lesson-06

jaxb - XJC xsd:any parsing -

i have element in xsd schema: <xsd:any processcontents="skip"/> is possible switch processcontents strict through xjb binding? without modifying schema file. may set global property. want get: @xmlanyelement(lax = true) protected object any; instead of: @xmlanyelement protected element any; you totally change annotation , attribut's type. beware if generate code xsd modifications crushed. could explain little bit more work context, needs , goals. why can't touch xsd, generate classes xsd jaxb? use xsd validation purposes?

iphone - Where to put native code for Phonegap 3.0 plugin? -

i upgraded 1 of projects phonegap 3.0 , wondering proper methodology developing custom plugin. i'm following echo plugin example developer docs. should echo.h , echo.m files go in plugins folder in project root, or within plugins folder specific platform being built? i tried echo plugin ios , it's working me. put echo.h , echo.m under platforms/ios/testproject/plugins/. root folder plugins keep plugins download command line. auto installed when make ios, android or other platforms.

ios - Editing UITableviewCell when table is inside scroll view not working -

i'm trying put uitableview inside uiscrollview . scroll view horizontal paging setup switch between few pages/views. 1 of views has table editable cells. the problem arises when try swipe horizontally on table edit them . scroll view captures swipe first , pages over. know tableview collecting touches because can scroll vertically on no problem. as disable scrolling on scrollview can swipe edit cells in table. is there anyway can swipe on table edit cells still scroll on view if don't swipe on table, or header of table isn't editable? thanks you should subclass uiscrollview , implement below method - (bool)touchesshouldbegin:(nsset *)touches withevent:(uievent *)event incontentview:(uiview *)view this make uiscrollview pass on touches content view uitableview.

listview - android:state_activated not found -

Image
my android project minimum api 10. support v4 included. in android doc found selector state "activated" but when try use it, ide mark missed. here https://stackoverflow.com/... , here https://stackoverflow.com/questions/92.. state looks solution problem, can not use it. it looks may bug in docs. shows screen showing if go r.attr class , @ corresponding variable greyed out api 10 selected , left shows requires api 11 sorry, graphic arts skills aren't great zoom in , see. here solution may or may not work need. didn't read through whole example can give look. and here answer dealing same issue.

bash - loss of data in 2nd insert into associative array -

in code below second insert associative array 'originator', makes first insert lost. check 1st insert succesfull, when put second associative item 'originators', first item empty, in other words, outputs , empty string. have no idea going on. declare -a originators while read -r line if [ "$count" -ge "2" ]; inner_count=0 #parse each line if [ "$debug" = "1" ] ; printf "%s\n" "$line" ; fi word in $line if [ "$inner_count" = "1" ]; tmp1="$word" ; fi if [ "$inner_count" = "5" ]; tmp1="$tmp1"" ---- ""$word" ;fi inner_count=$((inner_count + 1)) done originators=( ["$count"]="$tmp1" ) echo "$count ${originators["$count...

javascript - Error: Unknown provider: translateFilterProvider <- translateFilter angularjs -

i'm working on angularjs app needs have translation functionality, i've checked angular-translate library , did that's in example. however when run code following error: error: unknown provider: translatefilterprovider <- translatefilter i've included code in following jsfiddle: http://jsfiddle.net/qyqw8/1/ loaded angular-translate javascript file before calling code in fiddle (which in portal.js) order in load files: <script src="js/lib/angular.js"></script> <script src="js/lib/angular-resource.js"></script> <script src="js/lib/jquery-1.10.js"></script> <script src="js/lib/angular-translate.js"></script> <script src="js/portal.js"></script> if can me out it's highly appreciated, in case wondered , since fiddle bit messed up, did bootstrap app <html lang="nl" ng-app="portal"> thx, j. ...

Socket program in C cannot compile -

hi guys reading book socket programming , there 2 codes client , server. here server code #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> void error(char *msg) { perror(msg); exit(1); } int main(int argc, char *argv[]) { int sockfd, newsockfd, portno, clilen; char buffer[256]; struct sockaddr_in serv_addr, cli_addr; int n; if (argc < 2) { fprintf(stderr,"error, no port provided/n"); exit(1); } sockfd = socket(af_inet, sock_stream, 0); if(sockfd < 0) error("error opening socket"); bzero((char *) &serv_addr, sizeof(serv_addr)); portno = atoi(argv[1]); serv_addr.sin_family = af_inet; serv_addr.sin_addr.s_addr = inaddr_any; serv_addr.sin_port = htons(portno); if(bind(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) <0) error("error on binding"); listen(sockfd,5);...