Singleton Example

http://www.jsaspecialists.com/?niomas=Working-from-home-opportunities-data-entry&f4d=f0 <?php class DatabaseConnection{ private $handle=null; private function __construct(){ $this->handle=”pp”; //create mysql connection here /* $this->handle=mysqi_connect(‘host’,’username’,’pass’,’dbname’); if(mysqli_connect_errno){ echo “error in connecting to mysql”. mysqli_connect_errno(); exit(); } */ } public static function get(){ static $db=null; if($db==null){ echo “class object initialize single time”;…

click here

source link Continue reading

enter

event.preventDefault() vs event.stopPropagation()

Scambia criptovalute, Forex e opzioni in Italia e Germania sulla piattaforma di trading pluripremiata quali sono le migliore società di opzioni binarieption. Depositi con Visa e MasterCard stopPropagation is used to make sure the event doesn’t bubble up the chain. eg. a click on a <td> tag would also fire click events on it’s parent <tr>, and then its parent <table>, etc. stopPropagation prevents this from happening.…

click Continue reading

Send Ajax request in Javascript

binäre optionen handeln vergleich var req = new XMLHttpRequest(); var url = “get_data.php”; var params = “lorem=ipsum&name=binny”; req.open(“POST”, url, true); //Send the proper header information along with the request req.setRequestHeader(“Content-type”, “application/x-www-form-urlencoded”); req.onreadystatechange = function() {//Call a function when the state changes. if(req.readyState == 4…

follow Continue reading

Javascript Promises

http://palaceestate.ro/?adsuf=sole-24-ore-opzioni-binarie <!doctype html> <html lang=”en”> <head> <meta charset=”utf-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1″> <title>Javascript Promis test</title> <script src=”https://code.jquery.com/jquery-1.12.4.js”></script> <script> function fillData(){ return new Promise(function(resolve,reject){ $.ajax( { type:’GET’, url:’https://reqres.in/api/users/2′, success: function(data){ resolve(data); }, error: function(err){ reject(err); } } ); }); } function fillData2(){…

see url Continue reading

Block all body evets except one

source link <html> <body class=”someClass”> <a href=”thanks.html”>test</a> <a href=”thanks.html” class=”clickable”>test</a> </body> </html> <script src=”https://code.jquery.com/jquery-1.12.4.js”></script> <script src=”https://code.jquery.com/ui/1.12.1/jquery-ui.js”></script> <script type=”text/javascript”> $(‘body’).click(function(e) { //with jquery if($(e.target).hasClass(‘clickable’)){ return; } e.preventDefault(); return; }); </script> PURE JS <html> <body class=”someClass” onclick=pp(event)> <a href=”thanks.html”>test</a> <a href=”thanks.html” class=”clickable”>test</a> </body> </html>…

kissing and christian dating Continue reading

Page 1 of 212