Connect to your keydb server new-keydb-server-1
keydb-cli -h new-keydb-server-1| public function sil($tablo,$id){ | |
| $eski_resim=""; | |
| $query = $this->db->query("SELECT * FROM $tablo where id='$id'")->fetch(PDO::FETCH_ASSOC); | |
| if ($query){ | |
| $eski_resim=$query["resim"]; | |
| } | |
| unlink("../images/$tablo/$eski_resim"); | |
| $stmt = $this->db->prepare("DELETE FROM $tablo WHERE id = :id"); | |
| $stmt->bindParam(':id', $id, PDO::PARAM_INT); | |
| $sil =$stmt->execute(); |
| public function duzenle($sutun,$deger,$tablo,$resim,$dizin,$id,$en,$boy){ | |
| if($sutun!=""){ | |
| $tablo_degerleri=explode("--",$deger); | |
| $tablo_adlari=explode("--",$sutun); | |
| $tablo_degerleri_text=""; | |
| for($i=0;$i<count($tablo_adlari);$i++){ | |
| $tablo_degerleri_text=$tablo_adlari[$i]."=:".$tablo_adlari[$i].",".$tablo_degerleri_text; | |
| } | |
| }else{ | |
| $tablo_degerleri_text=""; |
| <?php | |
| public function ekle($sutun,$deger,$tablo,$resim,$dizin,$en,$boy){ | |
| if($sutun!=""){ | |
| $tablo_adlari=explode("--",$sutun); | |
| $tablo_degerleri=explode("--",$deger); | |
| $tablo_adlari_text=""; | |
| $tablo_degerleri_text=""; | |
| for($i=0;$i<count($tablo_adlari);$i++){ | |
| $tablo_adlari_text.=$tablo_adlari[$i].','; | |
| $tablo_degerleri_text.=":".$tablo_adlari[$i].","; |
| // [Noted in the comments below on 2023-10 - this script might not work very well anymore due to Elon ruining Twitter] | |
| // [Updated 2021-01-18 w/new selectors] | |
| // go to your account Likes page and run this in the console: | |
| function scrollToLoadMore() { | |
| // keep scrolling if twitter tries to stop loading more. | |
| // scroll up, then down to force infinite load. | |
| window.scrollTo(0, 0); | |
| setTimeout(function() { | |
| window.scrollBy(0, 9999999999); |
| DROP TABLE IF EXISTS `cities`; | |
| CREATE TABLE `cities` ( | |
| `id` int(2) NOT NULL, | |
| `title` varchar(255) NOT NULL, | |
| `lat` double(11,8) DEFAULT NULL, | |
| `lng` double(11,8) DEFAULT NULL, | |
| `northeast_lat` double(11,8) DEFAULT NULL, | |
| `northeast_lng` double(11,8) DEFAULT NULL, | |
| `southwest_lat` double(11,8) DEFAULT NULL, | |
| `southwest_lng` double(11,8) DEFAULT NULL, |
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |