Posts

unable to store variable in Matlab Gui -

i know several variants of issue have been discussed elsewhere, still unable solve problem. please help. i have created function part of larger gui, unable store 3 data variables (avex, avey, avez) later use guidata(hobject, handles). doing wrong? here function: %call checkbox values = 1:30 checkboxes=get(handles.(sprintf('checkboxav%d',i)),'value') checkboxes(i,1)=checkboxes(1,1); end plotdata=handles.plotdata; [row,col] = find(checkboxes==1) num=length(plotdata{1,1}(:,1)); datay = zeros(num,length(row));%zero matrix %average y data k=1:length(row) datay(:,k)=plotdata{row(k,1),col(k,1)}(:,4); end [m,n] = size(datay) if (n==1) avey=datay' elseif (n>1) avey=mean(datay'); end avey=avey'; %average x data kk=1:length(row) datax(:,kk)=plotdata{row(kk,1),col(kk,1)}(:,1); end test=datax(:,1); comp=any(bsxfun(@minus,datax,test),1) s = sum(comp) if (s > 0) h=msgbox(['note! wavelength index selected samp...

build.gradle - How to share sub-projects with many other projects on Gradle? -

i new gradle, , running issues while trying share sub-projects among many other projects. project structure looks follows: project | |--------------project b |--------------project c |--------------project d project e | |--------------project c |--------------project d where: project d | |---------------project c project c , project d used in other projects frequently, act libraries data classes , database utilities. project a settings.gradle file: rootproject.name = 'projecta' include ":projectb" project(":projectb").projectdir = file("/home/myfolder/netbeansproject/projectb") include ":projectc" project(":projectc").projectdir = file("/home/myfolder/netbeansproject/projectc") include ":projectd" project(":projectd").projectdir = file("/home/myfolder/netbeansproject/projectd") project a build.gradle file: apply plugin: 'java' apply plugin: 'applicat...

CMake check_function_exists only called one time in macro -

i have cmake macro calls check_function_exists() detect several math functions. by output below, seems check_function_exists() called first time; macro(nco_check_funcs func def) message(${argv0}) check_function_exists(${argv0} have_result) message(${have_result}) if (not have_result) message("-- using nco defined version of ${argv0}") add_definitions(-d${argv1}) endif() endmacro(nco_check_funcs) nco_check_funcs(atan2 need_atan2) nco_check_funcs(acosf need_acosf) nco_check_funcs(asinf need_asinf) in example below macro called 3 times, output of check_function_exists() shows 1 time atan2 -- looking atan2 -- looking atan2 - found 1 acosf 1 asinf 1 those results of check_function_exists() cached. check <function> provided libraries on system , store result in <variable> . <variable> created as internal cache variable . add following begin of macro: unset(have_result cache) or if want keep functionality of searching ones f...

python - Pandas - DateTime within X amount of minutes from row -

i not entirely positive best way ask or phrase question highlight problem, dataset, thoughts on method , end goal , clear end. my problem: my company dispatches workers , load dispatches single employee if on current dispatch. due limitation in software use. if employee receives 2 dispatches within 30 minutes, call double dispatch. we analyzing our dispatching efficiency , running bit of head scratcher. need run through our 100k row database , add additional column read dummy variable 1 double 0 normal. have multiple people dispatch , b our records not start ordered dispatch, need determine how dispatch occurs same person within 30 minutes. dataset: the dataset incredibly massive due poor organization in our data warehouse terms of items need these columns need calc. tech name | dispatch time (pst) john smith | 1/1/2017 12:34 jane smith | 1/1/2017 12:46 john smith | 1/1/2017 18:32 john smith | 1/1/2017 18:50 my thoughts:...

pyspark - How to convert spark streaming nested json coming on kafka to flat dataframe? -

need on first attempt parse json coming on kafka spark structured streaming. i struggling convert incoming json , covert flat dataframe further processing. my input json [ { "siteid": "30:47:47:be:16:8f", "sitedata": [ { "dataseries": "trend-255", "values": [ {"ts": 1502715600, "value": 35.74 }, {"ts": 1502715660, "value": 35.65 }, {"ts": 1502715720, "value": 35.58 }, {"ts": 1502715780, "value": 35.55 } ] }, { "dataseries": "trend-256", "values": [ {"ts": 1502715840, "value": 18.45 }, {"ts": 1502715900, "value": 18.35 }, {"ts"...

pandas - I am getting an ImportError when using package sklearn and scipy -

traceback (most recent call last): file "c:/users/mohit/onedrive/scorpion/neuralnetanalysis.py", line 9, in <module> sklearn import preprocessing file "c:\users\mohit\appdata\local\programs\python\python36\lib\site-packages\sklearn\__init__.py", line 134, in <module> .base import clone file "c:\users\mohit\appdata\local\programs\python\python36\lib\site-packages\sklearn\base.py", line 12, in <module> .utils.fixes import signature file "c:\users\mohit\appdata\local\programs\python\python36\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module> .validation import (as_float_array, file "c:\users\mohit\appdata\local\programs\python\python36\lib\site-packages\sklearn\utils\validation.py", line 18, in <module> ..utils.fixes import signature file "c:\users\mohit\appdata\local\programs\python\python36\lib\site-packages\sklearn\utils\fixes.py", line 144, in ...

javascript - VueJS Element vue-data-tables Search box filter with range -

i using vuejs 2.0 along http://element.eleme.io , https://njleonzhang.github.io/vue-data-tables . been trying figure out how can ranged search (x y) https://njleonzhang.github.io/vue-data-tables/#/searchboxfilter unable figure out , not find examples. feel can done filterfunction, unsure. or maybe add more text inputs can take 2 numbers, , pass values filterfunction? not sure if has example on how done, extremely appreciate it. below have far, removed tried, not confuse anyone. <template> <data-tables ref="multipletable" :data="tabledata" :pagination-def="paginationdef" :search-def="searchdef" @filtered-data="handlefiltereddata" @selection-change="handleselectionchange"> <el-row slot="custom-tool-bar" style="margin-bottom: 10px"> <el-col> <el-button @click="hidefiltereddata()" type="primary">delete filtered</el-button> ...