Posts

Showing posts from May, 2013

newline - Imacros.... start a new line in a data extraction CSV file -

i have following macro: version build=9002379 tab t=1 tab closeallothers url goto=http://www.bbc.co.uk/food/recipes/chocolate_and_orange_87739 add !extract {{!urlcurrent}} tag pos=1 type=div attr=class:article-title extract=txt tag pos=1 type=div attr=id:ingredients extract=txt add internal {{#newline#}} url goto=http://www.bbc.co.uk/food/recipes/secret_squirrel_cake_49338 add !extract {{!urlcurrent}} tag pos=1 type=div attr=class:article-title extract=txt tag pos=1 type=div attr=id:ingredients extract=txt saveas type=extract folder=c:\data_extract_bbc file=ollytest1.csv i want write new line each url hit, in file puts them both on same line. there command start new line? that's main question. other question is... how can imacro's crawl whole of site , take recepies off every page exist? pages may not have recepies on. cant find list on sitemap of url's , url's not numbers. how can make imacros explore links on site? to start new line can this: add ...

javascript - how to remove single marker google maps api v3 -

i try remove google maps marker clearoverlays(), cant resolve problem.. thing want remove single marker map. can remove marker. have use array code.. here code <!doctype html> <html> <head> <script src="http://maps.googleapis.com/maps/api/js?key=aizasydy0kkjitpvd2u7atoawhc9ysh6ohxoiym&sensor=false"> </script> <script> var map; var mycenter=new google.maps.latlng(51.508742,-0.120850); var markers = []; function initialize() { var mapprop = { center:mycenter, zoom:5, maptypeid:google.maps.maptypeid.roadmap }; map = new google.maps.map(document.getelementbyid("googlemap"),mapprop); google.maps.event.addlistener(map, 'click', function(e) { placemarker(e.latlng); }); google.maps.event.addlistener(map, 'rightclick', function(){ clearoverlays(); }); } function placemarker(e) { var marker = new google.maps.marker({ position: e, map: map, }); var infowindow = new...

php - vtiger crm 5.4.0 custom module installation shows Sorry! Attempt to access restricted file -

i in developing of custom module in vtiger crm 5.4.0 .when installing newly developed custom module @ server shows message 'sorry! attempt access restricted file.' , can't install module. please me rectify issue. the cause vtiger error “sorry! attempt access restricted file.” $root_directory value in ‘config.inc.php’ incorrect or misspelled. in order correct follow steps below: go vtigercrm directory open “config.inc.php” favorite text editor go line 86 , adjust $root_directory value correct vtiger directory. note, directory must end /. should – $root_directory = ‘/var/www/vtigercrm/’;

javascript - js wont show result of calculation -

quick newbie question, i'm sure simple you, cant head around figure out why code wont work. checked online, seems i'm doing fine, still wont work... i'm trying do, make simple calc , display in diff field. have tryed external , internal js. here's code: <script type="text/javascript"> function calculate(){ var = document.calculate.first.value; var b = document.calculate.second.value; var c = parseint(a) + parseint(b); document.calculate.result.value = c; } </script> <body> <form name="calculate"> <input type="text" name="first" size="5"> <input type="text" name="second" size="5"> <input type="button" onclick="calculate()"> <input type="text" name="result" id="result" size="5"> </form> </body> c...

Machine Learning using R linear regression -

i used r machine learning code. project scenario mentioned below. used mongodb database storage. in mongo db had 1 collection in collection every 5 min. 1 new document added. collection description below. { "_id" : objectid("521c980624c8600645ad23c8"), "timestamp" : 1377605638752, "cpuused" : -356962527, "memory" : 2057344858, "hostid" : "200.2.2.2" } now problem using above documents want predict next 5 min or 10 min or 24 hrs. cpuused , memory values. write r code below library('rmongo') mg1 <- mongodbconnect('dbname') query <- dbgetquery(mg1,'test',"{'hostid' : '200.2.2.2'}") data1 <- query[] cpu <- query$cpuutilization memory <- query$memory new <- data.frame(data=1377678051) # set timestamp calculating results predict(lm(cpu ~ data1$memory + data1$date ), new, interval="confidence") but, when execute above code shows me...

c# - Bind to extension method in WPF -

i have simple class in c#: public class dog { public int age {get; set;} public string name {get; set;} } and created extension method : public static class dogext { public static string barkyourname(this dog dog) { return dog.name + "!!!"; } } is there way how bind result of barkyourname method wpf component? basically : there way hwo bind extension method? no, cannot bind extension method. can bind name -property of dog -object , use converter though. to create converter create class implementing ivalueconverter interface. need one-way conversion (from model view) need implement convert method only. convertback method not supported converter , throws notsupportedexception . public class nametobarkconverter : ivalueconverter { public object convert(object value, type targettype, object parameter, cultureinfo culture) { var dog = value dog; if (dog != null) { return dog.barkyour...

java - Contacts android application development -

i wrote adding contacts android app contains 1 name field , 1 number field , save button,when enter name , number , press save button add contact contact list..it working fine..but when not entered , pressed save button saving contact "noname"..for wrote if , else condition not working..please give me solution source code: package com.example.contacts; import java.util.arraylist; import android.app.activity; import android.content.contentprovideroperation; import android.os.bundle; import android.provider.contactscontract; import android.view.menu; import android.view.view; import android.widget.edittext; import android.widget.toast; //import android.view.menu; public class contactdetails extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_contact_details); } @ove...

c# - Move&Zoom Image -

i have pretty simple requirement (i thought), window shows image @ start point & size , moves/zooms end point , size. not typical image viewer requirement pan&zoom. more sprite animation. i tried out couple of ways, e.g. thicknessanimation alter margin move image, performance not enough. have admit don't have experience wpf, though. below last version ok performance-wise. image element goes on whole window , size , position set scaletransform , translatetransform. works (and shows relatively smooth movement) if end position on lower right of start position, e.g. 0,0 800,600. if it's other way around, though, image makes kind of slingshot movement lower right corner of window, leaves window , comes stop @ end position. i appreciate explanation behavior solution. , if know different way works , similar or better performance-wise, i'd hear too. <window x:class="viewboxtext.animatedimagewindow" xmlns="http://schemas.microsoft.com/winfx/...

zend framework - Access an id of a user in a table from a controller -

php, zend framework, apache, mysql. i want edit user in list clicking corresponding edit button. when click edit button, corresponding users id should send controller should accessed. cant seem user id in controller. after getting id , want populate fields in edit.phtml data retrieved view model. since cant access id, cant populate fields. the url /sample/user/edit/2 2 id of user. usercontroller.php <?php class usercontroller extends zend_controller_action { protected $_user; public function init() { /* initialize action controller here */ $this->_user = new application_model_user(); } public function indexaction() { // action body } public function listallaction() { // action body $this->view->users = $this->_user->listusers(); } public function registeraction() { // action body if($this->getrequest()->ispost()) ...

c# 4.0 - How to read <a></a> from Listview in asp.net -

i have listview have add in asp.net form there code below: <asp:listview runat="server" id="listview2" groupitemcount="1" onitemdatabound="listview2_itemdatabound"> <layouttemplate> <asp:placeholder runat="server" id="groupplaceholder"/> </layouttemplate> <grouptemplate> <asp:placeholder runat="server" id="itemplaceholder"/> </grouptemplate> <itemtemplate> <div style="width: 200px; height: 220px; margin-left: 230px; margin-top: -220px"> <a href='<%# getafterburndownloadhref() %>'> <asp:image id="image2" runat=...

c++ - Conditional large flat array traversal and surprisingly short loop execution time -

i in need of explanation have discovered experience. have large flat array of type char. array in total 500x500x500 = 125e+6 bytes long. inside cells keep number between 0 , 255. luckily when traversing array interested in cells having non-zero value! now here goes question. found out experimenting doing smallest operation on cells takes huge amount of time when going through whole 0 , non-zero array whereas, if use condition similar 1 below, while( index < 125000000 ) { if( array[ index ] > 0 ) { // stuff } index++; } the execution time drastically shorter. in fact can go through whole array , perform operations on non-zero cells in few seconds rather half hour execution time of approach no conditions. what need explanation of why works! need explain phenomena in thesis report , best if can relate scientific paper or similar. thank in advance! best regards, omid ariyan it expect char unsigned, hence capable of holding values in ...

.net - Cannot access a disposed object. in c# client & Server -

i had fix problem cannot access disposed object. in c# client & server following points used. used using scope limitation i not closed socket object class client { static void main(string[] args) { console.title = "client chat"; byte[] bytes = new byte[1024];// data buffer incoming data string data = null; // connect remote device try { // establish remote end point socket iphostentry iphost = dns.resolve("localhost"); ipaddress ipaddr = iphost.addresslist[0]; ipendpoint ipendpoint = new ipendpoint(ipaddr, 95); using (socket socketsender = new socket(addressfamily.internetwork, sockettype.stream, protocoltype.tcp)) { socketsender.connect(ipendpoint); console.writeline("\n\n\tsocket connecting java server...." + socketsender.remoteendpoint.tostring()); ...

Unable to implement mongor bundle in laravel -

i trying implement mongor bundle laravel version 3.2.14 i have followed steps mentioned in documentation on mongor homepage there no documentation regarding usage in homepage chance got following link : bundle full example in-spite of following unable understand why code not working. strangely not getting errors. my code follows database.php 'mongor' => array( 'hostname' => '127.0.0.1', 'connect' => true, 'timeout' => '', 'replicaset' => '', 'db' => 'census', 'username' => 'root', 'password' => '', ), user.php(model) class user extends mongor\model{ public static $timestamps = true; public function __construct($connection = null) { parent::__construct($connection); static::$collection = 'user'; } } use...

embedded resource - Error extracting a file from a program C# -

i have embedded files in program of mine full success have transferred lines of code on second program , disappointment, cant work life of me. the code extraction is: private static void extract(string namespace, string outdirectory, string internalfilepath, string resourcename) { assembly assembly = assembly.getcallingassembly(); using (stream s = assembly.getmanifestresourcestream(namespace + "." + (internalfilepath == "" ? "" : internalfilepath + ".") + resourcename)) using (binaryreader r = new binaryreader(s)) using (filestream fs = new filestream(outdirectory + "\\" + resourcename, filemode.openorcreate)) using (binarywriter w = new binarywriter(fs)) w.write(r.readbytes((int)s.length)); } to extract program want located in folder named newfolder1 typing code: type mytype = typeof(newprogram); var n = mytype.namespace.tostring(); string...

java - How to print debug messages in dynamic web project in eclipse -

i working on simple dynamic web project in eclipse. getting http 404 error. want debug program using debug messages. please help. in advance. you can use logger such log4j , configure use fileappender send logs file. here simple tutorial basic log4j configuration: http://www.mkyong.com/logging/log4j-log4j-properties-examples/

objective c - How to retrive image from parse.com -

Image
hi new using parse.com iam trying save image in parse.com , retriving it.. saved image pffile in parse.com dashboard showing this now how can retrive image , show in uiimageview i tryied not working.. pfquery *query = [pfquery querywithclassname:@"userphoto"]; [query wherekey:@"username" containsstring:@"ravi"]; [query getobjectinbackgroundwithid:@"id" block:^(pfobject *object, nserror *error) { if(!error){ pffile *im = [object objectforkey:@"imagefile"]; _getimg.image = im; }}]; here want retrive particular image of username ravi thanks in advance.. :) to retrieve image, need to: query pfobject in question use -[pffile getdatainbackgroundwithblock:] retrieve pffile 's data create uiimage resulting nsdata pfquery *query = [pfquery querywithclassname:@"userphoto"]; [query wherekey:@"username" containsstring:@"ravi"];...

dynamic - Rails routes: same controller different routes -

in our app have tag model, such red yellow big small etc. in several categories color , size (tag model have field category ). now, instead of /tags/big /tags/small /tags/red /tags/yellow /tags we want routes like /size/big /size/small /color/red /color/yellow /size /color ... also, url helpers should work too, i.e., tag_path should yield correct url's how in routes.rb file? thanks!! edit: need index pages/url_helper work too will_paginate uses tag_path generate links page numbers. need overload tag_path? you can use route constraints. define class executes matches customized conditions. can search api match see details. i assume tag has 2 columns named "category" , "name". route.rb match ':category/:name' => 'tags#show', via: 'get', constraints: tagroutewhitelist.new, as: 'tag' app/models/tag_route_white_list.rb class tagroutewhitelist def matches(request) tag.distinct('...

support for Multi Window wicket 6.x -

hi using wicket , getting page expire when ever 2 pages open , trying submit in on after other there way support getpagesettings().setautomaticmultiwindowsupport(true) in wicket 6.8 you've know how big pages , how many sessions you've in parallel. think page size (serialized) bigger maxsizepersession , because of last page stored on disk. you can tweak ipagestore settings bit (but increase resource usage): /** * sets maximum number of page instances stored in application scoped * second level cache faster retrieval * * @param inmemorycachesize * maximum number of page instances held in application scoped * cache */ void setinmemorycachesize(int inmemorycachesize); /** * sets maximum size of {@link file} page instances per session stored. after * reaching size {@link diskdatastore} start overriding oldest pages @ * beginning of file. * * @param maxsizepersession * maximum size of file page instances stored ...

bash shell while loop how to break out -

i want write bash shell script process text, might require while loop. for example, while loop in c: int done = 0; while(1) { ... if(done) break; } i want write bash shell script equivalent that. used , classic examples read have showed, this: while read something; ... done it offers no how while(1){} , break; , defined , used in c , , not have read data stdin. could me equivalency of above c code? thanks. it's not different in bash . done=0 while : ; ... if [ "$done" -ne 0 ]; break fi done : no-op command; exit status 0, loop runs until done given non-zero value. there many ways set , test value of done in order exit loop; 1 show above should work in posix-compatible shell.

architecture - Latency between instructions -

what latency between add , store instruction in mips pipeline . suppose have following 2 instructions. add.d f4,f0,f2 s.d f4,0(r1) it given in book these 2 have latency of 2 cc , think need not any, if can bypass values in pipeline . value of f4 ready in 3rd cc , can forward value in f4 s.d instruction because r1 has nothing add.d instruction . if wrong in thinking , correct latency ?

regex - Python: substituting a regular expression into a string to be used as a regular expression -

i have string: s = 'this number -n-' i want substitute -n- placeholder regular expression: s = 'this number (\d+)' so can later use s regular expression match against string: re.match(s, 'this number 2') however, i'm not able s substitute in regular expression doesn't escape slash: re.sub('-n-', r'(\d+)', 'this number -n-') # returns 'this num (\\d+)' please let me know i'm doing wrong here. thanks! your string contains single \ , use print see actual string output: str version: >>> print re.sub(r'-n-', r'(\d+)', 'this number -n-') number (\d+) repr versions: >>> re.sub(r'-n-', r'(\d+)', 'this number -n-') 'this number (\\d+)' >>> print repr(re.sub(r'-n-', r'(\d+)', 'this number -n-')) 'this number (\\d+)' so, regex going work fine: >>> patt = re.compi...

registry - Powershell - last logged on user - same input, different output -

update @ hal9256 your answer made me think! i did more googling, , found website offers approach http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/19/use-powershell-to-find-last-logon-times-for-virtual-workstations.aspx so far, works! i remote server run powershell script displays last logged on user. several things it works when run in context of service account, not administrator it takes several minutes output but when run in contenxt of service account, different output same input $line_array = @() $multi_array = @() [hashtable]$my_hash = @{} foreach ($i in $args){ $line_array+= $i.split(" ") } foreach ($j in $line_array){ $multi_array += ,@($j.split("=")) } foreach ($k in $multi_array){ $my_hash.add($k[0],$k[1]) } $sender_ip = $my_hash.get_item("sender-ip") $eventlist = @() get-eventlog "security" -computername $sender_ip ` | -filterscript {$_.eventid -eq 4624 -and $_.replacementstring...

c# - String Equal to Regex Result? -

i have regex result capture in order use throughout code. such as, i'm using regex rid of specific part in string , i'd capture result in string variable. is possible such thing? , how 1 go it? input: c:\users\documents\development\testing\11.0.25.10\w_11052_0_x.pts expected result want store string: c:\users\documents\development\testing\11.0.25.10\ regex pattern: ^(.*[\\]) of course can: groups property of system.text.regularexpressions.match object lets access match in form of string accessing value property of corresponding group. for example, can capture value of expected output example: string namestring = @"c:\users\documents\development\testing\11.0.25.10\w_11052_0_x.pts"; // note needed double slashes in pattern avoid "unmatched [" error string pathprefix = regex.match(namestring, @"^(.*[\\])").groups[1].value; console.writeline(pathprefix); the above prints c:\users\documents\development\testing\11.0....

php - How to reconstruct a url using cakephp while removing selected query parameters? -

i using cakephp 2.4 i have url e.g. /sent?note=123&test=abc i want remove note parameter while giving me rest of url back. i.e. /sent?test=abc i have piece of code works query parameters. i find out how improve code works with: named parameters passed parameters hashtag e.g. /sent/name1:value1?note=123&test=abc#top this code have written far. https://github.com/simkimsia/utilitycomponents/blob/master/controller/component/requestextrashandlercomponent.php#l79 update part iii: let me illustrate more examples demonstrate mean more generic answer. the more generic answer should assume no prior knowledge url patterns. assuming given url /sent/name1:value1?note=123&test=abc i want rid of query parameter note , /sent/name1:value1?test=abc the more generic solution should work give me url. another example. time rid of named parameters. assuming given url again /sent/name1:value1?note=123&test=abc i want rid of name1 , back: /...

mysql - SQL join table to self to find difference -

consider below table create table `temp` ( `id` int(11) not null, `lang` char(2) collate utf8_unicode_ci not null, `channel` char(2) collate utf8_unicode_ci not null, `name` varchar(20) collate utf8_unicode_ci default null, primary key (`id`,`lang`,`channel`) ) insert `temp` (`id`, `lang`, `channel`, `name`) values('1','fr','ds','jacket'); insert `temp` (`id`, `lang`, `channel`, `name`) values('1','en','ds','jacket'); insert `temp` (`id`, `lang`, `channel`, `name`) values('2','en','ds','jeans'); insert `temp` (`id`, `lang`, `channel`, `name`) values('3','en','ds','sweater'); insert `temp` (`id`, `lang`, `channel`, `name`) values('1','de','ds','jacket'); the question how can find entries lang en not exist fr? head stuck , believe trivial query having 1 of these days. there several ways of achieving thi...

angularjs - How to use promises with Angular.js and $resource with query string? -

what's best way handle promises in angular.js resource expects query string / parameters passed it? i've seen job of $q handled in factory, controller , router i'm not sure how handle in case when there's parameters involved. if factory : angular.module(animals, ['$resource', '$route', '$location', function($resource, $route, $location) { return $resource('http://thezoo.com/animals', { query: {method: 'get', isarray: true}}); }]); and controller: animals.query({size="med",gender='f'}); then how should best handled using promises? call external resource can take quite long. really late party, found page google. if want use resource, maybe want data query method before continue (maybe you're writing in resolve or something), can this. var deferred = $q.defer(); resource.query({params}, function (response) { somedata = response; deferred.resolve(somedata); }); return deferred.prom...

spring - Updating my SpringSocialLinkedIn version prevent it from working, why? -

i've been using spring social linkedin 1.0.0.rc1 few times , managed have working application. however, since changed module version in pom.xml , doesn't work anymore. have form enabling users use application : edit : form updated <form action="signin/linkedin" method="post"> <button type="submit">import linkedin</button> <input type="hidden" name="scope" value="r_basicprofile" /> </form> when submit form, here : org.springframework.web.util.nestedservletexception: handler processing failed; nested exception java.lang.noclassdeffounderror: org/apache/http/conn/scheme/schemesocketfactory org.springframework.web.servlet.dispatcherservlet.triggeraftercompletionwitherror(dispatcherservlet.java:1259) org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:945) org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservle...

version control - How to get Tortoise HG to detect changes in files based on directory again -

Image
the simplest way can describe have project in windows 7 under version control tortoise hg version 2.8.1 using mercurial-2.6.2, using bitbucket.org remote repository. when go click hg commit on folder red exclamation point on (meaning files need committed). tells me no files found operation but when click on files in directory have red exclamation point, brings normal commit menu expecting me write normal commit message. so problem doesn't detect files need comitting directory level when click commit, despite there being red exclamation point on directory . maybe caused other issues. sure has branches or heads, don't understand stuff prefer. i willing grab info or screenshots tortoise hg or bitbucket issue, sure explain how info. here screenshots of issue. here inside directory. repository on network share bad idea (tm) move repository local drive

java - JSplitPane not filling panel -

i having trouble making jsplitpane work how too. first, fill container (a jframe) fully, not have size determined components inside the split panes. second, when resize container, not display scroll bar on either jscrollpane s or jlist s. any ideas how make happen. i'm sure need wire listeners correctly, i'm not quite sure start. my panel looks this... public class mainpanel extends jpanel { public mainpanel(){ jpanel p1 = new jpanel(); jpanel p2 = new jpanel(); jpanel p3 = new jpanel(); p1.setlayout(new boxlayout(p1, boxlayout.page_axis)); p2.setlayout(new boxlayout(p2, boxlayout.page_axis)); p3.setlayout(new boxlayout(p3, boxlayout.page_axis)); p1.add(new somebuttons()); p2.add(new somebuttons()); p3.add(new somebuttons()); p1.add(newneedylist()); p2.add(newneedylist()); p3.add(newneedylist()); dimension ms = new dimension(0,0); p1.setminimumsi...

javascript - Fixed table header with horizontal scroll inside div element -

i have table horizontal scroll , want stick header in following proof of concept html table headers visible @ top of window when viewing large table horizontal scroll doesn't work when table placed inside other element. header fixed position property , doesn't move rest of table. ideas?

mootools - Menu with fade effect -

if go website ( www.actemp.es ) , click on menu button (right top), you'll see first time, menu doesn't appear fade, other times yes. want fade first. don't speak english =d here code: window.addevent('domready', function(){ $('fadeout').addevent('click', function(evento){ evento.preventdefault(); $('menu').fade('out'); }); $('fadein').addevent('click', function(evento){ evento.preventdefault(); $('menu').fade('in'); }); }); window.addevent('domready', function(){ $('fadeout').addevent('click', function(evento){ evento.preventdefault(); $('menu2').fade('out'); }); $('fadein').addevent('click', function(evento){ evento.preventdefault(); $('menu2').fade('in'); }); }); window.addevent('domready', function(){ $('fadeo...

php switch statement using text box/drop down box -

i trying use switch statement make when specific word typed text box display available models of car for example if user entered "volkswagen" should echo "the available models beetle , polo" but reason isnt working can suggest me why? here code have far, <form action="switch.php" method="post"> <input type="text" name="cars" id="cars" /> <input type="submit" /> <?php $i = $_post; ?> <?php switch ($i) { case "volkswagen": echo "the available models beetle , polo"; break; case "renault": echo "the available models megane , clio"; break; case "land rover": echo "the available models range rover sport , defender"; break; } ?> </form> edit: i bit stuck trying use switch statement drop down box , not quite sure how can make the...

java - Regex not to give overflow error -

sample code: import java.util.regex.matcher; import java.util.regex.pattern; public class regex { public static void main(string[] args) { string data = "shyam , you. 2.3 km away home. lakshmi , you. ram , you. mike. "; pattern pattern = pattern.compile( "\\s*((?:[^\\.]|(?:\\w+\\.)+\\w)*are.*?)(?:\\.\\s|\\.$)", pattern.dotall); matcher matcher = pattern.matcher(data); while (matcher.find()) { system.out.println(matcher.group(0)); } } } output: you 2.3 km away home. mike. i getting expected output on executing code above. problem when testing same regex greater string , showing overflow error. searched same , came know alternation (a|b)* in regular expression causes problem. there way solve issue? please help. i have tried refactor regex avoid backtracking. can try out regex: pattern pattern = pattern.compile("(?>[^.]|(?:\\w+\\.)+\\w)+\\sare\...

node.js - How to host jsdoc / apidoc on Express.js -

im using http://apidocjs.com/ create public documentation express.js api building. question is, how use express.js route , serve documentation? here's express server setup: /** load config globally defined __config * @requires fs */ var fs = require('fs'); __config = json.parse(fs.readfilesync('config/config.json')); /** custom logging moduele * @requires ninja_modules/jacked-logger */ log = require('./ninja_modules/jacked-logger'); /** configure express server * @requires express * @param {function} callback configures server */ var express = require('express'); var app = express(); app.configure(function() { /** sets default public directory */ app.use(express.static(__dirname + '/public')); /** sets root views directory */ app.set('views', __dirname + '/public/views'); /** compress response data gzip / deflate. */ app.use(express.compress()); /** request body parsing middleware supp...

api - Ruby rescue syntax error -

i have following line of code giving me error: rescue timeout::error => e logs.puts("rescued timeout error...#{e}") email_ids_all.each |email_delete| call= "/api/v2/emails/#{email_delete}/" uri= httparty.delete("https://www.surveys.com#{call}", :basic_auth => auth, :headers => { 'contenttype' => 'application/x-www-form-urlencoded', 'content-length' => "0" } ) puts "deleted email #{email_delete}".green log.puts("deleted email #{email_delete}") end abort #abort entire script after deleting emails end the error receiving this: syntax error, unexpected keyword_rescue, expecting $end rescue timeout::error => e ^ essentially trying run api delete call if script times out. doesn't seem matter put in block rescue though, receive same error. what's wrong syntax on rescue method? the for...

Develop Sharepoint 2013 365 Workflow in Visual Studio -

my clients have bought office 365 sharepoint 2013 site , i'm in process of configuring it. their business rules require complicated workflow can developed in sharepoint designer. however, i'm experienced visual studio .net developer i'd rather programmatically , save time. at present can't figure out how connect desktop version of visual studio cloud-based sharepoint site. i've downloaded workflow manager tool i'm struggling figure out how configure farm databases etc. available documentation seems patchy. has out there found way of doing this? this link suggests might not possible. thanks edward according this article it's possible, though not nice. have deploy workflow sharepoint app. means able call webservices. another option might worth looking @ nintex , has module office 365 well. nintex has alot of useful functions, though don't know how office 365 version is. have check whether suits requirements.