Skip to content

Instantly share code, notes, and snippets.

View uvlad7's full-sized avatar
:octocat:

Vladimir Ulianitsky uvlad7

:octocat:
  • Profitero
  • Minsk
  • 08:23 (UTC +03:00)
View GitHub Profile
$ sha256sum test_*
9827714b99613aee8458127d590345dd695a869ac75036038d4aca1597734e84 test_gir_ffi_with_save_to_file.desktop
9827714b99613aee8458127d590345dd695a869ac75036038d4aca1597734e84 test_gir_ffi_with_to_data.desktop
9827714b99613aee8458127d590345dd695a869ac75036038d4aca1597734e84 test_glib_with_load_from_data.desktop
9827714b99613aee8458127d590345dd695a869ac75036038d4aca1597734e84 test_glib_with_load_from_file.desktop
2ab4b687dec232b5ca5bba316bd7fa27fbf670a01b3e0c37b05d1179876a630e test_inifile.desktop
9827714b99613aee8458127d590345dd695a869ac75036038d4aca1597734e84 test_iniparse.desktop
<!doctype html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Emscripten-Generated Code</title>
<style>
body {
font-family: arial;
margin: 0;
// The Module object: Our interface to the outside world. We import
// and export values on it. There are various ways Module can be used:
// 1. Not defined. We create it here
// 2. A function parameter, function(Module) { ..generated code.. }
// 3. pre-run appended it, var Module = {}; ..generated code..
// 4. External script tag defines var Module.
// We need to check if Module already exists (e.g. case 3 above).
// Substitution will be replaced with actual code on later stage of the build,
asm����```````~~``|``~`~~``||````~``|~`~~|`~~р��wasi_snapshot_preview1fd_write envemscripten_memcpy_bigenv setTempRet0����6

  ����p����������A��� A A ����memory__wasm_call_ctorsmain__indirect_function_table__errno_location __stdio_exitemscripten_stack_init3emscripten_stack_get_free4emscripten_stack_get_base5emscripten_stack_get_end6 stackSave0 stackRestore1
stackAlloc2 dynCall_jiji8 ����A  #$
�Ԁ�63* �~#!A0! k! $A!  6,B!  7 - !A!A�!  q!A�!  q!  G!
A!
q! @@ E
B���������!  7B��䪖��!  7  B圁ɇ�ܰ�!  7B��ȋ֬���!  7 A!

from cffi import FFI
ffi = FFI()
ffi.cdef("""
int printf(const char *format, ...);
""")
C = ffi.dlopen(None)
x = ffi.cast("long long", 1)
l = ffi.new("long long[2]")
if (int(x)): # Little-endian
#include <stdio.h>
int main() {
long long x = 1, l[2];
if (*(char *) &x) // Little-endian
l[0] = 7299807751963697480LL, l[1] = 9414436869185655LL;
else
l[0] = 5215573471842553445LL, l[1] = 8583959181729603840LL;
printf("%s\n", (char *) l);
return 0;
require 'ffi'
module C
extend FFI::Library
ffi_lib 'c'
attach_function :printf, [:varargs], :int
end
x = FFI::MemoryPointer.new(:long_long)
@uvlad7
uvlad7 / src_Main.java
Created April 16, 2019 13:45
УП 6.2
public class Main {
public static void main(String[] args) {
new MyFrame();
}
}
@uvlad7
uvlad7 / src_Main.java
Created April 16, 2019 13:44
УП 6.1
import java.awt.*;
public class Main {
public static void main(String[] args) {
EventQueue.invokeLater(() -> new Puzzle());
}
}
import javafx.application.Application;
import javafx.geometry.HPos;
import javafx.geometry.VPos;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.ColumnConstraints;
import javafx.scene.layout.RowConstraints;
import javafx.scene.text.Font;
import javafx.stage.Stage;