Posts

Showing posts from August, 2012

reactjs - Redux relation between component, container and mapDispatchToProps,mapDispatchToProps -

i read presentational , container components , smart , dumb components in react and concept : components “dumb” react components ; containers “smart” react components ; but did not mention mapdispatchtoprops , mapdispatchtoprops is means should state , action container , not use mapdispatchtoprops , mapdispatchtoprops in components??? or means can use mapdispatchtoprops not use mapdispatchtoprops in components??? i felt confused component, container concept a presentational component defines how things , shouldn't connected store. here example of presentational/dumb component: import react "react" import styles "./styles.css" const todolist = ({ todos, removetodo }) => ( <div classname={ styles.todolist }> { ... } </div> ) export default todolist a container defines how things work , shouldn't put dom markup or styles in kind of component. it's connected store , provides data presentatio...

apache spark - Number of executors in local mode and difference between client and cluster modes -

i have simple question spark configuration, in local mode, number of executors 1, there 1 working node? another question have difference between deploy modes client or cluster mode? documentation mention in client model, driver initiated outside cluster, can not statement.. if remember correctly, 1 executor in local mode, if not specify otherwise. the difference between client , cluster mode driver runs. in client mode runs on machine deploy job. in cluster mode, driver run on node in cluster. in client mode have easy acces whatever driver outputs stdout , stderr. go client mode if in doubt.

JMeter: do not measure the connection establishment by the first call -

i want automatically test web api service, measurement not correct because of connection establishment, takes long time, , want run short test. is possible make first sampler, because of , not include it's result summary? you can use different name first request want emit , exclude results (report). you can in setup thread group using 1 threads, way run @ start of test , real test can start.

browser - Behavior of Enter key when pressed in address bar with URL containing '#' -

i have link this: http://....../index?spid=1#tid=2&cmno=17 render index page , move window position top of comment no.17 (cmno=17). works normally. in other browser ie, firefox, when in page, , focus mouse on address bar press enter again without changing url, page not refresh. while in chrome, when same thing, page refreshed. normal behavior , difference between chrome vs ie, firefox? or it's website's source code problem? please me. lot. i asked chromium , answer: https://bugs.chromium.org/p/chromium/issues/detail?id=12952 intentional ui design.

Sharepoint 2007 workflow vs powershell script -

in sharepoint 2007 document list, have need have column expiry date, column indicator if expiry date has passed. i have spoken end user , having additional views show documents have expired not enough - want column show word "expired". i can achieve having workflow on item created event waits date less today. run workflow , work flow remain in "in progress" state until item expires (which 5 years) i can via powershell , run scheduled task every night iterate items in list , manually set column text if criteria met. my question best document list have on 100,000 documents. there impact on having workflows run 5 years.. , lots of them @ that? having ten thousand workflows paused , waiting 5 years bad idea . not put unnecessary load on workflow timer service, you'd run risk of ten thousand workflows entering error state if workflow timer service stops unexpectedly @ point within 5 years, force terminate , restart 10,000 workflows keep process g...

database - How to check if record is exist based on some Id in db using mule esb -

how check existing customerid in db using mule esb. inserting data customer table in db, in customerid unique. when insert data unable find existing customer id using mule flow. please suggest on this. getting data json format rest api. pass select query database connector . if there existing record getting value out of query or else returning empty . use choice router check emptiness. if result empty there no record exist. based on can proceed further. cheers!

mysql - Rails Joins Query on Multiple Association Search -

i have 2 models user , roles lets have 3 users "a", "b" , "c" , have 3 roles "x", "y", "z" , relation users has_many roles lets assume have role x, b have x , y , c have role x how should modify query b alone have both x , y role this query returns users either x or y user.joins(:roles).where("roles.name in (?)", ["x", "y"]) i think work on after implement below query, seeing code & implemented. user.joins("left join roles on roles.name = name").where(["name = 'x', 'y'"]) note: not tested

php - Laravel 5 Changing Database name in controller -

ers. need change database name specific controller. changed database.php 'sqlsrv' => [ 'driver' => 'sqlsrv', 'host' => env('db_host', 'loal'), 'database' => env('db_database', 'test1'), 'username' => env('db_username', ''), 'password' => env('db_password', ''), 'charset' => 'utf8', 'prefix' => '', ], 'sqlsrv2' => [ 'driver' => 'sqlsrv', 'host' => env('db_host', 'local'), 'database' => env('db_database', 'test2'), 'username' => env('db_username', ''), 'password' => env('db_password', ''), 'charset' => 'utf8', 'prefix...

user interface - Making subscreens on GUI using 'Processing' software -

i using processing software make gui work on raspberry pi. is there quick way make sub-screens, message box images, in software? i know not comparable qt framework, still! go the processing libraries page , check out gui section. the popular options g4p , controlp5 . might have try few , experiment working on raspberry pi.

php - Message: Class 'Illuminate\Database\Capsule\Manager' not found in Codeigniter3.1 -

i have try configuration codeigniter3.1 illuminate use orm got errors below. an uncaught exception encountered type: error message: class 'illuminate\database\capsule\manager' not found filename: /users/sopheak/documents/web/com/application/config/database.php line number: 10 this composer.json, { "name": "illuminate/database", "description": "the illuminate database package.", "license": "mit", "homepage": "https://laravel.com", "support": { "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, "keywords": ["laravel", "database", "sql", "orm"], "authors": [ { "name": "taylor otwell", "email": "taylor@laravel.com" } ], "require...

regex - java expression match -

i writing code replace expression follows scanner sc = new scanner(system.in); string str = sc.nextline(); str=str.replaceall("http\\s+", "url "); //used answer given system.out.println(str); i giving input icloud hits 20m users http://www.google.com/htputbfk via @cnet and want output english url english @cnet but getting icloud hits 20m users url @cnet . after want modify english url @cnet the modification changes parts of sentence not following special character(like #,%,@ etc.) english. if want replace web address, regex can simpler: http\\s+ and that's all! it scans http , non spaces can find. stops @ first space. to on safe side , avoid case of word starting http make regex bit longer , safer: 'http://\\s+'

python 3.x - Precision and F-score are ill-defined and being set to 0.0? -

a question running python 3.5 using ipython3 notebook. the main problem if add following codes marked in picture, following warning happend, how can fix issue? /usr/local/lib/python3.5/dist-packages/sklearn/metrics/classification.py:1074: undefinedmetricwarning: precision , f-score ill-defined , being set 0.0 in labels no predicted samples. 'precision', 'predicted', average, warn_for)

linux - Undefined reference when building libvpx -

i trying build libvpx static library, later used in ffmpeg build , having trouble. version of libvpx using 1.6.0. here's config: ./configure --prefix=/home/test/dev/build-x64/libvpx/ --enable-static --disable-shared --target=x86_64-linux-gcc and during make, there lots of errors being dumped on screen: [ld] test_libvpx test/add_noise_test.cc.o: in function `(anonymous namespace)::gtest_caddnoisetest_evalgenerator_()': add_noise_test.cc:(.text+0x342): undefined reference `vpx_plane_add_noise_c' test/add_noise_test.cc.o: in function `(anonymous namespace)::gtest_sse2addnoisetest_evalgenerator_()': add_noise_test.cc:(.text+0x492): undefined reference `vpx_plane_add_noise_sse2' test/add_noise_test.cc.o: in function `(anonymous namespace)::addnoisetest_checkcvsassembly_test::testbody()': add_noise_test.cc:(.text+0x2437): undefined reference `vpx_setup_noise' add_noise_test.cc:(.text+0x2448): undefined reference `vpx_calloc' add_noise_test.cc:(.t...

node.js - Accessing live video stream midway using websockets -

i using combination of fragmented mp4 , websockets stream live video stream web browser mse takes over. i have fragmented appropriate fmp4 format using ffmpeg , have checked data using mpeg4parser tool. utilising websocket server, incoming data broadcasted browser clients connected via websocket. works fine both playback , live streaming(using rtsp stream input). the problem facing occurs when client tries access stream midway, i.e, once ffmpeg stream has started. have saved init segment(ftyp + moov) elements in queue buffer in websocket server. queue buffer sends data each new client on connection. i believe data sent correctly since browser console not throw 'media source element not found' error. yet no video streamed when receives broadcasted moof/mdat pairs. so couple of questions answer are: 1) have observer each moof element contains sequence number in it's mfhd child element. have start 1 always, naturally not case video stream accessed midway? 2) p...

iphone - How to post an image to a LinkedIn account using Objective-C code on iOS? -

Image
i able post comment linkedin not able post image . code posting comment: nsurl *url = [nsurl urlwithstring:@"http://api.linkedin.com/v1/people/~/shares"]; oamutableurlrequest *request = [[oamutableurlrequest alloc] initwithurl:url consumer:self.consumer token:self.accesstoken callback:nil signatureprovider:nil]; nsstring *postedstr = self.textview.text; nsdictionary *update = [[nsdictionary alloc] initwithobjectsandkeys: [[nsdictionary alloc] initwithobjectsandkeys: @"anyone",@"code",nil], @"visibility", postedstr, @"comment", nil]; [request setvalue:@"application/json" forhttpheaderfield:@"content-type"]; nss...

Javascript regex in with special character in between -

hello can regex. string ((11a1:i19 + 11a1:k19 + 11a1:l19 + 11a1:i20 + 11a1:k20) - (11a1:n19 + 11a1:n20)) and regex /([0-9a-z])\w+:\w+([0-9-a-z])/g i want take 11a1:i19, 11a1:k19, etc.. , replace values string (1767+154+1123 - (151-17)) full code $f.each(function() { var formula = $(this).data("formula"); var formula = $f.data("formula"); formula.split(/([0-9a-z])\w+:\w+([0-9-a-z])/g) .foreach(function(el) { if (el) { var hy = el.split(':'); let v = $('[data-sheet="' + hy[0] + '"][data-cell="' + hy[1] + '"]').val(); formula = formula.replace(el, v); } }); console.log(formula) var result = eval(formula); $f.val(result) }); i believe want (not tested jquery) $f.each(function() { var formula = $(this).data("formula"); var formula = $f.data("formula"); formula...

when I got an instantiate object of IScroll, i found the constructor of that instantiate object point to Object rather than IScroll。Why? -

i learning original code of iscroll.js. , found question title.this code exceted[enter image description here][1] var myscroll = new iscroll('#wrapper', { mousewheel: true}); myscroll.constructor; // object myscroll.constructor === object; //true

Unzip Zip File Using JAVA ZipFile Class -

i trying unzip files using java , compiling without errors. when calling tool, , giving absolute destination path , source path of file e.g: source: d:\data\test.zip destination: d:\data\op\ i getting error acess denied (i have admin access of system) stack trace: extracting: test/new text document - copy (2).txt java.io.filenotfoundexception: d:\data\op (access denied) @ java.io.fileoutputstream.open(native method) @ java.io.fileoutputstream.(fileoutputstream.java:179) @ java.io.fileoutputstream.(fileoutputstream.java:70) below function calling, believe has destination may ot extracting absolute path temp folder cannot write. tried combination on destination not working form end.please guide me how can fix it. public void unzip(string zipfilepath, string destdir, string flname) throws exception { int buffer = 2048;//buffer size try { file dir = new file(destdir); // throw exception if output directory doesn't exist ...

angularjs - Angular UI Router root named view template change from child view -

setup using angular v1.5.8, , ui-router v0.3.1 . root view has several named sections (ive removed number of them brevity). looks this <section id="container"> <div id="main"> <div id="overlay"> <section id="overlay__content" ui-view="overlay"></section> </div> <div id="content"> <section id="content__content" ui-view="content"></section> </div> </div> </section> my state controller looks this $stateprovider .state('app',{ url: '/', abstract: true, views: { 'overlay': { templateurl: partialsurl + 'main.overlay.html', // <-- content below controller: 'overlaycontroller', controlleras: 'vm' } } }) .sta...

c# - How to get absolute URI of hyperlink in MS word using OpenXML SDK? -

a ms word file contains link local files (ms word, excel, visio ...), used openxml absolute uri of linking local files. filename. could give me advice? using (wordprocessingdocument document = wordprocessingdocument.open(docxfile, true)) { body body = document.maindocumentpart.document.body; //----------------------------------------------- documentformat.openxml.wordprocessing.hyperlink hlink = body.descendants<documentformat.openxml.wordprocessing.hyperlink>().firstordefault(); if (hlink != null) { // hyperlink's relation id (where path stores) string relationid = hlink.id; if (relationid != string.empty) { // current relation hyperlinkrelationship hr = document.maindocumentpart.hyperlinkrelationships.where(a => a.id == relationid).firstordefault(); if (hr != null) { string path = hr.uri.absolutepath; //exception } } } } ...

salesforce - To get the number of opportunities in an Account -

how count number of opportunities related account, total number of opportunities field on account should increment/decrement when opportunity created/deleted. how solve it, pl me sample code. actually, don't need write code if need count of opportunities related account. create “rollup/summary” field type on account. evaluate opportunity object, , run “count” operation. that’s it! upd: if need solve trigger looks this: trigger countopportunitiesonaccount on opportunity (after insert, after delete){ set<id> aid = new set<id>(); if(trigger.isinsert || trigger.isdelete || trigger.isundelete){ for(opportunity opp : trigger.new){ aid.add(opp.accountid); } updateaccounts(aid); } if(trigger.isdelete){ for(opportunity opp : trigger.old){ aid.add(opp.accountid); } updateaccounts(aid); } private void updateaccounts(set<id> accids){ list<accoun...

c# - Tasks and Binding works but every now and then I get an error out of the blue -

this learning application and i'm trying make simple animation using dispachtimer , image control. have 3 images jump through every 100 ms. works great after time passes error. i notice when decrease time interval garbage collector doesn't fire often. i'm new wpf , love wrap brain around whats happening. once again, animation work random amount of time. ** must create dependencysource on same thread dependencyobject. ** public class viewmodel : inotifypropertychanged { public event propertychangedeventhandler propertychanged; public void raisepropertychanged(string propertyname) { if (propertychanged != null) subscribed event { propertychanged(this, new propertychangedeventargs(propertyname)); } } private imagesource _imagesourceheader_image; public imagesource imagesourceheader_image { { return _imagesourceheader_image; } set { ...

python 2.6 - how to print same randomint after if/elif? -

i want randint printed same in if/elif statements each time executes without new integer returning. there way instead of having write code after while statement or fine? from random import * def randomchance(): return randint(1, 100) def randomknife(): return randint(1, 8) skins = ['blue', 'purple', 'pink', 'red'] knives = ['karambit', 'flip', 'bowie', 'butterfly', 'm9 bayonet', 'bayonet', 'daggers', 'falchion'] print 'welcome cs go case lottery' skin in skins: print "available", skin, knife in knives: print "available", knife, print '(blue = common, purple = uncommon, pink = rare, red = epic)' keys = 10 while keys >0: resp=raw_input("enter 'yes' open case: ") if (resp == str('yes') or resp == str('yes')): print 'opening case...' if (randomchance() >= 35): ...

java - SpringMVC response json not right for Boolean properties -

i use springmvc 4.2.5, , make rest controller, response not want. here it's detail. have entity named propertyentity , public class propertyentity implements serializable, cloneable { private static final long serialversionuid = -7032855749875735832l; private int id; private string propertyname; private boolean isenable; private boolean isdimension; private boolean ismetric; } and controller is: @controller @requestmapping("/api/v1/properties") public class propertycontroller { @requestmapping(method = requestmethod.get, produces = "application/json;charset=utf-8") @responsestatus(httpstatus.ok) public @responsebody list<propertyentity> getall() { return propertyservice.getall(); } } when request api, result is: [ { "id": 1, "propertyname": "money1", "isenable": true, "dimension": false, ...

How to sort a Scala List[Map[String, Any]] by an arbitrary number of keys in the Map? -

i have list[map[string, any]] represents results of query. the keys of map instance (or row) column names. each query different , result may contain different set of columns, compared other query. queries cannot predicted in advance, hence cannot use case classes represent result row. within results given query, columns appear in every row. the values largely int , double , string types. i need able sort results multiple columns, in both ascending , descending order. for example, in pseudocode / sql: order column1 asc, column2 desc, column3 asc i have 3 distinct problems: sort single column type (in map, opposed underlying type) any sort either direction chain multiple sort instructions together how can this? update i can part 1. , part 2. writing custom ordering[any]. don't yet know how chain sorts together.

php - How to show the value of the database to combobox? -

how show value of database combobox? i've tried this: http://pastebin.com/gzl4qaps $result = $koneksi->query( "select tb_sekolah.idsekolah, tb_sekolah.namasekolah, tb_sekolah.tb_kategori_sekolah_idkategori, tb_kategori_sekolah.namakategori, tb_uptd.namauptd, tb_sekolah.alamat, tb_sekolah.telp, tb_sekolah.katasandi, tb_sekolah.status tb_sekolah, tb_kategori_sekolah, tb_uptd tb_sekolah.tb_kategori_sekolah_idkategori = tb_kategori_sekolah.idkategori , tb_uptd.iduptd = tb_sekolah.tb_uptd_iduptd , idsekolah='$id'" ); while ($row = $result->fetch_array()){ <select name="id_kategori" size="1" class="form-control" required> <option label="-- pilih kategori --" ></option> <?php //looping kategori $result1 = $koneksi->query("select * tb_kategori_sekolah"); while ...

C++ RTTI in a Windows 64-bit VectoredExceptionHandler, MS Visual Studio 2015 -

i'm working on small windows exception handling engine trying gather maximum information system, including c++ exceptions rtti. in 32-bit vectoredexceptionhandler compiled msvs 2015, can obtain std::type_info pointer rtti of type being thrown. can found in ((_throwinfo*) exceptionpointers->exceptionrecord->exceptioninformation[2])->pcatchabletypearray->arrayofcatchabletypes[0] (see classic article of raymond chen , definitions ms's ehdata.h file , many others). method based on fetching pcatchabletypearray member of msvc built-in _throwinfo structure data built compiler. but in 64-bit environment, _throwinfo contains no direct rtti: unfortunately, pcatchabletypearray null. in disassembly window, see null before call _cxxthrowexception , main ms throw-handler. searched through number of articles concerning new 64-bit exception-handling mechanism used in msvc, there no information on rtti. maybe missed something. are there ways obtain std::type_info (or...

mongodb replicate-set with 3 servers but only 2 locations -

i have 3 x mongodb nodes configured 1 shard (1 x primary , 2 x secondary) have 2 data centers. if host 1 x node in datacentera , 2 x nodes in datacenterb , datacenterb down. can have anyway node in datacentera perform both read write instead of in read-only mode , once other nodes online clusters can retained? understand best practice have third location host each of node in 1 location if have 2 x locations available have way make option work? thanks lot. yes can removing node in data center replica set , starting standalone node. can add node once other servers in replica set up.

spring - Restrict access to Swager UI -

i have swagger ui working spring-boot. have stateless authentication setup spring rest api restricted based on roles every api path. however, not sure how can put <server_url>/swagger-ui.html behind basic authentication. update i have following websecurity configured via websecurityconfig @override protected void configure(httpsecurity httpsecurity) throws exception { httpsecurity .csrf().disable() .exceptionhandling().authenticationentrypoint(unauthorizedhandler).and() .sessionmanagement().sessioncreationpolicy(sessioncreationpolicy.stateless).and() .authorizerequests() .antmatchers("/sysadmin/**").hasrole("sysadmin") .antmatchers("/admin/**").hasrole("admin") .antmatchers("/siteadmin/**").hasrole("siteadmin") .antmatchers("/api/**").hasrole("user") .anyrequest().permitall(); ...

python - Parse hierarchical XML tags -

need parse hierarchical tags xml , tag's value in desired output input <doc> <pid id="231"> <label key="">electronics</label> <desc/> <cid id="122"> <label key="">tv</label> </cid> <desc/> <cid id="123"> <label key="">computers</label> <cid id="12433"> <label key="">lenovo</label> </cid> <desc/> <cid id="12434"> <label key="">ibm</label> <desc/> </cid> <cid id="12435"> <label key="">mac</label> </cid> <desc/> </cid> </pid> <pid id="7764"> <label key="...

twiml - Twilio: Dial out from conference -

i have incoming phone call waiting in conference. while waiting, our application looks appropriate rep based on business logic connect them too. if unable find rep, forward call general number. it's possible number dial voicemail. normally, dial out, , when phone picked connect call conference. issue workflow person in conference not hear call being dialed out, , presents challenges voicemails (i need inbound call know if leaving voicemail). how can either remove inbound caller conference , dial out generic number, or call out conference? i found here: https://twilio.radicalskills.com/projects/conference-calling-voice/3.html (under "modify live calls") using original call sid should able remove them , send new twiml instructions. whoopie! edit: asked expand on answer. here i'm doing: the caller waiting in conference, need "remove" them , dial out. using rest api send redirect original call sid of call put conference. the redirect url...

javascript - Why POST's requests don't parse? -

learn express , faced problem. after create module body-parser begin don't work. requests complited, data don't parsing. let express = require('express'); let bp = require('body-parser'); let dishrouter = require('./dishrouter'); let app = express(); let hostname = 'localhost'; let port = 8080; dishrouter.use(bp.json()); //don't work app.use('/dishes', dishrouter); app.use(express.static(__dirname + '/public')); app.listen(port, hostname, function(){ console.log(__dirname); console.log(`server has running @ http://${hostname}:${port}`); }); //my dishrouter module let express = require('express'); let router = express.router(); router.route('/') .all(function(req, res, next){ res.writehead(200, {'content-type': 'text/plain'}); next(); }) .get(function(req, res, next){ res.end('we dish you'); }) .post(funct...

spring - Spiring @Cacheable is not working -

i have added <cache:annotation-driven /> in spring applicationcontext.xml. also added <bean id="cachemanager" class="org.springframework.cache.support.simplecachemanager"> <property name="caches"> <set><bean class="org.springframework.cache.concurrent.concurrentmapcachefactorybean" name="executecachedmethod" /> </set></property></bean> added @cacheable before method make database call using jdbctemplate. whenever makes call method same parameter method executed , goes database. supposed me cached result. help? actually using in spring bean during startup. spring implementation @cacheable work after cacheinterceptor.aftersingletonsinstantiated() call made. in case using before that. so testing @autowired cacheinterceptor cacheinterceptor; just test cache while load if purposefully (not recommended) make call cacheinterceptor.aftersingleto...

python - Where (and what) can I find in local Google Chrome sql databses? -

Image
i'm trying work way through book "violent python", , i'm on chapter 3... exercise walks through writing python scripts grab firefox data locally stored sql dbs - cool stuff! want see if can same chrome. i've seen on websites should able find "urls" db, can't seem figure out is. i've found databases.db file, has tables "databases", "meta", , "sqlite_sequence". on right track here? want find things internet history, bookmarks, etc. thanks! if on windows you'll find sqlite db chrome history here: c:\users\%username%\appdata\local\google\chrome\user data\default\history on linux: /home/$user/.config/google-chrome/default/history on macos-x: /users/$user/library/application support/google/chrome/default/history for more information here: http://www.forensicswiki.org/wiki/google_chrome i advise use: http://sqlitebrowser.org/ through history file.

c# - How would I display an object that points to a list in a ListBox? -

Image
i have list of objects find way display information for, want know if using listbox. problem figuring out how have list of objects have multiple properties display, , 1 of them list inside object this: public class records { //i may want think adding way keep track of book number record part of //rather keeping book title. way can easier reference. public class records { public string title { get; set; } public string firstname { get; set; } public string lastname { get; set; } public list<int> pages { get; set; } public string person { get; set; } public string tag { get; set; } public int booknumber { get; set; } public string date { get; set; } private type _type; public type type { { return this._type; } set { this._type = value; grabdate(); } } } because of list of pages in records, how display using listbox? better use datagridview? here 2 methods try. may want refer this question...

apache spark - Custom transformer in Pyspark ML -

i'm trying write custom estimator fit pipeline using pyspark 1.6.0, try solution in how roll custom estimator in pyspark mllib it works on spark 2.0, when remove typeconverter parameter(which exists in spark 2.0) test spark 1.6.0, shows error: valueerror: param param(parent='undefined', name='centered_threshold', doc='centered_threshold') not belong normaldeviation_4dc98930f6cd0fd37ce6. i'm not allowed use spark 2.0 in production. how can change code make work on spark 1.6.0?

java - Subclass final static initialization prior to superclass class intialization? -

i couldn't find specific post referring specific case, i'd ask think yes/no question. here's jls §12.4.2 (java se 8), listing 6-7: [...] then, initialize static fields of c constant variables (§4.12.4, §8.3.2, §9.3.1). next, if c class rather interface, , superclass has not yet been initialized, let sc superclass [...] each s in list [ sc, si1, ..., sin ], recursively perform entire procedure s. if necessary, verify , prepare s first. [...] my question: mean final static variable of subclass initialized before static initialization of superclass (assuming final static initialized part of declaration)? the answer might so. key part constant word meaning. consider code class foo { public static final int foo_value = 1000; static { system.err.println("foo bar.bar_value=" + bar.bar_value); } } class bar extends foo { public static final int bar_value = 2000; static { system.err.print...

android - Fixed button at the bottom of the view -

Image
i trying have button (or buttons) @ bottom of view, , else in scrollview. whatever do, still can't have button fixed @ bottom (the yellow rectangle @ bottom of pic), don't understand why. here's code: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/themeoverlay.appcompat.dark.actionbar"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width=...