This file contains 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 delegate void NoArgDelegate(); | |
public static void Refrsh(DependencyObject o) | |
{ | |
o.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Loaded, (NoArgDelegate)delegate { }); | |
} |
This file contains 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
package ; | |
import neko.vm.Thread; | |
import neko.Sys; | |
/** | |
* ... | |
* @author Andor | |
*/ |
This file contains 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
if (Reflect.hasField(settings, split[0])) | |
{ | |
switch (Type.getClassName(Type.getClass(Reflect.field(settings, split[0])))) | |
{ | |
case "String": | |
Reflect.setField(settings, split[0], split.slice(1).join(" ")); | |
case "Array": | |
Reflect.setField(settings, split[0], split.slice(1)); | |
default: | |
if (Type.typeof(Reflect.field(settings, split[0])) == ValueType.TBool) |
This file contains 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
match sdl::event::poll_event() { | |
sdl::event::QuitEvent => break main, | |
sdl::event::NoEvent => break event, | |
sdl::event::KeyEvent { Key: key, _ } => { | |
match key { | |
AKey => {} | |
_ => {} | |
} | |
} | |
_ => {} |
This file contains 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; | |
namespace teststuff | |
{ | |
class Program | |
{ | |
static ulong szamjegy_osszeg(ulong x) | |
{ | |
ulong ossz = 0; | |
ulong lim = (ulong)Math.Ceiling(Math.Log10(x)); |
This file contains 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.Linq;class p{static void Main(){System.IO.File.ReadAllLines("a.txt").Select(x=>x.Substring(0,x.TakeWhile(y=>y==' ').Count())+x.TrimStart(' ').Split(' ').Where(y=>y!="").Aggregate("",(y,w)=>(y+=w+" ")).TrimEnd(' ')).ToList().ForEach(System.Console.WriteLine);}} |
This file contains 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
// on windows 7 64bit, the following program produces this output: | |
//D:\dev\rust>test.exe | |
//test4 | |
//test1 | |
//^C | |
//D:\dev\rust> | |
extern mod std; |
This file contains 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 { | |
let namelen = GetWindowTextLengthA(wh); | |
let mut namebuf : ~[u8] = std::vec::with_capacity((namelen+2) as uint); | |
GetWindowTextA(wh, namebuf.as_mut_ptr() as *mut i8, namelen+1); | |
namebuf.set_len(namelen as uint); | |
println!("Window: {:s}", match std::str::is_utf8(namebuf) { | |
true => std::str::from_utf8(namebuf), | |
false => "Non-UTF8 win name"} | |
); | |
} |
This file contains 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
// foo.rs | |
use bar::KeyBytes; | |
mod bar; | |
fn main() { | |
... | |
// baz is some PublicKey | |
baz.key_bytes(); // PublicKey does not implement any method named key_bytes, but it does? | |
... | |
} |
This file contains 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
impl<T: Encoder> Encodable<T> for NonceWrap { | |
fn encode(&self, e: &mut T) { | |
// TODO | |
} | |
} |
OlderNewer