Search Results

Search found 24 results on 1 pages for 'babiker'.

Page 1/1 | 1 

  • Which coding style is more common?

    - by Babiker
    In no way shape or form am i advertising/promoting my programming style, but as far as 'multiple variable declarations' are concerned, which case is more acceptable professionally and commonly: case 1: private $databaseURL = "localhost" ; private $databaseUName = "root" ; private $databasePWord = "" ; private $databaseName = "AirAlliance"; case 2: private $databaseURL = "localhost"; private $databaseUName = "root"; private $databasePWord = ""; private $databaseName = "AirAlliance"; The reason i like case 1 is because i can skim though it and see that all is correct way faster than case 2. Also i can visually get familiar with variable names witch makes it faster to work with them l latter on the program.

    Read the article

  • CSS :hover not working

    - by Babiker
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <style type='text/css'> #body{ margin:0px; } #headerDiv{ background-color:#e0e2eb; } .header_innerHeaderDivs{ border:solid 1px gray; display:inline; font:normal 11px tahoma; color:black; } .header_innerHeaderDivs:hover{ padding:4px; } </style> </head> <body id='body'> <div id='headerDiv'> <div class='header_innerHeaderDivs'>Comapny</div> <div class='header_innerHeaderDivs'>Edit</div> <div class='header_innerHeaderDivs'>Inventory</div> <div class='header_innerHeaderDivs'>Logout</div> </div> </body> </html>

    Read the article

  • Envoking mouse capturing function onmousedown?

    - by Babiker
    I have the following: <html> <script type="text/javascript"> document.onmousemove = getCursorXY; function getCursorXY(e) { document.getElementById('cursorX').value = (window.Event) ? e.pageX : event.clientX + (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft); document.getElementById('cursorY').value = (window.Event) ? e.pageY : event.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); } </script> <body> <input id="cursorX" size="3"> <input id="cursorY" size="3"> <input type="button" id="button"> </body> </html> With this my mouse coordinates are displayed in the input fields when the page loads and whenever i move the mouse. How can i make this work only when i mousedown over #button and then stop at the last coordinates when i mouseup only over #button? using firefox 3.6.3 Thanks in advance :)

    Read the article

  • Using pointers in PHP.

    - by Babiker
    I ask this question because i learned that in programming and designing, you must have a good reason for decisions. I am php learner and i am at a crossroad here, i am using simple incrementation to try to get what im askin across. I am certainly not here to start a debate about the pros/cons of pointers but when it comes to php, which is the better programming practice: function increment(&$param) { $param++; } Or function increment($param){ return $param++; } $param = increment($param);

    Read the article

  • AJAX works fine in firefox, but malfunctions in Mozilla Prism 0.9

    - by Babiker
    I have the following ajax fucntion: function ajax(value, url, urlVarname, displayContainers_id){ if(value == ''){ document.getElementById(displayContainers_id).innerHTML=''; } /* THIS IS LINE 12*/ xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200){ document.getElementById(displayContainers_id).innerHTML=xmlhttp.responseText; } } xmlhttp.open('GET',url + '?varName=' + urlVarname + '&value=' + value, true); /* THIS IS LINE 25 */ xmlhttp.send(); } onmousedown="ajax(document.getElementById('searchParamater').value, 'http://192.168.0.7/controllers/search_controller.php', document.getElementById('searchBy').value, 'ajaxBucket')"> This whole thing works fine in firefox but when i use prism 0.9, it malfunctions and i get the following error in the errors console: Warning: assignment to undeclared variable xmlhttp Source File: http://192.168.0.7/javascript/main.js Line: 12 Error: uncaught exception: [Exception... "Not enough arguments [nsIXMLHttpRequest.send]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://192.168.0.7/javascript/main.js :: ajax :: line 25" data: no]

    Read the article

  • What is the proper way to credit public code snippets?

    - by Babiker
    This question might not be a programming problem, but its been bothering me. There is a lot of free js/css scripts out there for public use. I some times use these scripts. If any, what is the formal and proper way to credit these snippets when all i have is a name of a website and a url. I understand that a simple comment might get the job done but i wanted to know whether there is a more professional way.

    Read the article

  • Local web apps and W3C standards.

    - by Babiker
    If am writing a local app that will only run using a specific browser, am i setting my self up by slightly ignoring W3C's standards? I ask this question because in this app i am thinking of using custom HTML tags, custom attributes, etc... Thanks in advance guys.

    Read the article

  • Passing null as a param for replace() in javascript behaving weird?

    - by Babiker
    I have the follwing jQuery: $("#textArea").keyup(function(){ var textAreaValue = $("textArea"); if(!textArea.value.indexOf("some string")){ textArea.value = textArea.value.replace("some string",null); alert("It was there!"); } }); Is it normal for element.value.replace("some string",null); to replace "some string" with "null"as a string? And if normal can you please explain why? I have tested it with element.value.replace("some string",""), and that works fine, so what would be the difference between null and ""? Thanks in advance.

    Read the article

  • Displaying images in webpage without src URL

    - by Babiker
    Recently i learned that i can display images in a web page without referencing an image URL as follows : <img class="disclosure" img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oIGRQbOY8MjgMAAABVSURBVBjTfc6xDcAwCETRM0rt5nbA+49j70DDAqSLsGXyJQqkVxxwNOeMiEA+waW1VuT/inrvG7wikht8UETy2ygVMjO4O8YYTf6AqrZyUwYlygAAXo+QLmeF4c4uAAAAAElFTkSuQmCC"> I had another small bmp image that i wanted to display, so i opened it in vim and the img source looke like: When i paste this code where it needs to be pasted i only get "BM?" How to i convert/paste this code properly to be used as an image source?

    Read the article

  • Why should i learn C++.

    - by Babiker
    Everyone has been telling me to learn C++. Without bashing languages right and left, can someone please state some relevant reasons as to why I should learn C++ today? Note that in no way am I saying anything harsh about C++. I just want to know why I should master it as a programmer instead of the other powerful languages out there.

    Read the article

  • How is $sys_root bieng assigned a value?

    - by Babiker
    I have been learning php for sometime now. Besides reading books and doing tutorials i also like to sometimes read other programmers code. I have came across this: <?php // authentication. include_once($sys_root."/inc/authenticate_check.php"); I understand the use for $sys_root, but what i dont understand is, how is $sys_root bieng assigned a value. I have checked and made sure that $sys_root is not a special var of PHP's.

    Read the article

  • PHP sleep() excution sequence while echoeing.

    - by Babiker
    I have the following: echo time()."<br>"; sleep(1); echo time()."<br>"; sleep(1); echo time()."<br>"; I wrote the preceding code with intention to echo time()."<br>" ln 1,echo time()."<br>" ln 4, wait a final second and then echo the final time()."<br>". Altough the time bieng echoed is correct when it comes to the intervals between time(), all echo functions are echoeing after the total of the waiting period/parameters in each sleep function. This is how the script runs: Excutes. Waits 2 secons. echoes 1275540664 1275540665 1275540666 Notice the correct incrementation in time() being echoed. My question is why is it not behaving like expected to where it echoes, waits a second, echoes again, waits one final second and then echos the last parameter? I know my question is a little confusing due to my wording, but i will try my hardest to answer any comments regarding this, thanks.

    Read the article

  • What is wrong with selecting with my drop down element.

    - by Babiker
    <html> <head> <script type='text/javascript' language='javascript' src="http://localhost/javascript/jquery-1.4.2.js"> </script> <script type='text/javascript' language='javascript'> $(document).ready(function(){ $("#button").mousedown(function(){ dropDownMenu = $("#dropDownMenu"); alert(dropDownMenu.options[0].text); }); }); </script> </head> <body> <select id="dropDownMenu"><option>Test</option></select><br> <input id="button" type="button"> </body> </html>

    Read the article

1