Posts

android - RecyclerView - CardViews overlap each other when scrolling (How to add multiple rows to a single CardView?) -

the entire layout set - recyclerview contains several card views, , each cardview can have multiple rows of linearlayouts of exact type (but different data). everything works okay, except when scroll down or up, cards begins overlap on other cards randomly. here's code: public class myadapter extends recyclerview.adapter<myadapter.viewholder> implements view.onclicklistener{ context context; public myadapter(context context) { this.context = context; } @override public int getitemcount() { return 20; } @override public void onbindviewholder(viewholder holder, int position) { try { linearlayout.layoutparams contentparams = new linearlayout.layoutparams(100, 100); layoutinflater inflater = layoutinflater.from(context); linearlayout ll_parent = (linearlayout) inflater.inflate(r.layout.parent_linearlayout, null, false); networkimageview networkimageview = ...

java - Threading Stopwatches -

i trying create 4 stopwatches run concurrently. start when program begins. i want user able use q,w,e,r keys speed stopwatches (from left right following keyboard pattern). i've established pretty wont let press other key r key speed 4th clock. i want implement threading allow this. how go it? heres code: public class stopwatches extends application { @override public void start(stage primarystage) { time time1 = new time(); time time2 = new time(); time time3 = new time(); time time4 = new time(); text text1 = new text("00:00:00"); text text2 = new text("00:00:00"); text text3 = new text("00:00:00"); text text4 = new text("00:00:00"); text1.setfont(font.font("times", 35)); text2.setfont(font.font("times", 35)); text3.setfont(font.font("times", 35)); text4.setfont(font.font("times"...

linux - Compare md5 sums in bash script -

i'm trying use md5sum compare 2 files in bash script. the goal use .md5 of 1 file check md5sum of other file. google searches on how proper way isn't showing me how i'm doing this. firing off e-mail works you'd expect. i'm trying fire off e-mail on failure rather success. and maybe list result of received .md5 file , actual md5sum of corrupted file. i'll figure out, confusing since have tried figure out i'm going wrong here. shellcheck indicates code looks good, i'm not getting results i'm expecting get. a few stackoverflow links checked out see if worked: one two here's content of bash script, in original form: #!/bin/bash cd /home/example/public_html/exampledomain.com/billing/system/ || exit rm -rf geolitecity.dat curl -l https://geolite.maxmind.com/download/geoip/database/geolitecity.dat.gz | gunzip > geolitecity.dat curl -l https://geolite.maxmind.com/download/geoip/database/geolite2-city.mmdb.gz | gunzip > geoli...

css selectors - What #id.class css means? -

this question has answer here: how combine class , id in css selector? 9 answers i saw in css declaration this: #nav.js { display:none; } can explain means? html code following <ul id="nav"> <li><a href="#">home3</a></li> <li><a href="#">about</a></li> <li><a href="#">contact</a></li> </ul> #nav.js this selects element id set "nav" , has class containing "js" . for example, select of following elements: <figure id="nav" class="js"></figure> <figure id="nav" class="foo js"></figure> <figure id="nav" class="js bar"></figure> <figure id="nav" class="foo js bar"></fig...

c++ - Why does my destructor only crash my code after it's called by its parent destructor? -

Image
i have doubly threaded linked list made of winery elements, winery being class own data fields. problem having winery 's destructor: winery::~winery() { delete[] name; delete[] location; } i received "double free or corruption (out): 0x0000000000402940" error in linux, , received error in windows visual studio: so put breakpoint on winery 's destructor , found being called every time referenced winery object. strangely, time error thrown when winery 's destructor called because list 's destructor had been called, if winery had been called 2 or 3 times. know why code didn't crash second time winery 's destructor called when wasn't called parent destructor. as side note/question: able solve issue of memory leakage removing winery 's destructor , putting calls in parent destructor this: list::~list() { (node* next; headbyname; headbyname = next) { next = headbyname->nextbyname; delet...

installing android SDK on removable media -

what pros/cons of installing android sdk windows on removable media storage (sd cards)? will there massive performance hit? i'm in process of installing takes forever finish. i'm wondering if it's not going usable have sdk on sd card , cancel rightaway. thanks response

leiningen - Using exiftool java library from clojure -

i'm trying include exiftool java in leiningen based clojure project. library not available @ central, have included :repository tag in project.clj file. project.clj: (defproject clojure-mongo "0.1.0-snapshot" :description "fixme: write description" :url "http://example.com/fixme" :license {:name "eclipse public license" :url "http://www.eclipse.org/legal/epl-v10.html"} :repositories {"the buzz media maven repository" "http://maven.thebuzzmedia.com"} :dependencies [[org.clojure/clojure "1.7.0"] [com.novemberain/monger "3.0.1"] [com.thebuzzmedia/exiftool-lib "1.1"]]) exiftool java not provide checksum , site warns of this: "note: @ time not providing checksums files on our repository, see '[warning] checksum validation failed' messages maven, can safely ignored." sure enough, lein deps gives me erro...