Posts

time - How to convert a numeric number in R to timestamp in R? For example, from 62280 to 17:18:00 -

i have rdata file, 1 column in time. however, when load in r, shown in numbers. for example, 17:18:00 shown 62280 , 06:30:00 shown 23400 , 18:30:00 shown 66600 , 10:30:00 shown 37800 , 01:00:00 shown 3600 . i figure out number divided 3600 equal time, 23400/3600 = 6.5. but still stuck how in next step. give clue? also, "divided 3600" standard time conversion in r? if so, there function conversion? thank you! 1) using chron package gives "times" class object or if prefer character strings use format(times(...)) . library(chron) x <- c(62280, 23400, 66600, 37800, 3600) times(x / (24 * 60 * 60)) ## [1] 17:18:00 06:30:00 18:30:00 10:30:00 01:00:00 2) using posixct class , no packages can character strings this: format(as.posixct(x, origin = "1970-01-01", tz = 'utc"), "%h:%m:%s") ## [1] "17:18:00" "06:30:00" "18:30:00" "10:3...

html - object HTMLInputElement JavaScript error -

so basically, i'm doing webpage calculate school marks can't print result @ input value... instead, prints [object htmlinputelement] here's javascript code: <script type="text/javascript"> </script> <script> window.onload = function () { var quran = document.getelementbyid('quran').value; var islamic = document.getelementbyid('islamic').value; var arabic = document.getelementbyid('arabic').value; var english = document.getelementbyid('english').value; var games = document.getelementbyid('games').value; var pc = document.getelementbyid('pc').value; var maths = document.getelementbyid('maths').value; var chem = document.getelementbyid('chem').value; var phys = document.getelementbyid('phys').value; var bio = document.getelementbyid('bio').value; var social = document.g...

css - How to get a jQuery Mobile full-width horizontal controlgroup? -

i have horizontal controlgroup 2 buttons: right 1 icon-only button standard fixed width whereby first 1 shall elastic , fill remaining width. i'm aware similar question has been asked before, tried different solutions , none seems work me, or aren't working jqm 1.4.5: i can't put second button before first 1 in markup because jqm first-child , last-child styling break i can't set width percentage (as seen in many examples) because icon-only button has fixed width of 1.5em the controlgroup should not break @ smaller window sizes, shall in 1 row, first button ellipsis text is there way controlgroup has 1 (or more one) icon-only button on right side, fit 100% of parent div width? <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <link rel="stylesheet" href="https://code.jque...

R Gui crashes with Keras Tensorflow windows cuda gpu -

edit: solved. not using proper version of cudnn. after downloading , copying on cudnn v5.1 library windows 10, works fine far. should have followed tensorflow windows guidelines more closely. i spent time set windows system run r-tensorflow keras , tensorflow backend. i followed these blog instructions, , able hello world example work. however, when continue r keras examples , several crash , exit rgui during running training phase, e.g. mnist_cnn fails @ training model block. # train , evaluate model %>% fit( x_train, y_train, batch_size = batch_size, epochs = epochs, verbose = 1, validation_data = list(x_test, y_test) ) a visual studio jit popup shows "an unhandled win32 exception occured in rgui.exe[10456]." , vs editor shows, "unhandled exception @ 0x00007fffea2734be (ucrtbase.dll) in rgui.exe: fatal program exit requested." there little load on cpu , or gpu during runtime (less 30%). ideas on how further debug appreciated. h...

java - Return different type of data as per the condition -

i have problem in if in method, called rest end point, have errorlog method should return file. otherwise, if correct, should return json. is there way change return type of method per condition? i start saying wrong approach problem. correct approach throw exception if have error, , deal using exception handler. alternatively, use call-back handle error case before returning method. (that deal "generate errorlog" use-case.) having said .... here's "complex" object can use return 1 of 2 types: public class aorb { private final a; private final b b; private final boolean isa; public aorb(a a) { this.a = a; this.b = null; isa = true; } public aorb(b b) { this.a = null; this.b = b; isa = false; } public boolean isa() { return isa; } public geta() { if (isa) { return a; } else { throw illegalstateexcepti...

osx - Autofill password in one command on Mac -

how autofill root password in single command on mac? want run following command computer not sleep while downloading, computer shutdown. i run following still prompted password $ caffeinate -u -t 7200 && echo | sudo -s shutdown -h now

javascript - Add or Remove multiple list item on the basis of AND,OR,NOT conditions in angular js -

i want add multiple add or remove multiple rules on basis of and/or/not operators. example: rule1>12h && rule2<10h. how can that? <label class="control-label" for="field_notificationrules">notification filter rules:</label> <div class="form-group"> <table class="table table-stripped table-bordered"> <thead> <tr> <th><label class="control-label" for="field_filterruledefinition">rule definition</label></th> <th>&nbsp;</th> </tr> </thead> <tbody> <tr> <td> <input type="text" class="form-control" name="notificationfilterrulesdefinition" id="field_filterruledefinition" ng-model="vm.notificationrules.notificationrules.noti...