This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //mysql sunucuya bağlanma ve veritabanı seçme | |
| //mysql | |
| mysql_connect('localhost','root','parola'); | |
| mysql_select_db('deneme'); | |
| //pdo | |
| $db = new PDO('mysql:host=localhost;dbname=deneme','root',parola); | |
| //sorgu | |
| $sqlUyeler = 'select * from uyeler where cins="2"'; |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DROP TABLE IF EXISTS `pk_il`; | |
| CREATE TABLE `pk_il` ( | |
| `il_id` int(2) NOT NULL COMMENT 'plaka kodu', | |
| `il_adi` varchar(255) NOT NULL, | |
| PRIMARY KEY (`il_id`), | |
| KEY `il_adi` (`il_adi`) USING BTREE | |
| ) ENGINE=MyISAM; | |
| -- ---------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String.prototype.turkishtoEnglish = function () { | |
| return this.replace('Ğ','g') | |
| .replace('Ü','u') | |
| .replace('Ş','s') | |
| .replace('I','i') | |
| .replace('İ','i') | |
| .replace('Ö','o') | |
| .replace('Ç','c') | |
| .replace('ğ','g') | |
| .replace('ü','u') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function g_debugging(_value, _value2, _value3, _value4) { | |
| if (_value == undefined) _value = ''; | |
| if (_value2 == undefined) _value2 = ''; | |
| if (_value3 == undefined) _value3 = ''; | |
| if (_value4 == undefined) _value4 = ''; | |
| if (host == 'dev') { | |
| return console.log('Debugging:=>' + _value, _value2, _value3, _value4); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const copyToClipboard = str => { | |
| const el = document.createElement('textarea'); | |
| el.value = str; | |
| el.setAttribute('readonly', ''); | |
| el.style.position = 'absolute'; | |
| el.style.left = '-9999px'; | |
| document.body.appendChild(el); | |
| const selected = | |
| document.getSelection().rangeCount > 0 | |
| ? document.getSelection().getRangeAt(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const once = fn => { | |
| let called = false; | |
| return function(...args) { | |
| if (called) return; | |
| called = true; | |
| return fn.apply(this, args); | |
| }; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const uniqueElements = arr => [...new Set(arr)]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const supportsTouchEvents = () => | |
| window && 'ontouchstart' in window; | |
| //EXAMPLES | |
| supportsTouchEvents(); // true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const setStyle = (el, rule, val) => (el.style[rule] = val); | |
| //ÖRNEKLER | |
| setStyle(document.querySelector('p'), 'font-size', '20px'); | |
| // The first <p> element on the page will have a font-size of 20px |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const detectDeviceType = () => | |
| /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( | |
| navigator.userAgent | |
| ) | |
| ? 'Mobile' | |
| : 'Desktop'; | |
| //ÖRNEKLER | |
| detectDeviceType(); // 'Mobile' or 'Desktop' |
OlderNewer