Skip to content

Instantly share code, notes, and snippets.

View mzdv's full-sized avatar

Milos Zivadinovic mzdv

  • Belgrade, Serbia
View GitHub Profile
@mzdv
mzdv / EventEmitter and functional programming
Created February 13, 2015 22:00
Something I whipped up.
var events = require("events");
var util = require("util");
var _ = require("lodash");
var Greeter = function() {
events.EventEmitter.call(this);
console.log("I greet you");
};
util.inherits(Greeter, events.EventEmitter);
package jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
package jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
package jdbc;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
//Broker
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.OleDb;
using System.Data;
namespace Sesija
ThreadStart ts = metoda;
Thread nit = new Thread(ts);
nit.Start();
========> Thread.Sleep(10000);
using (TransactionScope ts = new TransactionScope())
....
ts.Complete();
Pete, pripreme za oba
public Form1()
{
InitializeComponent();
dataGridView1.MultiSelect = false;
}
private void button1_Click(object sender, EventArgs e)
{
Elementi e1 = new Elementi()
{
var x = [{
id: 1,
data: 'ab',
ordering: 1
}, {
id: 2,
data: 'cd',
ordering: 1
}];