Posts

java - Can't conenct to a url -

i have link i'm providing 2 parameters , php server side script executing query , writing them databae. the problem in specific case, seems can't connect teh url. here button xml file: <button android:layout_width="match_parent" android:layout_height="wrap_content" android:includefontpadding="@+id/btnsubmit" android:text="@string/btnsubmit" android:onclick="submitnewj" /> here click "listener": public void submitnewj(view view){ new submitj().execute(); } and here submitj code: public class submitj extends asynctask<void, integer, void>{ @override protected void doinbackground(void... params) { try{ string encodedname = urlencoder.encode(name,"utf-8"); string encodedbody = urlencoder.encode(body,"utf-8"); url url = new url("http://site123.com/android/j/sj.php?name=...

vimeo api video search call does not work for utf-8 characters -

when use turkish characters ş ç ğ vimeo playground returns response. query İşletim request get /api/rest/v2?format=json&method=vimeo.videos.search&query=%c4%b0%c5%9fletim http/1.1 host: vimeo.com accept: */* response { "generated_in": "0.0121", "stat": "ok", "videos":{ "on_this_page": "0", "page": "1", "perpage": "50", "total": "0", "video":[ ] } } however, know there video has title İşletim

voip - Unable to store voicemail through odbc in asterisk -

i using asterisk 1.8 trying save voicemail details in database cli shows [apr 4 18:11:54] notice[6879][c-00000006]: chan_sip.c:25503 handle_request_invite: call '' (37.59.2.156:5071) extension '9900972597869877' rejected because extension not found in context 'default'. -- <dahdi/i1/9634434640-3> playing 'digits/4.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/7.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/5.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/9.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/5.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/0.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> playing 'digits/0.gsm' (language 'yes') -- <dahdi/i1/9634434640-3> play...

bots - JavaScript : detect and create a fake human click -

i'm developing robot click protection. of course, far perfect. layer of security main protection involves server side log analysis. have ideas how use javascript detect fake click fired using javascript? , also, how user simulate perfect, realistic , undetectable human click using javascript?

javascript - One input triggers Chrome validation, but another isn't -

i have 3 inputs across 2 pages, of want chrome validate (i.e. won't allow form submitted if doesn't contain valid email address). the input on this page (input a) validating fine, i'd same inputs on this page : 1 see when click options -> add/remove feeds or options -> edit account (input b) , 1 see when click 'get notified' (input c). this code input a, validating properly: <form role="form" class="form-inline" method="post"> <p>get notified when shopaholic launches</p> <input type="email" name="email" class="form-control input-lg" id="inputemail" placeholder="enter email"> <button type="submit" class="btn btn-primary btn-lg" data-dismiss="modal">notify me</button> </form> this code inputs b , c, aren't validating: <!-- modal containing input b --> <div class="m...

java - Unparsable Date with colon-separated timezone -

i'm trying parse string 2014-04-04t14:28:38+02:00 it should iso 8601 format. can't parse correct date. i've tried following: string example = "2014-04-04t14:28:38+02:00" public final static simpledateformat df = new simpledateformat("yyyy-mm-dd't'hh:mm:ssz") date tempdate = df.parse(example) but message "unparseable date" can not change example because it's value webservice. could there probleme "+02:00" instead of "+0200" ? thanks lot starting java7, handle +02:00, can use following format: "yyyy-mm-dd't'hh:mm:ssxxx" this can seen in simpledateformat documentation

c# - How to get all text from RichTextBox in WPF -

i need text wpf richtextbox. everyone ( how wpf rich textbox string , richtextbox (wpf) not have string property "text" , http://msdn.microsoft.com/en-us/library/ms754041(v=vs.110).aspx , many more) agrees code one: public static string gettext(richtextbox rtb) { textrange textrange = new textrange(rtb.document.contentstart, rtb.document.contentend); string text = textrange.text; return text; } but add trailling "\r\n". in simple case: <richtextbox x:name="mrichtextbox"> <flowdocument> <section> <paragraph> <run text="the dog brown. cat black."/> </paragraph> </section> </flowdocument> </richtextbox> i get: "the dog brown. cat black.\r\n" it can seen minor issue need exact text. do know why? is safe ignore 1 trailing "\r\n"? is code correct? is there other gotcha (i mean differences between real text ,...