Posts

Showing posts from April, 2015

android - How can i pass adapter to fragment like in intent -

i new android , trying call mapfragment adapter after on click using intent below code below adapter code: public view getview(int position, @nullable view convertview, @nonnull viewgroup parent) { final businfo info = getitem(position); view view = layoutinflater.from(context).inflate(r.layout.bus_only_list,null); textview busname; busname = (textview) view.findviewbyid(r.id.busname); busname.settext(info.name); view.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { pref = context.getsharedpreferences("businfo",context.mode_private); sharedpreferences.editor editor = pref.edit(); editor.putstring("bus_name",info.name); editor.commit(); intent intent = new intent(context, mapsfragment.class); intent.putextra("name",info.name); context.startactivity(intent);> } }); return view; } i want pass mapfragment using intent red

Why is the diff command in Mac OSX terminal unable to pick up file size differences Finder detects? -

i used 7zip create .7z file folder had. afterwards, unzipped .7z file , used finder compare differences between 2 folders. appeared 2 folders differed in size 200,000 bytes. then, used diff command in terminal compare: diff -rq folder1 folder2 to surprise, nothing showed up. there explain difference? there way use diff find why these show different sizes when click on info through finder? thanks. wiki

java - Infinity number returns a NumberFormatException even after casting to two decimal places -

Image
i have researched , tried different solutions fix problem keep getting same exception. i have class called balancebreakdownfee public class balancebreakdownfee { private double amount; private double balance; public double getamount() { return amount; } public void setamount(double amount) { this.amount = amount; } public double getbalance() { return balance; } public void setbalance(double balance) { this.balance = balance; } } then have method populates amounts list. private void addquarterlyfees(){ list<period> periods = getpaymenttermperiods(); int discountpercentage = getdiscountpercentage(); double perquarteramount = getperperiodamount(); double perquarterbalance = perquarteramount; balancebreakdownfee dp = getdownpayment(); if (discountpercentage >= 100) { dp.setamount(0); dp.setbalance(0); breakdown.add(dp); } else { break

visual studio 2017 errors are not shown -

Image
i'm using visual studio 2017 community v14.0.25431.01 update 3 , errors not shown. can see in vs 2015 can see errors underlined not in vs2017. vs2017 exemple : vs2015 exemple : wiki

laravel - Bootstrap javascript loaded but not working -

i'm trying new bootstrap have problem javascript. loaded 3 lines @ end of <body></body> : <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-kj3o2dktikvyik3uenzmm7kckrr/re9/qpg6aazgjwfdmvna/gpgff93hxpg5kkn" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/u6ypibehpof/4+1nzfpr53nxss+glckfwbdfntxtclqqenisfwazpkamnfnmj4" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0abixch4zdo7tp9hkz4tshbi047nrkglo3sejag45jxxngifyzk4si90rdiqnm1" crossorigin="anonymous"></script> and tested dropdown... doesn't work. i'm working laravel , blade, that's may reason, no ? <!doctype html> <html> <head> &l

Laravel -records in the table are being deleted at the end of the import -

i importing data wordpress database database use laravel project. doing import this: public function all() { $posts = post::where('post_status', 'publish')->get(); foreach ($posts $post ) { $this->createcontent($post->id); } } private function createcontent($post) { $ctid = contenttype::where('name', $post->post_type)->first()->id; $inventory = inventory::where('cms_id', $post->id)->first()->id; $content = content::updateorcreate( ['cms_id' => $inventory->remote_id], [ 'ct_id' => $ctid, 'title' => $post->post_title, 'slug' => str_slug($post->post_title, '-'), 'excerpt' => $post->post_excerpt, 'body' => $this->formatbodyimages($post->post_content),

python - Tensorflow queue is not filled -

i'm sorry still have problems dealing tensorflow , hope here.... i did first solution suggested sraw @ tensorflow not terminate using batches following error now outofrangeerror (see above traceback): randomshufflequeue '_1_shuffle_batch/random_shuffle_queue' closed , has insufficient elements (requested 30, current size 0) [[node: shuffle_batch = queuedequeuemanyv2[component_types=[dt_float, dt_float], timeout_ms=-1, _device="/job:localhost/replica:0/task:0/cpu:0"](shuffle_batch/random_shuffle_queue, shuffle_batch/n)]] i tried use try: while not coord.should_stop(): # run training steps or whatever sess.run(train_op) except tf.errors.outofrangeerror: but not work well. file dataset.csv existing. can't figure out if there way check if read correctly script. the hole file looks from __future__ import print_function import numpy np import tensorflow tf urllib.request import urlopen num_attributes = 15 num_types = 7 d

javascript - setTimeout to JS function inside another one -

i'm looking add settimeout js function inside function have one, i'm aware can use onclick=settimeout"(foobar(), 2500);" there's loader inside function, make clear, i'd execute function instantly (show loader div) when button clicked settimout 2500 ms before running $.getjson . let's want add fake timeout api request because stuff blazing fast. also, please let me know if loading animation method js ok, think it's lines of code show/hide div. i'm sure there's better way handle this. thanks. <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>js loader</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> </head> <body> <s

c# - How to get rectangular part of the screen using SharpDX? -

there lots of examples on how fullscreen image dektop using sharpdx need take small rectangular area only. grabbing fullscreen , cutting seems not efficient solution , can't find other. so please guide me on how can it. thanks! here link fullscreen version can take starting point: https://github.com/sharpdx/sharpdx-samples/blob/master/desktop/direct3d11.1/screencapture/program.cs wiki

javascript - Fading-in text on bottom of screen centered -

i want text shown on bottom middle of screen, keeps showing on bottom left of screen. doing wrong? $('div').delay(2000).fadein(1000); div.hidden { position: absolute; bottom: 0; display: none; text-align: center; } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="hidden"> <p>this text.</p> </div> add width: 100% css. this causes div span entire width of screen, when text centered, centered in screen. wiki

python - How can I change the x axis in matplotlib so there is no white space? -

Image
so learning how import data , work in matplotlib , having trouble tho have exact code book. this plot looks like, question how can there no white space between start , end of x-axis. here code: import csv matplotlib import pyplot plt datetime import datetime # dates , high temperatures file. filename = 'sitka_weather_07-2014.csv' open(filename) f: reader = csv.reader(f) header_row = next(reader) #for index, column_header in enumerate(header_row): #print(index, column_header) dates, highs = [], [] row in reader: current_date = datetime.strptime(row[0], "%y-%m-%d") dates.append(current_date) high = int(row[1]) highs.append(high) # plot data. fig = plt.figure(dpi=128, figsize=(10,6)) plt.plot(dates, highs, c='red') # format plot. plt.title("daily high temperatures, july 2014", fontsize=24) plt.xlabel('', fontsize=16) fig.autofmt_xdate() plt.ylabel("temperature (

php - error in uploading file to a specified directory -

i new php , trying upload file specified directory. when check condition given below: if(file_exists($target_dir))//check if file exists in uploads folder { echo "sorry! file exists"; $uploadok=0; } it shows "sorry! file exists";. picking imagefile c:\mypictures\ , path target directory c:\xampp\htdocs\uploads. having no idea why happening. great if clarify this. here full code of upload.php file: <?php $target_dir="c:/xampp/htdocs/uploads/"; $target_file=$target_dir.basename($_files["filetoupload"]["name"]); $uploadok=1; $imagefiletype=pathinfo($target_file,pathinfo_extension); if(isset($_post["submit"])) $check=getimagesize($_files["filetoupload"]["tmp_name"]);//check if file image or not if($check == true) echo "file image"; else { echo "file not image"; $uploadok=0; } if(file_exists($targ

rjava - Is there a way to import MULAN library from java to R? -

i've been working on multi-label classification problem, , want ml-tree algorithm (not problem transformation approach, algorithmic adaptation approach) in mulan library. tried use rjava package bring r, cannot figure out how. can help? wiki

Although I used 'drawnow' and 'hold on', last plot still appears in animation - MATLAB -

Image
i read lot of answers here, reason animation still doesn't work expected. the axis range should vary frame frame. 'hurricane center' caption should remain in center time, captions previous frames must erased. also, i'm afraid of data previous parts remain. i used hold on , draw now still happens. the animation can seen here: code: v = videowriter('test_video.avi'); v.framerate = 4; v.open() hold on i=1:length(relevant(1,1,:)) if isempty(relevant) == 0 title('lightning around hurricane jerry') grid on ylim([interp_jerry(i,2)-radius interp_jerry(i,2)+radius]) xlim([interp_jerry(i,3)-radius interp_jerry(i,3)+radius]) ylabel('latitude') xlabel('longitude') text(interp_jerry(i,3),interp_jerry(i,2),txt1); scatter(relevant(:,3,i),relevant(:,2,i),'.'); drawnow pause(0.1); v.writevideo(getframe(fig));

javascript - How to add line and text as a label to a rectangle in D3? -

Image
i have bar looks this, values b , c change little bit in data follow same sort of trend , out of 100. the trouble having how add lines in centre of each of graphs little bit of text on each one. have tried appending path doesn't work reason. another issue having how make entire bar have whole striped white lines going across go underneath. answer here doesn't change bars me. have place bar on top of these line gradient too? var = 89; var b = 6; var c = 5; var = parseint(a); var b = parseint(b); var c = parseint(c); var margin = { top: 60, right: 70, bottom: 40, left: 65 } var width = '100%'; var data = [{ "percentage": (a + b + c), "name": "a" }, { "percentage": (b + c), "name": "b" }, { "percentage": c, "name": "c" }]; var data1 = [a, b, c]; var chart = d3.select("#chartareadiv").append("svg") .attr("class",

Most efficient way to create sequential string vector in R -

this question has answer here: how paste string on each element of vector of strings using apply in r? 2 answers what efficient way in r? vic <- c() for(i in 1:12){ vic[i] <- paste0("ng.fwd.p_tfi_m",i,":hello") } vectorizing loop: paste0("ng.fwd.p_tfi_m",1:12,":hello") wiki

how disable popup challenge on submit for recaptcha invisible mode -

Image
i integrate google invisible recaptcha on form website. before try visible recaptcha , work perfectly. , want use invisible mode , don't want displaying popup challenge question. i try lot of solution popup appear time when click on submit button. i try 'inherited' option in grecaptcha.render function : var onloadcallback = function() { grecaptcha.render('contact_submit', { 'sitekey' : '6lf4nsiuaaaaaikpyu1piop_weol5yo-tzgj-ws7', 'callback' : onsubmit }, true); }; with button <button id="contact_submit" class="g-recaptcha" data-sitekey="6lf4nsiuaaaaaikpyu1piop_weol5yo-tzgj-ws7" data-callback="" data-size="invisible"> submit </button> it display popup : i try tutorial same behaviour : tuto

swift - How to add constraints in Basic Style TableView cell -

Image
i try add constraints label added basic style cell in uitableview, not active. i use basic style instead of custom , because need rows start title , cell.imageview!.image if use custom cell, when there no imageview, title anyway located far left side of row. screenshot: use custom cell. don't bother predefined one. build yourself, , wont have worry , can use constraints wish (just make sure these related content view of cell, not other view - uitableviewcell has quite few of them). wiki

Java keeps giving me an error even though there is not red line thingy -

this program made create files in specified directory user inputs. user can specify name , file extension. recent changes code marked. latest thing did code way program can tell if user added extension or of extension valid. java.lang.exceptionininitializererror caused by: java.lang.nullpointerexception @ filecreator.coolversion.filecreatorcoolversion.<clinit> (filecreatorcoolversion.java:13) exception in thread "main" c:\users\deadm\appdata\local\netbeans\cache\8.2\executor- snippets\run.xml:53: java returned: 1 ^error code: package filecreator.coolversion; import java.io.file; import java.io.ioexception; import java.util.*; public class filecreatorcoolversion { public static scanner sc = new scanner(system.in); public static boolean success = false; public static string filename; public static string filedir; public static string fileexten = filename.substring(filename.lastindexof(".") + 1); //recent change here public static file file; p

c++ - How to return a variant from an input iterator with high performance? -

i have file format decoder returns custom input iterator . value type of iterator (when dereferencing *iter ) can 1 of many token types. here's simplified usage example: file file {"/path/to/file"}; (const auto& token : file) { // token } how can token have multiple possible types? depending on type of token, type of payload changes too. performance important here during traversal. don't want unnecessary allocation, example. why iterator's type input iterator : advance iterator, previous token invalidated per requirements of inputiterator tag. i have 2 ideas in mind far: use single token class private union of possible payloads (with public getters) , public type id ( enum ) getter. user needs switch on type id know payload getter call: for (const auto& token : file) { switch (token.type()) { case token::type::apple: const auto& apple = token.apple(); // ... break; case token::type::banan

ip - Unable to connect to docker host when network changes -

here have 2 cases. my office address 10.10.33.xx changing every day , home ip address 192.168.0.100/101/102 so want set single static ip both cases on windows 10 please suggest way handle this thanks, kusuma you communicate containers of links. example consider application mongo , node. can start mongo container with: docker run --name mymongodb -d mongo start express app with: docker run --express --link mymongodb:mongo -p 8080:3000 -d username/express here in such system access containers alias mongo . access mongo container express with: const dbhost = 'mongodb://mongo/mean-docker'; this concept can scaled per need number of containers. solve problem of changing ip. wiki

Change marker icon on click leaflet -

Image
original-markericon = leaflet/images/marker-icon-2x.png current-markericon = leaflet/images/map-marker.png i have many markers , want change marker icon of current clicked marker.if click again on marker change marker icon original marker , current marker current icon. i have label attached each marker. when click on current icon want change label of marker or remove label. how can achieve ? thank you. image marker visible original-markericon edit-1 l.icon.change = l.icon.default.extend({ options: { iconurl: 'leaflet/images/map-marker.png', iconsize: new l.point(150, 75), } }); var changeicon = new l.icon.change(); l.icon.original = l.icon.default.extend({ options: { iconurl: 'leaflet/images/marker-icon-2x.png',

How can I use an AirPcap and Wireshark in Windows 10? -

i installed airpcap nx driver on windows 10 pc , airpcap control panel , driver per se seem installed , detected correctly. however, when open wireshark version 2.2.4 (v2.2.4-0-gcc3dc1b) or wireshark, see interface named usbpcap, , followed instructions on here . however, need capture traffic protocol 802.11, , here, in column protocol, see usb, same in link mentioned. however, tried dongle in windows server 2012 , works perfectly. idea, please? wiki

jquery active menu issue for links -

hi use event check active menu in navigation window.addeventlistener("load",function(){ var mylinks = document.queryselectorall(".main-navigation-menu a"); for(var i=0; i<mylinks.length; i++) if(location.href==mylinks[i].href) mylinks[i].parentnode.classlist.add("active"); }); and work correct main links e.x mysite.com/users , mysite.com/settings ..., when go e.x mysite.com/users/add active menu disappear... idea how fix stay active menu class permalinks. thanks. wiki

java - Illegal data address exception in j2mod -

hello using j2mod serial connection modbus device , exception com.ghgande.j2mod.modbus.modbusslaveexception: illegal data address there me . below code. public static void main(string[] args) throws exception { serialconnection con = null; modbusserialtransaction trans = null; readmultipleregistersrequest req = null; readmultipleregistersresponse res = null; string portname= "com4"; //the name of serial port used int unitid = 1; //the unit identifier talking int ref = 41799; //the reference, start reading int count = 100; //the count of ir's read int repeat = 1; //a loop repeating transaction // modbuscoupler.createmodbuscoupler(null); modbuscoupler.getreference().setunitid(1); serialparameters params = new serialparameters(); params.setportname(portname); params.setbaudrate(19200); params.setdatabits(8); params.setparity("none"); params.setstopbits(1); params.setencoding(modbus.seri

wpf - can I use MVP with MVVM -

i got source-code , trying understand using documentation. in documentation, says code has used both mvp , mvvm in combination make project. can answer these following questions of mine:- what point of using 2 design pattern in single project(both mvp , mvvm) ? how can simple know looking @ source code if made using mvp,mvc or other design pattern? can tell me ....what layers in design pattern? how many minimum layers gonna use make project in design pattern? , benefit of having many layers possible? what difference between java logic , android logic? coz we're separating apart java android logic better testing environment using design pattern. give example. if code using mvc see following: models: models contain data information. not call or use controller , view. contains business logic , ways represent data. of data, in form, may displayed in view. can contain logic retrieve data source. controller: acts connection between view , model. view calls

javascript - Upload file to Firebase Storage using AngularFire2 -

i working on project angular2 , firebase , willing upload images firebase storage. so, created component contructor , function, and, then, template. not sure whether way declare variable firebaseapp, public firebaseapp: firebaseapp; correct. so, in component, have: import { component, oninit, inject, input } '@angular/core'; import {angularfiredatabase, firebaselistobservable} 'angularfire2/database'; import { mddialog, mddialogref, md_dialog_data, mdbutton } '@angular/material'; import { http, headers, response } '@angular/http'; import {observable} 'rxjs/rx'; import { formbuilder, formgroup } '@angular/forms'; import { firebaseapp } 'angularfire2'; import 'firebase/storage'; @component({ selector: 'individual-chat', templateurl: './chat.component.html', styleurls: ['./chat.component.css'] }) export class individualchat implements oninit { public firebaseapp: firebaseapp; c

React Native conditionally accepting props -

i making autocomplete component live search. these props: <autocompleteinput ref={autocomplete.tag} tag={autocomplete.tag} type={autocomplete.type} title={autocomplete.title} required={autocomplete.required} photorequired={autocomplete.photorequired} defaultvalue={autocomplete.defaultvalue} options={autocomplete.options} titlekey={autocomplete.titlekey} valuekey={autocomplete.valuekey} singleselection={false} maxsuggestionnumber={50} minimumcharacternumber={-2} /> singleselection, maxsuggestionnumber , minimumcharacternumber optional props. want give default values them , should check prop values. example; default value of mi

excel - Looping Through Filters and Saving as PDF -

i have excel file contains list of models , owners. have been trying filter owner (column j) , print out models own in pdf. however, when run code below presents me "run time error 1004 autofilter method or range failed" on line rngtofilter.autofilter field:=rngtofilter.column, criteria1:=filtercell.value as new vba user, unsure of coming from. identifying error appreciated! sub filtermacro() dim wb workbook dim ws worksheet set wb = activeworkbook set ws = sheets("consolidatedlist") ws.select dim filtercol string: filtercol = "j" 'the column containing data filter dim headerrow string: headerrow = "1" 'the row containing headers data 'this location file saved to. saves desktop. 'if necessary, change savepath desired location. make sure include ending \ dim savepath string: savepath = environ("userprofile") & "\desktop\" 'the range of cells filter looping through dim rngtofilter range: se

react navigation - Using redux-connected component as screen in StackNavigator -

i'm creating react native app using create-react-native-app , react-navigation , react-redux . i'm trying add redux-connected component screen nested stacknavigator (though nesting seems not make difference, doesn't work either way) , consistently getting error message saying route 'milkstash' should declare screen . when remove redux connection milkstash.js file, works fine. idea how working? app.js import react, { component } 'react'; import { stylesheet, text, view } 'react-native'; import { provider } 'react-redux'; import { createstore } 'redux'; import rootreducer './src/reducers'; import appwithnavigation './src/appwithnavigation'; export default () => ( <provider store = {createstore(rootreducer)}> <appwithnavigation /> </provider> ); appwithnavigation.js import react, { component } 'react'; import { connect } 'react-redux'; import { stylesheet, text

vector - How can I take an item from a Vec in Rust? -

what want method this: fn take<t>(vec: vec<t>, index: usize) -> option<t> however, can't find such method. missing something? or there reason unsafe / can't done correctly. edit: different question built in *safe* way move out of vec<t>? there goal remove method didn't panic on out of bounds access (that instead returned result.) here i'm looking method consumes vec, , returns 1 of elements. none of answers above question address question. edit 2: clarify further, i'm looking method consumes vec , returns 1 element, without overhead of restoring vec's invariants way remove , swap_remove do. you can write function this: fn take<t>(mut vec: vec<t>, index: usize) -> option<t> { if vec.get(index).is_none() { none } else { some(vec.swap_remove(index)) } } this guaranteed o(1). to mention solution using iterators: fn take<t>(vec: vec<t>, index: u

node.js - NodeJS pre-signed URLs for Secure S3 Downloads - Help w/simple spec -

looking review of flow can pinpoint signing calculation going wrong. the main issue in generating signing key , signature--the hashing of canonical request seems match reference here http://docs.aws.amazon.com/amazons3/latest/api/sigv4-query-string-auth.html the sha256hmac , getsignature functions this: function sha256hmac(key, string, encoding = 'hex') { return crypto.createhmac('sha256', key).update(string, 'utf8').digest(encoding); }; function getsignature(stringtosign, signingdates) { const datekey = sha256hmac('aws4' + s3_secret_key, signingdates.shortdate); const dateregionkey = sha256hmac(datekey, s3_region); const dateregionservicekey = sha256hmac(dateregionkey, s3_service); const signingkey = sha256hmac(dateregionservicekey, s3_request_type); const signature = sha256hmac(signingkey, stringtosign); return signature; } thanks looking! the fix: // remove default hex encoding fu

excel - How to avoid use of .Select and .Activate in creating a table? -

i’ve been told use of .select , .workbooks.activate not way write vba. code below tends work , there doesn’t seem real issues. activeworkbook not problem because of workbooks("fua.xlsm").activate. question then, alternative/approach? i’m sorry if waste of time or it’s stupid question, have heard using these methods not way in long run. worried not work or create problems in future. should noted without workbooks("fua.xlsm").activate code tends create errors gets confused workbook should select. in short, question is, how able avoid using select , .activate mitigate potential errors in future? code follows.. dim wb1 excel.workbook dim wb2 excel.workbook set wb2 = workbooks.open("c:\users\ha.csv") set wb1 = workbooks("fua") dim sht1 worksheet dim sht2 worksheet dim copyrange range set sht1 = wb1.sheets("sheet1") set sht2 = wb2.sheets("ha") wb1.sheets("sheet1") range("aa3&q

java - Spring Mongo Query, remove objects in collection matching list -

how can remove objects mongo collection, passing list of objects remove: using spring , mongo repository, below code: public void removedocuments(list<payloadlogs> listlogs){ string collectionname = mongotemplate.getcollectionname(logs.class); query removequery = query.query(criteria.where("typehash").in(listlogs)); // not removes documents. this.mongotemplate.findallandremove(removequery, payloadlogs.class, collectionname); } query log: db.getcollection('payloadlogs').find({ "creativehash": { "$in": [{ "creativehash": "21540209fa87504bbbb0dd173c41d742", "lastaccessedat": null, .... }] } }); i think helpful, add ids list , remove ids basicdbobject query = new basicdbobject(); list<integer> list = new arraylist<integer>(); list.add(10004); list.add(10005); query.put("_id", new basicdbobject("$in", list

ios - Many requests via Alamofire with request timeout -

i have case need send out many thousands of requests "at once" using normal foreach. naturally performing these requests takes time longer timeoutintervalforrequest . what observe first few requests succeed after timeout interval has experied requests that did not complete yet fail. pretty normal behavior i'm looking solution requests fail when timeout interval expires once request did start. from understanding when starting thousand requests few started , rest successively started once previous requests complete 1 after other. in other words want timeout interval start counting down not @ moment data task get's called resume() on moment started , send out. i don't want create actual chain, starting 1 request after another. slow down overall completion time of requests. should process in parallel not considered timeout when waiting longer timeout interval , not startet yet. how that? wiki

javascript - Is there a way to access Google Maps Placelists via an API? -

placelists user generated lists of places user can create starring location , adding list google providing place library place list map https://developers.google.com/maps/documentation/javascript/places wiki

codenameone - Codename One - all available BrowserComponent properties -

about browsercomponent properties, in api it's written so: public void setproperty(java.lang.string key, java.lang.object value) this method allows customizing properties of web view in various ways including platform specific settings. when property isn't supported specific platform ignored. where listed available properties, including platform specific settings? thank :-) there no official list. use method workaround platform specific issues , never compiled list of what's available. on android use reflection underlying browser implementation varies based on google in internal component. that's why can't document it, once we need support that. wiki

scala - sbt run fails whereas sbt package succeeds -

please have problem running chisel code. when sbt package, success. when sbt run, fails , following error: code error i suspected data not loaded correctly array not initialized or forgot initialize array, arrays initialised. so please question correct way load data in chisel? this did: val data = io.source.fromfile(args(0)).getlines().map(_.split(",").map(_.todouble)) .zipwithindex .map{ case(data, id) => (id.tolong, data)}.toarray where args array of strings defined such def main(args: array[string]): unit = {... looking forward responses thank you! looks exception when you're trying access args(0) (if that's on line 24 in main.scala). when sbt run you're not passing command line arguments main . add args after sbt run this: sbt run foo bar wiki

java - Change Tablayout image from Viewpager Swipe -

/* hello read im trying simple. im creating slide show. have view pager tablayout. tablayout going used indicator viewpager. problem setting background drawable selected tab within view pager. tried tab layout position , set background drawable thats not working well. posted code if need anymore information let me know. */ public class tutoralactivity extends appcompatactivity { private viewpager viewpager; private pageradapter pageradapter; private tablayout tablayout; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_tutoral); int images[] = { r.drawable.t1, r.drawable.t2, r.drawable.t3, r.drawable.t4 }; viewpager = (viewpager) findviewbyid(r.id.imageviewpager); tablayout = (tablayout) findviewbyid(r.

material design form validation in android without TextInputLayout -

it seems dumb question want validate edittext don't want use textinputlayout, want keep simple. error message should display below edittext according material guidelines.i don't want code, want hint how can achieve this. thank you wiki

javascript - Meteor with Chart js cannot read property ‘getContext’ of null only AFTER new document in collection? -

i have 2 selects set session vars , after 2nd selected, chart loaded. works fine until add new document collection serves key “index” of sorts in compiling of dataset. new document has 1 common field document generates dataset won’t render – field “season”. the charts not display collection directly, see there quite bit of data massaging going on (probably withstand improvements, that’s not issue). my issue after inserting new document common “season” field, other docs used in dataset same “season” field throw getcontext null error. other charts different “season” fields display fine… until insert document “season” field. if remove newly/recently inserted document, chart renders again fine. apologies data overload included below - dumbfounded here. fyi, thisweek.js:72 “redrawchart” function below: var ctx = document.getelementbyid("twchart").getcontext("2d"); error: thisweek.js:72 uncaught typeerror: cannot read property 'getcontext' of nu