Posts

Showing posts from June, 2011

mysql - Looking up times in DB based off actual time or actual time including Delay -

i looking way able grab rows database time. two columns exist: time - scheduled time delay - +seconds time delayed. let's say: id,time,delay 1,18:23,360 2,18:25,0 3,17:15,-60 now, let's searching buses after arriving at/after 18:25, how include these 2 results: 2,18:25,0 1,18:23,360 (note: 18:23 + 360 seconds = 18:29) in query like where `time` >= '18:23' thanks select * [table] date_add(time,interval timedelay second) >= '18:25:00' mysql date_add function

css - Responsive Bootstrap Tiles (News Like Layout) -

i have been stuck trying obtain particular layout bootstrap finding little success. .row .col-md-8 %h3 title %p description .col-md-4 .row .col-md-12 %p side item 1 .col-md-12 %p side item 2 drawing of attempted layout some of key issues having getting spacing between squares while still having line in clean fashion. i have no idea how 2 elements on right "unstack" when viewed on smaller screen. any or advice appreciated. you can use nested columns layout. acheive equal height story , depends (somewhat) on going inside divs. /**css display purposes only**/ body, html { padding-top: 50px; } .alert.alert-top { height: 300px; border-radius: 0; text-align: center; } .alert.alert-bottom { height: 140px; border-radius: 0; text-align: center; } <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /> <

c++ - simd code to check if two double values are sufficiently different -

suppose have 2 double values, old , new. implement vectorized function returns old if abs(x-y) < p, , new otherwise. here code (test.cpp): #include <emmintrin.h> #include <iostream> #define array_length 2 int main(void) { // x = old value, y = new value, res = result double *x, *y, *res; posix_memalign((void **)&x, 16, sizeof(double) * array_length); posix_memalign((void **)&y, 16, sizeof(double) * array_length); posix_memalign((void **)&res, 16, sizeof(double) * array_length); double p = 1e-4; // precision __m128d sp = _mm_set1_pd(p); x[0] = 1.5; y[0] = 1.50011; // x - old value, y - new value x[1] = 2.; y[1] = 2.0000001; __m128d sx = _mm_load_pd(x); __m128d sy = _mm_load_pd(y); // sign mask compute fabs() __m128d sign_mask = _mm_set1_pd(-0.); // |x-y| __m128d absval = _mm_andnot_pd(sign_mask, _mm_sub_pd(sx, sy) ); // mask of |x-y| < p __m128d mask = _mm_cmplt_pd(absval, sp);

jquery - Smoothing out glitchy javascript animation (logical issue) -

sorry misleading title. don't know how else word issue. i'm working on website , i'm having problems transition between animations when rolling on these 2 icons. when roll mouse on either icon, animations run fine, when move on next icon, can see fades out , fades in immediately. looks bad. you can see issue here: http://theromdepot.com/ now correct this, tried checking if either of images hovered when leaving icon, , if not, go ahead , return normal. if either of them hovered, change text , don't fade anything. reason, couldn't work no matter did , scrapped whole thing. if come solution, i'd grateful. here's related javascript: $(document).ready(function(){ $("#cartridge").hover(function(){ document.getelementbyid("archivetext").innerhtml = "view archive"; $("#archivetext").animate({opacity: 1}, 400); $("#slogan").animate({opacity: 0}, 300); $("#recen

com.handmark.pulltorefresh.library.PullToRefreshListView cannot be cast to android.widget.ListView -

i made activity page fragment page , necessary changes fragment need got error please me out of this. have activity have 2 fragments , 1 one of two.and though list view if click on 2nd 1 display @ other side of same activity page. main functionality want do. public class freagmentmaincategory extends fragment{ private linearlayout lllayoutmain; private fragmentactivity faactivitymain; private listview lstcategorylist; private selectcategorytask mauthtask = null; private view mservicestatusview; categorydetails maincategory; private categorylistadapter adapterlist; static final int menu_manual_refresh = 0; static final int menu_disable_scroll = 1; static final int menu_set_mode = 2; static final int menu_demo = 3; private view lstlistview; private pulltorefreshlistview mpullrefreshlistview; @suppresslint("newapi") @override public view oncreateview(layoutinflater inflater, viewgroup container,

ide - Xcode 7.0.1 always crashes immediately when open any project -

i'm using xcode 7.0.1 (7a1001) , os x el capitan i don't know happening! tried load new xcode mac app store , crashes t~t i can't work right long crash log i've got when open project (crashes immediately) https://gist.github.com/macbaszii/9e45fa13a119670ec20a thanks in advance. remove plusgins, , try again. i met same problem, caused "mclog".

parse.com - I encounter some issues using parse on some of my Android devices -

i encounter issues parse regarding device i'm running project on. first tried make parse work on project had issues regarding device using, decided take parsestarterproject ( here ). i opened build.gradle android studio , after checking working on 2 android devices, modified androidmanifest.xml , build.gradle files fit first project. androidmanifest.xml : <?xml version="1.0" encoding="utf-8"?> <!-- ~ copyright (c) 2015-present, parse, llc. ~ rights reserved. ~ ~ source code licensed under bsd-style license found in ~ license file in root directory of source tree. additional grant ~ of patent rights can found in patents file in same directory. --> <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:largeheap="true" package="com.parse.starter"> <uses-permission android:name="android.permission.internet

feeling-responsive Jekylltheme fork provokes 404 (File not found) at [username].github.io -

complete newbie github , pages, 4th day , many attempts @ getting existing jekyllthemes repo replicated, , running. i'm unsure due risk of disturbing original feeling-responsive jekylltheme. current problem: despite clean bill of health way local clone through github.io, current attempt's pages not visible @ cantillate.github.io . been following otherwise good workflow description analogy. only hint @ problem find here , states 'for user pages, use master branch in username.github.io repository. project pages, use gh-pages branch in project's repository'. so seem have defined user page, there 1) no 'master' branch , 2) no project defined. understanding user page should show independently of whatever else exists. rather confusing. history? in browser: forked well-known feeling-responsive jekyll theme renamed resulting repository cantillate.github.io in terminal window: cd'd desktop (mac os x) did 'git clone https://github.c

sqlite - Android - Create Multiple Exported Databases And Allow User To Select Which One To Import -

i have following code used create backup of sqlite database; file sd = environment.getexternalstoragedirectory(); file data = environment.getdatadirectory(); filechannel source = null; filechannel destination = null; string currentdbpath = "/data/com.sjhdevelopment.shaunharrison.myejuiceapp/databases/ejuicedata.db"; string backupdbpath = "ejuicedata.db"; file currentdb = new file(data,currentdbpath); file backupdb = new file(sd,backupdbpath); try { source = new fileinputstream(currentdb).getchannel(); destination = new fileoutputstream(backupdb).getchannel(); destination.transferfrom(source,0,source.size()); source.close(); destination.close(); toast.maketext(this, "db exported", toast.length_long).show(); } catch(exception e) { showerror("error", e.getmessage()); } and have following code import sqlite database file sd =

html - Chrome input history dropdown has the same thing in multiple fonts -

Image
stumbled across weird behaviour when working on search our site. when using search on our site, no matches results knew existed. when retyped it, input field history showed search in different font. typing search scratch return correct results. when clicked history item weird font, still show no results. what caused happen? don't have other language enabled on pc...

Preserve Jenkins workspace -

i have jenkins set run concurrent builds, end workspace, workspace@2, workspace@3, etc. if jenkins thinks build finished, new build overwrite workspace. there way of preventing that? e.g. don't overwrite workspace@3 until say. have various scenarios useful. you archive complete workspace @ end of build. deleted when job deleted. to this: add post-build action -> "archive artifacts" enter "**" "files archive" if want make configurable per run, create build parameter: call "archive" of type "choice parameter" with choices being "**" , "" use "${archive}" "files archive" in "advanced" setting of "archive artifacts" action enable checkbox "do not fail build if archiving returns nothing"

date - Extract current fiscal week for current year in PostgreSQL -

i have table fields fiscal week , date in postgresql . for eg: date 2015-10-10, has fiscal week values 1,2,3..39,40,41,42,etc , other dates 2014-10-10 has fiscal week values 1,2,3..39,40,41,42,etc , same year 2013-10-10 , on... want extract current fiscal week current year. there multiple fiscal week values different year , dates , should extract current fiscal week .

shell - How to get around the Linux "Too Many Arguments" limit -

i have pass 256kb of text argument "aws sqs" command running limit in command-line @ around 140kb. has been discussed in many places it been solved in linux kernel of 2.6.23 kernel . but cannot work. using 3.14.48-33.39.amzn1.x86_64 here's simple example test: #!/bin/bash size=1000 while [ $size -lt 300000 ] echo "$size" var="`head -c $size < /dev/zero | tr '\0' 'a'`" ./foo "$var" let size="( $size * 20 ) / 19" done and foo script just: #!/bin/bash echo -n "$1" | wc -c and output me is: 117037 123196 123196 129680 129680 136505 ./testcl: line 11: ./foo: argument list long 143689 ./testcl: line 11: ./foo: argument list long 151251 ./testcl: line 11: ./foo: argument list long 159211 so, question how modify testcl script can pass 256kb of data? btw, have tried adding ulimit -s 65536 script , didn't help. and if plain impossible can deal can shed light on quote link

python - "cannot find static files" -

i've been confused deploying apache , wsgi these days. here files. /usr/local/apache/conf/httpd.conf <virtualhost *:80> documentroot "/data/www/default/dj/tangle_with_django_project" wsgiscriptalias / "/data/www/default/dj/tangle_with_django_project/tangle_with_django_project/wsgi.py" alias /static/ "data/www/default/dj/tangle_with_django_project/static" <directory /data/www/default/dj/tangle_with_django_project/static> order deny,allow allow </directory> servername django.skywhat.com </virtualhost> sorry writing word 'tangle' rather 'tango' @ start. :( , others. ── static │   ├── css │   ├── images │   │   └── rango.jpg │   └── js │   ├── jquery-1.11.3.min.js │   ├── rango-ajax.js │   └── rango-jquery.js /data/www/default/dj/tangle_with_django_project/tangle_with_django_project/wsgi.py import os import sys django.core.wsgi import get_ws

javascript - Disable the ability to post HTML content to a Textarea -

i'm facing weird problem html code. people started posting html content such html forms, input boxes, check boxes via textarea , messed website's content. need disable ability post html content via textareas , allow text. example: if type html <input> tag, that'll delivered text , not html. however, need enable ability post content <a> tags since i'm allowing ability post links, etc. should given ability post <img> tags has specific class (class name 'emoji-class'), since i'm giving ability post emojis. conditions: allow text contain <a href> tags allow text contain <img> that contain class named 'emoji-class' . other <img> tag not passed html content via text area i receive content via javascript: https://jsfiddle.net/wv4s511e/11/ how can add these conditions textarea/javascript such every other html content received text content aforementioned html tags received html content? edit: i&

laravel - Composer behind proxy, set up, still not working -

i have virtualbox ubuntu 14.04 behind proxy. i've installed apache2, php, mysql , composer. did google, set system wide proxy, proxy apt-get , git. , according this: deralsem@dervirtualbox:/var/www/laravel$ composer diag checking composer.json: ok checking platform settings: ok checking git settings: ok checking http connectivity packagist: ok checking https connectivity packagist: ok checking **http proxy**: ok checking **http proxy support request_fulluri**: ok checking **https proxy support request_fulluri**: ok checking github.com rate limit: ok checking disk free space: ok checking composer version: ok composer set proxy use. but, trying this: $ cd /var/www $ git clone https://github.com/laravel/laravel.git navigate laravel code directory , use composer install dependencies required laravel framework. $ cd /var/www/laravel $ sudo composer install i have this: loading composer repositories package information [composer\downloader\transportexception]

android - Alarm is not working at entering location -

i want trigger alarm when user enters specific location. trying switch cell normal mode silent mode, when user enters location. when added code in app, did not work. please tell me , wrong? logcat error 10-10 11:40:39.711: e/androidruntime(26894): fatal exception: main 10-10 11:40:39.711: e/androidruntime(26894): java.lang.runtimeexception: unable start activity componentinfo{com.haider.trymap/com.haider.trymap.proximityactivity}: java.lang.nullpointerexception 10-10 11:40:39.711: e/androidruntime(26894): @ android.app.activitythread.performlaunchactivity(activitythread.java:2255) 10-10 11:40:39.711: e/androidruntime(26894): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2309) 10-10 11:40:39.711: e/androidruntime(26894): @ android.app.activitythread.access$700(activitythread.java:157) 10-10 11:40:39.711: e/androidruntime(26894): @ android.app.activitythread$h.handlemessage(activitythread.java:1289) 10-10 11:40:39.711: e/androidruntime(26894):

python - How to detect if string "_numbers" here -

i need detect, if string contains "_numbers", e.g.: "4myluv3_27113.jpg" - true , "5cr00g3.jpg" - false , " joshua969 .jpg"- false , "20comer100saber_lol.jpg" - false the number may have 1 6 digits. answer! use re.search if re.search(r'_\d{1,6}\b', s):

c++ - Is generate Guaranteed to be Executed Sequentially? -

i told here that: the order of generate not guaranteed => depending on implementation i have looked gcc's implementation of generate : (; __first != __last; ++__first) *__first = __gen(); and visual studio implements identically that. relief me using lambda in generate reads , writes capture have undeterministic results: int foo[] = {1, 0, 13}; vector<int> bar(3); generate(bar.begin(), bar.end(), [&]() { static auto = 0; static auto total = 0; total += foo[i]; return foo[i] / total; }); i expect bar contain {1, 0, 0} . if allowed execute out of order cause divide 0 error. so i'd sleep easier if question answered proof generate required execute sequentially. as note here, know experimental::parallel::generate not sequential. i'm asking generate . i intrigued have done research. at bottom of answer copy of relevant section standard of 2011. you see template declaration of std::generate<> iter

C++ dynamic allocation of class array -

assume class x constructor function x(int a, int b) i create pointer x x *ptr; allocate memory dynamically class. now create array of object of class x ptr = new x[sizeofarray]; until fine. want creation of above array of objects should invoke constructor function x(int a, int b) . tried follows: ptr = new x(1,2)[sizeofarray]; as expected gave me compile time error error: expected ';' before '[' token| how can create array of objects invoke constructor? sizeofarray entered user @ runtime. edit: wanted achieve in not possible answered zenith or complex . how can use std::vector same? this seems job placement new ... here's basic example: run online ! #include <iostream> #include <cstddef> // size_t #include <new> // placement new using std::cout; using std::endl; struct x { x(int a_, int b_) : a{a_}, b{b_} {} int a; int b; }; int main() { const size_t element_size = sizeof(

google analytics - How to fix this duplicate symbol error, xcode 7.0.1 -

i searched , searched , couldnt find answer. i added google analytics project. have 2 projects in same workspace use google analytics. linked them both. in past wasnt issue. needed add library, ran "pod update" , since i've been getting error. now, both locations same file. how can fix error? (as sub note, no .m files imported, , there no duplicate library entries in pbxproj file regarding thing) duplicate symbol _uselessfunctionthatexistssolelysothatidontgeterrorsaboutemptylibsf474397331760491295374 in: /users/lena/dev/workspace/app/myapp/../pods/googleutilities/libraries/libgtm_nsdata+zlib.a(staticlibraryemptysourcefile.o) /users/lena/dev/workspace/app/pods/googleutilities/libraries/libgtm_nsdata+zlib.a(staticlibraryemptysourcefile.o) ld: 1 duplicate symbol architecture x86_64

ios - Google Analytics crash with Swift 2.0 -

i've installed googleanalytics cocoapods , tried use it, crashes error: fatal error: unexpectedly found nil while unwrapping optional value the crash occurs in part: override func viewwillappear(animated: bool) { super.viewwillappear(animated) let tracker = gai.sharedinstance().defaulttracker tracker.set(kgaiscreenname, value: "main") let builder = gaidictionarybuilder.createscreenview() tracker.send(builder.build() [nsobject : anyobject]) } and when reaching line: tracker.set(kgaiscreenname, value: "main") maybe has framework bridged objective-c? update so fixed crash wrapping if statment , still nothing sent google analytics: let name = "main" if let gai = gai.sharedinstance() { if let tracker: gaitracker = gai.trackerwithtrackingid("tracking_id") { tracker.set(kgaiscreenname, value: name) let builder = gaidictionarybuilder.createscreenview() tracker.send(builder.b

css - Hover is triggered when mouse over child element -

i trying use transition effects on drop down menu , using display: none stops transition happening instead using opacity. a strange thing happening. when mouse hovers on see-through sub menu becomes visible have selected behaviour happen when mousing on parent <li> , not mousing on it. child '` absolutely positioned below it. in snippet below, move mouse underneath post , sub menu appear. want appear when mouse ontop of post box in black border. there going on here don't understand. menu-main-menu-container { position: relative; } ul.menu { background: lightblue; padding: 0; } ul.menu > li { border: 1px solid black; position: relative; display: inline-block; height: 30px; padding-right: 20px; padding-left: 20px; } ul.menu > li > ul.sub-menu { top: 100%; } ul.menu li.menu-item-has-children:hover > ul.sub-menu { opacity: 1; } ul.sub-menu { padding: 0; left: 0; list-style: none; tran

c# - What is the best way to reduce assignations from DataSets to WinForm Controls -

i have several entities like: customer, products, order, orderdetails, employees, etc. each 1 has window form crud capabilities. the problem i'm having i'm coding lot of lines when passing data dataset controls viceversa. search() { dataset dsresult = server.invokesearch(); txtcustname.txt = dsresult.tables["customer"].rows[0]["custname"]; ... //like 50 columns txtaddress.txt = dsresult.tables["customer"].rows[0]["address"]; } save() { dsupdate.tables["customer"].rows[0]["custname"] = txtcustname.txt; ... //like 50 columns dsupdate.tables["customer"].rows[0]["address"] = txtaddress.txt; server.update(dsupdate); } it ve nice if control has way retrieve value if specify table.column like: txtcustname.dbcolumn = "customer.custname"; search() { mainds = server.invokesearch(); } update() { server.update(mainds); } i'm complety lost. have no idea topics should search &a

system.reactive - Merging multiple streams, keeping ordering and avoiding duplicates -

i have problem not know how handle beautifully rx. have multiple streams supposedly contain same elements however​ each stream may lose messages (udp involved) or late/early compared others. each of these messages have sequence number . now want achieve single stream out of streams, ​ without duplicate , keeping message order ​. in other words, same sequence number should not appear twice , values have increase, never decrease. when message lost on streams , i'm ok losing (as there tcp mechanism involved allows me ask explicitly missing messages). i looking in rxjava, guess problem not specific java. here's marble diagram visualizing want achieve: marble diagram you can see in diagram waiting 2 on first stream output 3 second stream. likewise, 6 outputted once receive 6 second stream because @ point can know sure 5 never received stream. this browser code, think should give idea of how solve this. public static iobservable<t> sequenced<t&g

button - Activating/Deactivating GameObject Not Working -

i can't seem button activate gameobject. @ moment, have gameobject deactivating in scene, button doesn't activate gameobject. i'm missing in coding? script not attach gameobject. #pragma strict public var myobject :gameobject; if (gui.button(new rect(1120,930,100,50),"3d object")) { myobject.setactive(true); } i dont understand question but, first of if want use gui must in ongui function. like: function ongui () { if (gui.button(new rect(1120,930,100,50),"3d object")) { myobject.setactive(true); } } by way recommend that: use unity ui gui purposes.

html - input number max attribute resizes field -

when adding max value input number field in chrome, re-size field according width of highest value. it seems cannot control re-sizing behavior. <input type="number" name="" value="3500" placeholder="3500" min="500"> <br> <input type="number" name="" value="3500" placeholder="3500" min="500" max="100000"> <br> <input type="number" name="" value="3500" placeholder="3500" min="500" max="100000000"> question: how can make behave without max attribute or normal text field. ps: cannot see changes in styles when switch type. pps: must tried using -webkit-appearance: textfield; chrome using textfield default. simply set width input. input { width: 100px; } for example.

How to force Scala to not use origin of type aliases? -

i created type mystring = string . now want function accept mystring , not string , latter should not compile @ all. def myfunc(s: mystring) = println(s) accepts both string , mystring args: scala> type mystring = string defined type alias mystring scala> def myfunc(s: mystring) = println(s) myfunc: (s: mystring)unit scala> val s1: mystring = "aaa" s1: mystring = aaa scala> myfunc(s1) aaa scala> val s2: string = "aaa" s2: string = aaa scala> myfunc(s2) aaa scala> trait mystring extends string <console>:10: error: illegal inheritance final class string trait mystring extends string ^ scala> s1 res7: mystring = aaa scala> s2 res8: string = aaa scala> s1 == s2 res9: boolean = true with type mystring = string you stating type mystring is string , useable (largely) interchangeably within scope both defined. to enforce usage of mystring on string , can define w

jsf - Update datatable in primefaces with update attribute -

i have form contains data required, used code it: <p: inputtext id = "salary" value = "#{paymentbean.payment.salary}" required = "true" requiredmessage = "#{msg ['required.salary']}" /> on same page there datatable contains objects (payment) add through form. once object added, update datable add new object using code: <p:commandbutton action="#{paymentbean.addnewpayment()}" value="#{msg['button.add_new_account']}" update=":msg :payment_table add_salary_form"> <f:param name="employeeid" value="#{param['employeeid']}" /> </p:commandbutton> the problem have when data not entered , click button update done , table appears empty! however, validation message appears there mandatory data. the datatable is <p:datatable id="payment_table" var="p" value="#{paymentbean.payments}" rows="15" paginat

javascript - Can I make refference to ArrayBuffer at offset? -

i convert data javascript variables arraybuffer , back. think of function: function numbertoarraybuffer(number) { return new float64array([number]).buffer; } and other way around: function numberfromarraybuffer(buffer) { // assuming implicitly, buffer long enough return new float64array(buffer, 0, 1)[0]; } that works, imagine stuff more of these numbers in blob: var numbers = new blob([numbertoarraybuffer(66), numbertoarraybuffer(666), numbertoarraybuffer(nan)], {type:"binary/float64array"}); if read using file reader, can arraybuffer again: var fl = new filereader(); fl.onload = function() { console.log(float64array(this.result)); } fl.readasarraybuffer(numbers); and this: float64array { 0=66, 1=666, 2=nan} but of course, there sequences od different types, 2 unrestricted double s , 4 uint32_t . (but there no .offset metod): var num1 = numberfromarraybuffer(buffer); // shift 8 bytes - if `offset(8)` defined var num2 = bytefrom

r - Edit values from a variable based on multiple values from multiple variable within a dataframe -

i new r please bear me. i have dataframe of 8891 obs. of 4 variables: survived: int 0 1 1 0 0 0 0 1 1 ... sex : factor w/ 2 levels "female","male": 2 1 1 1 2 2 2 2 1 1 ... age : num 22 38 15 78 35 na 54 2 27 14 ... fare : num 120 120 120 120 ... sex <- c("female","male", "male", "male") survive <- c(0,1,1,0) age <- c(22,38,15,78) fare <- c(120,120,120,120) dataframe <- data.frame(sex, survive, age, fare) #view(dataframe) i trying create variable fixedfare values variable fare divided 2 based on values variable survived , variable age . basically, if value in survived 1 , value in age <= 16 , >= 60 divide value x in fare 2. , if comes across na mark na . within same data frame. i not sure how this. i’ve searched related questions in stackoverflow solution couldn’t find 1 similar question. thanks help. the ifelse approach assigns values based on conditions pro

objective c - YouTube iframe is too slow in iOS app -

i using youtube api in ios application , problem loads slow on iphone, on ios simulator works perfectly. i tried on different networks , on different iphones , same. on every network simulator works lot better. i'm using ytplayerview-iframe-player.html , ytplayerview . so, question can load faster or can start playing song after loads? there no way speed network. can 2 things improve user experience: hide player until video loads, , start playing video possible (autoplay). add autoplay key playervars dictionary: nsdictionary *playervars = @{ @"playsinline" : @1, @"autoplay" : @1, // <- here @"showinfo" : @0, @"rel" : @0, @"modestbranding" : @1, }; [self.playerview loadwithvideoid:videoid playervars:playervars]; // hide player view u

controller - Laravel sum column in table -

i have 2 tables: lectures id name 1 - lesson 1 2 - lesson 2 3 - lesson 3 lecturestype id id_lectures numb 1 - 1 - 10 2 - 2 - 20 3 - 1 - 30 how can sum numbs column each lesson , take result : name: lesson 1 numb: 40 i want display sum of numb each lesson. try lecturestype::with('lectures')->sum('numb')->groupby('id_lectures')->get()

linux - How to run an independent bash script in nodejs -

so run script kills nodejs process , runs 1 in screen window. when run command console works, when run nodejs script kill part gets executed server never run. filelog('attempting restartnodejs pid: ' + pid + ' serverjslocation: ' + serverjslocation); filelog('kill ' + pid + ';screen -d -m -l nodejs ' + serverjslocation); //return; exec('kill ' + pid + ';screen -d -m -l nodejs ' + serverjslocation); and log attempting restartnodejs pid: 29685 serverjslocation: /home/git/gitorade/server.js kill 29685;screen -d -m -l nodejs /home/git/gitorade/server.js but server not run. ps -e | grep nodejs returns nothing while @ first run output process. my guess it's run fork somehow when kill nodejs screen command never gets executed because can in no way response or log out of action. screen.0 log empty after command. how run exec independently not killed after kill ?

angularjs - How to position a DHTMLX Popup beside a html component without using co-ordinates -

i have basic service creates manages dhtmlx popup component. so: var popupservices = angular.module('popup.services', []); popupservices.factory('popupservice', ['$rootscope', function($rootscope) { this.popupobject = null; return{ createpopup: function(){ if (!this.popupobject) { this.popupobject = new dhtmlxpopup(); } }, showpopup: function(htmlid,text){ this.popupobject.attachhtml(text); this.popupobject.show(htmlid); }, hidepopup : function() { this.popupobject.hide(); } }; }]); i want pass id of button or html component want link popup to, in future if button moved, popup moves it. this angular application , following solution not work : http://dhtmlx.com/docs/products/dhtmlxpopup/samples/01_init/07_custom_object.html this regards code : window.dhx4.absleft(inp), window.dhx4.abstop(inp), inp.offsetwidth, inp