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
| from fnmatch import fnmatch | |
| def check_pdb(ui, repo, hooktype, node=None, source=None, **kwargs): | |
| for file in [f for f in repo[node].files() if fnmatch(f, '*.py')]: | |
| # ファイルごとにチェック |
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
| [TestCase] | |
| public void Test_SequenceEqual() | |
| { | |
| int[] a = { 1, 2, 3 }; | |
| List<int> alist = a.ToList(); | |
| int []b = { 3, 2, 1 }; | |
| Assert.That(a, Iz.EquivalentTo(b)); // 順番が違ってもOK | |
| Assert.That(a, Iz.EquivalentTo(alist)); // 型が違ってもOK |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| namespace ConsoleApplication1 | |
| { | |
| public class MyEx1 : Exception | |
| { | |
| public MyEx1(string msg, Exception inner) : base(msg, inner) { } |
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
| [divhelper] | |
| div-alias.foo = class=foo | |
| span-alias.red = "style=color:red;" |
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
| dim x as integer = 0 | |
| for i as integer = 0 to (10 and (x < 10)) | |
| x = x + i | |
| debug.print(i) | |
| next | |
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
| from spock import spec, mark, d, v | |
| @spec | |
| def test(): | |
| """length of Spock's and his friends' names""" | |
| @mark | |
| def expect(): | |
| assert(len(v.name) == v.length) |
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 | |
| e.obj_id, | |
| max(decode(e.key, 'A', e.value, null)) A, | |
| max(decode(e.key, 'B', e.value, null)) B, | |
| from EAV e | |
| group by e.obj_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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using NUnit.Framework; | |
| namespace groupby | |
| { | |
| public static class Class1 |
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
| Imports System.Runtime.CompilerServices | |
| Namespace Hoge | |
| Class EachSliceEnumerator(Of T) | |
| Implements IEnumerator(Of T()) | |
| Private ReadOnly _internal As IEnumerator(Of T) | |
| Private ReadOnly _size As Integer | |
| Private _current As T() = Nothing |
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 Class FuncBaseEnumerable(Of T) | |
| Implements IEnumerable(Of T) | |
| Private ReadOnly _getEnumerator As Func(Of IEnumerator(Of T)) | |
| Public Sub New(getEnumerator As Func(Of IEnumerator(Of T))) | |
| _getEnumerator = getEnumerator | |
| End Sub | |
| Public Function GetEnumerator() As IEnumerator(Of T) Implements IEnumerable(Of T).GetEnumerator |