Posts

Showing posts from April, 2011

excel - If #REF! then hide certain rows -

i have created 2 sheets, sheet no. 1 shows data nicely , other imports data. therefore sheet no. 1 gets data sheet no. 2. there no data in sheet no 2. gives cells in sheet 1 "#ref!". when happens need hide rows in sheet 1. so imagine this sub hidecharts() beginrow = 132 endrow = 138 chkcol = 8 rowcnt = beginrow endrow if cells(rowcnt, chkcol).value = 0 cells(rowcnt, chkcol).entirerow.hidden = true end if next rowcnt rowcnt = beginrow endrow if cells(rowcnt, chkcol).value <> 0 cells(rowcnt, chkcol).entirerow.hidden = false end if next rowcnt end sub however works if data 0 , got no clue on how catch #ref! hides rows contains 0 value, need catch rows 130 140 so thought, else turn stack overflow? like this: change if cells(rowcnt, chkcol).value = 0 then if cells(rowcnt, chkcol).value = 0 or iserror(cells(rowcnt, chkcol).value) sub hidecharts() beginrow = 132 endrow = 138

r - How to set scale_x_log10(FALSE/TRUE) by checkbox in shiny? -

the following code not work. have change? specific: want x-axis change logaritmic scale when checkbox ticked. ui <- shinyui(fluidpage( ... checkboxinput("logarithmicx", "show x-axis in log10", false), checkboxinput("logarithmicy", "show y-axis in log10", false), ... )) server <- shinyserver(function(input, output) { output$distplot <- renderplot({ ... xlog <- reactive({ switch(input$logarithmicx, true == true, false == false) }) ylog <- reactive({ switch(input$logarithmicy, true == true, false == false) }) ggplot(datasetinput(), aes(size)) + geom_histogram(bins = biins) + theme_bw() + scale_x_log10("logarithmicx") +scale_y_log10("logarithmicy") }) something this: output$distplot <- renderplot({ mygg <- ggplot(datasetinput(), aes(size)) + geom_histogram(bins = biins) + theme_bw() if(input$logarithmicx) mygg <- mygg + scale_x_log1

python - python3.5: serial port reading gives error -

while reading serial port com4 port using python, following error: ---------------------------------------------------------------------------- f:\invsense\motion_driver_6.12\empl-pythonclient>python.exe empl-client.py 4 traceback (most recent call last): file "empl-client.py", line 543, in <module> data_delegate = data) file "empl-client.py", line 23, in __init__ self.s = serial.serial(port,115200) file "c:\users\admin\appdata\local\programs\python\python35-32\lib\site- packages\pyserial-3.1.1-py3.5.egg\serial\serialwin32.py", line 31, in __init__ file "c:\users\admin\appdata\local\programs\python\python35-32\lib\site- packages\pyserial-3.1.1-py3.5.egg\serial\serialutil.py", line 162, in init file "c:\users\admin\appdata\local\programs\python\python35-32\lib\site- packages\pyserial-3.1.1-py3.5.egg\serial\serialutil.py", line 206, in port valueerror: "port" must none or string, not f:\invsen

encryption - GCM-AEAD support for ubuntu system running linux kernel-3.10 -

i trying implement aead sample code encryption using gcm encryption. invalid argument error while setting key static int init_aead(void) { printk("starting encryption\n"); struct crypto_aead *tfm = null; struct aead_request *req; struct tcrypt_result tresult; struct scatterlist plaintext[1] ; struct scatterlist ciphertext[1]; struct scatterlist gmactext[1]; unsigned char *plaindata = null; unsigned char *cipherdata = null; unsigned char *gmacdata = null; const u8 *key = kmalloc(16, gfp_kernel); char *algo = "rfc4106(gcm(aes))"; unsigned char *ivp = null; int ret, i, d; unsigned int iv_len; unsigned int keylen = 16; /* allocating cipher handle aead */ tfm = crypto_alloc_aead(algo, 0, 0); init_completion(&tresult.completion); if(is_err(tfm)) { pr_err("alg: aead: fail

c# - Dapper function doesn't map the string values from stored procedure, but maps the other values correctly -

i have stored procedure returns data in following format: "companyid"|"metadataid"|"mnemonic"|"short"|"format"|"metadatatype"|"lngvalue"|"decvalue"|"charvalue"|"datevalue"|"blnvalue"|"sorder"|"version"|"type"|"sortorder"|"createddate" the strings mnenomic , short . sp returns multiple rows why thinking using ienumerable<myclass> best way map rows. my class mapping data: public class creditdatareport { public int companyid { get; set; } public int metadataid { get; set; } public string mnenomic { get; set; } public string shortdesc { get; set; } public int format { get; set; } public int metadatatype { get; set; } public int lngvalue { get; set; } public double decvalue { get; set; } public string charvalue { get; set; } public

java - Why are all elements printed although they are the same in mapWithState -

i'm sending 3 times same object javapairdstream. i'm updating it's state it's saved 3 times. printing javapairdstream confirms this. function3<inputmessagekey, optional<inputmessage>, state<inputmessage>, tuple2<inputmessagekey, inputmessage>> mappingfunction = new function3<inputmessagekey, optional<inputmessage>, state<inputmessage>, tuple2<inputmessagekey, inputmessage>>() { @override public tuple2<inputmessagekey, inputmessage> call(inputmessagekey key, optional<inputmessage> value, state<inputmessage> state) { inputmessage inputmessage = value.get(); tuple2<inputmessagekey, inputmessage> output = new tuple2<>(key, inputmessage); state.update(inputmessage); return output; } }; printing stream: (com.input.inputmessagekey@220593a0,com.input.inputmessage@781bfd72) (com.input.inputmessagekey@220593a0,com.inpu

distinct - Names disintct in linq -

i try select name there names repeat want select these through distinct how done in linq string data2 = "["; t1 db = new t1(); var te = db.tblvni; foreach (var c in te) { data2 += "'" + c.name + "',"; } data2 = data2.substring(0, data2.length - 1); data2 += "]"; this return me this ['dpsb','mv','psb','','','','psb','psb','','psb','psb','mv','','','mv','psb','','mv','mv','mv','','psb','mv', where dont want repeat these names any solution you replace foreach (var c in te) { data2 += "'" + c.name + "',"; } by following snippet. foreach (var c in te.select( x => x.name ).distinct()) { data2 += "'" + c + "',"; } you use existing facilities , rewrite entire part

mysql - sql insert wrong value in BDD -

Image
here request, insert user(name,user_id,url,email,created,updated,phone,organisationid,role) values ('bastien frey', '2196898165', 'https://cubber.zendesk.com/api/v2/users/2196898165.json', 'bastien.frey@incityz.com', '2016-01-19t16:21:07z', '2016-01-19t16:21:07z', '', '30567951','end-user'),('mathilde zimmer', '2297486669', 'https://cubber.zendesk.com/api/v2/users/2297486669.json', 'mathilde.zimmer91290@gmail.com', '2016-01-26t12:04:20z', '2016-01-26t12:04:20z', '', '36094152','end-user') but insert wrong user_id in table, think code or bdd problem ? in bdd have that: you have defined user_id column signed integer , attempted insert value greater upper limit of data type (2147483647). mysql truncated value maximum allowed data type (you not have strict sql mode enabled, otherwise have received error). check out warnings show

android - Update Activity on closing Fragment -

i have activity a. once has been loaded, on clicking button in adds fragment f on a's home layout. once inside f, if calling getactivity().getsupportfragmentmanager().popbackstack(); , infacts navigates again activity a. there way can make changes in activity once fragment has been popbackstacked? don't know method called in activity once fragment has been popbackstacked , have activity. please help. you can add onbackstackchangedlistener(). this: getsupportfragmentmanager().addonbackstackchangedlistener(new onbackstackchangedlistener() { public void onbackstackchanged() { } }); this callback called after each change on stack.

javascript - Node Forever Affects App Display (Style and Routes) -

i trying make app server run indefinitely forever , nodemon. so, using following command: forever -c nodemon --exitcrash app.js the problem presence of forever module seems affect display of app. namely, whenever run app using forever, login window styles changed , entire thing shifted left side of window. more, of app routes stop working. on other hand, whenever use simple npm start or nodemon command , works expected. does know why may happening? how make server run continuously , not mess app itself? p.s. may useful mention reason, app works upon running npm start , not work when node app.js run. unsure why happens.

sql - How to solve The multi-part identifier "r.StandardRate" could not be bound -

i getting following error query shown below: msg 4104, level 16, state 1, line 37 multi-part identifier "r.resourceid" not bound. msg 4104, level 16, state 1, line 16 multi-part identifier "r.standardrate" not bound. can please me figure out? query: select vnd.name vendorname, cct.name costcentrename, ct.name costtype, case when cct.isactive = 1 'active' else 'closed' end ccstatus, isnull(cct.t1code,'') t1code, cct.t2code, '' [month], convert(varchar, year(pf.period)) + '-' + convert(varchar, month(pf.period)) period, pp.parentproformano, pf.proformano, vac.trafiguraaccountcode, vac.pumaaccountcode, pli.finalamt ammount, ts.quantity quantity, r.standardrate standardrate, cmp.[text] proformastatus, '' billableuom, '' currency, bet.entity ccbilledentity, bcet.name ccbilledcompany,

Why does jar library work in Eclipse but not Android Studio? -

Image
i have jar library (specifically rajawali v0.9) works in eclipse when using , compiling project android studio gives ton of errors when trying compile. why , there way bypass lint on specific jar library? edit had remove manifest via gradle because of mismatch here logcat when try run app: java.lang.unsatisfiedlinkerror: couldn't load bufferutil loader dalvik.system.pathclassloader[dexpathlist[[zip file "/data/app/com.pspdemocenter.graffitilwp-1.apk"],nativelibrarydirectories=[/data/app-lib/com.pspdemocenter.graffitilwp-1, /vendor/lib, /system/lib]]]: findlibrary returned null @ java.lang.runtime.loadlibrary(runtime.java:358) @ java.lang.system.loadlibrary(system.java:526) @ rajawali.util.bufferutil.<clinit>(bufferutil.java:16) @ rajawali.geometry3d.setvertices(geometry3d.java:506) @ rajawali.geometry3d.setvertices(geometry3d.java:494) @ rajawali.geometry3d.setdata(geometry3d.java:259) @ rajawali.baseobject3d.setdata(baseobj

css3 - Using pure CSS to slide an arrow under a menu -

when hovering on menu, i'd arrow slide left menu item i'm hovering on. in javascript i'd bind event hover , play arrow element's "left" property, wonder if can have pure css3 animated solution. the arrow similar thread- show border triangle in navbar using css but don't want appear , hide- want arrow visible , slide right left depending on menu i'm hovering on. this how if i'd done in js: var arrele = $("#indication-mark-wrap"); var starthover = $(arrele).css("left"); $("li").mouseenter(function() { var left = $(this).position().left; $(arrele).css("left", left+30); }); $("li").mouseleave(function() { $(arrele).css("left", starthover); }); ul { list-style-type: none; padding: 0px; } li { display: inline-block; width: 80px; color: white; background-color: black; height: 50px; } #indication-mark-wrap { position: absolute;

You cannot call a method on a null-valued expression (powershell, sharepoint) -

i created powershell script purpose of reading text document , applying changes field in sharepoint environment. sorry errors in technical jargon im starting out , still learning. heres script: $data = get-content "e:\projects.txt" write-host $data.count total lines read file foreach ($line in $data) { write-host $line $web = get-spweb -identity "http://bizprojectsqa.westerncape.gov.za/pwa/" $list = $web.getlist($line) $query = "<where><eq><fieldref name='status'/><value type='text'>(2)active</value></eq></where>" $view = $list.views["all active risks"] $view.query = $query $view.update(); } heres error message: cannot call method on null-valued expression. @ c:\temp\pwa_risks.ps1:12 char:13 +$view.update <<<< (); +categoryinfo : invalidoperation: (update:string) [], runtimeexception +fullyqualifiederrorid : invokemethodnull

apache - PHP code is not being executed, instead code shows on the page -

Image
i'm trying execute php code on project (using dreamweaver) code isn't being run. when check source code, php code appears html tags (i can see in source code). apache running (i'm working xampp), php pages being opened php code isn't being executed. does have suggestion happening? note: file named filename.php edit: code..: <? include_once("/code/configs.php"); ?> sounds there wrong configuration, here few things can check: make sure php installed , running correctly. may sound silly, never know. easy way check run php -v command line , see if returns version information or errors. make sure php module listed and uncommented inside of apache's httpd.conf should loadmodule php5_module "c:/php/php5apache2_2.dll" in file. search loadmodule php , , make sure there no comment ( ; ) in front of it. make sure apache's httpd.conf file has php mime type in it. should addtype application/x-httpd-php .php . tells

How can I execute a cmd command through windows run prompt box? (win+R) -

how can start program run terminal, right run prompt? ( win key + r ) example: instead of pressing: win + r, type "cmd", press enter, type "jupyter notebook", press enter i to win + r, type "cmd; jupyter notebook", press enter maybe like: cmd, jupyter notebook cmd: jupiter notebook cmd; jupyter notebook is possible? just type: cmd /c "jupyter notebook" this close command prompt after command has been executed. if don't want close command prompt use /k instead of /c.

sql - List all tables of a given user in Oracle -

i new oracle , want find tables created user 'john' . i connect oracle database via command line following command: sqlplus john/passwd how list tables created given user e.g. john? this tables "john" user owner: select * user_tables; or select * all_tables owner = 'john'; ([tl;dr] 'john' typically needs in upper-case. assuming user john created using create user john ... statement oracle's default behaviour convert object names (i.e. tables, columns, users, etc) upper case. when query data-dictionary table details stored in case (and not case used in original command unless wrap in double quotes).)

How to use ionic cordova preferences? -

currently i'm using cordova app preferences store data today's date key. var pref = $cordovapreferences.fetch(date, 'dates').$$state.status; if (pref===0) { var out = $cordovapreferences.store(date, '1', 'dates'); dbpopup('store' + json.stringify(out)); } but both fetch , store methods displays status 0. didn't uninstall app every time. since uninstallation of app removes stored preferences.. i recommend using $window.localstorage . uses keys save strings. can use json.stringify convert objects string. an example can found here: http://codepen.io/drewrygh/pen/ciozb

database - Pivot column component in talend -

i have requirement i'm using tpivottocolumndelimited component in talend. component generates output in file , not in database here i'm dealing lot of records file output not recommended. need way write output db , not file. any alternative appreciated. if want how tpivottocolumndelimited component works, refer this https://help.talend.com/display/talendopenstudiocomponentsreferenceguide521en/13.43+tpivottocolumnsdelimited you can try 1 of third-party pivot components in talend exchange . suggest looking @ tturnrow , tpivotrow components. i'm using exact tpivottocolumndelimited component pivot approximately 3 million rows of data 4 thousand rows. after pivot file, read file , further processing of pivoted rows. find fast enough in batch-processing context.

c# - Customise serialisation of Dictionary to Yaml -

i'm looking find clean method of customising output yamldotnet serializer. i have following poco: public class myclass{ public string foo { get;set; } public dictionary<string, string> bar { get;set; } } if set values on like var class = new myclass{ foo = "bla" }; class.bar["key1"] = "val1"; class.bar["key2"] = "val2"; and serialize results: foo: bla bar: key1: val1 key2: val2 however, need is foo: bla key1: val1 key2: val2 i can't add key1, key2 etc properties of myclass unknown until runtime (both value , number of keys). there way can using yamldotnet? i've considered using reflection convert in myclass dictionary<string, object> prefer cleaner implementation. is there way can control serialization degree? a simple solution implement idictionary<string, string> in myclass . members need implemented enumerator. there return content of dictionary, entry each ad

angularjs - How to get data with my angular.js file from node.js restful api in localhost -

i created main.js rest api.when sent request local server vericek.js,response did not come localserver showing sending datas in terminal. problem. thank you index.html <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title></title> <link href="lib/ionic/css/ionic.css" rel="stylesheet"> <link href="css/style.css" rel="stylesheet"> <!-- if using sass (run gulp sass first), uncomment below , remove css includes above <link href="css/ionic.app.css" rel="stylesheet"> --> <!-- ionic/angularjs js --> <script src="lib/ionic/js/ionic.bundle.js"></script> <!-- cordova script (this 404 during development) --> <script src="cordova.js&

excel - Randomising a number then displaying a corresponding cell on workbook open -

good afternoon. have tried multiple methods achieve this. in essence code works when run it, however, doesn't seem when workbook opens should. there easier way achieve this? basically in rows 5-28 there random strings, , want cell g4 show 1 of random strings every time workbook opened. i think might along right lines, missing obvious? many thanks private sub workbook_open() wbopeneventrun = true dim myvalue myvalue = int((28 * rnd) + 5) sheets("hints & tips").range("g4") = cells(myvalue, 7) end sub try this: private sub workbook_open() randomize 'as suggested john coleman wbopeneventrun = true dim ws worksheet set ws = sheets("hints & tips") ws.range("g4").value = ws.range("g" & int((23 * rnd()) + 5)).value end sub

Adding meta-data to a folder in amazon S3 -

i can set 'cache-control'(meta data) of particular file , particular bucket in amazon s3. but want cache-control set every file in particular folder(not entire bucket, folder). also when upload new file in particular folder, cache-control header gets automatically set new file. have followed this , s3 documentation . is there way can achieved? based on question's answer here found tool can run recursive files in particular folder, won't applied new files. steps: git clone https://github.com/s3tools/s3cmd run s3cmd --configure (you asked 2 keys - copy , paste them confirmation email or amazon account page. careful when copying them! case sensitive , must entered accurately or you'll keep getting errors invalid signatures or similar. remember add s3:listallmybuckets permissions keys or accessdenied error while testing access.) ./s3cmd --recursive modify --add-header="cache-control:public ,max-age= 31536000" s3://your_bucket

javascript - how can activate my countdown timer with button? -

i have countdown timer function writed in javascript.its working starts when start page.i want should start when button clicked. function starttimer(duration, display) { var timer = duration, minutes, seconds; setinterval(function () { minutes = parseint(timer / 60, 10); seconds = parseint(timer % 60, 10); minutes = minutes < 10 ? "0" + minutes : minutes; seconds = seconds < 10 ? "0" + seconds : seconds; display.text(minutes + ":" + seconds); if (--timer < 0) { // timer = 0; time.style.display = "none"; time2.style.display2 = "none"; redxsms.style.display = "none"; onaysms.style.display = "none"; tekraruyarionay.style.display = "block"; tekraruyarired.style.display = "block";

Uninstall weave docker -

there nice guide how install weave here , can't find anywhere how uninstall properly. removing containers doesn't because weave changes network configuration. weave reset undo network config

javascript - how can i code this widget on client side without a need for a server -

i want code same widget available on w3schol. widget used transform xml using xslt , display result in web browser 2 text area , zone display result bellow.i have included widget in url below. problem need function on client side without intervention of server.is possible ? , how can done? http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog

html5 - What HTML tag is semantically suitable for an "alternating" list with "intervals"? -

let's assume want present todo list such this: 8:00 walk dog! 8:30 clean car! 9:20 rob bank! 9:21 run dog! 22:00 have beer! 22:05 my first though use definition list , it's not great fit: <dl> <dt>8:00</dt> <dd>walk dog!</dd> <dt>8:30</dt> <dd>clean car!</dd> <dt>9:20</dt> <dd>rob bank!</dd> <dt>9:21</dt> <dd>run dog!</dd> <dt>22:00</dt> <dd>have beer!</dd> <dt>22:05</dt> <!--<dd>missing element???</dd>--> </dl> afaik, <dt> must followed 1 or more <dd> tags. last time (22:05) not have (non-empty-)element follow it. furthermore, points in time given semantically should correspond element before 1 after it, relationship lost here too. is there other combination of html tag(s) might fit data better? html can’t convey

c++ - Explain the following about pointers and const with example -

"you can assign address of either const data or non-const data pointer-to-const, provided data type not pointer, can assign address of non-const non-const pointer." reference: c++ primer plus stephen prata if have non-const object, say int = 10; then can assign address pointers both const , non-const ints. int* p = &a; //ok const int* pc = &c; //ok can't modify *pc if, on other hand, have const object, can assign address pointer const const int = 10; int* p = &a; //error, because allow modifying `a` via `*p` const int& pc; //ok one problem have provided quote uses term "const pointer" refer known "pointer const". compare int * p const = nullptr; this const pointer. cannot change value of pointer itself, i.e. points to. const int * p; although book refers const pointer, pointer not const. can things p = &a; p = nullptr; etc.

sql - How do you import multiple databases at once and do a query (mongodb) -

i have 7 different websites tons of databases in it, looking make universal site linked 7 databases. how import databases @ once , how search string in databases @ once. example: string= john.doe@mail.com output: (database name) john.doe@mail.com email pass ip

pip - Error while installing python-snappy -

this question has answer here: c99 stdint.h header , ms visual studio 7 answers i'm trying install package requires snappy compiled in c speed. have downloaded , installed required compiler here https://www.microsoft.com/en-au/download/details.aspx?id=44266 . this http://imgur.com/dv8j897 error i'm getting. i can't figure out why it's not able stdint.h. should come compiler right? any tips appreciated. similar error seen in: https://github.com/fsx/misaka/issues/49 user solved problem doing: download visual c++ python https://www.microsoft.com/download/details.aspx?id=44266 copy stdint.h installation path\vc\include

android - Exception while running app below Lollipop devices -

this question has answer here: android multidex runtimeexception 3 answers my app running fine on lollipop devices. when try run app on below lollipop devices giving error everytime. the error given below: error:the number of method references in .dex file cannot exceed 64k. :app:transformclasseswithdexfordebug failed error:execution failed task ':app:transformclasseswithdexfordebug'. my gradle file below: defaultconfig { applicationid "com.ielts.touchstone.touchstone" minsdkversion 15 targetsdkversion 23 versioncode 1 versionname "1.0.4" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } try adding multidexenabled true app build.gradle file. defaultconfig { multidexen

parsing - PHP Parse/Syntax Errors; and How to solve them? -

Image
everyone runs syntax errors. experienced programmers make typos. newcomers it's part of learning process. however, it's easy interpret error messages such as: php parse error: syntax error, unexpected '{' in index.php on line 20 the unexpected symbol isn't real culprit. line number gives rough idea start looking. always @ code context . syntax mistake hides in mentioned or in previous code lines . compare code against syntax examples manual. while not every case matches other. yet there general steps solve syntax mistakes . references summarized common pitfalls: unexpected t_string unexpected t_variable unexpected '$varname' (t_variable) unexpected t_constant_encapsed_string unexpected t_encapsed_and_whitespace unexpected $end unexpected t_function … unexpected { unexpected } unexpected ( unexpected ) unexpected [ unexpected ] unexpected t_if unexpected t_foreach unexpected t_for unexpected t_while unexpected t_do

xamarin.forms - Xamarin Tab page not showing the icon for cross platform -

i creating tabbed page in xamarin using : class uitabbedpages : tabbedpage { public uitabbedpages() { var landingpage = new firstpage(); landingpage.icon = new fileimagesource() { file = fontawesome.farocket }; landingpage.title = "firstpage"; var location = new 2ndpage(); location.icon = fontawesome.fabars; location.title = "location" this.children.add(landingpage); this.children.add(location); } } i used 2 different things show icons these both not working.

html - Why does Eval statement show the wrong image -

sql ( active column of type bit ): id question active 1 weather today 1 asp.net eval : <img src='<%# eval("active") == "1" ? "images/active.png" : "images/inactive.png" %>' /> html: <img src="images/inactive.png"> why inactive.png image showing , not active. bit fields correspond boolean. need type conversion ensure right comparison done, eval outputs object. so: (bool)eval("active") == true

javascript - What is angle property in rotation event in hammer.js -

in hammer js wanted save rotation of object, use left rotation can start same. but found not working , in event there 2 attributes 1 rotation , angle . may missing , couldn't find documentation regarding angel property. here demo not able save rotation after 1 cycle of rotate. http://codepen.io/anon/pen/bzygkd/

Paypal IPN and btn_id -

i looking @ php script, , noticed method handles paypal's ipn calls expects receive value btn_id. but there no such value @ all. has paypal replaced else? maybe txn_id? the script expects receive value of subscr_id, , paypal send it. depending on type of ipn gets sent there different possible parameters on ipn, depending on script you're looking @ , it's doing may or may not handling things correctly.

android - Is there a way to get all the downloads posted to the DownloadManager -

the issue facing @ point of files downloaded via downloadmanager getting deleted. see other files getting deleted donwloadmanager @ same time. assumption other app deleting files that, app needs list of files downloaded via download manager. i have checked api reference , downloadmanager.query() method gives download entries posted requesting app. there other way downloads posted download manager other app. all download requests marked request.setvisibleindownloadsui(false) , don't show on downloads app. at time of deletion, logs printed downloadmanager 4819 14535 v downloadmanager: deleting /storage/emulated/0/android/data/..... via provider delete has else faced kind of issue? device info: asus zenfone max (asus_z010d )

java - Throwing exceptions in Controller methods Play framework? -

i using play framework (2.5) java development. in that, configure routes , routes relative controller methods triggered. i have question whether ok include exception throws in these controller method signatures or must catch them inside method body? ex: public result getpurchasedstatisticsoutofallpricechecked(string from, string to) throws invalidparameterexception, salesserviceexception { requestparams requestparams = new requestparams(messageprovider); requestparams.setdaterangestart(from); requestparams.setdaterangeend(to); return ok(processinfluenceonsales(influenceonoverallsales)); } i think better way handle exceptions inside action method, instead of throwing. can respond client relevant error message, otherwise end 500 internal server error and stacktrace looks following play.api.http.httperrorhandlerexceptions$$anon$1: execution exception followed respective exception trace.

python - How do I transform the dynamic type of log data that vary over time, with static type for data that I use to train my Machine learning algorithm? -

i work on project have principal purpose creation of prediction system failures in servers based on analyzing log file. in addition have use algorithms svm. moment not know how transormer dynamic type of log data vary on time, static type data use train algorithm grateful or proposals .

php - Collection result manipulation with Laravel -

i writing follower module site , got problems it. want list useres ones not followed me. use function them: ** * listing users * @return \illuminate\contracts\view\factory|\illuminate\view\view * @todo valamiért hat kétjegyű az követendő user id akkor scope lehal */ public function listusers() { //declare empty array result of collection $ids = array(); $collection = $this->user->followers; $collection->each(function($follower) use (&$ids) { $ids[] = explode(',', $follower->id . ','); }); $users = user::pending($ids)->get(); dd($users); return view('profile.listusers', [ 'users' => $users, '_user' => $this->user, ]); } it works fine ids 0 - 9 when use without explode ids 10 - ... kills pending scope. goal add char end of id (in our case ,) , explode it. did kills scope

zend framework2 - Apigility: Send Error code 404 module.php in bootstrap -

i use apigility create web-service, i’d resolve problem. don’t have specific database linked app ,the database specified parameter in url. example http://sk.localhost/users-service/1 , 1 database’s paramaters “projet” can see below. it’s database .conf: return array( 'db' => array( '1' => array( 'driver' => 'pdo', 'dsn' => 'mysql:dbname=projet;host=localhost', 'driver_option' => array( 1002 => 'set names \'utf8\'' ), ), '2' => array( 'driver' => 'pdo', 'dsn' => 'mysql:dbname=cgm;host=localhost', 'driver_option' => array( 1002 => 'set names \'utf8\'' ), )); and it’s code specify database parameter: class module { private $id

android - Alarm Manager firing instantly -

i know question has been asked many times , answered too, did check out lot of posts , tried of them how i'm still having trouble. my code like: cal = calendar.getinstance(); cal.settime(calendarutils.getdatefromstring(objscheduledo.schedulestarttime, calendarutils.time_format)); logutils.debug("time",cal.get(calendar.hour_of_day) + ":" + cal.get(calendar.minute)); am.set(alarmmanager.rtc_wakeup, cal.gettimeinmillis() , pi); i use rtc_wakeup fires instantly , if use elapsed_realtime_wakeup doesn't fire @ all. and i'm sure start time never current time, future time. time_format "hh:mm aa". , have further verified time correct, when tried cal.gettimeinmillis() through debug, received integer value instead of long, not sure whether android studio debug mode can give long value or not. please help.. as per alarmmanager set method , if stated trigger time in past, alarm triggered immediately. verify date

sql - Alternative for union in Oracle -

is there alternate way fetch following data without using union? select a.name,a.age,b.address,c.phoneno table1 a,table2 b,table3 c a.pkid = b.fkid , b.pkid = c.fkid union select a.name,a.age,b.address,c.phoneno table4 a,table5 b,table3 c a.pkid = b.fkid , b.pkid = c.fkid i using in hibernate , unfortunately hibernate doesnt support union. wondering if there other way achieve else ill have write in procedure , save data in temp table , fire sql read data temp table there alternative union , not pretty: select distinct coalesce(x1.name, x2.name) name, coalesce(x1.age, x2.age) age, coalesce(x1.address, x2.address) age, coalesce(x1.phoneno, x2.phoneno) age, (select a.name, a.age, b.address, c.phoneno table1 join table2 b on a.pkid = b.fkid join table3 c on b.pkid = c.fkid ) x1 full outer join (select a.name, a.age, b.address, c.phoneno table4 join table5 b on a.

Can someone help me solve this string index error in python? -

this code need schools cau, thought had solved keep getting string index error, wondering if tell me why error message letters = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n","o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"] menu = """ caesar cipher ======================================================== | exit program ---------------------- enter 0 | | find lucky name number ----------- enter 1 | \------------------------------------------------------/ """ option = "" def lucky_name(): forename = input("what forename?") surname = input("what surname?") forenaem = str(forename) surnamenum = 0 forenamenum = 0 luckynum =

android - Visualizing an image from Html.fromHtml in a TextView(The image must be in the server) -

this question has answer here: is possible display inline images html in android textview? 8 answers i have problem. i'm trying show image in textview in android studio method html.fromhtml , problem image in server, how can this? there code: textview1.settext(html.fromhtml(s), textview.buffertype.spannable); textview1.setmovementmethod(linkmovementmethod.getinstance()); ps: image in server because use httpurlconnection html text internet the method html.fromhtml supports loading of <img> tags, you're going need manage way images fetched yourself. remember, not web client... android app. fromhtml method method interprets html tags, , creates appropriate spannables best fit html tags. and so, we're the issue images ( img tags). again, not web client. you're going need load images yourself. to this, need pass fromhtml me