Posts

r - melt function applied to json input replaces some values with factors -

i have following json file: { "observations": [ { "type": "ob_type_1", "data": { "dynamic": { "sensor": [ { "timestamp": 552625694285098, "a": 1.4921862, "b": 8.613739 }, { "timestamp": 552625699285098, "a": 0.6907272, "b": 7.6243353 } ] }, "static": { "class1": "abc", "class2": "xyz" } } } ] } i import using rjson: library(rjson) raw_json <- fromjson(file=json_file) to reproduce please use: raw_json <- structure(list(observations = list(structure(list(type = "ob_type_1", data = structure(list(dynamic = structure(list(sensor = list( str...

android - BitmapFactory.decodeFile in asset doesn't work (FileNotFindException) -

i don't know why decodefile doesn't work when param point file inside asset folder. // load images file path string[] dir = null; try { dir = genericmaincontext.sharedcontext.getassets().list("drawable"); // dir log => [ic.png, ic_info_dark.png, ic_launcher_default.png] } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } (string uri : dir){ // stuff here if (uri!=null) { bitmap bitmap = null; try { bitmap = bitmapfactory.decodefile("file:///android_asset/drawable/"+uri); } catch (ioexception e) { // todo auto-generated catch block e.printstacktrace(); } any explanation ? file:///android_asset/ used webview load assets. load assets programmatically use getassets() method returns assetmanager on context object such activity . open(fil...

concurrency - MySQL CDR Concurrent Call Query -

i trying construct query concurrent calls of of asterisk cdr uploaded mysql. i have tried following examples located on these threads: mysql query - peak concurrent calls cdr data results not expected. fetch max number of concurrent phone calls call_log , seems take forever , results not expected either. i cant rewrite them because base not expected wouldnt know start. what following: 1 - query peak calls system whole day 2015-06-01 | 134 2 - query list of times of top 10 concurrent calls selected period. 2015-06-01 9:32:21 | 50 2015-06-01 10:15:11 | 43 2015-06-01 15:45:14 | 40 ....... i have other complex queries me started. eventually, want max concurrent calls of specified day src or dst equals pool of specified dids my mysql database in format of source destination calldate endtime duration uniqueid any appreciated. here required query find max concurrent calls on specified day. set @start = '2015-12-03 00:00:00'...

Gulp Sass Compile Issue -

my gulp scss compiler below works fine single files, , when including files single output e.g. styles.scss & _base.scss output styles.css. however if 2 output files e.g. styles.css & base.css upon making scss file 'base.scss' complies dest still .scss extension. not till rerun compile task till base.css file base.scss file in dest folder... gulp.task('build-css', function() { return gulp.src('source/scss/**/*.scss', { style: 'expanded' }) .pipe(plugins.sass()) .pipe(gulp.dest('public_html/css')); }); im using node-sass. not want use ruby-sass output in public_html/css/ what i'm getting css/ - base.scss - base.css - style.css what want css/ - base.css - style.css there no such option { style: 'expanded' } available in gulp.src to control output style, need specify outputstyle , pass argument plugins.sass(options) call.

HTML/CSS: Styling a checkbox inside a form -

Image
i have following form: using html: <form id="user_form" name="user_form"> <input id="firstname" type="text" name="firstname" placeholder="vorname" required> <br> <input id="lastname" type="text" name="lastname" placeholder="nachname" required> <br> <input id="nickname" type="text" name="nickname" placeholder="nickname" required> <br> <input id="email" type="email" name="email" placeholder="email" required> <br> <input id="conditions" type="checkbox" name="conditions" required>ich bin mit den <a id="show_2">teilnahmebedingungen</a> einverstanden! <br> <input id="user_save" type="submit" value="speichern"> ...

mongodb - Undefined is not a Function-Sails Mongoose -

hi trying write logic in sails using mongoose find , update parameters in mongoose database using serial no in string format.the parameters passing in the body of dhc app(used posting data api). while posting data, getting following error typeerror: undefined not function @ object.module.exports.createorupdatestatus (/users/febinp/downloads/shubham_application/taqua-parser/api/controllers/status-packetcontroller.js:66:26) @ bound (/usr/local/lib/node_modules/sails/node_modules/lodash/dist/lodash.js:729:21) @ routetargetfnwrapper (/usr/local/lib/node_modules/sails/lib/router/bind.js:179:5) @ callbacks (/usr/local/lib/node_modules/sails/node_modules/express/lib/router/index.js:164:37) @ param (/usr/local/lib/node_modules/sails/node_modules/express/lib/router/index.js:138:11) @ pass (/usr/local/lib/node_modules/sails/node_modules/express/lib/router/index.js:145:5) @ nextroute (/usr/local/lib/node_modules/sails/node_modules/express/lib/router/index.js:100:7) @ callbacks (/usr/local/l...

Firebase group security rule configuration -

i new firebase, , trying setup security rules want users grouped dynamically created groups. want user able read content same group, not other groups. when create new users , assign them groups using push, data following: { "groups" : { "default" : { "-jtcdyniz1yvwnqcgsar" : { "user" : "simplelogin:5" }, "-jtd114knq-rqh6-rlni" : { "user" : "simplelogin:7" } } }, "users" : { "simplelogin:5" : { "group" : "default", "name" : "123" }, "simplelogin:6" : { "group" : "default1", "name" : "1" }, "simplelogin:7" : { "group" : "default", "name" : "23" } } } can here? how can setup authentication rules? have tried following doesn't seem work... { "rules": { "users" : { ...