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
package client; | |
import java.io.InputStream; | |
import java.text.DateFormat; | |
import java.text.ParseException; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.Scanner; |
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
Public Sub キーワードカラー() | |
Dim keywordList() As String | |
keywordList = Split("abstract,continue,for,new,switch,assert,default,goto," & _ | |
"package,synchronized,boolean,do,if,private,this,break,double,implements,protected," & _ | |
"throw,byte,else,import,public,throws,case,enum,instanceof,return,transient," & _ | |
"catch,extends,int,short,try,char,final,interface,static,void," & _ | |
"class,finally,long,strictfp,volatile,const,float,native,super,while", ",") | |
Dim keywordColor As Long | |
keywordColor = RGB(128, 0, 64) |
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
Public Sub InputFormula() | |
Dim r As Range: Set r = Range(Cells(1, 6), Cells(20, 10)) | |
Dim c As Range | |
Dim i As Integer: i = 101 | |
For Each c In r | |
c = "=データ!A" & i | |
i = i + 1 | |
Next c | |
End Sub |
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
Option Explicit | |
Private Const 強調色 = 4 | |
' | | | |cell_name1|cell_name2|... | |
' |directory_name|password|book_name|sheet_name| | |
' |
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
Private Const 強調色 = 4 | |
Private Const 検索開始列 = 2 | |
Private Const 検索最終列 = 6 | |
Private Const 検索開始行 = 2 | |
Private Const 検索最終行 = 6 | |
Public Sub 強調表示_1件のみ() | |
Dim r As Range: Set r = Range(Cells(検索開始行, 検索開始列), Cells(検索最終行, 検索開始列)) | |
Dim c As Range |
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
Option Explicit | |
' | | | |cell_name1|cell_name2|... | |
' |directory_name|book_name|sheet_name| | |
' | |
Public Sub データ抽出() | |
Dim ブック_オリジナル As Workbook: Set ブック_オリジナル = ThisWorkbook | |
Dim シート_オリジナル As Worksheet: Set シート_オリジナル = ブック_オリジナル.Sheets(1) |
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
package filters; | |
import java.io.IOException; | |
import java.util.Enumeration; | |
import java.util.logging.Logger; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; |
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
object quotient { | |
def mkCoset[E](objs: Seq[E], equivalence: (E) => E):Iterable[Seq[E]] = { | |
objs.groupBy(e => equivalence(e)).map(p => p._2) | |
} //> mkCoset: [E](objs: Seq[E], equivalence: E => E)Iterable[Seq[E]] | |
val coset = mkCoset((1 to 5), (e:Int) => e % 3) | |
//> coset : Iterable[Seq[Int]] = List(Vector(2, 5), Vector(1, 4), Vector(3)) | |
val originalSet = coset.flatten //> originalSet : Iterable[Int] = List(2, 5, 1, 4, 3) | |
} |
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
package iteration.third | |
import java.util.Date | |
object Scenario3 { | |
def main(args: Array[String]) = { | |
def payMethodNormal(t: Ticket) = (t.outTime.getTime - t.inTime.getTime).toInt | |
def payMethodDouble(t: Ticket) = (t.outTime.getTime - t.inTime.getTime).toInt * 2 |
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
package iteration.second; | |
import java.util.ArrayList; | |
import java.util.Date; | |
import java.util.List; | |
public class Scenario2 { | |
public static void main(String[] args) { | |
ParkingArea pa = new ParkingArea(2); | |
Parking t1 = pa.checkin(0); |