Posts

sql - Conditional WHERE clause with CASE statement in Oracle -

i'm brand-new oracle world softball. in working ssrs report, i'm passing in string of states view. twist users pick selection state list called "[ no selection ]" ... (that part not doing , i'm stuck implementing things way) if choose no selection option, want return states default, otherwise return list of states in comma-separated list. this seems should easy i'm stuck. here code have far (just trying sample work) eyes have gone crossed trying going. could give me direction on 1 please? begin :statecode:='mo,fl,tx'; --:statecode:='[ no selection ]'; end; / select count(*) statecount, :statecode selectedval hcp_state vw (case when (:statecode = '') (1) when (:statecode != '') (vw.state_cd in (:statecode)) (else 0) end) ; you can write where clause as: where (case when (:statecode = '') (1) when (:statecode != '') , (vw.state_cd in (:statecode...

android - Alternate way to access multiple columns independently from a database? -

my application stores 3 items: "name", "email", "mobile" in database under same table. want access each of them independently display value under respective textviews. access them independently because if access them through 1 single function won't able display values currently, have write function each column information it. example "email" public string getuseremail(string mobile) { string[] columns = new string[] {user_email}; cursor c = maindatabase.query(reg_info_table, columns, user_mobile_number + "=" + mobile, null, null, null, null); string result = ""; int email = c.getcolumnindex(user_email); while(c.movetonext()) { result = result + c.getstring(email); } return result; } so, if need the "name", i'll have write function similar above it. now, if need access 50 such columns, i'll have make 50 such func...

javascript - Get elements that have not been added to the DOM -

if create new html element using document.createelement , not add dom, there way find it? method of document , seems logical might become property of document . example: (function(){ document.createelement("a"); })(); console.log(document.getelementsbytagname("a").length); // -> 0 i understand why above example doesn't work. there alternative? you're creating elements, without insterting them in dom. you need store them if want know how many are. var myelements = []: var elem = document.createelement("a"); myelements.push(elem); myelements.length; // use length needs

php - Function expects array to be string, convert? -

before downvoting can atleast write bothering you, jesus christ arogance i "warning: mysql_real_escape_string() expects parameter 1 string, array given in bla bla..." everytime following happens: if($_post['action'] == 'napadi') { $igralec_ime = $_session['username']; $igralec = array ( 'ime' => $igralec_ime, 'napad' => prikazi_stat('ofe',$igralec_ime), 'obramba' => prikazi_stat('def',$igralec_ime), 'curhp' => prikazi_stat('curhp',$igralec_ime) ); $monster_ime = $_post['monster']; $monster = array ( 'ime' => $monster_ime, 'napad' => prikazi_monster_stat('ofe',$monster_ime), 'obramba' => prikazi_monster_stat('de...

html - How to enable links if a parent element uses a fullscreen pseudo-element? -

my page looks this: <div.ui-page> <div.ui-content> <a href="foo.html"> </div> </div> on page, i'm setting fullscreen watermark so: /* watermark */ .ui-page:before { background: url("../img/foo.png") no-repeat center center; position: absolute; content: ""; top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; /* transparency */ opacity: .2; /* grayscale */ filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><fecolormatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); filter: gray; -webkit-filter: grayscale(100%) brightness(10%) contrast(100%); } which works fine. problem is, link no longer clickable. i tried moving ...

css - Equal line height with varying border width (border-box) -

Image
in simplified example have 4 circles, each varying border-width , trying maintain equal line height in each keep them horizontally aligned. however border width seems effect line height (despite being technically outside box?) is there anyway solve without manually adjusting each line-height? width: 50px; height: 50px; border-radius: 50px; border: 1px solid #1daeec; line-height: 50px; example: http://jsfiddle.net/vcj3g/ you can remove line-height, use display:table-cell instead, , add vertical-align:middle; stat class. jsfiddle example .stat { display: table-cell; width: 50px; height: 50px; border-radius: 50px; border: 1px solid #1daeec; text-align: center; margin: 10px; font-size: 16px; color: #1daeec; text-transform: uppercase; vertical-align:middle; }

difference between constructor and properties in C# -

i new programming, please explain me difference between constructor , property in context c#. since both used initialized class fields, & 1 choose in given situation . besides technical stuff, rule of thumb use constructor parameters mandatory things, properties optional things. you can ignore properties (hence optional), can't ignore constructor parameters (hence mandatory). for else, i'd recommend reading c# beginners book or tutorial ;-)