Posts

Showing posts from February, 2014

javascript - SQLite plugin Cordova basic code -

i'm new cordova & sqlite wrote code , can't figure out wrong it? suggestions? following output javascript debugger: click see error messages <script type="text/javascript"> // wait cordova load document.addeventlistener('deviceready', ondeviceready, false); var output = document.getelementbyid('outputfield'); // cordova ready function ondeviceready() { window.sqliteplugin.opendatabase({ name: 'test.db', location: 2 }, function (db) { output.innerhtml += '</br> - database created/opened'; db.transaction(function (tx) { tx.executesql(tx, "create table localstorage2 if not exists (key unique, value)"); }); output.innerhtml += '</br> - table localstorage2 created'; storevalue(db, 'localstorage2', 'testkey', 'testvalue'); output.innerhtml += '...

spring - Error creating bean with name 'dao': Injection of persistence dependencies failed -

i dont know ahy got error main ibanquemetier metier; classpathxmlapplicationcontext context = new classpathxmlapplicationcontext( new string[]{"applicationcontext.xml"}); metier = (ibanquemetier) context.getbean("metier"); metier.addclient(new client("client1","adress1")); banquedaoimpl public class banquedaoimpl implements ibanquedao { @persistencecontext private entitymanager em; @override public client addclient(client c) { // j'enregistre le client c et je le retourne em.persist(c); return c; } .... and 1rst error : info : org.springframework.context.support.classpathxmlapplicationcontext - refreshing org.springframework.context.support.classpathxmlapplicationcontext@1be847c: startup date [fri feb 05 14:22:40 cet 2016]; root of context hierarchy info : org.springframework.beans.factory.xml.xmlbeandefinitionreader - loading xml bean d...

java 8 - How do streams stop? -

i wondering when created own infinite stream stream.generate how streams in standard library stop... for example when have list records: list<record> records = getlistwithrecords(); records.stream().foreach(/* */); the stream won't infinite , running forever, stop when items in list traversed. how work? same functionality applies stream created files.lines(path) (source: http://www.mkyong.com/java8/java-8-stream-read-a-file-line-by-line/ ). and second question, how can stream created stream.generate stopped in same manner then? finite streams aren’t created via stream.generate . the standard way of implementing stream, implement spliterator , using the iterator detour . in either case, implementation has way report end, e.g. when spliterator.tryadvance returns false or foreachremaining method returns, or in case of iterator source, when hasnext() returns false . a spliterator may report expected number of elements before processing begins. ...

html - Span content over two divs -

i have following code text in red div respond/wrap around yellow box. possible (ideally without js)? #div1 { float: left; width: 300px; } #div2 { float: left; width: 50%; background-color: blue; } #div3 { float: left; width: 50%; background-color: red; } p span { width: 250px; height: 50px; left: 20px; display: inline-block; clear: both; float: left; background-color: yellow; position: relative; } <div id="div1"> <div id="div2"> <p>bonorum has. ut cibo quas tantas, vis ut probo adhuc definiebas, has @ meis debet vulputate. no sed velit essent suavitate, <span>overlap me</span> in pro decore ceteros temporibus, usu in odio offendit theophrastus. mel labore indoctum cu, ad soleat admodum delicatissimi sed, mei viris tritani ullamcorper eu. ut vim simul aperiam.</p> </div> <div id="div3"> <p>bonorum has. ut cibo qu...

javascript - Meteor fetch on client undefined outside of helper -

i trying fetch entry in collection with: client/views/home.js : criticalcrewnumber = configvalues.find({ name: 'criticalcrewnumber' }).fetch()[0].value; but i'm getting error: uncaught typeerror: cannot read property 'value' of undefined if run code in browser console, desired value returned string. i have tried various things, e.g. using findone ; placing code elsewhere in app; using iron-router waiton subscription come, etc. every attempt far has failed end undefined . here's how collection defined, published , subscribed to: lib/config/admin_config.js : configvalues = new mongo.collection("configvalues"); configvalues.attachschema(new simpleschema({ name: { type: string, label: "name", max: 200 }, value: { type: string, label: "value", max: 200 } })); both/collections/eventscollection.js : if (meteor.isclient) { meteor.subscribe('events'); meteor.subscribe(...

angularjs - ui-router $urlRouterProvider wait until all states loaded -

i'm trying dynamically load bunch of states, merging them disperse files. i'm collecting of them $http.get , add $stateprovider.state(name, config) . all ok here. the problem if enter url, besides root url "/", same url never resolved correct state. it seems that, if load app root state , navigate there, $urlrouterprovider can match loaded states, but, if try enter app child state, example "/#/anotherpage", cannot match url/state , fallback .otherwise('/') . it's if tries resolve url without waiting states loaded. i'm using $urlrouterprovider.deferintercept() try stop continue, , after configuration, enable again sync. app.config(configure).run(['$urlrouter', function($urlrouter){ $urlrouter.sync(); $urlrouter.listen(); }]); how make sure $urlrouterprovider waits until states loaded during .config() , , try match correct state? thanks. i'm not sure had related i'll post : c...

CUDA C++ Linking error undefined reference threadIdx.x -

hello trying parallelize lattice boltzmann solver on cuda. somehow getting error while linking object files together. objects compiles without error. lbmsolver.o: in function > lbmsolver::calcmoments_gpu(lbmuniformgrid2d::lbmgridnode**, int)': tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x939): undefined >reference to blockdim' tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x93f): undefined >reference blockidx' tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x948): undefined >reference to threadidx' tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x953): undefined >reference blockdim' tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x959): undefined >reference to blockidx' tmpxft_00004b33_00000000-3_lbmsolver.cudafe1.cpp:(.text+0x962): undefined >reference `threadidx' here makefile: objs = main.o lbmsolver.o lbmuniformgrid2d.o lbmboundaryconditions.o writevtk.o cc...

php - Opencart <title> tag do not show site name on new controller -

i've created new controller along new template , language model display custom registration page new user the problem page title new controller not displaying site name. example opencart default registration page title "register account - [site_name]" new controller displays "register user" without site name sure can place site name on language model doesn't feel right i've tried trace problem using firephp on settitle function of document class, this: public function settitle($title) { global $firephp; $firephp->log($title, 'c:document'); $this->title = $title; } but i'm still unable solve problem. please help. thanks. if wanting add site name store's titles site wide, there's simple little trick can employ done. open system/library/document.php , find following code $this->title = $title; after line, put global $config; if($this->title != $config->get('config_title')) $...

node.js - FreeBSD phantomJS installation issue -

after running command below root@hz:/data/www/node # npm phantomjs i get npm warn deprecated phantomjs@2.1.3: package renamed phantomjs-prebuilt. please update 'phantomjs' package references 'phantomjs-prebuilt' > phantomjs@2.1.3 install /data/www/node/node_modules/phantomjs > node install.js looks `npm install -g`; unable check installed version. downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-macosx.zip saving /data/www/node/node_modules/phantomjs/phantomjs/phantomjs-2.1.1-macosx.zip receiving... [=======================================-] 98% received 16746k total. extracting zip contents removing /data/www/node/node_modules/phantomjs/lib/phantom copying extracted folder /data/www/node/node_modules/phantomjs/phantomjs/phantomjs-2.1.1-macosx.zip-extract-1454690434788/phantomjs-2.1.1-macosx -> /data/www/node/node_modules/phantomjs/lib/phantom writing location.js file done. phantomjs binary available @ /data/www/node/nod...

One properties configuration file for Multi Apps on Mule ESB runtime -

Image
today have same properties configurated on mule-app.properties file each apps. this: all apps (+ 5) running on same mule esb runtime (ce). for example, when necessary change host or password, need change properties file of apps. i have 1 properties file on mule esb runtime shared apps. is there form make this? thanks! you can create new mule project , call "shared". now, in project, can create file src/main/resources/config.properties , there put settings need. to have these settings in current project, add project "shared" in "projects" tab of "java build path". in main file of current project, write < context: property-placeholder location="config.properties" />

android - First EditText in a ListView automatically requests focus -

my listview contains 4 edittext . every time user types in or clicks textview (not first 1 in list): the first textview gets focus the clicked textview or textview in user typed in gets focus sometimes cycle repeated 2 or 3 times. this stacktrace of onfocuschange method: at it.softecspa.workflowmanager.views.integernumber_type.onfocuschange(integernumber_type.java:308) @ android.view.view.onfocuschanged(view.java:5592) @ android.widget.textview.onfocuschanged(textview.java:8855) @ android.widget.edittext.onfocuschanged(edittext.java:182) @ android.view.view.clearfocusinternal(view.java:5475) @ android.view.view.unfocus(view.java:5508) @ android.view.viewgroup.unfocus(viewgroup.java:982) @ android.view.viewgroup.unfocus(viewgroup.java:982) @ android.view.viewgroup.requestchildfocus(viewgroup.java:672) @ android.view.viewgroup.requestchildfocus(viewgroup.java:678) @ android.view.viewgroup.requestchildfocus(viewgroup.java:678) @ android.view.vi...

push notification - Android GCM Rate Limit -

i have seen few posts talking gcm rate limits still not clear me. let me ask question given scenario: ----------------------------- | | | app server | | | ----------------------------- || || || || ----------------------------- | | | gcm connection | | server | | | ----------------------------- / | \ .... \ / | \ \ / | \ \ user #1 user #2 user #2 ... user #100000 given scenario above, have following questions: for downstream unicast messages, there rate limit/quota limit on how many & @ rate app server can send messages users. for upstream messages, there limit on how many messages/second gcm can push app server because ...

Is there a canned way to log the current line in Powershell with a Write-Host? -

i remember c++ macros output current line number. same code, preprocessor replace macro current line. want in powershell can tell meant when tfs 2015 tells me there error on line 6, line 6 comment. see , powershell "thinks" line 6 differ. first, define following aliases: function get-scriptlinenumber { return $myinvocation.scriptlinenumber } function get-scriptname { return $myinvocation.scriptname } new-item alias:__line__ -value get-scriptlinenumber new-item alias:__file__ -value get-scriptname to test them, save code below in script file (let's call "test.ps1") , call powershell prompt: function hello #1 { #2 param ( #3 [parameter(mandatory = $true)] [string] $receiver #4 ) ...

ADFS/SAML authentication for Java desktop app -

i have java desktop app. found lot of online resources talk sso authentication web apps. need same thing old school desktop app. basically, need app open browser window, have user authenticate against adfs , token back. how can add sso authentication adfs/saml? i found answer. first, desktop app needs show browser window. can achieved using javafx webview. have tested google , adfs login using javafx webview. nb: if use adfs must set adfs use form-based auth. a helper webservice needs built. webservice provide method secured federated authentication mechanism (saml2, oauth, etc). haven't been able in java. there solutions josso they're ridiculously cumbersome or severely lacking. however, c# has outstanding support federated auth makes excellent choice task. when user needs authenticate, desktop app shows browser window automatically calls method above. after federated auth handshake, browser able access method. method tells desktop app whether calling user ...

python - In-place version of pandas truncate? -

newbie question: there in-place version of pandas truncate? for example >>> df = pandas.dataframe({'stuff':range(5)}, index=range(5)) >>> df.truncate(2,3) returns new truncated data frame. do >>> df = pandas.dataframe({'stuff':range(5)}, index=range(5)) >>> df = df.truncate(2,3) but seems inefficient. there way more efficient truncate not make copy truncate in-place? or kind of efficiency not issue due uber-clever pandas design? note, docstring truncate says there copy option, not think affects whether dataframe truncated whether returned value copy of data frame or reference portion of data frame. see below mean: >>> df = pandas.dataframe({'stuff':range(5)}, index=range(5)) >>> cp = df.truncate(2,3, copy=false) >>> df stuff 0 0 1 1 2 2 3 3 4 4 >>> cp['stuff'][2] = -50 >>> df stuff 0 0 1 1 2 -50 3 3 4 4 ...

for loop - MATLAB symsum() function -

i having trouble getting code work symsum() work. don't know if because variables matrices or else. error getting following: "invalid indexing or function definition. when defining function, ensure arguments symbolic variables , body of function sym expression. when indexing, input must numeric, logical, or ':'. " any appreciated! syms k x =4 = zeros(4,4) b = [1 1 1 1]' = 1:1:x a(i,i) = symsum(b(k),k,1,4) end

html - stretch image over div -

i have gallery , thumbnails set have width of 100%. images not fill full height of div. how images stretch on full width , height of div? (can't changed background images) <div class="gallery-grid"> <div class="section group"> <div class="col span_1_of_6"> <a href="javascript: changeimage(1);"><img src="images/flowers.jpg" alt="" /></a> </div> <div class="col span_1_of_6"> <a href="javascript: changeimage(2);"><img src="images/back.jpg" alt="" /></a> </div> <div class="col span_1_of_6"> <a href="javascript: changeimage(3);"><img src="images/flowers.jpg" alt="" /></a> </div> <div class="col span_1_of_6"> <a href="javascri...

sql server - Altering multiple objects in in query -

the code below attempting alter 2 columns @ once in table. can done , doing wrong? alter table verdata add primary key(asset_id) add foreign key(asdes) references assetdesc(assetdescription) to add constraints in alter query, follow below, alter table add constraint adds table-level constraint existing table. supported table-level constraint type can added via alter table. following limitations exist on adding constraint existing table: when adding foreign key or check constraint existing table, derby checks table make sure existing rows satisfy constraint. if row invalid, derby throws statement exception , constraint not added. all columns included in primary key must contain non null data , unique. alter table add unique or primary key provide shorthand method of defining primary key composed of single column. if primary key specified in definition of column c, effect same if primary key(c) clause specified separate clause. column cannot contain null values, ...

Referencing and reading from a .sqlite database file (C#/UWP) -

Image
all i'm trying use .sqlite database file have stored in assets folder of app (/assets/commoncore.sqlite). i'm trying set connection , i've tried few different things: sqlite.net.sqliteconnection conn; public mainpage() { this.initializecomponent(); conn = new sqlite.net.sqliteconnection("data source=assets/commoncore.sqlite"); but throws exception "does not contain constructor takes 1 arguments". string path; sqlite.net.sqliteconnection conn; public mainpage() { this.initializecomponent(); path = path.combine(windows.storage.applicationdata.current.localfolder.path, "commoncore.sqlite"); conn = new sqlite.net.sqliteconnection(new sqlite.net.platform.winrt.sqliteplatformwinrt(), path); but references folder "\appdata\local\packages\8ed84aca-896d-4286-ba91-e52316db2e89_dzc2ymb8n4xk4\localstate\commoncore.sqlite" isn't file need. i'm sure it...

html - Hide table border in Wordpress -

i want hide table border of table within wordpress site. figured out, theme setting table border standard , deleted corresponding line of code. my problem is: table border still visible! has of guys tip me solve problem? here link website: http://studifutter.com/2732-2/ thank in advance. best regards, maverick as requested, here can see current code: <table style="border-color: #ffffff; background-color: #ffffff;" border="none"> <tbody> <tr> <td> <h4>Ãœber den autor</h4> </td> <td></td> </tr> <tr> <td style="text-align: justify;"><strong>vorname nachname</strong> tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum. lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod. soluta nobis eleifend option liber tempor cum solute.</td> <td><img class=" wp...

c# - Barcode 128 space -

i'm converting in visual studio's console application strings barcode128 format. my problem "space" ( ): can't convert in form, have barcode128 library word , doesn't convert space, splits 2 barcodes making them impossible read. i read replace ascii 32 ( ) ascii 194 (┬) ascii not converted word. how can convert barcode128 string space? example "prop. log." thanks all whether space character needs special treatment depends on actual font using. but fonts seem miss working code point space expect it. while defined (with pattern of '11011001100' , weights of '212222') fonts out there seem not have @ same spot. use font doesn't contain proper space character @ 32. so have find out space character in font. one free font have @ 32 found here . i looked few other free fonts , found have space character @ 223. the control codes misplaced. wikipedia says this: the encoded ascii char depends on a...

c++ - How to include qrc data into Qt-based binary that was compiled using CMake -

i have big qt + third-party-library project try compile binary test program in machine. able make binary run (found necessary *.dll s , plugins), however, cannot figure out how include *.qrc data icons program. moment, binary cannot load icons, have buttons text. the code structure of program follows: root_folder cmakelists.txt program_folder main.cpp cmakelists.txt data_folder / data.qrc , set of icons in svg format other .cpp , .h files lib_folder1 lib_folder2 ... this how data.qrc file looks inside: rcc> <qresource prefix="/"> <file>file-name.svg</file> ... this how add resources program, inside cmakelists.txt of program_folder : qt5_add_resources(img_rsc_added data_folder/data.qrc ) add_executable(${project_name} ${project_srcs} ${img_rsc_added} ) inside 1 of .cpp files of program_folder load icons: static qicon icon(qpixmap(":/file-name.svg")); for icons, have class data{}; , inside...

regex - JavaScript Check for palindrome (spaces & punctuation included) -

trying check palindromes. i've checked other answers none included punctuation & spaces. "never odd or even" , "a man, plan, canal. panama" should return true don't. function palindrome(str) { if(str.replace(/[^\w\s]|_/g, "").tolowercase() === str.replace(/[^\w\s]|_/g, "").tolowercase().split("").reverse().join("")){ return true; } else { return false; } } palindrome("eye"); i think have error in regex. if want remove spaces, don't need \s . try changing: str.replace(/[^\w\s]|_/g, "") with str.replace(/[^\w]|_/g, "")

android - Can the main activity be able to grab elements from two XML files? -

update code (sorry crappy formatting of code, reason had problems allowing me post had mess lines whole allow me save thisedit) here idea. have app works clarifia's image recognition. generated app using google's pre built navegation bar, there xml files , code that, can ignored 2 needed activity_main.xml , content_main.xml. anyways in content_main.xml linear layout has imageview , listview. goal dynamically generate listview list of buttons. each button have settext() done give tag, example if image selected dog, , tags dog, animal, etc, many buttons generated, settext() of 1 button being dog, other button being animal, etc . since have network call, network call done in asynctask. after done, method onpostexecute() called , there tags. since got tags, want call set adapter hold array of buttons, , loop geting id each button , doing settext() on each button tags. there want set adapter list view.. problems: way many count, think narrowed down me not knowing how ...

xml - How do I display specific text when an element has true in it? -

i have following element in xml document <liveswithindicator>true</liveswithindicator> i when liveswithindicator has true display following <xsl:text>juvenile lives parent/guardian/custodian</xsl:text> **otherwise when ** <liveswithindicator>false/liveswithindicator> display <xsl:text>juvenile not live parent/guardian/custodian</xsl:text> my xsl code <xsl:value-of select="liveswithindicator"/> displays juvenile lives parent/guardian/custodian: true this not want you use xsl:choose here <xsl:choose> <xsl:when test="liveswithindicator='true'"> <xsl:text>juvenile lives parent/guardian/custodian</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>juvenile not live parent/guardian/custodian</xsl:text> </xsl:otherwise> </xsl:choose> alternatively, template based approach. create 2 templates s...

etl - Identify data warehouse design methodologies in the following diagram -

Image
can me identify top-down, bottom-up, , hybrid data warehouse design methodologies mentioned here in wikipedia in following diagram? interested in understanding how diagram differs depending on each design methodology. the diagram generic enable identification of methodology. further, wikipedia article surprisingly out of date. there 4 mainstream dw methodologies in common use today - dimensional (kimball), 3nf (inmon), data vault (linstedt) , anchor modelling (ronnback). represented within diagram. the issue of top-down or bottom-up in article centred around data marts. there no requirement marts stored in separate database, or in dbms. in context of diagram might exist in either data warehouse or analysis tool. in case, diagram not give indication of came first, can't infer approach. in order identify methodology (kimball, etc.) used design warehouse you'd need see data model. apparent model. to identify order in components delivered you'd need see ...

ios - How do I run the Xcode project generated by Titanium? -

i'm sure used possible don't seem able run xcode project generated titanium in xcode. app installs in simulator , starts stops following runtime error: could not find file app.js i'm running xcode 7.2.1 appc cli 5.1.0 / ti cli 5.0.5. app built 5.1.2.ga. running app in xcode provided access instruments , perhaps better insight in native level crashes etc. what trying isn't officially supported, possible. first, clean build of titanium app appcelerator studio (or command line). open xcode project build/iphone directory. next, open xcode's preferences , go "locations" tab. click "advanced" button under "derived data" field. set build location "custom" , "relative workspace". lastly set "products" location build/products , "intermediates" location build/intermediates . click "done" , close preferences dialog. need once. you can build app xcode, there few gotchas: ...

c++ - CMake Warning: Cannot generate a safe linker search path for target -

while running cmake pcl project got warning message: -- configuring done cmake warning @ cmakelists.txt:12 (add_executable): cannot generate safe linker search path target handgenerator_output_to_pcd because files in directories may conflict libraries in implicit directories: link library [libboost_system.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_filesystem.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_thread.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_date_time.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_iostreams.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_serialization.so] in /usr/lib/x86_64-linux-gnu may hidden files in: /usr/local/lib link library [libboost_chrono.so] i...

javascript - GeoJson "Not Well Formed" message in console, and appears undefined -

ive included end of script below, i'm trying put json file website using ajax callback function. when inspect page, i'm seeing json file not formed , can't seem find answer. webpage showing json file "undefined." suggestions appreciated! function debugcallback(response){ var mydata; $("#mydiv").append('geojson data: ' + json.stringify(mydata)); }; function debugajax(){ var mydata; $.ajax("data/megacities.geojson", { datatype: "json", success: function(response){ //mydata = response; debugcallback(mydata); } }); $("#mydiv").append('<br>geojson data:<br>' + json.stringify(mydata)); }; //$("#mydiv").append('geojson data: ' + json.stringify(mydata)); if(typeof mydata === 'undefined') { console.log("undefined data") } else { console.log("not undefined") } $(docum...

ios - viewController.title is nil after init of Google analytics -

i followed google analytics doc add swift app i have done said there, , yet code fails in run time. here code in appdelegate: func application(application: uiapplication, didfinishlaunchingwithoptions launchoptions: [nsobject : anyobject]?) -> bool { loadgoogleanalytics() chooseandluanchstoryboard() initmembersafterviewcontrollerinit() return true } func loadgoogleanalytics() { // configure tracker googleservice-info.plist. var configureerror:nserror? gglcontext.sharedinstance().configurewitherror(&configureerror) assert(configureerror == nil, "error configuring google services: \(configureerror)") // optional: configure gai options. let gai = gai.sharedinstance() gai.trackuncaughtexceptions = true // report uncaught exceptions gai.logger.loglevel = gailoglevel.error } here code in viewcontroller: override public func viewwillappear(animated: bool) { super.viewwillappear(true) let name = "p...

The right way to kill a process in Java -

what's best way kill process in java ? get pid , killing runtime.exec() ? use destroyforcibly() ? what's difference between these 2 methods, , there others solutions ? if process want kill has been started application then have reference ( processbuilder.start() or runtime.exec() both return reference). in case, can call p.destroy() . think cleanest way (but careful: sub-processes started p may stay alive, check http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4770092 more info). the destroyforcibly should used if destroy() failed after timeout. in nutshell terminate process destroy() allow process exit gracefully reasonable timeout kill destroyforcibly() if process still alive if process want kill external then don't have choice: need pass through os api ( runtime.exec ). on windows, program call taskkill.exe , while on mac , linux can try kill . have @ https://github.com/zeroturnaround/zt-exec/issues/19 , killing proces...

javascript - Exclude children of the first span tag inside div -

i building simple web scraper. website scraping - http://www.home.com/pro/c/oho,-ni . scraper clicks on every link class name of pro-title , extracts data web page enters (eg: http://www.me.com/pro/home/marcelle-services ) var casper = require('casper').create({ loglevel:"verbose", debug:true }); var jsonobj = {}; var links; var name; var paragraph; var contact; var description; var location; var expression = /[-a-za-z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-za-z0-9@:%_\+.~#?&//=]*)?/gi; var regex = new regexp(expression); casper.start('http://www.home.com/ro/c/oho,-tn'); casper.then(function getlinks(){ links = this.evaluate(function(){ var links = document.getelementsbyclassname('pro-title'); links = array.prototype.map.call(links,function(link){ return link.getattribute('href'); }); return links; }); }); casper.then(function(){ this.each(links,function(se...