何故オブジェクト指向はクソなのか by Joe Armstrong(Erlangの作者)
このドキュメントは http://www.bluetail.com/~joe/vol1/v1_oo.html で行われたオリジナルの講演のコピーである
| static IEnumerable<T> seq<T>(params T[] args) | |
| { | |
| return args; | |
| } | |
| var sequence = seq(1,2,3,4,5); |
| ls -Recurse -Include "*.bat" | ?{(cat $_.FullName) -match "REGSVR"} |
| ls $PATH -Recurse -Include "$EXT" | %{$temp = (cat $_.FullName) -replace $OLDNAME,$NEWNAME; $temp | Out-File -Encoding default -FilePath $_.FullName} |
| Get-Clipboard -Image | %{$_.Save((Get-Date -Format "MMddhhmmss") + ".bmp")} |
| ls *.bmp | sort -Property Length -Unique | % -begin{$i = 0} -process{ren $_ ("Image" + $i.ToString() + ".bmp");$i += 1 } |
| for file in *.m4a; do ffmpeg -qscale 0 -i "$file" "${file%.m4a}.mp3"; done | |
| #128kに変換するなら-abを使う | |
| for file in *.m4a; do ffmpeg -aq 100 -i "$file" "${file%.m4a}.mp3"; done |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using NUnit.Framework; | |
| namespace List_SortedList_Behavior_Test | |
| { | |
| public class Test | |
| { | |
| private List<int> _randList; |
このドキュメントは http://www.bluetail.com/~joe/vol1/v1_oo.html で行われたオリジナルの講演のコピーである
| using DataContractExtention | |
| //Serialize | |
| var x = new SomeClass(); | |
| var str = x.ToStringUsingDataContract(); | |
| //Deserialzie | |
| SomeClass y = str.ToObjectUsingDataContract<SomeClass>(); |
| public static class HBitmapExtention | |
| { | |
| /// <summary> | |
| /// ref: http://nine-works.blog.ocn.ne.jp/blog/2011/12/post_b0e8.html | |
| /// </summary> | |
| /// <param name="hBitmapSource">hBitmap</param> | |
| /// <returns>BitmapSource</returns> | |
| public static BitmapSource ToBitmapSource(this IntPtr hBitmapSource) | |
| { | |
| return Imaging.CreateBitmapSourceFromHBitmap( |