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
using UnityEngine; | |
using UnityEngine.Networking; | |
using System.Collections; | |
[[Serializable] | |
public class TokenClassName | |
{ | |
public string access_token; | |
} |
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
static final int frequency = 44100; | |
static final int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO; | |
static final int audioEncoding = AudioFormat.ENCODING_PCM_16BIT; | |
boolean isPlaying; | |
int playBufSize; | |
Socket socket; | |
AudioTrack audioTrack; | |
playBufSize=AudioTrack.getMinBufferSize(frequency, channelConfiguration, audioEncoding); | |
audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, frequency, channelConfiguration, audioEncoding, playBufSize, AudioTrack.MODE_STREAM); |
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
#!/bin/bash | |
# Forked respin respun forked stolen and modified by Cptangry | |
# Tested w/ Fedora 28 Gnome | |
# Version 1.0.0 | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root type: sudo ./installscript" | |
exit 1 | |
else | |
#Update and Upgrade |
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
require 'minitest/autorun' | |
module Gigasecond | |
def self.from(time_object) | |
time_object + (10**9) | |
end | |
end | |
class GigasecondTest < Minitest::Test |
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
require 'minitest/autorun' | |
module Hamming | |
def self.compute(str1, str2) | |
if str1.length == str2.length | |
distance = str1.chars.zip(str2.chars).count { |l, r| l != r } | |
print "Hamming Distance for '#{str1}' & '#{str2}' : #{distance}", "\n" | |
distance | |
else | |
puts "ERROR! : The Hamming distance is only defined for sequences of equal length" |
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
MAP = -> (f, *coll) { mem = []; coll.each { |i| mem << [i].flatten.map(&f) }; mem } # Bir kolaksiyon yada değeri alıp bir fonksiyona geçer | |
ARR_GEN = -> (x, y, z) { Array.new(x) { rand(y..z) } } # Belirtilen değer aralıklarında Belirtilen uzunlukta bir dizi yaratır | |
INC = -> (x) { x + 1 } # Bir arttır | |
DEC = -> (x) { x - 1 } # Bir azalt | |
dizi1 = [3, 5, 8] | |
dizi2 = ARR_GEN.(5, 1, 5) |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 | |
# İLERİ SEVİYE DERSLER 1 :: ENUMARATORLER | |
ucgensel_sayilar = Enumerator.new do |y| | |
n = 0 | |
sayac = 1 | |
loop do | |
n += sayac |
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
# coding: utf-8 | |
require 'nokogiri' | |
require 'open-uri' | |
require 'yaml' | |
print "Bir Youtube Playlist Linki Girin: " unless ARGV[0] # İlk parametre boşsa yazdır | |
# Parametre verilmemişse kullanıcı playlist linki girecek | |
PLAYLIST = ARGV[0] || gets.chomp | |
SAYFA = Nokogiri::HTML(open(PLAYLIST).read) # SAYFA sabitine playlist linki çözümlenecek |
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
func Round(val float64, roundOn float64, places int ) (newVal float64) { | |
var round float64 | |
pow := math.Pow(10, float64(places)) | |
digit := pow * val | |
_, div := math.Modf(digit) |
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
package main //Çalıştrılacak her Go kaynak dosyasında yer almalıdır. | |
// Go Dilinde tek satırlık yorum/açıklama | |
import ( | |
"fmt" // Standart kütüphaneyi projemize dahil ettik | |
"io/ioutil" // Temel io işlemleri | |
"log" // log | |
"math" // Matematiksel işlem ve değer tanımlarını içeren kütüphaneyi içe aktardık | |
"net/http" | |
"os" // İşletim sistemi işlemleri |
NewerOlder