Posts

javascript - How do I call a server side VB.net function from jquery in an asp.net form? -

i trying call method in server-side vb code jquery. import system.web.services ... 'my vb.net code <webmethod()> _ public shared function submitreport_click() 'this code go return nothing end function in javascript code alert being called submitreport_click not being called. <asp:scriptmanager id="scriptmanager1" runat="server" enablepagemethods="true"></asp:scriptmanager> <script type="text/javascript"> $("#<%= fileinput.clientid%>").on('filebatchselected', function (event) { alert("file input"); pagemethods.submitreport_click(); }) </script> i'd make function fires on click event , calls on web method using ajax, , use json pass relevant data. $(".clickme").click(dowebmethod); function dowebmethod () { var data = { 'name': 'jessikwa' , 'location...

ruby - Iterating through JSON data from external API in Rails -

i have function return_summoner_champion_list(name) return following json data when called [ { "id"=>"1", "name"=>"a" }, { "id"=>"2", "name"=>"b" }, , on... ] how iterate through json array , print out ids? i tried return_summoner_champion_list(name).each |list| puts list["id"] end but still returns same json data above without changes. i think you're looking array#collect not array#each : return_summoner_champion_list(name).collect{|l| l['id']} => [1,2, ...]

php - $_POST limitations in terms of number of fields -

my php version 5.4.16 i have form 2500 fields. sounds weird, have excel sheet. read sheet , display data in html table each cell has hidden field able post data , further. issue: $_post remains empty when post form 2500 fields. when delete fields or remove columns excel sheet results in less number of fields in $_post,then works fine. question: there limit in $_post number of fields being posted? its of these: max_input_nesting_level , max_input_vars , max_input_time , post_max_size increase them all, try like max_input_nesting_level = 9999 max_input_vars = 9999 max_input_time = -1 post_max_size = 9999m in php.ini

Route with out parameter works fine, but with parameter view is not working properly in Laravel 5 -

routes.php route::get('/viewprofile/{uid?}','usercontroller@viewprofile'); usercontroller.php public function viewprofile($uid){ if ($uid <> null) { $getuser = user::where('id','=',$uid)->first(); return view('user.profile')->with('getuser',$getuser); } } inbox.blade.php <a href="{{ url::to('viewprofile',[$msg->user->id]) }}"> {{$msg->user->username }} </a> when use route parameter profile.blade.php page design collapses, when use simple route route::get('/viewprofile','usercontroller@viewprofile'); it works fine. need help! in advance.

ios - iAd Banner takes up unnecessary space -

Image
i have table view iad banner @ bottom. when open page in app, iad expands take unneeded space. unsure of how rid of banner expansion wastes space in app. go storyboard , cant rap in iad , click height, make constraint height. way doesn't expand upwards.

c# - Better 64-bit byte array hash -

i need hash algorithm produces 64-bit hash code ( long ) fewer collisions string.gethashcode() , fast (no expensive calls cryptographic functions). here's implementation of fnv still shows 3% of collisions after testing 2 million random strings. need number way lower. void main() { const string chars = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz!#@$%^&*()_+}{\":?><,./;'[]0123456789\\"; const int n = 2000000; var random = new random(); var hashes = new hashset<long>(); int collisions = 0; for(int = 0; < n; i++) { var len = random.next(chars.length); var str = new char[len]; (int j = 0; j < len; j++) { str[j] = chars[random.next(chars.length)]; } var s = new string(str); if(!hashes.add(get64bithash( s ))) collisions++; } console.writeline("collision percentage after " + n + " random strings: " + ((doubl...

selenium webdriver - How to find xpath from javascript href -

the scenario need check default elements present on web page. trying check headers available on web table. able find headers except 1 name ip address / host name <div id="ctl00_contentplaceholder1_radgrid1_gridheader" class="rgheaderdiv" style="overflow: hidden;"> <table id="ctl00_contentplaceholder1_radgrid1_ctl00_header" class="rgmastertable rgclipcells rgclipcells" style="border-color:#6788be;border-width:1px;border-style:solid;width:100%;table-layout:fixed;overflow:hidden;empty-cells:show;"> <colgroup> <thead> <tr> <th class="rgheader rgsorted" style="font-weight:bold;font-style:normal;text-decoration:none;text-align:left;" scope="col"> <a href="javascript:__dopostback('ctl00$contentplaceholder1$radgrid1$ctl00$ctl02$ctl01$ctl05','')" title="click here sort" onclick="telerik.web.ui.grid.sort($find('ctl00_...