Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <unordered_set> | |
| #include <vector> | |
| #include <optional> | |
| #include <iostream> | |
| #include <chrono> | |
| #include <ctime> | |
| template<typename T> std::optional<int> minimum_coins(T target, std::vector<T> denominations) { | |
| auto values = new std::unordered_set<T>(); values->insert(target); | |
| auto k = 0; |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>DApp Tutorial</title> | |
| <style> | |
| body { |
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
| !mkdir ~/.kaggle | |
| !echo '{"username":"korakot","key":"8db2e62c9fcbb3d2cc204a01671189num+2"}' > ~/.kaggle/kaggle.json | |
| !chmod 600 ~/.kaggle/kaggle.json | |
| # list files | |
| !kaggle datasets files robervalt/sunspots | |
| # load one file | |
| !kaggle datasets download robervalt/sunspots -f Sunspots.csv | |
| # load all files as a zip | |
| !kaggle datasets download robervalt/sunspots |
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
| <div style="font-family: sans-serif;"> | |
| <? var data = valid(); ?> | |
| <form id="form" name="form"> | |
| <? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
| <? for (var i = 0; i < data.length; i++) { ?> | |
| <? for (var j = 0; j < data[i].length; j++) { ?> | |
| <input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
| <? } ?> | |
| <? } ?> | |
| <? } else { ?> |
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
| // implement search function that can be filter by name,priceRange or category | |
| fun List<Product>.search(name: String? = null, | |
| priceRange: Pair<Double, Double>? = null, | |
| categoryId: String? = null): List<Product> = TODO("Make it happen") |
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
| class ProductDetailFragment : MFragment() { | |
| companion object { | |
| const val ARG_PRODUCT_ID = "PRODUCT_ID" | |
| const val ARG_SOMETHING = " SOMETHING" | |
| fun badInstance(productId: String, something: String?): ProductDetailFragment { | |
| val bundle = MBundle() | |
| bundle.putString(ARG_PRODUCT_ID, productId) | |
| if (something != null) bundle.putString(ARG_SOMETHING, something) |
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
| # ตาม guru.sanook.com/1520 | |
| import re | |
| t1 = str.maketrans("กขฃคฅฆงจฉชฌซศษสญยฎดฏตณนฐฑฒถทธบปผพภฝฟมรลฬฤฦวหฮอ", | |
| "กกกกกกงจชชชซซซซยยดดตตนนททททททบปพพพฟฟมรรรรรวหหอ") | |
| t2 = str.maketrans( | |
| "กขฃคฅฆงจฉชซฌฎฏฐฑฒดตถทธศษสญณนรลฬฤฦบปพฟภผฝมำยวไใหฮาๅึืเแโุูอ", | |
| "1111112333333333333333333444444445555555667777889AAABCDEEF") | |
| def LK82(s): | |
| res = [] |
NewerOlder