This file contains 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
class GenNumber extends React.Component { | |
componentDidUpdate() { | |
let time, digit; | |
// increase showing time depend on level | |
digit = this.props.level.main + 2; | |
time = 100 * Math.min(digit, 5) + 400 * Math.max(digit-5, 0); | |
let number = document.getElementById('number'); | |
/*setTimeout(function() { | |
number.innerHTML = number.innerHTML.replace(/\w/gi, '·'); |
This file contains 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
""" | |
a: &a ["lol","lol","lol","lol","lol","lol","lol","lol","lol"] | |
b: &b [*a,*a,*a,*a,*a,*a,*a,*a,*a] | |
c: &c [*b,*b,*b,*b,*b,*b,*b,*b,*b] | |
d: &d [*c,*c,*c,*c,*c,*c,*c,*c,*c] | |
e: &e [*d,*d,*d,*d,*d,*d,*d,*d,*d] | |
f: &f [*e,*e,*e,*e,*e,*e,*e,*e,*e] | |
g: &g [*f,*f,*f,*f,*f,*f,*f,*f,*f] | |
h: &h [*g,*g,*g,*g,*g,*g,*g,*g,*g] | |
i: &i [*h,*h,*h,*h,*h,*h,*h,*h,*h] |
This file contains 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
$(document).ready(function(){ | |
$("#youtube").autocomplete({ | |
source: function(request, response){ | |
/* Google Developer ID (optional) */ | |
var apiKey = 'AI39si7ZLU83bKtKd4MrdzqcjTVI3DK9FvwJR6a4kB_SW_Dbuskit-mEYqskkSsFLxN5DiG1OBzdHzYfW0zXWjxirQKyxJfdkg'; | |
/* Search keyword */ | |
var query = request.term; | |
/* youtube sorgusu */ | |
$.ajax({ | |
url: "http://suggestqueries.google.com/complete/search?hl=en&ds=yt&client=youtube&hjson=t&cp=1&q="+query+"&key="+apiKey+"&format=5&alt=json&callback=?", |
This file contains 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
class Party | |
{ | |
public void Cost() | |
{ | |
Console.WriteLine("Detail: Party, Price: 200"); | |
} | |
} | |
class PartyWithAlcohol | |
{ |
This file contains 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
abstract class Thing | |
{ | |
private int price; | |
private string detail; | |
public int Price { get => price; set => price = value; } | |
public string Detail { get => detail; set => detail = value; } | |
public Thing(int price, string detail) | |
{ |
This file contains 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
Console.InputEncoding = Encoding.UTF8; | |
Console.OutputEncoding = Encoding.UTF8; | |
Uyen uyen = new Uyen("Uyên", "Em ăn cơm chưa", "Anh ăn cơm rồi"); | |
Console.WriteLine($"{uyen.name}, {uyen.say}, {uyen.response}"); |
This file contains 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
class Uyen : GirlFriend, ICloneable | |
{ | |
public Uyen(string name, string say, string response) : base(name, say, response) | |
{ | |
} | |
public object Clone() | |
{ | |
return this.MemberwiseClone(); | |
} |
This file contains 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
abstract class GirlFriend | |
{ | |
public string name { get; set; } | |
public string say { get; set; } | |
public string response { get; set; } | |
public GirlFriend(string name, string say, string response) | |
{ | |
this.name = name; | |
this.say = say; |
This file contains 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
public class Food | |
{ | |
private string name; | |
private int price; | |
private List<string> ingredient; | |
private int somethingMore; | |
//Builder Pattern | |
public string Name(string name) { this.name = name; return name; } | |
public int Price(int price) { this.price = price; return price; } |
This file contains 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
public class Food | |
{ | |
private string name; | |
private int price; | |
private List<string> ingredient; | |
//Constructor | |
public Food(string name, int price, List<string> ingredient) | |
{ | |
this.name = name; |
NewerOlder