Posts

jquery - unable to fix undefined index in my php page -

i trying access token html page having input element having token when run page on server (wamp) in windows 7. getting error undefined index on "api_key" . how fix ? php code: <?php $cname=$_post['api_key']; if($cname=="to-do") { $api_key=$_post['api_key']; $file1="i have url here not mentioning valid reason".$api_key; $data = file_get_contents($file1); $json_o=json_decode($data); echo "<pre>"; print_r($json_o); echo "</pre>"; } ?> //html page: //script within head <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js "></script> <script type="text/javascript"> $(document).ready(function() { $("#postjson").click(function(event){ $.post( "get_task_by_column.php",{hidden:$('#api_key').val()}, function(data) { ...

c# - LINQ Sorting, Titles grouped by Author -

so currently, have program sorts list of books & authors. right now, outputting authors grouped title, meaning prints author's name & books he/she wrote. i'm trying reverse & have output book, & authors wrote book. appreciated. // authors , titles of each book // co-authored; group author var titlesbyauthor = author in dbcontext.authors orderby author.lastname, author.firstname select new { name = author.firstname + " " + author.lastname, titles = book in author.titles orderby book.title1 select book.title1 }; outputtextbox.appendtext("\r\n\r\ntitles grouped author:"); // display titles written each author, grouped author foreach (var author in titlesbyauthor) { //display author's name outputtextbox.appendtext("\r\...

Grails clean leaves java process -

i using grails 2.3.5, think might bug in version of grails. whenever execute clean command sts have grails suite installed leaves java.exe background task. i know grails clean jvm process should terminated when when grails clean finishes cleaning stays there forever instead wasting ~250 mb memory. before executing clean no of java processes : 1 (ie sts) after executing clean no of java processes : 2 (sts , clean) and whenever kill process, stays same. testes oss: win8 (jvm7) ubuntu13.10 (jvm7) in grails 2.3 there addition of forked execution , there option use daemon start time of grails. if comment out of forked mode config may fix issue.

android - Listfragment crashes when tab selected and gives errors -

when run app runs until select third tab consist listfragment made displays listview data , image, once selected app gives normal message unfortunately app stopped working , logcat sends lot of red errors. 03-06 01:44:23.200: d/dalvikvm(879): gc_for_alloc freed 99k, 6% free 3113k/3280k, paused 57ms, total 59ms 03-06 01:44:23.410: d/dalvikvm(879): gc_for_alloc freed 20k, 5% free 3143k/3280k, paused 20ms, total 21ms 03-06 01:44:23.410: i/dalvikvm-heap(879): grow heap (frag case) 3.811mb 709972-byte allocation 03-06 01:44:23.450: d/dalvikvm(879): gc_for_alloc freed <1k, 4% free 3836k/3976k, paused 33ms, total 33ms 03-06 01:44:23.530: d/(879): hostconnection::get() new host connection established 0xb7a51a38, tid 879 03-06 01:44:23.690: w/egl_emulation(879): eglsurfaceattrib not implemented 03-06 01:44:23.700: d/openglrenderer(879): enabling debug mode 0 03-06 01:44:35.760: d/androidruntime(879): shutting down vm 03-06 01:44:35.760: w/dalvikvm(879): threadid=1: thread exiting uncau...

ruby on rails - Twilio post to url with params[:text_response] and params[:phone_number] -

i using ruby 2.0.0 , rails 4.0. i sending text message out via rails app end user. when respond, want redirect them api call: www.myapp.com/api/verify_text_response within api call, want see text message sent end user url is. ideally, receive param of " text_response " wanted with. how can redirect reply end_user above url, , capture phone number came message sent me in params? if isn't possible, how can use twiml similar? end goal for it's worth, i'm trying accomplish: i send text message out - " would subscribe? " the end user responds " yes " or " no ". i change subscribed attribute on subscription model true or false. i send text message saying either " you subscribed. " or " you not subscribed. ". item's #3 , #4 based on user responding "yes" or "no" in item #2. the twilio guide here ruby useful documentation out there. recommend using twilio gem i...

linux - Cannot connect to Azure Ubuntu VM - Public Key Denied -

we have been using ubuntu vm's on azure time , had problems. however, 1 of vms has gone bonkers lately. out of blue, ubuntu vm starts rejecting public key - ssh -i ~/azure.key abc@xyz.cloudapp.net permission denied (publickey). verbose gives me more confusing signs - ~$ ssh -i -v -v -v ~/azure.key abc@xyz.cloudapp.net warning: identity file -v not accessible: no such file or directory. openssh_5.9p1 debian-5ubuntu1.1, openssl 1.0.1 14 mar 2012 debug1: reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: applying options * debug2: ssh_connect: needpriv 0 ssh: not resolve hostname /home/abc/azure.key: name or service not known wondering if saw problem or can suggest ideas/solutions? how following? $ ssh -i ~/azure.key -v -v -v abc@xyz.cloudapp.net

git - Can not access via ssh and view layout without css -

Image
i set gitlab in company lan, now, can access gitlab server http://dqa-test but when ran sudo -u git -h bundle exec rake gitlab:check rails_env=production i got check gitlab api access: failed. code: 404 i've change `host:` dqa-test, dqa-test/ , `http://` or not but after above tries, still got same error running self-check i can clone project via http , no way in ssh git clone git@dqa-test:vvtk_dqa_automation_team/sandbox.git cloning 'sandbox'... access denied. fatal: not read remote repository. please make sure have correct access rights , repository exists. my gitlab.yml ## gitlab settings gitlab: ## web server settings (note: host fqdn, not include http://) host: "http://dqa-test" port: 1987 https: false i have no idea why don't have correct layout it doesn't work when ran sudo -u git -h bundle exec rake assets:clean assets:precompile cache:clear rails_env=production i found source code of html page wei...