3
 bounty
3
answers
How to determine current EXE directory for a C# console application
6 years ago • support_man
I tried to determine current running directory of my C# console application using the following code: Assembly.GetExecutingAssembly().Location However that code returns path to assembly location. It may be different from the folder where EXE file is located. My console application parses logs with no parameters. I want to know the path to the logs/ folder inside of the current executable's folder. Please help!
Tags: , ,
0
 bounty
2
answers
JS loop producing no result
6 years ago • support_man
Trying to create an array with a loop and then sum all the contents of the array and put the result as the contents of a DIV but when I run the fiddle I get no result and jshint says everything is well formed. var begin = 500000; var stop = 999999; var arrInt = []; // Create an array worth summing var CreateArray = function (begin,stop) { while(begin < stop +1){ arrInt.push(begin++); } }; // Sum all ints in an array var I
0
 bounty
2
answers
Understanding parameters in an anonymous function (callback example)
6 years ago • support_man
There is an example in JavaScriptIsSexy for a simple callback that I'd like to understand a bit better: var friends = ["Mike", "Stacy", "Andy", "Rick"]; friends.forEach(function (eachName, index){ console.log(index + 1 + ". " + eachName); // 1. Mike, 2. Stacy, 3. Andy, 4. Rick​ }); In this case, how are the parameters eachName and index understood to mean the elements of the array (people's names as strings) and index numbers, respectively?
0
 bounty
2
answers
how to get the selected index of the asp:DropDownList control using javascript
6 years ago • support_man
I have an asp.net page, and I want to hide a div on the page when the index of the asp:DropDownList is 0 using javascript. I know how to hide the div but I do need help on how to get the selected index of the asp:DropDownLists using javascript. This is what I have in the javascript: function hideDiv() { var drpCampDock = document.getElementById('drpListCampaignDocketTemplate'); var drpCampType = document.getElementById('drpCamp
0
 bounty
0
answers
PHP Pagination Last id record
6 years ago • lampego1@qrid
I've the following Pagination code : $rec_limit = 3; /* Get total number of records */ $query = "SELECT count(id) FROM news"; $result = mysql_query($query); if(!$result) { die('Could not get data: ' . mysql_error()); } $row = mysql_fetch_array($result, MYSQL_NUM ); $rec_count = $row[0]; if( isset($_GET{'page'} ) ) { $page = $_GET{'page'} + 1; $offset = $rec_limit * $page ; } else { $page = 0; $offset = 0; } $left_rec = $rec_co
Tags: , ,
11 from 19