Skip to content

Instantly share code, notes, and snippets.

View ozalexo's full-sized avatar

Alexey Ozerov ozalexo

  • Russia, Nizhniy Novgorod
View GitHub Profile
@ozalexo
ozalexo / ContentView.swift
Created October 24, 2019 04:42
SwiftUI: ScrollView pager
//
// ContentView.swift
// PaginatedScrollView
//
// Created by Aleksey Ozerov on 24.10.2019.
// Copyright © 2019 Aleksey Ozerov. All rights reserved.
//
import SwiftUI
@ozalexo
ozalexo / ContentView.swift
Created October 18, 2019 23:57
SwiftUI: Difference between computed property and view as property
import SwiftUI
struct ContentView: View {
@State private var name = "John"
@State private var surename = "Connor"
var motto1: some View {
VStack {
TextField("Enter your name", text: $name)
0x3b2d493c96b2c6218f080268ec5677f389cd714c
@ozalexo
ozalexo / waitevents.js
Created March 4, 2012 23:32
firebird: listen events
var drev = require('drev')
, fb = require('firebird');
var conn = fb.createConnection();
conn.connectSync('nodejs:/opt/firebird/dbs/testdb.fdb', 'SYSDBA', 'masterkey', '');
conn.addFBevent("fbevent");
conn.on("fbevent",function(event,count){
console.log('GOT EVENT');
drev.emit('newevent', 'any text');
});