Skip to content

Instantly share code, notes, and snippets.

View iletai's full-sized avatar
🎯
=))

Tài Lê iletai

🎯
=))
View GitHub Profile
@iletai
iletai / FindStringVowelCountAppear.lua
Created August 1, 2018 00:37
Find Vowel Count Appear
t={} -- create an empty array
x="aeiou" -- list of vowels
i=io.write -- shorthand for outputing
x:gsub(".",function(c)t[c]=0 end)-- create a celle at 0 for each vowel
i("Enter string: ") -- output some boilerplate
z=io.read() -- take the input
s="Remaining characters: ".. -- save in s the concatenation of this string
z:gsub(".",function(c) -- and the result of gsubing on each character of the input
if x:find(c) -- if the current char is a vowel
then
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.4.1)
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
@iletai
iletai / inhinhvuong.cpp
Created May 10, 2018 12:16
In hình vuông kèm đường chéo
#include<iostream>
using namespace std;
int main()
{
int i,j,cd;
cout << "\n Nhap vao do dai hinh vuong :";
cin >> cd;
for (i=0;i<cd;i++)
{
for (j=0;j<cd;j++)
using Luxor
# drawing pi with circles, rather than drawing circles with pi
function perimeterize(s, n)
# center it
te = textextents(s)
move(-te[3]/2, te[4]/2)
textpath(s)
p = pathtopoly()[1]
@iletai
iletai / Textbox.cs
Last active March 21, 2018 02:48
Textbox.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@iletai
iletai / DownloadFileBlockGGDriver.js
Created February 21, 2018 16:25
DownloadFileBlockGGDriver.js
javascript:
function unicodeToChar(text) {
return text.replace(/\\u[\dA-F]{4}/gi,
function(match) {
return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16));
});
}
var bodyHTML = document.body.innerHTML;
var viewerng_link = bodyHTML.slice(bodyHTML.search('https://drive.google.com/viewerng/'), bodyHTML.search('application/pdf') - 6);
@iletai
iletai / tictactoe.cpp
Last active February 5, 2018 14:17
tictactoe.cpp
#include "iostream.h"
char board[3][3]; // Mảng 2 chiều lưu bàn cờ
int winner; // cho biết ai là người thắng, nếu bằng 1 là player 1, 2 là player 2, 0 là hòa
bool endGame; // nếu bằng true thì kết thúc game
// khởi tạo bàn cờ và một số dữ liệu khác trong game
void initBoard()
{
endGame = false; // đầu tiên thì ta đặt endGame là false vì lúc này mới bắt đầu game mà