Posts

data.table in R: Why can't data.table::`:=`() be called? -

use dt = data.table(type=rep(c("b","a"),each=2), value=1:4) create following data.table: type value 1: b 1 2: b 2 3: 3 4: 4 the code dt[, `:=`(text=max(value)), by=type] works well: type value test 1: b 1 2 2: b 2 2 3: 3 4 4: 4 4 same code (except data.table:: calling part) dt[, data.table::`:=`(text=max(value)), by=type] doesn't work , returns following error: error in data.table::`:=`(text = max(value)) : check is.data.table(dt) == true. otherwise, := , `:=`(...) defined use in j, once , in particular ways. see help(":="). can tell me why can't call := function data.table::`:=`() can call other functions data.table data.table::data.table ? please me, want use data.table::`:=`() in package. many ahead!

vb.net - How to increase year range in Hijri DateTimePicker -

in windows application, have datetimepicker insert hijri date database. but, datetimepicker doesn't allow dates of more '29-12-1450'. how can expand year range of datetimepicker hijri calendar?

node.js - Promise.promisify get parameters from position 2..n in then resolution -

the first time posted confused actual issue was. in bluebird documentation promisify , says the node function should conform node.js convention of accepting callback last argument , calling callback error first argument , success value on second argument. this means parameter in 1st position (error) passed .catch . parameter in 2nd position passed .then . if there more 1 "success" value, how capture parameters 3rd position , on? child_process.exec callback function called function (error, stdout, stderr) . there anyway capture stderr in promisify 'd function? this var promise = require('bluebird'); var child_process = promise.promisifyall(require('child_process')); var execasync = child_process.execasync; var exec = child_process.exec; // normal callback, can access stderr exec('node-gyp rebuild', function(error, stdout, stderr) { console.log(stderr); }); execasync('node-gyp rebuild') .then(function(stdout, stderr) { ...

Testing component in Android App SDLC? -

"automated testing integral part of development lifecycle." in android app proejcts we've implemented mvp, rx retrofit , content provider/sqlite, dagger. every android apps have server communication, storing data in local database, complex ui naviagtion drawer , recycler view etc, , difficult navigation flow of application. what want achieve? few test cases should tested every time before deliver apk client or release on play store?(20-30% automate testing) list of test cases of business logic, can not auto tested because whatever reason complex ui, navigation flow etc (40-60% manual testing) continuous integration based on above, there few questions, what test in auto , manual, how decide that? in automate testing, test in mvp - model-view-presenter layers? what kind of general business logic should auto test mobile apps - registration, login, forgot password, update profile etc? what type of testing should perform android apps - unit testing, func...

ajax - React-rails gem TypeError: Cannot convert a symbol to a string -

i have problem react-rails gem have bit different syntax react.js i have created multiple form , collect data each form request api. problem cannot proceed more further because got error typeerror: cannot convert symbol string below code createassociations.jsx (body) handleclick(e) { e.preventdefault(); $.ajax({ url: 'http://localhost:3001/api/v1/associations/create?', type: 'post', data: { name: name,association_url:url}, beforesend: function (xhr){ xhr.setrequestheader('authorization', 'token token='+localstorage.authtoken); xhr.setrequestheader('accept', 'application/json'); }, success: (data) => { alert("success!") }, error: (xhr, ajaxoptions, thrownerror) => { alert(xhr.responsetext); }...

svn - Git alias to create a new branch, switch repository and create the same branch there -

i have 2 repositories, our application exists of our basic product, , extended product each client have (i work 1 client, 2 repositories). when make new branch on basic product repository, want same branch created on extended product repository. to this, created git alias using: git config --global alias.newbranch '!git checkout -b $0 central/branchname && cd ../extendedproduct && git checkout -b $0 central/branchname' when run using: git newbranch test, exception saying ../extendedproduct outside repository. i'm not sure if want @ possible, appreciated. so basically: create branch on current repository -> switch repository -> create branch same name on repository. git alias has restrictions, can use these commands directly , such git checkout -b central/branchname && cd ../extendedproduct && git checkout -b central/branchname also, there way, can add extendedproduct submodule current repo git submodule add...

shell - What kind of permission is required to access and rename a directory? -

among x, w, r, permission required access , rename directory. (i'll use cd , mv respectively) just note, mv need rights modify (w)the current directory too, because writes new content (the new name) it.. demo: testdir="./$0.$$" pwd="$(pwd)" err()(echo "$@">&2; return 1) echo "creating $testdir" mkdir "$testdir" || err "can't mkdir $testdir" || exit 1 ls -la "$testdir" trap 'cd "$pwd"; chmod 777 "$testdir"; rm -rf "$testdir"; exit' 0 1 2 15 #ensure 'w' demo chmod 755 "$testdir" echo "cd $testdir" cd "$testdir" || err "can't cd $testdir" || exit 1 echo "mkdir a" mkdir || err "can't mkdir a" || exit 1 ls -la echo renaming b mv b || err "can't rename b" || exit 1 ls -la echo "rewoke 'w' permission $testdir (now .)" chmod 555 . || err ...