Posts

Android: clicking issue of overlapping imageViews with transparent background -

i have 2 clickable imageviews partially overlap each other, let's big 1 @ bottom base , small 1 on top right corner of it. sample view: this . black circle have problem getting big image's listener. the problem is, transparent area invisible still there, lead ontouch action not "accurate". e.g. clicking on overlapping area, small image transparent , big isn't, small image detected, want big image detected. using ontouchlistener catch colour make transparent areas not clickable won't neither. how can solve please? imageview big, small; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_seventh); big = (imageview) findviewbyid(r.id.imageviewbig); small = (imageview) findviewbyid(r.id.imageviewsmall); big.setontouchlistener(this); small.setontouchlistener(this); } @override public boolean ontouch(view v, motionevent event) { if (event.geta...

mysql - Advanced eloquent filtering with pivot table -

a challenge community! have map presents multiple stores. when user clicks on store should load relevant products . have 4 tables (see below). i able bring relevant products brand if user applied gender filter $gender using if(!is_null($gender)) $q->where($gender, '=', 1); .however, i able present correct products if user did not filter . the challenge a brand have products both men , women, placed in separate stores (or in same store). track have pivot table named brands_stores. in short - add $q->with(['products' => function ($q) use ($product_ids [gender(s) pivot table]){ $q->wherein('gender', [gender(s) pivot table]; } to existing query below. query // stores $query = store::with(['brandsunfiltered' => function ($q) use ($active, $gender, $product_ids){ if(!is_null($active)) $q->where('active', '=', 1); // active stores if(!is_null($gender)) $q->where($gender,...

javascript - simple play sound from soundcloud by clicking button -

trying stream sound on page soundcloud, said on api, unfortunately there's no sound when i'm click on button. otherwise, when "run" code here or on jsfiddle - works! must problem i'm trying run local disc? how can solve it? sc.initialize({ client_id: '53902af7a344bb0351898c47bc3d786f' }); $("#stream").on("click", function(){ sc.stream("/tracks/49712607", function(sound){ sound.play(); }); }); <!doctype html> <html> <head> <title>music</title> <meta charset="windows-1251"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="http://connect.soundcloud.com/sdk-2.0.0.js"></script> <script src="script.js"></script> </head> <body> <div id='player'>player <...

node.js - How to get data from mongodb using _id.$oid object? -

i trying find objects logged-in user id. function getitems(req, res) { var userid = json.stringify(req.user._id); items.find({user_id: userid}, function(err, items) { if (err) { res.send(err) } else { res.json(items); } }); } // logged-in user app.get('/useritems', isloggedin, function(req, res) { getitems(req, res); }); user json data looks like: "_id": { $oid": "55c772bce97e9a500b3754ae" } item object such: { "_id": { "$oid": "55d086a182377f840844ee78" }, "user_id": "55c772bce97e9a500b3754ae", itemspecs:[ //... ] } it returns empty array because userid doesn't match user_id guess. try set: var userid = '55c772bce97e9a500b3754ae'; it returns items userid. var userid = json.stringify(req.user._id); console.log(typeof userid); // >> string so, userid...

intermittent SSL handshake error nginx -

since week or i'm having ssl problem on nginx server intermittently. i know there few other topics on problem on stackoverflow none of answers seem apply 1 real problem because when i'm working on site dies on me , gives me ssl error in chrome (version 44.0.2403.155): ssl connection error err_ssl_protocol_error and happens on ff well. 2 server isn't running out of memory (no sign of oom ran , top seems ok well) 3 no updates available either nginx (1.8.0) or openssl (openssl 1.0.1e 11 feb 2013) running on debian (7.8) 4 not have special 3rd party libraries installed (just standard nginx, mariadb, php via fpm setup no email server) my log has these entries: [crit] 15592#15592: *317414 ssl_do_handshake() failed (ssl: error:1408a0d7:ssl > routines:ssl3_get_client_hello:required cipher missing) while ssl handshaking, server has ntp installed make sure server time in sync (right?). when experience problem , give few minutes , reload page wo...

php - How to select equal values one time from table -

this question has answer here: mysql distinct on group_concat() 5 answers i have table structure this: |id | country | league | | 0 | germany | b1 | | 1 | germany | b2 | | 2 | italy | | how can germany once query? this: germany, italy. you can this: select distinct country some_table this give countries once. if want country names in single result, can use group_concat() : select group_concat(distinct country order country desc separator ',') country_list some_table

vb.net - How to read 'n' following tags after each selected node -

i'm trying each player stats following html table using vb .net , html agility pack (hap), don't know how select tags after each player row. <table class="stats" cellspacing="0"> <tr class="statsgreen"> <td colspan="10" class="estverdel">team a</td> <td colspan="2">reb</td> <td colspan="4">&nbsp;</td> <td colspan="2">blk</td> <td>&nbsp;</td> <td colspan="2">pf</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr class="statsgreen"> <td>num</td> <td>name</td> <td>min</td> <td>gs</td> <td>t2</td> <td>t2 %</td> <td>t3</td> <td>t3 %</td> <...