I hereby claim:
- I am tamkien on github.
- I am tamkien (https://keybase.io/tamkien) on keybase.
- I have a public key ASD5FUZGlsFBRLlVDdYY30Zmz3Hn0oWZCvAOJvtiJ3uCSAo
To claim this, I am signing this object:
| /* | |
| * OneTimePasswordAlgorithm.java | |
| * OATH Initiative, | |
| * HOTP one-time password algorithm | |
| * | |
| */ | |
| /* Copyright (C) 2004, OATH. All rights reserved. | |
| * | |
| * License to copy and use this software is granted provided that it |
| ///////////////////////////////////////////////////////// | |
| // // | |
| // _oo0oo_ // | |
| // o8888888o // | |
| // 88" . "88 // | |
| // (| -_- |) // | |
| // 0\ = /0 // | |
| // ___/`---'\___ // | |
| // .' \\| |// '. // | |
| // / \\||| : |||// \ // |
| #include <stdio.h> | |
| int main() | |
| { | |
| int n,m,i,j; | |
| float a[10][10]; | |
| printf("Nhap so hang ma tran"); | |
| scanf("%d", &m); | |
| printf("Nhap so cot ma tran"); | |
| scanf("%d", &n); |
| //Java version: http://www.informatik.uni-leipzig.de/~duc/amlich/VietCalendar.java | |
| import kotlin.math.floor | |
| import kotlin.math.sin | |
| object VietCalendar { | |
| private const val PI = Math.PI | |
| /** | |
| * |
| private fun Date.add(field: Int, amount: Int): Date = Calendar.getInstance().let { calendar -> | |
| calendar.time = this@add | |
| calendar.add(field, amount) | |
| return@let calendar.time | |
| } |
| override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) { | |
| if (holder is EmployeeViewHolder) { //EmployeeViewHolder is my custom viewHolder to bind values | |
| holder.bind(employees[position]) //employees is my list | |
| holder.itemView.setOnClickListener { | |
| val dialog = AlertDialog.Builder(it.context).create() | |
| dialog.setTitle("Title")//your title here | |
| dialog.setMessage("Message")//your message here | |
| dialog.setButton( | |
| AlertDialog.BUTTON_NEUTRAL, "OK" //a button labeled "OK" | |
| ) { _: DialogInterface, _: Int -> dialog.dismiss() } |
| editTextNumber.setOnTouchListener(object : View.OnTouchListener{//editTextNumber is the id of my EditText that contains the drawable | |
| @SuppressLint("ClickableViewAccessibility") | |
| override fun onTouch(view: View?, event: MotionEvent?): Boolean { | |
| if (event?.action == MotionEvent.ACTION_UP){ | |
| if (event.rawX >= editTextNumber.right - editTextNumber.compoundDrawables[2].bounds.width()){ //*Why [2]? See below | |
| Log.d("DrawableEnd", "Pressed")//Insert your action here | |
| return true | |
| } | |
| } | |
| return false |
I hereby claim:
To claim this, I am signing this object:
| import java.util.ArrayList; | |
| import java.util.Random; | |
| public class FakePhoneNo { | |
| public static void main(String[] args) { | |
| ArrayList<String> dauso = new ArrayList<>(); | |
| dauso.add("032"); | |
| dauso.add("033"); | |
| dauso.add("034"); | |
| dauso.add("035"); |
| import java.util.*; | |
| public class Baitap { | |
| private static Scanner scanner = new Scanner(System.in); | |
| public static void main(String[] args) { | |
| for (; ; ) { | |
| System.out.println("Input String"); | |
| String s = scanner.nextLine(); | |
| s = s.trim().replaceAll("\\s+", " ");//Dong nay de xoa het dau cach thua (de dem tu) |