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
| static void DuffsDevice(uint count, int[] A, int[] B) | |
| { | |
| uint i = 0; | |
| uint n = (count + 7) / 8; | |
| switch (count % 8) { | |
| case 0: A[i] = B[i++]; goto case 7; | |
| case 7: A[i] = B[i++]; goto case 6; | |
| case 6: A[i] = B[i++]; goto case 5; | |
| case 5: A[i] = B[i++]; goto case 4; | |
| case 4: A[i] = B[i++]; goto case 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
| class Team<T> : IEnumerable<T> // enumerable collection | |
| { | |
| private T[] workers; | |
| private const byte DEFAULTSIZE = 5; | |
| public Team() { | |
| this.workers = new T[DEFAULTSIZE]; | |
| } | |
| private int i = 0; | |
| public void Add(T param) |
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 static string GetXmlValue(string id, string getData, XDocument xdoc) | |
| { | |
| return xdoc.Root.Descendants("girl").Elements(). | |
| Where(node => node.Name == "id" && node.Value == id). | |
| Single<XElement>().NodesAfterSelf(). | |
| Where(values => ((XElement)values).Name == getData). | |
| Cast<XElement>().Single<XElement>().Value; | |
| } |
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
| $dir = dir *.zip | |
| #go through each zip file in the directory variable | |
| foreach($item in $dir) | |
| { | |
| Expand-Archive -Path $item -DestinationPath ($item -replace '.zip','') -Force | |
| } | |
| /* unzip all files in a directory and then do some work!! */ |
NewerOlder