perl -e 'for my $file (@ARGV) { next unless -f $file; my $max = 0; open my $fh, "<", $file or next; while (<$fh>) { chomp; $max = length if length > $max } close $fh; print "$file $max\n" }'... src/components/*.ts | sort -k 2 -n| <html><head><title>test</title> | |
| <script language="JavaScript"> | |
| pa=new Array(); | |
| page=new Array(); | |
| function changeDesign(cno){ | |
| pa[0]=document.getElementById('page[0]'); | |
| pa[1]=document.getElementById('page[1]'); | |
| pa[2]=document.getElementById('page[2]'); | |
| pa[0].style.display='none'; | |
| pa[1].style.display='none'; |
| const VWL = new Set(["A", "E", "I", "O", "U"]); | |
| function abbr(name) { | |
| if (name.length < 3) | |
| return null; | |
| const NAM = name.toUpperCase(); | |
| const HEA = NAM[0]; | |
| const TAI = Array.from(NAM.substr(1)); | |
| const FLT = TAI.filter(CHR => !VWL.has(CHR)).join(""); | |
| if (FLT.length >= 2) |
| // s は、文字列の平均的な長さ | |
| // n × 2 | |
| // => 変数確保: 2, 整数比較: 2n, 再代入: 2n, 配列要素取得: 2n, 文字列比較: 2sn | |
| const hasFooOrBar = function(items) { | |
| // 変数確保: 1, 整数比較: n, 再代入: n | |
| for (let i = 0; i < items.length; i++) // * n | |
| // 配列要素取得: 1 (* n), 文字列比較: s (* n) | |
| if (items[i] === "foo"); | |
| return true; |
| let parent = i => Math.floor(i - 1); | |
| let left = i => (i + 1) * 2 - 1; | |
| let right = i => (i + 1) * 2; | |
| let swap = function (items, i, j) { | |
| let temp_i = items[i]; | |
| items[i] = items[j]; | |
| items[j] = temp_i; | |
| }; | |
| let get_largest_node = function (items, i, heap_size) { |
| import java.util.stream.IntStream | |
| object NestedParallelStream { | |
| def main(args: Array[String])]: Unit = { | |
| iterateScalaStream() | |
| iterateJavaStream() | |
| } | |
| def iterateScalaStream(): Unit = { | |
| Stream.range(0, 100) |
| class Router<T...> { | |
| portions: [String]; | |
| when (T) { | |
| case <>: { | |
| } | |
| otherwise: { | |
| leading: Router<* T.init>; | |
| parser: Parser<T.last>; | |
| } |
| // 参考 | |
| // 『Java による関数型プログラミング』7章 | |
| let TailRec = { | |
| done: function(result) { | |
| return { | |
| complete: true, | |
| result: result | |
| }; | |
| }, |
| using System; | |
| using System.Linq; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class Test | |
| { | |
| public static void Main() | |
| { | |
| IEnumerable values = new List<string>() { "foo", "bar" }; |