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
// harbour -n selam.prg | |
procedure main() | |
QQout ("selam alejkum dunja: from harbour") | |
return |
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 (!exists('g:github_user') || !exists('g:github_token')) && !executable('git') | |
echoerr "Gist: require 'git' command" | |
finish | |
endif |
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
class Person | |
attr_accessor :country, :country_options | |
def initialize | |
self.country_options=["", "Canada", "US", "Mexico"] | |
self.country = "Canada" | |
end | |
end | |
class HelloList |
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
class Person | |
attr_accessor :provinces, :provinces_options | |
def initialize | |
self.provinces_options=[ | |
"", | |
"Quebec", | |
"Ontario", | |
"Manitoba", | |
"Saskatchewan", |
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
shell { | |
text "SWT" | |
tab_folder { | |
tab_item { | |
text "Tab 1" | |
label { | |
text "Hello World!" | |
} | |
} | |
tab_item { |
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
module Etc | |
class Passwd < FFI::Struct | |
@@@ | |
struct do |s| | |
s.include "sys/types.h" | |
s.include "pwd.h" | |
s.name "struct passwd" | |
s.field :pw_name, :string | |
s.field :pw_passwd, :string |
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
require 'ffi' | |
module LibC | |
extend FFI::Library | |
callback :qsort_cmp, [ :pointer, :pointer ], :int | |
attach_function :qsort, [ :pointer, :int, :int, :qsort_cmp ], :int | |
end | |
p = MemoryPointer.new(:int, 2) | |
p.put_array_of_int32(0, [ 2, 1 ]) |
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
// gcc -rdynamic -o dlopen_e1 dlopen_e1 -ldl | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
int main(int argc, char **argv) { | |
void *handle; | |
double (*cosine)(double); | |
char *error; |
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
def f1(arg1, *args) | |
puts "argument count= #{args.size}" | |
puts "arg1= #{arg1}" | |
for i in 0..args.size-1 | |
puts "args[#{i}] #{args[i]} " | |
puts "string ?", args[i].is_a?(String) | |
puts "integer ?", args[i].is_a?(Integer) |
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
enum Oznaka {A, B, C, D, E}; | |
.. | |
Oznaka ozn; | |
cout << "unesi oznaku:" | |
// ovo je bitno jer cin ne zna raditi direktno sa enum-om | |
cin >> (int) ozn; |
OlderNewer