Posts

Showing posts from March, 2012

javascript - Count number of rows inside a div element -

Image
as shown in image below, have several div inside div (outer div). need count number of rows outer div have. in example row count 5. note:the inner div floated left , content created dynamically. does has ideas? perhaps along lines of: demo fiddle var minleft = null, rows = 0; $('div div').each(function () { var left = $(this).offset().left; if (left <= minleft || minleft==null) { rows++; minleft=left; } }); console.log(rows);

google app engine - Separate datastore data from debug and live versions of app -

what best approach separate data debug version , live one? the question , answers here describe how separate code logic: https://stackoverflow.com/a/8550105/129202 still datastore data shared between versions. i imagine of these: some nice setting in dashboard automatically separate data between versions, ignorant of each other. no changes needed in code, unless expect versions share data :-p get version number in code , use "physically" organize data, ie putting data in subfolders/subkeys per version... i'm not experienced datastore yet , don't know if have significant impact on performance. you can't seperate data based on versions. you use name space, wouldn't i use different instance , copy production data instance, run testing there, complete confidence working separate data set. some of projects, data specific companies/users , set test companies , test users, approach dependent on types of updates, , how segmented data is.

clojure - let forms : How to access destructured symbols in a macro? -

i'm trying write macro expands let form destructuring. problem have list of symbols defined in let form, including obtained destruturing. use case i'm trying factor out kind of behavior, validation example : (let [a (foo bar) {x :x, y :y, {u :u, v: v :as nested-map} :nested} some-map] (and x y nested-map u v ; testing truthiness (valid-a? a) (valid-x? x) (valid-y? y) (valid-nested? nested-map) (valid-u-and-v? u v) )) proposed solution it nice achieve through sort of and-let macro call this: (and-let [a (foo bar) {x :x, y :y, {u :u, v: v :as nested-map} :nested} some-map] (valid-a? a) (valid-x? x) (valid-nested? nested-map) (valid-u-and-v? u v)) what i'm missing but i'm missing way of accessing list of symbols bound in let form. if had list-bound-symbols function, : (defmacro and-let "expands , close previouly

php - Display current post on single template -

i have plugin automatically expires posts , changes it's post status "archive" on date. we have archive section houses these posts. still want display data post gives page not found. can alter query display post on single template? i've tried following pulls in archive posts rather page you're on. <?php $my_query = new wp_query('post_status=archive'); ?> <div> <?php if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); ?> <ul> <li> <?php the_title(); ?> </li> </ul> <?php endwhile; else: ?> <div> <ul> <li><?php _e('no upcoming posts'); ?></li> </ul> </div> <?php endif; ?> </div> post status allows users set workflow status post in wordpress. there 8 default st

r - Subset rows which have a column inside numeral interval -

i subset lines have "chr" column 1 29, in "cnv1" dataframe. i tried it: cnvk <- cnv1[cnv1$chr==1:29,] but not lines have 1,2,3...29. cheers! try cnvk <- cnv1[cnv1$chr %in% 1:29,] or cnvk <- cnv1[cnv1$chr>=1 & cnv1$chr<=29,] (the latter might quicker if you're checking against large range of values)

angularjs - Implementing keyboard shortcuts in Angular apps -

i using directive implement keyboard shortcuts in angular app. directive called "keycapture". included in body tag of index page. <body ng-controller="mainctrl" key-capture> this directive uses mix of $broadcast , other methods things done. angular.module('plunker').directive('keycapture',['$state','$rootscope',function($state, $rootscope){ var shortcutkeys = []; return { link: function(scope,element,attrs,controller){ element.on('keydown',function(e){ shortcutkeys.push(e.keycode); if (shortcutkeys.length === 2){ var key2 = shortcutkeys.pop(); var key1 = shortcutkeys.pop(); /*press g , 1 - navigate different state*/ if (key1 === 71 && key2 == 49) { $state.transitionto('option1'); } /*press g , 2 - navigate different state*/ if (key1 === 71 && key2 == 50) {

Is there an equivalent of Androids ShowcaseView for iOS? -

there project android on github: https://github.com/amlcurran/showcaseview according readme: the showcaseview library designed highlight , showcase specific parts of apps user distinctive , attractive overlay. library great pointing out points of interest users, gestures, or obscure useful items. i know if functionally equivalent 1 exists ios. useful give users quick tour of app. typically app intros handled few swipe screens. think uber , duolingo. google , stackoverflow searching returns nothing meaningful. if had time i'd work on side project. edit: i've ended using github.com/ifttt/razzledazzle works both swift , objective-c. you can try https://github.com/rahuliyer95/ishowcase similar implementation of showcaseview android on ios.

actionscript 3 - Away3D click listener doesn't work with all the cube, only its center -

i trying add click listener cube in away3d. works... partially. seems click works center of cube's face. have no idea why because should taking bounding box (which, of course, cube). if click somewhere "near" edge of cube, nothing happens. the code rather simple: cube = new mesh(new cubegeometry(400, 400, 400, 1, 1, 1, false)); cube.mouseenabled = true; cube.addeventlistener(mouseevent3d.click, cubeclickhandler); var t:trident = new trident(); cube.addchild(t); scene.addchild(cube); ... private function cubeclickhandler(event:mouseevent3d):void { navigatetourl(new urlrequest("http://www.google.com")); } any idea doing wrong , how resolve it? lot! example here here suggestions: have tried rotate camera? have tried without trident?(it have big bb , occlude) have tried other picking method? cube.pickingcollider = pickingcollidertype.as3_best_hit it's possible framerate in example (1fps) interfere, try set @ least @ 10fps

soap - wso2 ESB request is truncated -

i'm using fresh installation of wso2 esb 4.8.1 stanalone default configuration. when send soap request backend (perl service soap lite), body of post request truncated according tcpdump: soapaction: "" content-type: text/xml content-length: 511 host: 192.168.11.234:8181 connection: keep-alive user-agent: synapse-pt-httpcomponents-nio <?xml version="1.0" encoding="utf-8"?><soap:envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="htt p://www.w3.org/2001/xmlschema" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <soap:body> <deleteaccountforhost xmlns="abcdehostingphysicalhostmanagercpanelservice"> <host xsi:type="xsd:string">zs000.abcde.net</host> <user xsi:type="xsd:string">tstauto</user> </deleteacc

C++ : Is it bad practice to use a static container in a class to contain pointers to all its objects for ease of access? -

i know if it's bad practice have static container in class store pointers class' objects can accessed base classes of program. game , saw on sdltutorials dot com, , find useful. allow me have neat structure game , don't see downside doing this, know have careful "global" access , maybe there's negative effect i'm not seeing right now. here context/example. game has base class basic methods such loop(), render(), playaudio(), cleanmemory(). idea have individual objects have same methods being executed inside base method. example in pseudocode: game::render() { (iterate enemies in static container) { current_enemy::render(); } } to sure, static member inside class this: static std::vector<enemy*> enemylist; so way, when game executing base render() method, example, can iterate enemies in enemies' class static container , execute individual render() methods, same environment objects, player, etc. i make sure i'm awa

php - Email Verification/Validation - Error -

i think post may appear "off" topic others. it'll great thank if me out this. i found email verification code on web. somehow, find confusing @ first when began understand , put on code. there's error , don't know how. problems: the email verification code. proper syntax/use of code. code: <?php if(isset($_post['submit'])) { $a = $_post['username']; $b = $_post['password']; $c = $_post['firstname']; $d = $_post['lastname']; $e = $_post['month']; $f = $_post['day']; $g = $_post['year']; $h = $_post['contact']; $i = $_post['email']; $j = $_post['confirm']; $code = md5(uniqid(rand())); include("dbconnect.php"); $query = "select * `users`.`info` `username`='".$a."' , `email_address`='".$i."'"; $queryquery=$con->query($query);

io - Can't read the files from a folder in series in java -

i trying read files folder java, found snippet , used it. file folder = new file("z.."); file[] listoffiles = folder.listfiles(); (int = 0; < listoffiles.length; i++) { file file = listoffiles[i]; if (file.isfile() && file.getname().endswith(".txt")) { string content = fileutils.readfiletostring(file); } this works fine except doesn't retrieve files in order. have files numbered file 0,file 1, file2.....file10 , how retrieves file 0 file 1 file 10 , file 2, should retrieve in proper series. should using else? i'm new this. there great example of using custom comparator sort array of files here: best way list files in java, sorted date last modified you have modify return of comparator along lines of return f1.getname().compareto(f2.getname()); and should you're looking for. if files numbered may want compare file names integers: return integer.valueof(f1.getname()).compareto(integer.va

Showing three different edge images in single figure for comparison (No Subplot) -

hello friends, have applied canny edge detection 3 different images , got 3 images of edges of circles of 3 different sizes. want show these 3 edges of circles of different radius in same figure different colors compare them. how can done? have tried use imfused command did not desired result. please me here quick solution might not best method: % edge detection = imread('circuit.tif'); bw1 = edge(i,'canny'); bw2 = edge(i,'sobel'); % black result image (it else) imrgb = repmat(zeros(size(bw1)), [1 1 3]); % color matrices, red , green rm = repmat(cat(3,1,0,0),size(bw1,1),size(bw1,2)); gm = repmat(cat(3,0,1,0),size(bw1,1),size(bw1,2)); % logical matrices same dimension result image lm1 = repmat(bw1,[1 1 3]); lm2 = repmat(bw2,[1 1 3]); % overwrite pixel positions color matrices according logical matrices % logical matrices derived edge detected ones imrgb(lm1) = rm(lm1); imrgb(lm2) = gm(lm2); imshow(imrgb)

ember.js - Why am I getting an error after successful deleteRecord in Ember -

i error after calling deleterecord , save on entity. i'm using ds.restadapter , delete works in backend console throwing error error: no model found 'id' @ new error (native) @ error.ember.error (http://localhost:3000/assets/ember.js?body=1:913:19) @ ember.object.extend.modelfor (http://localhost:3000/assets/ember-data.js?body=1:9808:33) @ jsonserializer.extend.extractsingle (http://localhost:3000/assets/ember-data.js?body=1:3021:28) @ superwrapper [as extractsingle] (http://localhost:3000/assets/ember.js?body=1:1295:16) @ ember.object.extend.extractsave (http://localhost:3000/assets/ember-data.js?body=1:2511:21) @ ember.object.extend.extractdeleterecord (http://localhost:3000/assets/ember-data.js?body=1:2468:21) @ ember.object.extend.extract (http://localhost:3000/assets/ember-data.js?body=1:2368:37) @ http://localhost:3000/assets/ember-data.js?body=1:10436:32 @ invokecallback (http://localhost:3000/assets/ember.js?body=1:10016:19) ember.js?body=1:3524 uncaught err

jquery - How to add text-align buttons to toolbar in TinyMCE 4.x? -

this link: http://www.tinymce.com/wiki.php/tinymce3x:%22for_dummies%22 shows under headline "custom advanced tinymce wysiwyg editor" in second window behind "theme_advanced_buttons" names of buttons can add toolbar. it's bit different in version 4.x works following way: $('#my_textarea').tinymce({ plugins: 'link,code,preview,autolink', height: 350, width: 750, toolbar: "undo redo | styleselect | bold italic | justifyleft justifycenter justifyright | bullist numlist | link image | preview code" }); except justifyleft justifycenter justifyright buttons works perfect. how find out right button names these buttons? found answer here: http://www.tinymce.com/tryit/full.php "alignleft aligncenter alignright alignjustify" works

sql - TempVar use in query -

Image
so client has 4 queries need updated every time process run. i setting macro ask user input on variable called 'filedate'. here's how looks: settempvar name = filedate expression = inputbox("enter filedate (yyyymmdd):") now works fine ( can tell ) then wanted use messagebox display value of tempvar, since it's in same macro, didn't see problem this. messagebox message = "you entered:" & [tempvars]![filedate] & "." beep = yes type = informative title = input i've tried several variations of syntax no progress... issues i can't messagebox show value set variable, displays message - know proper syntax messagebox? once figure out, i'd enter input box once, , insert variable each query requires update. currently i'm accepting user input every query: update test_pcp_changes set test_pcp_changes.datercvd = [enter filedate (yyyymmdd): ] (((test_pcp_changes.datercvd) nu

html - CSS: counter property renders empty -

i'm trying create printing page has attachments running numbering (for example: page 3 of 5). far have succesfully created page header repeating on attachment pages, , has correct page numbering, on first page. on second attachment page total number rendered empty. i'm trying not use javascript achieve this. to reproduce issue, copy following code html file open in firefox , go print preview , move second or third page, notice total page number empty. there no need support other browsers firefox. any welcome! :) <!doctype html> <html> <head> </head> <body> <style> body{ counter-reset: joku, attachment; } table { page-break-inside: auto; page-break-after: always; } tr { page-break-inside:avoid; page-break-after:auto; } table td { border-bottom:1px sodiv.attachment-page-breakd gray; } th { font-family:arial; color:black; background-color:div.attachment-page-breakghtgrey; } thead { display:t

list - Exporting several arrays from all documents in a mongodb database -

Image
mongodb's documentation not seem cover this. after several hours of mixing different commands stand defeated. i have hundreds of documents inside collection in mongodb database. in every document have array called "hashes", in documents array contains list of hashes (md5, sha1 etc...). want export these hashes text file, or list them in gui/terminal. i've included image want export highlighted in yellow. this command derived documentation lalit agarwal provided. wanted. ./mongoexport --port 27017 -db paste_db -collection pastes --fields hashes --csv > out.csv

Finding the median value of an RGB image in OpenCV? -

is there easy way of finding median value of rgb image in opencv using c? in matlab can extract arrays corresponding 3 channels , compute median values each of arrays median(median(array)) . finally, median value of these 3 medians (for 3 channels) can calculated final median value. you can convert matrix histogram via calchist function (once each channel), calculate median given channel using function available here . note: have not tested linked code, should @ least give idea of how started.

c++ - Swap function based on ai+b mod n -

i need swap function swap based on results after computing ai+b mod n for example have text : "test" , want swap based on ai+b mod n result ai+b mod n 2, 4, 1, 3 ie text after swap "etts" letter @ first position @ position 3, position 2 position 1, position 3 4 , 4 2. the following code generate values ax+b mod n , need on how swap words in file. in advance. int main () { cout << "enter values of , b." << endl; cin >> >> b; cout << "enter input file name." << endl; cin >> inputfile; file * pfile; pfile = fopen (inputfile, "rb"); if (pfile == null) perror ("error opening file"); else { fseek (pfile, 0, seek_end); // non-portable sizeoffile = ftell (pfile); cout << sizeoffile << "\n"; fclose (pfile); } n = sizeoffile / 32; cout << n << endl; (i = 1; <

multithreading - posix multithread.With Multiple threas using one socket to receive data , when will the data be taken away from recv buffer? -

i use multuple thread receive data 1 socket. can receive same data. want know when data taken away recv buffer? why not 1 thread receive next data when former thread read former data. pthread_create(&(ntid[i]), null, find_host, (void *)&start_addr); int find_host(void * arg) { int sockfd; unsigned long ip ; tv.tv_sec = 0; tv.tv_usec = 100000; struct sockaddr_in from; char sendpacket[packet_size]; char recvpacket[packet_size]; ip = *(unsigned long *)arg; struct sockaddr_in present_addr; if( (sockfd=socket(af_inet,sock_raw,protocol->p_proto) )<0) { perror("socket error"); exit(1); } setsockopt(sockfd,sol_socket,so_rcvbuf,&size,sizeof(size) ); if(setsockopt(sockfd, sol_socket, so_rcvtimeo, &tv, sizeof(tv))<0){ printf("socket option so_rcvtimeo not support\n"); return; } bzero(&present_addr,sizeof(present_addr)); present_addr.sin_family=af_inet; present_addr.sin_addr.s_addr = htonl(ip); pthread_mutex_unloc

mono - Crash during Fragment transactions inside the Custom Dialog in Xamarin Android -

when tried add fragment inside dialog, app got crash. crash saying "no view found id 0x01276" this layout file dialog (my_dialog_layout.axml) <?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" > <linearlayout android:id="@+id/fragment_container" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </linearlayout> and code opening dialog , fragment transaction class customdialog : dialog{ public override void oncreate(bundle savedinstancestate) { base.oncreate(savedinstancestate) setcontentview(resource.layout.dialog_fragment_layout); var mycustomfragmnent = new mycustomfragment(_context);

c# - Using Semantic Zoom in Windows Phone -

i trying out released vs 2013 update 2 , building sample universal application. as found out, windows phone supports multitouch default, , means new controls weren't available. i have tried use simple semantic zoom test <semanticzoom> <semanticzoom.zoomedinview> <gridview background="red" scrollviewer.ishorizontalscrollchainingenabled="false" scrollviewer.isverticalscrollchainingenabled="false"/> </semanticzoom.zoomedinview> <semanticzoom.zoomedoutview> <gridview background="black" scrollviewer.ishorizontalscrollchainingenabled="false" scrollviewer.isverticalscrollchainingenabled="false"/> </semanticzoom.zoomedoutview> </semanticzoom> how can make happen on windows phone emulator? have tried multitouch - didn't help the semanticzoom-control behaves different on windows phone 8.1 (compared win

ms access - copy value entered in unbound textbox to label after pressing button -

i have unbound text box on form admin can enter date of when records last updated. want date copied label after pushing button holds date instead of disappear after closing form. does know if possible , how possible? for creating variable can used after form closed: create new module (in code window, click 'insert | module' insert variable name(s) , types want available everywhere. i.e. global dtlastupdated date global strsavesomename string save module mdl_globals add code wherever needed set variable, can reference anywhere. if use during form, use following: 'lblforunbound' label field , 'txtunbound' unbound text box me.lblforunbound.caption = me.txtunbound.text

flex4 - how get 24 hour date from DateField in flex? -

normally can this("2014-04-24 04:50:10 pm") type of date , time datefield.i need 24 hour date format "2014-04-24 16:50:10" . possible ? you need use dateformatter <mx:dateformatter id="dateformatter" formatstring="yyyy-mm-dd hh:nn:ss"/> an example @ end here

syntax error in pyscripter - python -

if dice == dice2 : print ("the scores on both dice remain constant, no changes made.") elif dice > dice2 : print ("the scores of 2 dice thrown not same.") print (a, "'s new strength is", difference, "+", c "and new skill value is", difference2, "+", cc) elif dice < dice2 : print ("the scores of 2 dice thrown not same.") print (b, "'s new strength is", difference, "-", d "and the new skill value is", difference2, "-", dd) else : print ("i think have error!") my syntax error in first elif statement, have gone wrong??? you need comma between c , "and new skill value is" : print (a, "'s new strength is", difference, "+", c, "and new skill value is", difference2, "+", cc) ^

docusignapi - Signers vs Recipients -

we integrating our bpm application docusign. have document should signed n individuals. should have multiple recipient tags or 1 recipient tag multiple signer tags inside that? difference between both approaches? each recipient object has properties identify specific signer including property represents signer's name, example). "create envelope" api request need include separate recipient object each signer -- , then, each recipient, you'll specify tags belong recipient. (the other approach describe -- i.e., facilitating multiple people signing envelope specifying 1 recipient multiple 'sign here' tags -- not feasible under circumstances.) for example, recipients structure represents 2 signers, each having 1 place sign , 1 text box complete, this: "recipients": { "signers": [ { "name": "john doe", "email": "johnsemail@outlook.com", "recipientid": &q

Does linux init process run in kernel or user mode? -

i trying learn linux kernel, in tldp linux kernel 2.0 book. init process or kernel thread don't know exact difference though. , run in physicial or virtual memory space? kernel related stuff use physicial memory space if process thing change. can share knowledge/experience on that. init user process other processes, using virtual memory. thing special init is 1 of 2 processes kernel started initially. when init started kernel, goes user mode. when init calls system call fork(), traps kernel mode, , kernel bunch of things create new process, , new process scheduled in future. when fork() returns, original process user mode. btw, kernel using virtual memory, mapping of kernel memory addresses shared among processes.

java - Eclipse can't find extended View class -

i'm trying implement custom facebook login button : it'll same, save fact it'll have functionality after user has logged in; don't wish change it's style or pertaining how looks/feels. the button needs called explicitly in xml file: <com.facebook.widget.loginbutton android:id="@+id/login_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_margintop="30dp" android:layout_marginbottom="30dp" /> i extended loginbutton class , added single method (where want functionality occur): public class customfbbutton extends loginbutton{ public customfbbutton (context context, attributeset attrs) { super(context, attrs); } public void enablepublishactions(final activity activity) { //extra functionality } } now, understanding

objective c - Roman Numeral to Arabic -

my function part of roman numeral arabic conversion function. evaluates fine there pair cm, pair cd, there single character c, , combinations of cm, cd, m, d , c. however, final character in string c (e.g. mcdccc), function crashes on final 'c'. ive put stack of nslog in there trace problem can't work out why crashing on final 'c'. any welcome ive been trying figure out week. ps, ive rewritten switch function im getting same kind of problem. -(nsstring *) decimaltoromannumeral : (nsstring*) romannumeral { nslog(@"roman numeral %@", romannumeral); int sumofdecimals = 0; int stringlength = [romannumeral length]; nslog(@"romannumeral length %i characters", stringlength); int arrayofprimitiveintegers[stringlength]; nslog(@"array size %i spaces", stringlength); (int c=0; c<[romannumeral length]; c++) { nslog(@"character @ counter %i %c", c, [romannumeral ch

Nested Perl Hash -

i'm trying take value hash , use key next level hash, code works, thinking there has better way this. is there way avoid k* array variables? my @key = keys %data3; $devicetype = $key[0]; @k = keys %{$data3 {$devicetype} }; ## uber ugly, find better way. $measinfoid = $k[0]; @k1 = keys %{$data3 {$devicetype} {$measinfoid}}; $deviceid = $k1[0]; @k2 = keys %{$data3 {$devicetype} {$measinfoid} {$deviceid}}; $location = $k2[0]; @k3 = %{$data3 {$devicetype} {$measinfoid} {$deviceid} {$location}}; $measobjectldn = $k3[0]; print ("data: $devicetype, $measinfoid, $deviceid, $location, $measobjectldn\n"); foreach $m ( keys %{ $data3 {$devicetype} {$measinfoid} {$deviceid} {$location} {$measobjectldn} } ){ print("ok: $m\n"); } %data3 looks this: $var1 = 'nthlrfe'; $var2 = { 'dia' => { 'njbb-hlr-2' => { 'njbb' => { 'lte-1/dia-1' => { 'di

asp.net - How to get ID against selected value of Dropdownlist C# -

i have 2 question how id against selected value of dropdownlist binded db? then how insert id in other table ? kindly explain code.. thanx in advance to id code string query = "select id table-1 name=" + dropdwonlist.selectedvalue; sqlcommand cmd = new sqlcommand(query, con); sqldatareader dr = cmd.executereader(); string getid = dr[0].tostring(); dropdownlist binding code string query = "select id, name table-1"; sqlconnection con = new sqlconnection(constr); sqldataadapter da = new sqldataadapter(query, con); datatable dt = new datatable(); da.fill(dt); dropdwonlist.datasource = dt; dropdwonlist.datatextfield = "name"; dropdwonlist.datavaluefield = "id"; dropdwonlist.databind(); dropdwonlist.items.insert(0, new listitem("--select name--")); 1) string id = dropdwonlist.selectedvalue; 2) to insert table use query: string id = dropdwonlist.selectedvalue; using (sqlconnection sql = new sqlconne

jquery - Making an Array Variable Global in JavaScript -

i'm setting array variable 0 on load of javascript. var postarray= new array(); however, used array hold objects retrieve localstorage. works when upload more blog posts entered localstorage , displays. however, after refresh page called again empty array , go enter 3rd blog post after i've refreshed, localstorage set having contents of postarray. therefore, i'm clearing out localstorage when dont want to. if throw if statement, postarray undefined. if (localstorage.getitem("posts") === null) { var postarray = new array(); } i'm trying make postarray global @ start yet create new array when localstorage empty. you should content localstorage, , if it's empty, return empty array. for example. var postarray= getposts(); function getposts() { var posts = localstorage.getitem("posts"); return posts ? json.parse(posts) : []; }

java - How to get an elapsed time for this? -

i creating spigot (performance savvy fork of bukkit (minecraft server software)) plugin communicates bungee (proxy server managing multiple spigot instances) server. i have functionality, when type command "/setbar (time-in-seconds) (message)", use api (barapi if familiar) create bar on every server connected bungee instance. the fault when player joins 1 of spigot servers after command issued, bar not there. solve storing bar's information on proxy level , sending these values specific spigot instance player attempts join. okay, enough background information. problem i'm having i'm storing time admin (or whoever issued command) requested in variable. when user joins, time have decremented (or lot.) way i've thought of making sure user joining receives proper elapsed time, (so barapi knows how large timer graphic needs be), storing time command executed in variable (currenttimemillis / currenttimenano) , converting seconds subtracting time specified