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
<div class="list-content" data-bind="if: announcementList.rendered, visible: announcementList.listVisible"> | |
<div class="search-wrapper" data-bind="dxTextBox: { placeholder: 'Search', mode: 'search', value: announcementList.searchQuery, valueUpdateEvent: 'keyup' } "></div> | |
<!-- ko with: announcementList --> | |
<div class="list-indentation" data-bind="dxList: {dataSource: dataSource, searchQuery: searchQuery}"> | |
<div data-options="dxTemplate : { name: 'item' } " > | |
<div> | |
<div class="course-icon-box"> | |
<span data-bind="text: Course.substr(0, 1);"></span> | |
</div> | |
<div> |
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
/// <reference path="../js/jquery-1.10.2.min.js"; /> | |
/// <reference path="../js/knockout-3.0.0.js"; /> | |
(function() { | |
var products = ["Spegesild", "Rogede sild", "吳佳倫", "Nord-Ost Matjeshering", "Konbu", "簡名沅", "Inlagd Sill", | |
"Ikura", "Guaraná Fantástica", "Gravad lax", "Escargots de Bourgogne", "Carnarvon Tigers", "Boston Crab Meat", "Uncle Bob's Organic Dried Pears", | |
"Tofu", "Rössle Sauerkraut", "Manjimup Dried Apples", "Longlife Tofu", "Tourtière", "Thüringer Rostbratwurst", "Perth Pasties", "Pâté chinois", | |
"Mishi Kobe Niku", "Alice Mutton", "Wimmers gute Semmelknödel", "Tunnbröd", "Singaporean Hokkien Fried Mee", "Ravioli Angelo", "Gustaf's Knäckebröd", | |
"Gnocchi di nonna Alice", "Filo Mix", "Steeleye Stout", "Sasquatch Ale", "Raclette Courdavault", "Queso Manchego La Pastora", "Mozzarella di Giovanni", |
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
.course-icon-box { | |
float: left; | |
margin-right: 15px; | |
width: 36px; | |
height: 36px; | |
font-size: 30px; | |
} |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
var appledailyURL = [ | |
'http://www.appledaily.com.tw/realtimenews/section/new/1', | |
'http://www.appledaily.com.tw/realtimenews/section/new/2', | |
'http://www.appledaily.com.tw/realtimenews/section/new/3', | |
'http://www.appledaily.com.tw/realtimenews/section/new/4', | |
'http://www.appledaily.com.tw/realtimenews/section/new/5']; |
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
<link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"> | |
<link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"> | |
<link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"> | |
<link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"> | |
<link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"> | |
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"> | |
<link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"> | |
<link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"> | |
<link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196"> | |
<link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160"> |
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
var express = require('express'); | |
var multer = require('multer'); | |
var upload = multer({ dest: 'uploads/'}); | |
var PORT = 3000; | |
var app = express(); | |
var htmlHeader = '<!DOCTYPE html>' | |
+ '<html lang="en">' | |
+ '<head>' |
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
import java.util.*; | |
public class Solution { | |
public List<int[]> getSkyline(int[][] buildings) { | |
// idxes: idx -> list of (start(1) or end(0), building idx) | |
TreeMap<Integer, List<int[]>> idxes = new TreeMap<>(); | |
for (int i = 0; i < buildings.length; i++) { | |
int[] b = buildings[i]; | |
if (!idxes.containsKey(b[0])) idxes.put(b[0], new LinkedList<int[]>()); | |
if (!idxes.containsKey(b[1])) idxes.put(b[1], new LinkedList<int[]>()); |
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
import zipfile | |
import shutil | |
zipname = "brs.zip" | |
with zipfile.ZipFile(zipname) as z: | |
for fileinfo in z.infolist(): | |
with z.open(fileinfo) as f: | |
unicode_filename = fileinfo.filename.decode("shift_jis").encode("utf-8") | |
with open(unicode_filename, "wb") as outputfile: |
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
/** | |
* This is a set of user scripts that open direct link to video for | |
* hdx3 blog when user hits the "確定" button next to the password input. | |
* | |
* Installation: | |
* 1. Install Tampermonkey browser extension. | |
* 2. Create a new script. Copy and paste PART 1 and save. | |
* 3. Create another script. Copy and paste PART 2 and save. | |
* 4. Restart the browser, OR reload any existing hdx3 pages. | |
* |
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
/** | |
* mpv user script to navigate to previous/next file | |
* Usage: Add the following lines to input.conf | |
* | |
* MBTN_BACK script-message navigate prev | |
* MBTN_FORWARD script-message navigate next | |
* Shift+LEFT script-message navigate prev | |
* Shift+RIGHT script-message navigate next | |
* WHEEL_LEFT script-message navigate prev | |
* WHEEL_RIGHT script-message navigate next |
OlderNewer