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
| SELECT | |
| tables.name | |
| , columns.name | |
| , table_comments.value | |
| , column_comments.value | |
| , 'EXEC sp_rename ''' + CONVERT(varchar, tables.name) + '.' + CONVERT(varchar, columns.name) + ''', ''' + CONVERT(varchar, column_comments.value) + ''' , ''COLUMN'';' | |
| FROM | |
| sys.tables AS tables | |
| INNER JOIN sys.columns AS columns ON | |
| tables.object_id = columns.object_id |
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
| WITH | |
| Input(date, star) AS ( | |
| SELECT '2013-04-01', 0 | |
| UNION ALL SELECT '2013-04-03', 1 | |
| UNION ALL SELECT '2013-04-04', 1 | |
| UNION ALL SELECT '2013-04-05', 0 | |
| UNION ALL SELECT '2013-04-06', 1 | |
| UNION ALL SELECT '2013-04-07', 1 | |
| UNION ALL SELECT '2013-04-08', 1 | |
| UNION ALL SELECT '2013-04-10', 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
| module ObsoleteAttributeTest | |
| open System | |
| module Record = | |
| [<Obsolete>] | |
| type Foo = { | |
| A: string | |
| B: int | |
| } |
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
| Sub expandAll() | |
| Dim sw | |
| sw = Timer | |
| Dim ss | |
| Set ss = Sheets | |
| For i = 1 To ss.Count | |
| Dim s | |
| Set s = ss(i) | |
| Dim orig | |
| orig = s.EnableCalculation |
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 | |
| open System.IO | |
| let rec resetDirectory (timestamp: DateTime) path = | |
| printfn "%s" path | |
| Directory.SetCreationTime(path, timestamp) | |
| Directory.SetLastAccessTime(path, timestamp) | |
| Directory.SetLastWriteTime(path, timestamp) |
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 beginPage = fsi.CommandLineArgs.[1] |> int | |
| let endPage = fsi.CommandLineArgs.[2] |> int | |
| let actualBeginPage = function | |
| | 1 -> 1 | |
| | n -> (n - 2) / 4 * 2 + 3 | |
| let actualEndPage n = actualBeginPage n + 1 | |
| printfn "%d-%d" (actualBeginPage beginPage) (actualEndPage endPage) |
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
| (* | |
| Prefixを導入した理由は、同じ'aでもqueryとtargetの'aは別物としたい。 | |
| 例) | |
| query: string -> 'a -> 'a | |
| target: 'a -> int -> int | |
| この場合マッチして欲しい。 | |
| 'aを同じとしてしまうと、string = 'a = intとなってマッチしない。 | |
| *) | |
| type Prefix = Target | Query | |
| type Type = |
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
| DECLARE @a AS bigint = 1103515245; | |
| DECLARE @b AS bigint = 12345; | |
| DECLARE @c AS bigint = 2147483647; | |
| DECLARE @x AS bigint = (@a * 3 + @b) % @c; | |
| DECLARE @y AS bigint = (@a * @x + @b) % @c; | |
| WITH t AS( | |
| SELECT | |
| 0 AS Id |
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
| module InferredFloatRepro | |
| open Microsoft.FSharp.Compiler.SourceCodeServices | |
| open System.IO | |
| let inferredFloatFunction x = 0.0 + x | |
| let annotatedFloatFunction (x: float): float = 0.0 | |
| let inferredIntFunction x = 0 + x | |
| type Dummy = Dummy |
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
| #r "System.Net.Http" | |
| #r "System.Xml" | |
| #r "System.Xml.Linq" | |
| open System | |
| open System.Net.Http | |
| open System.Xml.Linq | |
| let client = new HttpClient() |
OlderNewer