Skip to content

Instantly share code, notes, and snippets.

import java.util.Scanner;
public class Program {
public static void main(String[] args) {
final int SAYI_ADET = 10;
int[] sayilar = new int[SAYI_ADET];
@irfanevrens
irfanevrens / kuyrukalama-ozellikli-kod-yapisi.js
Last active October 19, 2019 20:37
expressjs ile kuyruklama özellikli kod yapısı
const express = require('express')
const sleep = require('sleep')
const app = express()
const router = express.Router()
router.get('/', function (req, res) {
new Promise(function (resolve) {
@irfanevrens
irfanevrens / gist:7310a5d0cc02244936c8
Last active December 3, 2015 12:51
extending interfaces
<?php namespace SP\Deneme\Interfaces;

interface ArabaInterface
{
    public function calistir(MotorInterface $motor);
}
<?php
// comma seperated tag list
$tags = $_POST['tags'];
$contentId = $_POST['contentId'];
$tagIds = InsertTagsAndGetIds(explode(',', $tags));
foreach ($tagIds as $tagId) {
@irfanevrens
irfanevrens / html
Last active December 31, 2015 01:59
ödeme yöntemine göre indirim oranı uygulamak için, seçilen ödeme yöntemine göre indirimli fiyat üzerinde güncelleme yapar.
<input indirim_orani="5" rel="pay" type="radio" name="odeme_yontemi" value="cash" />cash
<input indirim_orani="3" rel="pay" type="radio" name="odeme_yontemi" value="credit" />credit
<input indirim_orani="0" rel="pay" type="radio" name="odeme_yontemi" value="bingbong" />bingbong
<hr />
Toplam fiyat: <span id="toplam_fiyat"></span><br />
İndirimli fiyat: <span id="indirimli_fiyat"></span>