Posts

Showing posts from June, 2010

ajax - populate jquery select2 with original value -

ajax - populate jquery select2 with original value - i using select2 plugin autocomplete text box. autocomplete makes ajax phone call employee view in database. working great except when user opens webform edit record. need select2 command load value saved record regardless of whether exists in list or not. when open edit form, select2 command blank. know can load value if in json info homecoming ajax call, if it's not? can see value in initselection don't know how set controls text/value it. long story short, view making ajax phone call may or may not have original employee value in it. example, if employee selected view left branch/agency, view no longer show them. still need display original value in control. hope makes sense. here have code. can see original value in initselection don't know how in control: var url = '@url.action("getemployees", "assetassignment")'; var originalvalue = ""; $('#assi

php - Converting certain sub arrays to another array -

php - Converting certain sub arrays to another array - i'm collecting form fields on page via jquery , passing them on php page in ajax post, array passed below (actual info on 60 fields / arrays @ present) array ( [0] => array ( [0] => main [1] => text [2] => product-name [3] => fieldvalue ) [1] => array ( [0] => main [1] => select [2] => product-range [3] => fieldvalue ) [2] => array ( [0] => main [1] => select [2] => product-year [3] => fieldvalue ) [3] => array ( [0] => main [1] => text [2] => product-type [3] => fieldvalue ) [4] => array ( [0] => main [1] => text [2] => product-sku [3] => fieldvalue ) [5] => array ( [0] => main [1] => te

Getting ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) when I try to install a gem with Ruby ruby 2.0.0p451 -

Getting ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) when I try to install a gem with Ruby ruby 2.0.0p451 - this question has reply here: “gem install rails” fails dns error 14 answers i installed ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0] using rvm , have list: ⇒ rvm list rvm rubies jruby-1.6.8 [ x86_64 ] jruby-1.7.0 [ x86_64 ] jruby-1.7.1 [ x86_64 ] mruby-head [ x86_64 ] rbx-head [ x86_64 ] ruby-1.8.7-head [ i686 ] ruby-1.8.7-p374 [ i686 ] ruby-1.9.3-p194 [ x86_64 ] ruby-1.9.3-p286 [ x86_64 ] * ruby-2.0.0-p353 [ x86_64 ] => ruby-2.0.0-p451 [ x86_64 ] ruby-2.0.0-preview2 [ x86_64 ] ruby-head [ x86_64 ] # => - current # =* - current && default # * - default ⇒ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0] now i'm not beingness able install

Subclassing ES6 Set in javascript -

Subclassing ES6 Set in javascript - i'm running problems when trying inherit new set available in ecmascript 6. class defined such: function selectionmanager () { set.call(this); } selectionmanager.prototype = object.create(set.prototype); selectionmanager.prototype.add = function (unit) { unit.setisselected(true); set.prototype.add.call(this, unit); }; /* functions left out */ when trying phone call add next error: typeerror: set operation called on non-set object the code available @ http://jsfiddle.net/6nq1gqx7/ the draft es6 states should possible subclass set, right way of doing so? looks beingness tracked: https://github.com/google/traceur-compiler/issues/1413 javascript set ecmascript-6 ecmascript-harmony

python 2.7 - Fixing the height of frame with resizing the window -

python 2.7 - Fixing the height of frame with resizing the window - how prepare height of alternative frame resizing window? i have 3 classes a ( frame ), b ( canvas ) , c ( object ) c top level. in class c , initialise a a( master, self ) , .config( height = 40 ) . in class a , established 2 sub-frame contain check button , entry box + alternative menu, both frame , code height = 20 when run code, worked pretty well, when resize window. if click mouse , drag down, works ok. but if click mouse , drag upwards (to cut down height), frame disappear ( first height of frame cut down until 0 , height of canvas changed ). if click mouse , drag down, alternative frame homecoming again can give me thought prepare behavior? python-2.7 tkinter

sql - Is there a performance disadvantage if an in-line function calls a scalar function? -

sql - Is there a performance disadvantage if an in-line function calls a scalar function? - i've been getting grips apply, , @ same time reading performance improvement of in-line functions on scalar functions (see rob farley's post here). i have application manages requests. 1 request might apply single person on system, or many persons. transactions (not sql tran!!) created against requests. so, i've written little function returns latest transaction of type, given personid , requestid alter function [dbo].[fnreturnpersoncollectiontime] ( -- add together parameters function here @personid int, @requestid int ) returns table homecoming ( select top 1 transactions.datecreated transactiondatetime, transactions.fkpersonid, transactions.fkrequestid transactions ((transactions.fkpersonid = @personid) , (transactions.fkrequestid = @requestid) , (transactions.fktransxtypeid = 169

php - Format the array output to display friendly names -

php - Format the array output to display friendly names - i've function returns json response: public function getusersaction() { $response = array(); $em = $this->getdoctrine()->getmanager(); $entities = $em->getrepository("userbundle:user")->findall(); $roles = array( "role_profile_one" => "facturación y entrega", "role_profile_two" => "envío", "role_admin" => "administrador", "role_user" => "no posee roles asignados" ); $users = array(); foreach ($entities $entity) { $user = array(); $user[] = $entity->getusername(); $user[] = $entity->getemailcanonical(); $user[] = $entity->getroles(); $user[] = $entity->getgroupnames() != null ? $entity->getgroupnames() : "-"; $users[] = $user; } $response[ 'data' ] =

ios - Iphone 6 doesn't resize my app while auto layout is turned off -

ios - Iphone 6 doesn't resize my app while auto layout is turned off - i have app made iphone 5 screen size. don't want utilize auto layout turned off. want iphone 6 resize content default. what should do, auto layout turned app in different sizes : remove launch image iphone 6/6 plus , launch screens project if added , there no need turn off autolayout , not depend on that.! ios autolayout screen-size

oop - Different objects with the same data java -

oop - Different objects with the same data java - i have created class creates instance of object public class employeeprofile { /////////instance variables///////// private static string fname; private static string lname; private static string email; private static string phone; ////////constructors//////////// public employeeprofile() { } public employeeprofile(string firstname, string lastname, string emailadd, string pnumber) { fname = firstname; lname = lastname; email = emailadd; phone = pnumber; } } when phone call empty constructor , populate myself methods i've created fine. when phone call new object new name using sec constructor , parameters, overwrite info first object!! employeeprofile prof1 = new employeeprofile(); prof1.firstname("john"); prof1.lastname("doe"); prof1.email("johndoe@yahoo.com"); prof1.phone("5

html - JavaScript fireEvent not a function? -

html - JavaScript fireEvent not a function? - i've been trying create game battleship in javascript school assignment, , i'm stuck trying create opponent ai. i've created event when click cell in grids: function addlistener(evt) { evt.addeventlistener('click', function(){ //bunch of code }); } now run function addlistener every time create new cell in grid in nested loop: yourcell.setattribute('id', evt + string(a) + string(b)); addlistener(yourcell); what want opponent run click event when i've made turn, wrote test out fireevent function: function enemyturn() { document.getelementbyid('yourgrid00').fireevent('onclick'); } according sec code example, set id of cell 'yourgrid00' , i've confirmed inspecting html code after javascript code has been run, , function enemyturn() never run before each cell has been created , assigned id. what not understand next error on fireevent

javascript - Menu text color move effect -

javascript - Menu text color move effect - my menu looks this: <nav> <a href="#"> <span class="black">home</span> <span class="red active">home</span> </a> <a href="#"> <span class="black">longer menu item</span> <span class="red">longer menu item</span> </a> <a href="#;"> <span class="black">two words</span> <span class="red">two words</span> </a> <a href="#"> <span class="black">about</span> <span class="red">about</span> </a> <a href="#"> <span class="black">contact</span> <span class="red">contact</span> </a> </nav> t

angularjs - How to access application from Mobile -

angularjs - How to access application from Mobile - i'm using yeoman + angularjs + ui router. when i`m used ng-router possible open mobile browser (local-ip):9000 , utilize app, ui router can not same. should setup something? for eg: run grunt server in computer. open browser in mobile , access local ip:port. bit of code: app.js .config(['$locationprovider', '$urlrouterprovider', '$httpprovider', function($locationprovider, $urlrouterprovider, $httpprovider) { $locationprovider.html5mode(true).hashprefix('!'); $urlrouterprovider.otherwise('/404'); $httpprovider.interceptors.push('authinterceptorservice'); } .run(['$rootscope', 'authenticationservice', '$state', function($rootscope, authenticationservice, $state) { var routesthatrequireauth = ['/dashboard']; $rootscope.$on('$statechangestart', function(event, tostat

notifications - Parse vs Urban Airship -

notifications - Parse vs Urban Airship - this simple sounds. know there lot of documentation, nil beats experience, , sharing in few lines improve reading ton of complex documents hours. so, if has used both (or @ to the lowest degree feels reliable in explaining point), appreciate feedback pros , cons of both parse , urban airship force notifications. even though i've found of these answers myself, think of import points maintain in mind : pricing quality speed documentation usability (hard maintain/implement, etc.) information (stats notifications, where/when/number, etc.) anything might not think about. i'm ears ;) i bit late recommend parse on urban airship. i've used both in limited quantities. one of biggest differences price. urban airship 14 times more expensive reference here http://killerapi.blogspot.sg/2013/01/warning-urban-airship-pricing-is-much.html. both have great quality , speed. my favorite thing parse documentation top no

C# how to load listview -

C# how to load listview - im doing windows form application open , load database. code needs show single record view of records , listview view stuck on listview part. here next code using system; using system.io; using system.collections.generic; using system.componentmodel; using system.data; using system.data.oledb; using system.drawing; using system.linq; using system.text; using system.windows.forms; using adox; namespace ex3 { public partial class changebutton : form { public list<client> clientrecords = new list<client>(); //creates list records stored public string filename; public string filedir; public string rec; public bool checkbc; public bool checklc; public string databasefile; public oledbconnection conn; public changebutton() { initializecomponent(); } int position = 0; private void form1_load(object sender, eventargs e)

javascript - Save src data:image information as file -

javascript - Save src data:image information as file - i using classic asp , have created preview script in jquery. $('#file').change(function(){ var ofreader = new filereader(); ofreader.readasdataurl(this.files[0]); ofreader.onload = function (ofrevent) { $('#preview').html('<img id="trial" src="' + ofreader.target.result + '">'); }; }); this works add together provides preview of image within of div called #preview. what need physically save file directory on website? the resultant img tag has next src value: src = 'data:image/png; base64,xxxxxxxxx' where xxxxxxxxx base of operations 64 encode string , png file type (can jpg, gif, etc) there not appear way of doing easily, created .net dll job me. javascript jquery vbscript

ios - Parse.com data caching and synchronization -

ios - Parse.com data caching and synchronization - what best strategy synchronize parse objects across application? take twitter example, have many tweet objects, same tweet object can shown on multiple places, viewcontroller1 , viewcontroller2, not efficient both of them hold deep copies of same parse object. when increment likecount of tweet_168 in viewcontroller2, how should update likecount of tweet_168 in viewcontroller1? i created singleton container class (tweetcontainer) every parse request goes through , checks if incoming objectids in container, a) if is, updates previous object's fields , dumps new object. (to maintain single deep re-create of parse object.) b) if not, adds new object. (this process fast i'm using hashmaps) this container holds deep copies objects, , gives shallow copies viewcontrollers, editing tweet in viewcontroller result in update on viewcontrollers! taking 1 step further, let's tweet objects have pointers author objects. w

vba - Concatenating in Excel For Loop to make batch file of commands -

vba - Concatenating in Excel For Loop to make batch file of commands - consider scenario: have client has 2 network shares on server. each share contains identical list of folders representing each project (one current data, , other share archived data). each project folder contains matching set of folders , subfolders need individual permissions assigned. of course of study projects added , removed time time. i'd maintain list of projects in excel along list of permissions need set each project folder subfolders. thought lay out commands in excel 1 per row each row representing subfolder. utilize loops duplicate these commands adding on shared folder , project folder directory path. output batch file run time permissions needed changed or updated. edit: i've never used vba in excel, , after searching can't seem find how utilize variables in loop alter cells in sheet referenced. it's been while since wrote program, when programming in c remember beingness

asp.net - Render partial webpage in WebForms -

asp.net - Render partial webpage in WebForms - in mvc can render partial view within view using html.partial("viewname") helper function. method used same thing within asp.net webforms application? want have 2 webpages (huge amounts of) content , want display them on 3rd page in different tabs. usercontrol best way utilize partial view in web forms. asp.net asp.net-mvc webforms partial-views

Android notification from service does not open activity -

Android notification from service does not open activity - updated myservice @commonsware i have service if started set alarm triggers notification. this works fine , alarms canceled if service stopped. i trying notification open new activity class can not done my service class following: bundle com.example.andtip; import android.app.notification; import android.app.notificationmanager; import android.app.pendingintent; import android.content.broadcastreceiver; import android.content.context; import android.content.intent; import android.support.v4.app.notificationcompat; public class breceiver extends broadcastreceiver { private static final int my_notification_id=1; notificationmanager notificationmanager; notification mynotification; public void onreceive(context context, intent intent) { intent myintent = new intent(context, dosomething.class); pendingintent pi = pendingintent.getbroadcast(context, 0, new intent("com.example.andtip&q

ios - Getting all subviews of a subview -

ios - Getting all subviews of a subview - well, problem can see in image have subview , in subview have other views , within have uilabel , uibuttons. my question how acess uibuttons , uilabel on each subview in viewdidload can alter aspects of them when app begins. in test tried alter color of buttons. i tried using code didn't work: for (uiview *view1 in self.view.subviews) { nslog(@"%@----", view1); for(uiview *view2 in view1.subviews){ nslog(@"%@", view2); if ([view2 iskindofclass:[uibutton class]]) { [(uibutton *)view2 setbackgroundcolor:[uicolor redcolor]]; } } } the nslog gives this: thanks help. you can either create iboutlets, or utilize unique tags in objects wish refference , utilize viewwithtag reference obejcts pointer. if utilize viewwithtag, create sure check object pointer against nil, avoid runtime crashes. to utilize viewwithtag, need assign unique tag in ib, see s

encryption - InvalidKeyException java.security.InvalidKeyException: No installed provider supports this key: (null) -

encryption - InvalidKeyException java.security.InvalidKeyException: No installed provider supports this key: (null) - i have 2 classes, 1 main class , implementation of aes. however, in aes class have method decrypt string, whenever run it, gives exception my encryption method works fine decryption method doesn't work expected. the code private cipher aescipherfordecryption; string strdecryptedtext = new string(); public string decryptaes(final string ciphertext) { seek { aescipherfordecryption = cipher.getinstance("aes/cbc/pkcs5padding"); aescipherfordecryption.init(cipher.decrypt_mode, secretkey, new ivparameterspec(iv)); byte[] bytedecryptedtext = aescipherfordecryption.dofinal(byteciphertext); strdecryptedtext = new string(bytedecryptedtext); } grab (illegalblocksizeexception e) { system.out.print("illegalblocksizeexception " +e); } grab (badpaddingexception e) { system.out.prin

python - pausing a thread from a function and resuming it -

python - pausing a thread from a function and resuming it - i have many threads in programme written below. wanted pause threads when 1 particular function called thread, , should resume after function execution of function finished or after delay of 1 second. illustration in code below, pause threads switch1 , switch2 when switch3 beingness executed, , resume these threads after switch2 finishes execution or after elay of 1 second. can please allow me know how implement in code below ? def switch1(): if (buttonpressed ==1): print 1 def switch2(): if (buttonpressed1 ==1): switch3() print 1 def switch3(): if (buttonpressed2 ==1): print 1 def main(): switch1thread=threading.thread(target=switch1) switch2thread=threading.thread(target=switch2) switch1thread.start() switch2thread.start() you can not pause , resume threads without cooperation of thread itself. thread want pause or resume can pause , resume checking fla

asp.net - WCF service not working when accessed over HTTPS and HTTP -

asp.net - WCF service not working when accessed over HTTPS and HTTP - i've installed ssl certificate in iis. now when navigate domain https://www.example.com/ page loads correctlty. when seek approach web service (which works perfect on http) on https: https://www.example.com/service.svc/newprofile/?id=8&ipaddress=124.162.13.109 get: the resource cannot found. description: http 404. resource looking (or 1 of dependencies) have been removed, had name changed, or temporarily unavailable. please review next url , create sure spelled correctly. requested url: /service.svc/newprofile/ i checked here webservice on ssl endpoint not found 404 create asp.net webservice ssl https moved asp.net website iis 8 on windows server 2012... services missing: .svc files viewable, methods give 404 but renaming webhttpbinding basichttpbinding throws unsupported error in combination jsonp. service element name in web.config matches qualified named of class implements contr

java.lang.IndexOutOfBoundsException Index: 0, Size: 0 -

java.lang.IndexOutOfBoundsException Index: 0, Size: 0 - i getting java.lang.indexoutofboundsexception index: 0, size: 0 error when trying save after inserting values textfields table named table_po . kindly assist private void saveactionperformed(java.awt.event.actionevent evt) { try{ if(cbo_payment.getselecteditem().equals("payment mode")){ joptionpane.showmessagedialog(null, "select valid payment mode before saving"); return; } if(table_po.getmodel().getvalueat(0, 0)==null){ joptionpane.showmessagedialog(null, "select products before saving"); return; } for(int i=0;i<salelistcounter;i++){ string sql="insert ot_purchase_order (part_no,item_description,quantity,amount,payment_mode,supplier_id,po_date,exp_date) values(?,?,?,?,?,?,?,?,?)"; pst=conn.preparestatement(sql); pst.setstring(

java - .htaccess and SocketException: Connection reset, SocketException: Broken pipe -

java - .htaccess and SocketException: Connection reset, SocketException: Broken pipe - is there connection between filrering in .htaccess , socketexception? suppose in .htaccess made deny host.are.everywhere.in.the.net if denied host... recieve socketexception: connection reset, socketexception: broken pipe while creating socket , sending info it? or erros not connected limitations in .htaccess? or these errors says in mutual case? restrictions in .htaccess impact info sent server, i.e. server might send arror code 403 , html page error message. this, however, part of http protocol, , requires functioning tcp connection. server might close connection after response, if client want persistent connection. client has able deal anyway. in short: no restrictions in .htaccess should not cause problems describe. java .htaccess

How to Implement a single program in C that replicates the following Unix command(s): ps -ef | grep YOUR_USER_id | wc -

How to Implement a single program in C that replicates the following Unix command(s): ps -ef | grep YOUR_USER_id | wc - this question has reply here: connecting n commands pipes in shell? 2 answers learning pipes, exec, fork, , trying chain 3 processes together 1 reply my teacher gave practice assignment studying in operating systems class. assignment pipe 3 processes , implement commands in title @ once. allowed utilize these commands when implementing it: dup2() 1 of exec() fork() pipe() close() i can pipe 2 don't know how three. either show me how or @ to the lowest degree point me in right direction? here code far: #include <stdio.h> #include <stdlib.h> #include <unistd.h> int main() { int pfd[2]; int pfdb[2]; int pid

jquery - Preloading another webpage from the current webpage -

jquery - Preloading another webpage from the current webpage - i have been looking while, , find articles , threads loading webpages using overlay or loading bar. using queryloader2 load webpage (which uses loading bar): http://www.gayadesign.com/diy/queryloader2-preload-your-images-with-ease/ however, loading of webpage occur in background. here imagine: someone comes website (and lands @ 'page 1'), , they're having around, , click link (to 'page 2'). user redirected instantly 'page 2' without need stare @ loading bar. occur hence page load in background while browse 'page 1'. the closest match have found (however can't work , don't have plenty reputation comment) preload image in index.html utilize on page any help appreciated! paul question answered (created own reply in effort close question). see comment alexander: refer html5 tags: how can preload page using html5? jquery html website preload

d3.js - D3 and GeoJSON - strange lines? -

d3.js - D3 and GeoJSON - strange lines? - why geojson rendered d3 given below code? (should map of uganda) geojson snippet "type": "featurecollection", "features": [{ "type": "feature", "properties": { "d_06_id": 1, }, "geometry": { "type": "polygon", "coordinates": [ [ [472470.4185696139, 183515.90337615015] code var projection = d3.geo.mercator() .scale(60) var path = d3.geo.path().projection(projection); svg.selectall(".subunit") .data(data.features) .enter().append("path") .attr("d", path); d3.js geojson

jquery ajax submit form to php -

jquery ajax submit form to php - i've started trying larn jquery need help. i've got form i'm trying submit, should simple messing me up. i'm using chrome's console see whats going on, , functions.php doesn't requested. instead of post request, request appearing in console. i've included jquery in file's head. cold explain me i'm doing wrong here? i've tried several other examples i've found on forums here without success. html: <form name="mypage_form" id="mypage_form"> <input id="mypage_location" type="text" size="50" placeholder="enter location" autocomplete="on" runat="server" /> <input type="text" id="mypage_city" name="mypage_city" /> <input type="text" id="mypage_citylat" name="mypage_citylat" /> <input type="text" id="myp

api - JWT (JSON Web Token) automatic prolongation of expiration -

api - JWT (JSON Web Token) automatic prolongation of expiration - i implement jwt-based authentication our new rest api. since expiration set in token, possible automatically prolong it? don't want users need sign in after every x minutes if actively using application in period. huge ux fail. but prolonging expiration creates new token (and old 1 still valid until expires). , generating new token after each request sounds silly me. sounds security issue when more 1 token valid @ same time. of course of study invalidate old used 1 using blacklist need store tokens. , 1 of benefits of jwt no storage. i found how auth0 solved it. utilize not jwt token refresh token: https://docs.auth0.com/refresh-token but again, implement (without auth0) i'd need store refresh tokens , maintain expiration. real benefit then? why not have 1 token (not jwt) , maintain expiration on server? are there other options? using jwt not suited scenario? i work @ auth0 , involved in de

ios - Add empty message to UITableView while preserving scrolling behavior -

ios - Add empty message to UITableView while preserving scrolling behavior - i want display empty message user when uitableview empty. there few attempts out there including using backgroundview : uilabel stays centered if scroll table view, message position stays fixed. looks kind of weird current layout. addsubview : used solution. because added view auto layout destroyed approach. here message goes scrolling needed it's not useable because of side effects. header/footer view: how center here correctly , height? a special cell: how have right height here? centering? i want utilize auto layout in case if possible. here requirements: message (could image text) should centered in table view. if table view scrolled, message should have fixed position on table view. should scroll label label on scroll view, height of scroll view correlates screen height. pull refresh should possible. one illustration can seen in app "app store". if in flight mode , navig

node.js - Promise chain is not executed in nodejs -

node.js - Promise chain is not executed in nodejs - i have next code: q.fcall(-> response = req.post({url:url, formdata: formdata}) homecoming response ).then((response) -> reply(response) ) it makes request , when server response execute reply function, until here works fine. response in xml format: <?xml version='1.0' encoding='utf-8'?> <foxydata> <store_version>2.0</store_version> <result>success</result> <messages> <message>transaction found</message> </messages> <transaction> ... ... ... i want utilize node module(xml2js) convert it. done this: add = (request, reply) -> q.fcall(-> response = req.post({url:url, formdata: formdata}) homecoming response ).then((response) -> parsexml(response, (err, result) -> reply(result) ) ) but in case reply executed immidiately , result empty. tho

objective c - How to use predicate on arrayController and Core Data -

objective c - How to use predicate on arrayController and Core Data - i have nsoutlineview shows info core info store. info presented using nsarraycontroller linked managedobjectcontext , displayed in nsoutlineview using nstreecontroller (much described here). filter info shown using nspredicate (or else) can't work. note osx , not ios can't utilize nsfetchedresultscontroller. i able retrieve right info , store these in nsarray. however, enabling automatic update of see in outlineview using filtered info not work. have: [arraycontroller setmanagedobjectcontext:_coredatahelper.context]; nsfetchrequest *request = [[nsfetchrequest alloc] init]; nsentitydescription *entity = [nsentitydescription entityforname:@"sdrdfileobject" inmanagedobjectcontext:_coredatahelper.context]; [request setentity:entity]; nsnumber *directionlimit = @1; nspredicate *predicate = [nspredicate predicatewithformat:@"directi

scalability - How is SIP scaled for high load? -

scalability - How is SIP scaled for high load? - basically, want implement voip scheme sip in vps server. seems not able handle more ~20 simultaneous calls(just bare sip). workarounds problem? can sip server used database tell clients find intended targets..? p2p? quite new sip. additional info appreciated. sip scalability comes delegating much work endpoints , doing little on servers possible. describe "redirect server": accepts , stores registrations endpoints (softphones, hardphones, etc), , responds "3xx redirect" incoming calls , forgets them immediately. this extreme illustration of server minimization. sip versatile protocol, lets set server infrastructure in many different ways varying grade of command on calls. lets trade off features performance. even flimsiest vps should able handle signalling way more 20 parallel calls in total "stateful proxy" mode. just create sure media (the rtp streams) not routed through server. set

r - using eval in data.table -

r - using eval in data.table - i'm trying understand behaviour of eval in data.table "frame". with next data.table: set.seed(1) foo = data.table(var1=sample(1:3,1000,r=t), var2=rnorm(1000), var3=sample(letters[1:5],1000,replace = t)) i'm trying replicate instruction foo[var1==1 , sum(var2) , by=var3] using function of eval: eval1 = function(s) eval( parse(text=s) ,envir=sys.parent() ) as can see, test 1 , 3 working, don't understand "correct" envir set in eval test 2: var_i="var1" var_j="var2" var_by="var3" # test 1 works foo[eval1(var_i)==1 , sum(var2) , by=var3 ] # test 2 doesn't work foo[var1==1 , sum(eval1(var_j)) , by=var3] # test 3 works foo[var1==1 , sum(var2) , by=eval1(var_by)] the j-exp , checks it's variables in environment of .sd , stands subset of data . .sd data.table holds columns that group. when do: foo[var1 == 1, sum(eval(parse(text=var_j))), by=var3]