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
// access modifiers, accessors và constructors được bỏ qua cho ngắn gọn | |
class IceTeaVietDeveloper implements Parcelable { | |
String name; | |
int yearsOfExperience; | |
List skillSet; | |
float favoriteFloat; | |
IceTeaVietDeveloper(Parcel in) { | |
this.name = in.readString(); |
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
private void Form1_Load(object sender, EventArgs e) | |
{ | |
// Lấy file ảnh từ ổ cứng | |
// File ảnh phải có trong thư mục debug của solution | |
// Nếu không chương trình sẽ bị crash vì không tìm thấy file | |
// Có thể để đường dẫn tuyệt đối đến file ảnh | |
//(bao gồm cả ổ đĩa, thư mục,...) | |
Image image = Image.FromFile("BeigeMonitor1.png"); | |
// Thiết lập thuộc tính của PictureBox |
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
private void Form1_Load(object sender, EventArgs e) | |
{ | |
// Chèn ảnh từ ổ cứng trực tiếp bằng thuộc tính ImageLocation | |
// Thiết lập thuộc tính Size một cách tự động | |
pictureBox1.ImageLocation = "BeigeMonitor1.png"; | |
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; | |
} |
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
private void button1_Click(object sender, EventArgs e) | |
{ | |
// Show hộp thoại open file ra | |
// Nhận kết quả trả về qua biến kiểu DialogResult | |
DialogResult result = openFileDialog1.ShowDialog(); | |
//Kiểm tra xem người dùng đã chọn file chưa | |
if(result == DialogResult.OK) | |
{ | |
// Gán .... |
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
namespace Picture_Viewer | |
{ | |
public partial class Form1 : Form | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
// Cài đặt thuộc tính pictureBox | |
pictureBox1.ImageLocation = "http://1.bp.blogspot.com/-ZskeiTa6Rig/VZwjEuEQPqI/AAAAAAAAAM0/VK5Im7Cfu3s/s1600/cooltext125983511023412.png"; |
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
Network | |
- HTTPS vs HTTP | |
- HSTS | |
- HTTP/2 | |
- Session vs Cookie | |
- SSL | |
- SSH | |
- Symmetric vs Asymmetric | |
- RSA, RC4, MD5 | |
- AES, DES |
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
ADB | |
1- Go to your platform-tools folder in a command prompt | |
2- Enter the command adb devices to get the list of your devices | |
C:\Android\adt-bundle-windows-x86_64\sdk\platform-tools>adb devices | |
List of devices attached | |
emulator-xxxx device | |
3- Connect a shell to your device: | |
C:\Android\adt-bundle-windows-x86_64\sdk\platform-tools>adb -s emulator-xxxx shell | |
4a- You can bypass this step on rooted device |
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
{ | |
"project_info": { | |
"project_number": "", | |
"project_id": "" | |
}, | |
"client": [ | |
{ | |
"client_info": { | |
"mobilesdk_app_id": "1:123456789012:android:1234567890123456", | |
"android_client_info": { |
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
android { | |
buildTypes { | |
release { | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | |
} | |
debug { | |
testCoverageEnabled true | |
minifyEnabled true | |
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro' |
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
def build_param = "${build}" | |
if (build_param == "devCI") { | |
// Exclude all except mockDebug flavor | |
android.variantFilter { variant -> | |
if (variant.getFlavors().get(0).name != 'mock' || variant.buildType.name != 'debug') { | |
variant.setIgnore(true) | |
} | |
} | |
} else if (build_param == "releaseCI") { | |
// Exclude all except prodRelease flavor |