Posts

Showing posts from January, 2013

How add condition statement in an array? - MATLAB -

i'm working on mapping linking 2 coordinates , database huge. hence display part of work on had done. question: add start , stop number together. if more 1,000,000 distance 100. else distance remain unchanged. store in single array. really appreciate respond. :) coding clear; n = xlsread('regionall.xlsx',2); m = xlsread('regionall.xlsx',1); % list of coordinates distance = distance(m(start,3:4), m(to,3:4)); % coordinates distancekm = deg2km(distance); sum = n(:,1)+n(:,2); %problem below l = 1:625 sum = n(l,1)+n(l,2); if (sum>1000000) = 100; else = distancekm(l,1); end; end excel data sample in variable n start stop distance 13054 13055 0.017749628 13055 13001 0.152363674 560601 13043 0.063200318 560601 13042 0.036090789 560601 13041 0.021083981 560601 13037 0.04975146 560604 13031 0.047614849 560604 13030 0.051513765 560604 13029 0.076687991 560604 560605 0.060676069 ...

java - Exception in integration of banking api -

this exception referred me checking. exception raised when doing api integration of icici bank. java.lang.exception: createinstance failed: new com.opus.epg.sfa.java.billtoaddress reference url: http://kndexim.com/java/sfaclient/testpages/testssl.php i j2ee developer, know little bit php , . know related class path problems. can solution this. if question not clear, please ask provide more details. content of web.xml file given below <?xml version="1.0" encoding="utf-8"?> <!doctype web-app public "-//sun microsystems, inc.//dtd web application 2.3//en" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <!-- support java ee cluster, remove line if want put non-serializable objects java_session() --> <distributable/> <!-- system php executable. default /usr/bin/php-cgi or c:/program files/php/php-cgi.exe --> <!--<context-param><param-name>php_exec</param...

.net - C# from socket to mail slot in windows -

what must rewrite code socket application mailslot intercommunication in example: server: using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using system.net.sockets; using system.net; namespace os { public partial class server : form { socket servsoc; byte[] buf = new byte[1024]; public server() { initializecomponent(); } private void start_click(object sender, eventargs e) { servsoc.receive(buf); out1.text = encoding.ascii.getstring(buf); array.clear(buf, 0, buf.length); } private void server_load(object sender, eventargs e) { createsocket(ref servsoc); } private void server_leave(object sender, eventargs e) { servsoc.close(); } } ...

restore - How to design undo function in Core-Graphics Framework? -

many pepole recommended save image i've drawn, , load when need undo in current picture. but think may not way this: save , load disk cause lagging. you cant erase after undo, because cant erase image (not fill backgroundcolor). so, i'm seeking way restore cglayer's or context's data cover current 1 "draw resource", when need undo. i've used nsmutabledata this, doesn't work @ all, because pointer has been saved. and don't understand how use cgcontextsavestate,cgcontextrestorestate. when save it, have restore before drawrect has been done, can't save , restore when need undo, because context destroyed or reset when drawrect has done, , i've tried, nothing happens. could me here? thx!

Is this possible to generate self expiring download link in C# - WPF? -

i'm working on c# - wpf project zune , want sell digital goods apps want create disposable link files in server , after successful payment in application, generate new download link requested file. link should expire after downloaded. is possible do? if yes how can it? sir or ma'am, i think design bit wrong. said you’re working on zune'esk project. means should able forego use of links , use web services wcf or soap. change design , make wpf project call web service. once app download content, let call api , mark item downloaded in persistency store , call day. can set “issued” date time stamp on token expires in 1 day. way if user never comes item, auto-expire. once working, can go ahead , add authentication , validation structure ensures 1 user download. there many authentication frameworks choose windows, username/password, ect.

html - SVG images displayed as broken images on server -

i'm encountering odd problem showing .svg using simple img tags on apache. on local computer, images visible. on mt vps, images come across broken links. when right click on broken image link , 'open image', shows images correctly (telling me path correct). my html looks this: <img width="32" height="32" alt="icon" id="create-wheel-icon2" src="public/assets/img/svg/idea_vect.svg" style="left: 230px; top: 57px; opacity: 1;"> any thoughts? the info in link robert provided above worked me: .htaccess file these rules: addtype image/svg+xml svg svgz addencoding gzip svgz

php - Error in ANDROID with WSDL and ksoap2 -

i have problem accessing web service made ​​in php. tried many codes not know if have stupid bug makes me not work. the webservice think because if make call page in php works, if access via android not work, call make in android. the error occurs in: transporte.call(soap_action, envelope,null); the error is: org.xmlpull.v1.xmlpullparserexception: expected: start_tag {http://www.w3.org/2003/05/soap-envelope}envelope (position:start_tag <definitions name='smb_gestionboda' targetnamespace='http://localhost/webservice/smb_gestionboda.wdsl'>@8:43 in java.io.inputstreamreader@405d9f50) thanks. the wsdl: <definitions name='smb_gestionboda' targetnamespace='http://localhost/webservice/smb_gestionboda.wdsl' xmlns:tns='http://localhost/webservice/smb_gestionboda.wdsl' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:soap12='http://schemas.xmlsoap.org/wsdl/soap12/' xmlns='http:/...

Joining two tables from two different databases with VB.net, possible? (Access and SQL Server) -

can perform join on 2 tables, 1 access database , other sql server database. i understand perform select on each database, , manually join results. how i'm going have it? i'm working in vb.net, using oledbconnection stuff. if it's possible (which i'm beginning doubt), can please provide sample code? you try using linq sql 2 different data contexts - see this example

php - mysql_query select from multiple columns with OR -

i have: $sql = mysql_query("select * articles articletitle or articledescription or articletags '%$term%'"); and returns no results. am using or incorrectly here? thanks you need add 3 clauses: select * articles (articletitle '%$term%') or (articledescription '%$term%') or (articletags '%$term%');

php - Accesing the id attribute of the select tag from jquery -

i looking way access id attribute of select tag jquery. say have select tag on form : form.php <select id="testid"> <option value="1">1</option> <option value="2">2</option> </select> from jquery can access option value $(this).attr("value") . $(this).attr("id") gets undefined. by giving option tag id attribute values works. but, there way around access id of select tag thru $(this) object thanks help if trying within change event of select like: $('select').change(function() { // here 'this' point select console.log( $(this)[0].id ); //or console.log(this.id); }) but $(this).attr('id') should work. if $(this) point option try $('select').has(this).attr('id'); or $(this).parent('select').attr('id');

java - Get common root of String path and list of folders for that path -

i've sqlite3 database table store list of paths this: /mnt/sdcard/folder1/a/b/file1 /mnt/sdcard/folder1/a/b/file2 /mnt/sdcard/folder1/a/b/file3 /mnt/sdcard/folder1/a/b/file4 /mnt/sdcard/folder1/a/b/file5 /mnt/sdcard/folder1/e/c/file6 /mnt/sdcard/folder2/d/file7 /mnt/sdcard/folder2/d/file8 /mnt/sdcard/file9 what want find common root of these paths , list of first level folder (unique) of common root. for example first run: parent root = null (it's first run) common root -> /mnt/sdcard/ list of folders - folder1 - folder2 second run (now parent root /mnt/sdcard/folder1/) common root -> /mnt/sdcard/folder1/ (same parent root) list of folders - - e second run (now parent root /mnt/sdcard/folder1/a/) common root -> /mnt/sdcard/folder1/a/b (same parent root) list of folders -> empty (i'll files) is there way filters db or have code? this question made because need provide folder view of android music library store paths in song db record. ...

c# - create directory on fly during application deployment or first request to application. -

i all, have been stuck in issue week now.i want directory created in root of project when application runs in iis.but since iis user account can't given full permission in root directory , access denied error while trying create directory.i tried find work around keeping images in app_data folder not approach per post enter link description here i need create folder on fly when request comes application first time without getting access denied error.it ok if able create directory permission during deployment. best approach above problem solve, s. you misunderstanding information in link. it's true browser shouldn't have access app_data folder, in case it's server , asp.net code this. if scenario letting user upload , download files, , have sensitive files in app_data folder, create dedicated folder purpose instead let's /uploads. create folder in project directly , deploy destination web server. give app pool account read/write permissions, , sho...

c# - How to get a content node using Umbraco 5 API -

i'm umbraco newbie , trying speed. 1 of things i'm trying out api , accessing node in content tree. unfortunately documentation bit thin , can't find info covering such basic task... i've got simple content structure content > home > how retrieve node using c# , api plain old model class? in other cms's simple calling database.getitem("/content/home/about") how achieved umbraco v5? thanks if have single, specific piece of content want it, can select using hiveid so: umbraco.getcontentbyid("content://p__nhibernate/v__guid/0000000000000000") you can find content id examining content's properties backoffice. edit: if must content uri, querying hive. can't recommend performance though. _context.application.hive.querycontent().where(x => x.niceurl().equals("/faq/functionality/submit-a-question",stringcomparison.invariantcultureignorecase);

animation - Javascript move a div smoothly and let another appear -

i'm trying create site u can click on links in menu , div below menu moves down smoothly , , when reached position should text appears in new gap.. i'm in beginning of learning js dont expect much.. somehow animation not work , setinterval couldnt it.. here's code: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <style> /* css document */ #container{ border: 1px solid #339999; width: 798px; } #top{ background-image:url(images/background1.jpg); width: 800xp; height: 289px; background-repeat:no-repeat; } #bot{ background-image:url(images/background2.jpg); width: 800xp; height: 250px; bac...

Check if a list is sorted in javascript using underscore.js -

in javascript (underscore) , how test whether list of numbers sorted or not? you can use _.every check whether elements in order: _.every(arr, function(value, index, array) { // either first element, or otherwise element should // not smaller previous element. // spec requires string conversion return index === 0 || string(array[index - 1]) <= string(value); });

diff - How to find exactly why patch failed? -

i have unified diff patch patch rejects. visual inspection of diff file , original code finds code contains text expected diff file in correct location. have tried --ignore-whitespace , -f3 measure patch still fails. option exist report causing patch fail?

javascript - Apply Jquery to generated content -

hoping can point me in right direction. i've got code: //nextbutton processing $('.nextbutton').on("click", function(){ //$('.nextbutton').click(function(){ var querystring = $("#formstep").serialize() + "&step=" + step + "&session=" + session; // ajax call $.ajax({ type: "post", data: querystring, url: "includes/processnext.php", datatype: 'json', success: function(msg){ $('.result').append(msg.answerrow); } }); // end ajax call }); now works first .nextbutton on there, ajax result replaces next next button. to fix tried using jquery .on() (old code commented out) doesn't seem have solved either. any suggestions? thanks. attach click event handler container element, this: $('#cont...

php - set checkbox checked state based on array values -

let's have bunch of checkbox inputs on page this: <input type="checkbox" name="vehicle" value="car" /> car<br /> <input type="checkbox" name="vehicle" value="bike" /> bike<br /> <input type="checkbox" name="vehicle" value="motorcycle" /> motorcycle<br /> <input type="checkbox" name="vehicle" value="bus" /> bus<br /> <input type="checkbox" name="vehicle" value="car" /> train<br /> now let's have array this: $my_array = array( 'first' => 'bike', 'second' => 'car', 'third' => 'train' ); as can see, array contains values correspond value of checkboxes. now, how set state of each checkbox input based on value of array , make checkbox stay checked on page refresh using php? in other words, want...

Bash Printing, how to -

wrote script in bash. im need bring information text file,for example in postscript, there 1 problem. need have length of string in characters, , stretch or shrink string on entire width of page layout. have tried a2ps , enscript , there no such option. please tell me solution problem, maybe in ghostscript. how change letter spacing fill lines? in advance! for example: input aaa bbbb ccccccc output a b b b b ccccccc sed -e 's/./& /g' -e 's/$/\\p/' < inputfile | groff -tascii use groff adjustment, groff adjust words, use sed first make each character word. can use groff output postscript instead if want different fonts or nicer printing or whatever.

java - Multiple files upload -

i trying upload multiple files using extjs , java , using " application/x-www-form-urlencoded " content type , data , files' names httprequest . , need upload may kind of file. can doc type or image type. problem following: 1) while giving static file path files static location uploaded successfully. need upload multiple files different locations rather 1 static location, please me possible.. this file upload controller code @requestmapping(value = "views/upload.action", method = requestmethod.post) public @responsebody map<string, object> create(httpservletrequest request) throws ioexception { map<string, object> fileupload = new hashmap(); boolean success = false; enumeration headernames = request.getheadernames(); while (headernames.hasmoreelements()) { string headername = (string) headernames.nextelement(); if (headername.equals("x-file-name")) { system.out.println("...

ipad - PhoneGap: How to use swipe gesture for images in html to make image gallery? -

how display image gallery when user swipe left or right images changed accordingly? is possible phonegap make ipad application. can 1 give me hint this?? <script> $("ul").delegate("li", "swiperight", function() { // user has swiped right on list view item. show edit menu. //$(this).find(".menu-edit").show();//change here according need. }) </script>

ios - Passing a value from NSObject class back to UIViewController -

i don't know why being difficult can't work. here's basic flow: i have uiviewcontroller subview uiview has subview uibutton. clicking button instantiates new instance of nsobject called twittercontroller, creates nsurl twitter feed , hands control on tc urlconnection , serialize data returned. here's relevant code in viewcontroller (pruit_igoe me, feel free follow though don't post : d) : - (void) gettwitter { //load new manager twittermanager = [twittercontroller new]; [twittermanager showtwitterfeed:vtwitterfeed:self]; nsurl* twitterfeedpath = [nsurl urlwithstring: @"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=pruit_igoe"]; [twittermanager gettwitterfeed:twitterfeedpath]; //toggle twitter view [self toggleview:vtwitterfeed]; [self toggleview:vcontactcard]; } showtwitterfeed dumps objects in view vtwitterfeed (button close view, images, etc.) gettwitterfeed begins nsurlconnection process in twittercontroller, tw...

javascript - Rally App SDK 2.0: Filtering the store for a rallymultiobjectpicker -

i attempting use rallymultiobjectpicker (not sure why there isn't single object picker) pull list of portfolio items. however, filter results "portfolio item type" field. have not had luck recognition of revised storecfg's parameters. modifications seem ignored, simple changing sorting on "name" field "asc" "desc". here basic example: this.pis = ext.widget('rallymultiobjectpicker', { items: [{ modeltype: 'portfolio item' }], storecfg: { autoload: false, fetch: "name, portfolioitemtype", pagesize: 200, filters: [ { property: 'portfolioitemtype', value: 'initiative' } ], sorters: [ { property: 'name', direction: 'desc' } ], remotegroup: false, remotesort: false, remot...

python - Compare lists - delete list where id = id and date > date -

i have list of lists [['id', 'fname', 'lname', 'gender', 'startdate'], ['100', 'john', 'jackson', 'm', '08/09/2000'], ['101', 'jenny', 'hobbs', 'f', '01/13/1995'], ['100', 'john', 'jackson', 'm', '08/09/1995']] i delete duplicate lists id == id , startdate < startdate. leaving lists unique ids have recent startdate. [['id', 'fname', 'lname', 'gender', 'startdate'], ['100', 'john', 'jackson', 'm', '08/09/2000'], ['101', 'jenny', 'hobbs', 'f', '01/13/1995']] any great stuff rows dictionary id after sorting them in date order. thing have remove header before using this. import time data = [['100', 'john', 'jackson', 'm', '08/09/2000'], ['101...

ruby - How to write an image to filesystem in rails 3.1.1? -

i feel should close, can't work quite right. i'm sending image using filetransfer phonegap app rails app (3.1.1 ruby 1.8.7 btw). i want write file filesystem. this params hash: parameters: {"file"=>#<actiondispatch::http::uploadedfile:0x7f1e2baa94e8 @tempfile=#<file:/tmp/rackmultipart20120607-5707-owzii5-0>, @headers="content-disposition: form-data; name=\"file\"; filename=\"image.jpg\"\r\ncontent-type: image/jpeg\r\n", @content_type="image/jpeg", @original_filename="image.jpg">} basically, can access file through params[:file]. need write image on filesystem. don't have model image correspond to, don't need paperclip. right now, best come this: open(params[:file]) |image| file.open("theiamge.jpg","wb"){|file| file.puts image.read } end this error get: typeerror (can't convert actiondispatch::http::uploadedfile string): edit: so, rather odd. can...

HTML5 Offline Cache Manifest file with asset pipeline in Rails 3.2 app? -

i'd created first web app using ruby on rails. , now, want make offline. how-to create html5 offline cache manifest file in rails 3.2 app? i read q&a , articles. seems outdated. (e.g. rack-offline ?) .note: e.g. rack-offline output home.js rather home-234201233453.js to make use of asset pipeline, don't want change settings if possible. (most articles suggested disable pre-compile) :-/ is there suggestion , tips? (create controller? erb? etc.) p.s. i'm newbie in development (learn 1 month only). understand html5 manifest mechanism i'm not sure how create in rails rack-offline has been updated work asset pipeline in rails 3.1+. unfortunately, maintainer has not bumped gem version, installing rack-offline gem won't work you. in gemfile, specify git repo of recent version , should good: gem 'rack-offline', :git => 'https://github.com/wycats/rack-offline.git'

actionscript 3 - Drawing a movieclip to bitmapdata moves around -

i'm trying draw movieclip bitmapdata , have same if had added movieclip directly stage. result shifts around. suspect has origin , bounds can't figure out. http://megaswf.com/s/2441986 (the 1 on right problem) package { import flash.display.sprite; import flash.events.event; import flash.display.movieclip; import flash.display.bitmap; import flash.display.bitmapdata; import flash.geom.matrix; import flash.geom.rectangle; public class main extends sprite { public var movieclip:movieclip; public var bitmapdata:bitmapdata public var bitmap:bitmap; public function main():void { if (stage) init(); else addeventlistener(event.added_to_stage, init); } private function init(e:event = null):void { removeeventlistener(event.added_to_stage, init); addeventlistener(event.enter_frame, update); // comparison, want re...

Java ANT : Issues with build.xml -

Image
i wondering if me serious issue... need create jar project using lot of dependencies... problem : build.xml file wrote own hand not working. more runs without problem, warning : buildfile: c:\users\alexis fasquel\workspace\firsteditserver\build.xml clean: [delete] deleting directory c:\users\alexis fasquel\workspace\firsteditserver\bin [delete] deleting directory c:\users\alexis fasquel\workspace\firsteditserver\dist makedir: [mkdir] created dir: c:\users\alexis fasquel\workspace\firsteditserver\bin [mkdir] created dir: c:\users\alexis fasquel\workspace\firsteditserver\dist compile: [javac] c:\users\alexis fasquel\workspace\firsteditserver\build.xml:101: warning: 'includeantruntime' not set, defaulting build.sysclasspath=last; set false repeatable builds [javac] compiling 14 source files c:\users\alexis fasquel\workspace\firsteditserver\bin jar: [jar] building jar: c:\users\alexis fasquel\workspace\firsteditserver\dist\firsteditserver.jar main...

apache2 - Multiple hostnames, same domain, different virtualhost -

i trying route requests different docroots depending on host name (not domain name): <virtualhost 123.123.12.12:80> suexecusergroup "#521" "#521" servername forum.somesite.net documentroot /home/somesite/public_html/forums </virtualhost> <virtualhost 123.123.12.12:80> suexecusergroup "#521" "#521" servername www.somesite.net documentroot /home/somesite/public_html </virtualhost> it not working though. apache seems go first entry regardless of in hostname. doing wrong? try changing second virtual host this <virtualhost 123.123.12.12:80> suexecusergroup "#521" "#521" servername somesite.net serveralias www.somesite.net documentroot /home/somesite/public_html </virtualhost>

gql - Google App Engine null sort order -

according googles documentation , null values have no sort order. there way configure behavior. instance, if sorting integer property in ascending order, can configure datastore return null values last or first? your best bet may save property blank "" string each entity has null value property. sure run put() on each entity alter. employees = employee.all().fetch(50) employee in employees: if employee.hobbies none: # null value property employee.hobbies = "" employee.put() of course, not efficient way perform task. may want create list object, "batch_put_list," , append each employee object list. then, perform db.put(batch_put_list). batch_put_list = [] employees = employee.all().fetch(50) employee in employees: if employee.hobbies none: employee.hobbies = "" batch_put_list.append(employee) db.put(batch_put_list) hope helps.

c# - Retreive data with simple.data from a table with its name passed in as a variable? -

is possible query table simple.data has table name passed in somewhere else. for example: string tabletouse = "mytable"; var test = db.tabletouse.all(); yes, can use string indexer object names instead of dynamic properties: string tabletouse = "mytable"; var test = db[tabletouse].all(); that works column names too, can this: var table = "mytable"; var keycolumn = "id"; int id = 42; var entity = db[table].find(db[table][keycolumn] == id);

android - How can I return to a child activity, after finishing OAUTH for twitter? -

for application there 1 tab host 5 different activities 5 tabs. 1 of activity group, contain 4 child activities, , users can go , fro these child activities. now 1 of child activities used post tweet. oauth thing fine. find callback cannot point activity parent activity group or tab activity. not sure points outcome when user authorize twitter app, , return android app, activity started on , called oncreate instead of onresume or onnewintent. causes infinity loop , asking user authenicate again , again. have tried add android:launch:singleinstance not help. if not start activity child new activity, fine.i can onnewintent , post tweets. quite sure cause activity group or tab activity. i not familiar of how intent filter works under tab / activity group, can explain case me? manifest.xml <activity android:name="twitteract" android:launchmode="singleinstance"> <intent-filter> <action android:name="android.inten...

iphone - memory-leak happens when running on physical iOS device -

when testing app, runs fine on ios simulator, experience memory leaks when running same app on physical ios device. new developing ios apps , know many potential reasons this. want know why things different between simulator , physical device , if there way solve memory leak issue? i suggest go through tutorial below. lot understand how debug memory problems , other issues. my app crashed – what? 1/2 my app crashed – what? 2/2 hint: problem can solved zombie objects; advise follow tutorials first.

ios - Which case should cause memory leaks? -

the code simple: @interface test : nsobject @property (nonatomic, strong) nsstring * str; //strong //@property (nonatomic, weak) nsstring * str; //weak -(void)func; @end @implementation test @synthesize str = _str; -(void)func{ _str = @"test string"; // using ivar //self.str = @"test string"; // using setter } @end there four situations in code above, strong/weak, ivar/setter which types cause memory leaks ? which types same ? i have test code nslog run (no nil printed) , why ? maybe autorelease ? --------------edit--------------- i read document , find "string constant never deallocated" so code act different when string initializes initwithstring or initwithformat (and code wrote wrong ) the weak property nil when using initwithformat for memory management ivar , setter same: is self.ivar necessary strong properties arc? if you're using arc system handles memory , won't report leak. here's wri...

JQuery Mobile Parse JSON for ListView -

this question has been asked lots , have spent last 3 days going through number of different 'solutions', none of can work. i have huge json file, 150k entries, want view listview in jquery mobile. (i using filter use data) the best have come this <!doctype html> <html> <head> <title>test</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/jqm-docs.css" /> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script> </head> <body> <div data-role="page"> <div data-role="c...

web scraping - Getting non-object type randomly when traversing with php DOMDocument -

below code: $xpath = new domxpath($doc); // start root element $query = '//div[contains(@class, "hudpagepad")]/div/ul/li/a'; $nodelist = @$xpath->query($query); // size 104 $size = $nodelist->length; ( $i = 1; $i <= $size; $i++ ) { $node = $nodelist->item($i-1); $url = $node->getattribute("href"); $error = scrapeurl($url); } function scrapeurl($url) { $cfm = new domdocument(); $cfm->loadhtmlfile($url); $cfmpath = new domxpath($cfm); $pointer = $cfm->getelementbyid('content-area'); $filter = 'table/tr'; // problem lies here $state = $pointer->firstchild->nextsibling->nextsibling->nodevalue; $nodelist = $cfmpath->query($filter, $pointer); } basically traverses list of links , scrapes each link scrapeurl method. i don't know problem here randomly non-object type error trying $pointer , passes through without error , values correct. anyone k...

Customizing JQuery autocomplete to add Static HTML content before and after the list -

hey need add html content before , after list dynamically generated using autocomplete........the following code snippet..i have tried append, prepend li no luck......and need limit number of items in list maximum 5. how do it? $(document).ready(function () { $("#autocomplete").autocomplete({ source: source, select: function (event, ui) { window.location.href = ui.item.value; this.autohide(); } }) .data("autocomplete")._renderitem = function (ul, item) { $("<li></li>") .data("item.autocomplete", item) .append("<a>" + "<img src='" + item.imgsrc + "' /><strong>" + item.label + "</strong></a>") .appendto(ul) ...

iphone - ZXingWidget header search path -

have imported zxingwidget project , seems working expected (after quite bit of trail , error). can activated, display white framed view finder, scan qrcode , return result. what wish add have zxingwidget turn white view finder frame red when scan result not match predefined strings. my strategy update global flag in own project string matching result , have zxingwidget read it. my problem is, zxingwidget cannot find header file (where global flag variable declared) despite having set header search path. my feeling is, either because search path wrong or strategy flawed. please advise. well, kinda sounds hack, if you're not concerned cleanliness, extern in widget rather bothering include header. at point of defintion: bool my_red_flag; in hacked widget: extern bool my_red_flag. the "proper" way add api widget, might not worth effort you. (polling variable somehow seem required: widget draws frame directly , won't redraw unless given rea...

ios - Animated load of viewcontroller -

i'm total newbie in ios, judge question that. i have code use. in code have vertical tabbar controller inherited fsverticaltabbarcontroller. use tabbar controller switch between viewcontrollers. what want have viewcontrollers come animation. kind of default animation fine. how can that? here's code, , thank help: @implementation aiverticaltabbarcontroller @synthesize appdelegate; - (void)viewdidload { [super viewdidload]; [self setdelegate:self]; [[self tabbar] setbackgroundcolor:[uicolor darkgraycolor]]; nsarray *titles = [nsarray arraywithobjects:@"home", @"export", @"settings", @"titles", @"slides", @"text doc", nil]; nsarray *viewclasses = [nsarray arraywithobjects:@"aiviewcontroller", @"aiviewcontroller", @"aiviewcontroller", @"aititlesviewcontroller", @"aislidesviewcontroller", @"aiviewcontroller", nil]; nsmuta...

php - How to resolve error in my sql manual? -

i encounter error in sql in running program, how can resol error? error: have error in sql syntax; check manual corresponds mysql server version right syntax use near 's', 's', 's','s','s','s','s', 's')' @ line 3 this syntax used. <?php include('config.php'); error_reporting("e_all"); ?> <html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>avaya</title> <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" /> </head> <body> <div id="page" class="shell"> <div id="mainwrapper"> <div id="top"> <div class="cl">...

result - Rally toolKit for Java how do i create and then attach a TestCaseResult to a TestCase -

general code testcase jsonobject : jsonobject result = new jsonobject(); result.addproperty("verdict", "true"); result.addproperty("testcase", ref.getrelativeref(testcase.get("_ref").getasstring())); createrequest createrequest = new createrequest("testcaseresult", result); createresponse createresponse = restapi.create(createrequest); i guess 2 main questions have are: am creating testcaseresult correctly?(with testcase property being reference testcase) do need attach testcaseresult testcase? ( testcase.addproperty("results", "testcaseresults reference" ) thanks kyle! way of example, here's quick snippet illustrates querying test case , adding new test case result it: // create , configure new instance of rallyrestapi rallyrestapi restapi = new rallyrestapi(new uri("https://rally1.rallydev.com"), "user@company.com", "password"); re...

validation - My jquery validate method is not being triggered on the form submit -

i prepared admit missing simple here. find documentation on jquery docs page not hold information needed make basic custom validation. my problem need validate data isn't contained within element i've been using sort of 'dummy' element try , trigger custom method. <div id="modal-dialog-overlay"> <div id="modal-background"></div> <article id="dialog-form" class="event-module module"> <header> <h6>new event</h6> <section class="module-actions"> <span class="button" onclick="overlay_select('modal-dialog-overlay', true);">cancel</span> <span class="primary button" onclick="createbevent()">create event</span> </section> </header> <section class="wrapper"> @using (html.beginform("createevent", ...

joomla1.5 - Looged in user action tracked in joomla 1.5 -

i need joomla 1.5 component performing following task when user logged in actions must tracked, these actions include: date logged in, time of login, pages visited login user, time on each page, links clicked login user, forms submitted, time logged out total time spent on site visit , report above action thanks in advanced. you try this: http://joomlax.net/downloads/access---security/user-management/user-trace/ it quit easy modify following needs. take consideration google analytics modules: http://extensions.joomla.org/extensions/site-management/analytics/site-analytics-google-based

click - How can I switch new opened tab for watching test execution -

i use radrails watir tests. here code: ie.link(:text, "first").click ie.link(:text, "second").click ie1 = watir::ie.attach(:title, "second") next watch test execution. see ie windows. after clicking second window opens in new browser window in new tab. want operate in new tab, in ie displaying first tab. want see how commands executed in new tab called second. suggest how this? to knowledge, watir not have direct support working browser tabs. however, given want view tab, can use ie's keyboard shortcuts working tabs (http://windows.microsoft.com/en-us/windows7/internet-explorer-keyboard-shortcuts). assuming tab opened last one, can switch using: ie.send_keys([:control, '9']) or if next tab, can switch using: ie.send_keys([:control, :tab])

javascript - jQuery Masonry error in FF 3.6 -

i have page tiles laid out using jquery masonry plugin. error in ff 4 , below: $("#flextiles").masonry not function i tearing hair out why not working, works in every other browser - ie6!!! here page anyone got ideas? relevant code load masonry plugin , init is: function buildgrid() { $('#flextiles').masonry({ itemselector: 'li', columnwidth: 235 }); } $.getscript("http://bhuk.stage.arcadiagroup.ltd.uk/wcsstore/consumerdirectstorefrontassetstore/images/colors/color35/cms/templates/static/template-0000008049/js/masonry.min.js", function() { buildgrid(); }); fwiw installed ff 3.6 on vm running xp , loaded link. works fine , no js errors. stuff below fold looks masonified. how many machines have tried on? there on particular machine hosing ( add-on or spyware ) suggest try disable "extensions" , try again.

.net - Make mouse tilt horizontal scrolling always repeat -

i'm designing form horizontal scroll bar docked @ bottom. wanted add support side-scrolling using mouse tilt buttons , found this solution which, after bit of tinkering, seemed trick – is, while form had gdi graphics drawn on surface. however, since i've added controls form , found when mouse on of them tilt operation fires once-at-a-time instead of repeatedly when mouse on other part of form. to see mean (if have mouse tilt buttons) dock horizontal scrollbar onto bottom of form, add few other controls , paste in code: public class form1 const wm_mousehwheel integer = &h20e protected overrides sub wndproc(byref m message) mybase.wndproc(m) if me.isdisposed orelse m.hwnd <> me.handle return select case m.msg case wm_mousehwheel hscrollbar1 if ctype(m.wparam, integer) < 0 '______________ left scroll if .value > 0 .value -= 1 ...