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 Gtk; | |
| public class MainWindow : Gtk.Window | |
| { | |
| private Box vboxMain; | |
| private ScrolledWindow swFiles; | |
| private TreeView tvFiles; | |
| private TreeViewColumn colName; | |
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
| /* The Computer Language Benchmarks Game | |
| https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ | |
| contributed by Isaac Gouy | |
| */ | |
| // using System; | |
| [Compact] | |
| class NBody { | |
| public static void main(string[] args) { |
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
| #include <stdint.h> | |
| #include <stdalign.h> | |
| #include <immintrin.h> | |
| #include <math.h> | |
| #include <stdio.h> | |
| // intptr_t should be the native integer type on most sane systems. | |
| typedef intptr_t intnative_t; | |
| typedef struct{ |
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
| void main(string[] args) { | |
| int[] e = {}; | |
| for (int i=0,j=0;i<100;i++,j++) { | |
| e+=j;e+=j;//заполнение парными | |
| } | |
| e+=100003;//уникальный | |
| ulong micsec; | |
| double sec; |
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 enum BinSide{ | |
| Left, | |
| Right | |
| } | |
| public class BinaryTree{ | |
| public long? Data { get; private set; } | |
| public BinaryTree Left { get; set; } | |
| public BinaryTree Right { get; set; } | |
| public BinaryTree Parent { get; set; } |
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
| void main(){ | |
| int a=5; | |
| int b=3; | |
| a ^= b; | |
| b ^= a; | |
| a ^= b; | |
| print(@"$a, $b"); | |
| } |
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
| string task(string str){ | |
| var result = ""; | |
| unichar c; | |
| for (int i = 0; str.get_next_char (ref i, out c);) { | |
| if (c ==' ')result+="%20"; | |
| else result+=c.to_string(); | |
| } | |
| return result; | |
| } |
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
| namespace ObjectFactory { | |
| private Gee.Map<Type, Type> _value_types; | |
| public void set_value_type_for_prop_type (Type prop_type, Type value_type) { | |
| if (_value_types == null) { | |
| _value_types = new Gee.HashMap<Type, Type> (); | |
| } | |
| _value_types[prop_type] = value_type; |
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 Gtk; | |
| Button button; | |
| void main (string[] args) { | |
| Gtk.init (ref args); | |
| var window = new Window (); | |
| button = new Button.with_label ("Start counting"); | |
| button.clicked.connect (() => { |
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
| bool sus(params Type[] types){ | |
| if (types.length != 0){ | |
| var a = types[0]; | |
| for (var i = 1; i < types.length; ++i){ | |
| if (!a.is_a(types[i])) | |
| return false; | |
| else | |
| a = types[i]; | |
| } |