Skip to content

Instantly share code, notes, and snippets.

View senocak's full-sized avatar
🎸
Working from home

Anıl senocak

🎸
Working from home
View GitHub Profile
@senocak
senocak / jira.java
Created September 26, 2024 10:30
Jira Java
/*
<dependency>
<groupId>com.dorkbox</groupId>
<artifactId>SystemTray</artifactId>
<version>3.14</version>
</dependency>
*/
import java.util.ArrayList;
import java.util.HashMap;
@senocak
senocak / express-array.js
Last active November 19, 2019 13:03
ExpressJS Restfull API - Part1
const express = require("express");
const app = express();
app.use(express.json())
const kullanicilar = [{
"id": 1,
"isim": "Lorem Ipsum",
"email": "lorem@ipsum.com",
"adres": "LA, USA",
"tarih": "1570706637487"
}];
@senocak
senocak / delete.php
Created August 23, 2017 07:33
PDO and verot.net class upload delete
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();
@senocak
senocak / update.php
Created August 23, 2017 07:26
PDO and verot.net class upload update
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="";
@senocak
senocak / insert.php
Created August 23, 2017 07:15
PDO and verot.net class upload insert Contribution settings
<?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].",";