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
| import scala.language.strictEquality | |
| case class A(x: String) | |
| case class B(x: String) | |
| given CanEqual[A, B] = CanEqual.derived | |
| @main def main = { | |
| val a = A("a") |
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
| // macro.scala | |
| import scala.quoted.* | |
| trait Show[T]: | |
| def show(value: T): String | |
| inline given showInstance[T]: Show[T] = ${ showInstanceImpl[T] } | |
| def showInstanceImpl[T: Type](using Quotes) = '{ | |
| new Show[T] { |
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
| // This program executes 6502_functional_test.bin from https://github.com/Klaus2m5/6502_65C02_functional_tests | |
| // It successes almost all the tests and fails the tests for decimal mode. | |
| open System.IO | |
| open System | |
| open System.Collections.Generic | |
| let hasBit i v = v &&& (1uy <<< i) <> 0uy | |
| type Addr = Accumulator | Implied | Immediate of uint8 | Bus of int | |
| type Addressing = Acc | Impl | Sharp | Rel | Zpg | ZpgX | ZpgY | Abs | AbsX | AbsY | Ind | XInd | IndY |
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
| let Size : Int = 40 | |
| var cells = [Array<Bool>]() | |
| func min(a:Int, b:Int) -> Int { | |
| if a > b {return b } else { return a } | |
| } | |
| func max(a:Int, b:Int) -> Int { | |
| if a > b { return a } else { return b } | |
| } |
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
| -- monad laws | |
| (>>= f) . return = f | |
| (>>= return) = id | |
| (>>= g) . (>>= f) = (>>= ((>>= g) . f)) | |
| -- definitions | |
| fmap f = (>>= (return . f)) | |
| join = (>>= id) | |
| -- theorem |
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 Example { | |
| implicit class NumberEx[A](val left:A)(implicit num:Numeric[A]) { | |
| def <== (right:A) = (num.lteq(left, right), right) | |
| def >== (right:A) = (num.gteq(left, right), right) | |
| } | |
| implicit class BoolNumberEx[A](val temp:(Boolean, A))(implicit num:Numeric[A]) { | |
| def <== (right:A) = (temp._1 & num.lteq(temp._2, right), right) | |
| def >== (right:A) = (temp._1 & num.gteq(temp._2, right), right) | |
| } |
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
| open System | |
| let occs = Array.zeroCreate 7 | |
| for year in 1970 .. 2037 do | |
| for month in 1..12 do | |
| let day = DateTime(year, month, 13).DayOfWeek |> int | |
| occs.[day] <- occs.[day] + 1 | |
| let total = Seq.sum occs | |
| for i, day in Seq.indexed "日月火水木金土" do |
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
| ■ あるソフトウェア ver 0.9.7 使用許諾契約書 | |
| 「あるソフトウェア ver 0.9.7 使用許諾契約書」(以下「本契約」といいます)は、 | |
| 「ながと」(以下「作者」といいます)がユーザー様に | |
| 「あるソフトウェア ver 0.9.7」(以下「本ソフトウェア」といいます)の | |
| 利用を許諾する際の条件を定めたものです。 | |
| ユーザー様が本契約をよくお読みの上で、 | |
| ユーザー様が本契約に同意された場合に限り、 | |
| ユーザー様は本ソフトウェアを本契約に従って使用することが出来ます。 |
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
| tyrano/plugins/kag/kag.tag_audio.js の 157行目あたり | |
| else if(browser == "firefox" || browser =="opera"){ | |
| を | |
| else if( false ){ | |
| と書き換えて、再度アップロードしてくださいー |
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
| **** ファビコンの変更 | |
| OneDrive内の icon.png を | |
| itsukaze/img/icon.png という風に配置する | |
| itsukazeフォルダ内の index.html, story.html, character.html, download.html, spec.html の | |
| headタグ内のtitleタグの次の行に、 | |
| <link rel="icon" type="image/png" href="./img/icon.png"> |