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
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 |
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
# 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. |
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
#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++) |
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 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] |
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 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; |
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
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); |
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
#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à |
NewerOlder