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
diff --git a/relax.el b/relax.el | |
index 4d16beb..eddf99e 100644 | |
--- a/relax.el | |
+++ b/relax.el | |
@@ -49,9 +49,10 @@ | |
;;; Code: | |
+(require 'thingatpt) | |
(require 'url) |
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
- for (int i = resolutions.Length - 1; i >= 1; i--) | |
+ foreach (object[] resolution in resolutions.Skip(1).Cast<object[]>().Reverse()) | |
{ | |
- object[] resolution = (object[])resolutions[i]; | |
- List<Transport> ret = new List<Transport>(); | |
- return ((object[])list).Select<object, Transport>(o => | |
- { | |
- object[] transport = o as object[]; |
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 static Transport[] Convert(object list) | |
{ | |
return Convert((object[])list); | |
} | |
// 1 | |
public static Transport[] Convert(object[] list) | |
{ | |
return list.Select<object, Transport>(o => | |
{ |
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
unsafe | |
{ | |
byte** nativePackets = stackalloc byte*[packets.Length]; | |
// Allocate native byte arrays. | |
for (int i = 0; i < packets.Length; i++) | |
{ | |
nativePackets[i] = (byte *)Marshal.AllocHGlobal(packets[i].Length).ToPointer(); | |
// TODO: try/finally, free memory allocated to date | |
} |
NewerOlder