Posts

css - Android version 4.3 and higher backround picture is not displaying -

Image
i use android studio 2.0. put background picture background 4.3 , higher versions not displaying picture. white background. less versions display background picture. background picture placed @ drawable folder. picture 1280х1768 png . how make display background picture @ versions of android? mistake? please give me advices. thank much. here xml of layout activity <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/linearlayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:orientation="vertical" android:background="@drawable/background"> <button android:id="@+id/button1" android:text="Мундарижа" android:textcolor="#ffffff" android:textsize="15sp" android:layout_width="170dp" ...

api - abraham/twitteroauth reply to a perticular tweet in PHP -

hi totally new here , title says .. want reply tweet using abraham/twitteroauth library twitter .. update twitte working fine unable reply thing . doing .. $status = $connection->post('statuses/update', array("status" => $dataa, "in_reply_to_status_id" =>$id)); twitteroauth_row('statuses/update', $status, $connection->http_code, $parameters); this code updates account value in $dataa variable not reply tweet defined in $id please . sorry bad english .this first post. yap . there mistake side while updating post .. after reading api document .. found without @username sign perticular user won't appear in reply section ..

c# - how to Radio button into hyperlink (Asp.net mvc) -

according culture language change. i'm using radio button,it works fine using razor syntax. here code snippet:- { var culture = system.threading.thread.currentthread.currentuiculture.name.tolowerinvariant(); } @helper selected(string c, string culture) { if (c == culture) { @:click="click" } } @using (html.beginform("setculture", "home")) { <fieldset> <div class="control-group"> <div class="controls"> <label for="en-us"> <input name="culture" id="en-us" value="en-us" type="radio" @selected("en-us", culture) /> english | <input name="culture" id="ar" value="ar" type="radio" @selected("ar", culture) /> arabic ...

Spring Boot URL mapping for static HTML -

my spring boot appliation consist of 2 main "modules": a "web" module consists of static html pages, available public (unauthenticated/anonymouse users); and an "app" module consists of number of dynamic pages, each of require (spring security-based) authentication access the basic app structure is: index.html : homepage, mapped http://localhost:8080/ about.html : page, mapped http://localhost:8080/about contact.html : contact page, mapped http://localhost:8080/contact login.html : login page, mapped http://localhost:8080/login dashboard.html : dashboard/landing page after logging in, mapped http://localhost:8080/account all other pages under http://localhost:8080/account/* mvc/dynamic pages typical @requestmapping mappings what not clear me is, static ("public web") html pages, i: just use standard controller-based @requestmappings render thymeleaf/handlebars template (which has no data model since content static)? or...

twilio - Send SMS from Google Sheet -

i got script send sms rows in google sheet using twilio example . i want send sms acknowledgement customers below google sheet https://docs.google.com/spreadsheets/d/1jpka0wn8cq6j6be8ks5vf-jj50ykdcumietrwjai7kw/edit?usp=sharing i want sms go once customers whom status not starting "sent" , phone number starting "+91" the sms this complaint no "ser 160530" registered on "16/5/16" customer "tneb" due "ct failed". please call 18004257865 details the message made of text , value cells in particular row "status" column must updated "sent sms xxxxxxxx on xxxx @ xx:xx:xx:xx" possible run script every 1 hour automatically? there free alternative send sms google sheet? to execute script every hour can set time driven trigger. here documentation setting trigger. here workaround sending texts out of google sheet free, might not work specific need, option: every mobile phone carrier offers...

mysql - Returning a default value in SQL when no rows found -

how can change sql return default value if no rows found? eg: select text,name text_file text='met' if no rows found, text contain 'values not found' example one method uses union all : select text, name text_file text = 'met' union select max('values not found'), null text_file text = 'met' having count(*) = 0; notes. second subquery aggregation query. returns 1 row (without having ). row has looking for. second, type of operation should done in application , not database. third, if expecting 1 row, can use aggregation query such as: select (case when count(*) > 0 text else 'values not found' end) text, (case when count(*) > 0 name end) name text_file text = 'met'

algorithm - Algorithmic complexity of o(n) -

i started playing algorithms this princeton course , observed following pattern o(n) double max = a[0]; (int = 1; < n; i++) if (a[i] > max) max = a[i]; o(n^2) for (int = 0; < n; i++) (int j = i+1; j < n; j++) if (a[i] + a[j] == 0) cnt++; o(n^3) for (int = 0; < n; i++) (int j = i+1; j < n; j++) (int k = j+1; k < n; k++) if (a[i] + a[j] + a[k] == 0) cnt++; the common pattern here nesting in loop grows exponent increases. safe assume if have 20-for loops complexity 0(n^20)? ps: note 20 random number picked, , yes if nest 20 loops in code there wrong you. it depends on loops do. example, if change end of 2nd loop 3 iterations this: for (int = 0; < n; i++) (int j = i; j < i+3; j++) if (a[i] + a[j] == 0) cnt++; we o(n) the key whether number of iterations in loop related n , increases linearly n does. here example 2nd loop goes n ^ 2: for (i...

sql server - When I try to save data from table to another by datagridview -

Image
i have datagridview read data (t1) , want save data table (t2) procedure create procedure [dbo].[saving_tasks] @task1 nvarchar(50), @task2 nvarchar(50), @task3 nvarchar(50) begin insert t2 (task1, task2, task3) values (@task1, @task2, @task3) end and using code saving data (t1. col1) checked rows (t2.task1 , t2.task2 , t2.task3) dim comm new sqlcommand comm.connection = sqlconn comm.commandtext = "saving_task" comm.commandtype = commandtype.storedprocedure dim integer = 0 dgv1.rows.count - 1 if dgv1.rows(i).cells(0).value = true comm.parameters.addwithvalue("task1", dgv1.rows(i).cells(1).value) comm.parameters.addwithvalue("task2", dgv1.rows(i).cells(1).value) comm.parameters.addwithvalue("task3", dgv1.rows(i).cells(1).value) 'else' end if next sqlconn.open() comm.executenonquery() sqlconn.close() en...

java 8 - Return method reference -

i playing around in java 8. how can return method reference? i able return lambda not method reference. my attempts: public supplier<?> foreachchild(){ return new arraylist<?>::foreach; } or public function<?> foreachchild(){ return new arraylist<?>::foreach; } you have small mis-understanding of how method-references work. first of all, cannot new method-reference. then, let's reason through want do. want method foreachchild able return accept list , consumer . list on object invoke foreach on, , consumer action perform on each element of list. that, can use biconsumer : represents operation taking 2 parameters , returning no results: first parameter list , second parameter consumer. as such, following work: public <t> biconsumer<list<t>, consumer<? super t>> foreachchild() { return list::foreach; } this type of method-reference called "reference instance method of arbitrary ...

ios - Specify Constraints for two UIViews in percentage -

Image
following image shows design 2 uiview. 1 in green should 20% , yellow should 80%, in land scape or portrait. i missing on constraint or content hugging change, trying fix. note: content hugging , compression priority has default values. you don't want have fixed height of 212 top view. want 20% of it's super view. you should delete top view's height constraint of 212. select both top view , super view. add equal height constraint. double click on constraint , open it's size inspector. change multiplier 0.2

php - Unable to decode decrypted string returning null -

after decrypting string using private key, using echo returns value. when try base64_decode returning null. needed value base64_decode. openssl_private_decrypt(base64_decode($_post['data']), $data, $privatekey, openssl_no_padding); echo $data; // returning value --> k/hgb3uqz1klyehlj2jhcg5fsoy+gowif4bich195ll7znf9sqbgg/1mkiupk4scflt2e0xiwxzanggrni2yeg== echo base64_decode($data); // returning null base64 decoding string: k/hgb3uqz1klyehlj2jhcg5fsoy+gowif4bich195ll7znf9sqbgg/1mkiupk4scflt2e0xiwxzanggrni2yeg== the decoded base64, binary data not string: 93f1e0077b90675925c9e1e52768e1706e5f48ecbe1a8c081786e2721d7de6597bccd17db106e083fd4c92252993849c1654f67b45c8c17cc034682b362db212 in general binary data can not represented in printable characters , in cases can not represented in character set.