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
var server = tcp.createServer(function (stream) { | |
stream.setEncoding('utf8'); | |
stream.setTimeout(0); | |
var user = new User(stream); | |
Users.push(user); | |
stream.addListener('connect', function () { | |
debug("Connection " + stream.remoteAddress); | |
user.OnConnect(); | |
}); | |
stream.addListener('data', function (data) { |
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
org 0x0 ; offset to 0, we will set segments later | |
bits 16 | |
jmp main ; Jump to main | |
main: | |
;Dont know whats in the segment registers so lets just reload them anyway :) | |
xor ax, ax | |
mov ds, ax |
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
/// <summary> | |
/// Make the new nHibernate Manager Object | |
/// </summary> | |
public Manager() | |
{ | |
// Setup Logging | |
log4net.Appender.FileAppender appender = new log4net.Appender.FileAppender(); | |
appender.File = @".\logs\data-manager.log"; | |
appender.LockingModel = new log4net.Appender.FileAppender.MinimalLock(); | |
appender.ImmediateFlush = true; |
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
using System; | |
using NHibernate.Tool.hbm2ddl; | |
using NHibernate.Mapping.Attributes; | |
using NHibernate.Cfg; | |
using NHibernate; | |
using log4net; | |
using System.Reflection; | |
using System.Web; | |
using System.CodeDom.Compiler; | |
using Microsoft.CSharp; |
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
// ------------------------------------- | |
// - Branches Table Mapping - Branches.cs | |
// ------------------------------------- | |
// Initial Table Mapping - 01.02.2011 - B Allen | |
using System; | |
using System.Collections.Generic; | |
using System.Data.Linq; | |
using System.Text; | |
using normist.data.Abstraction; | |
using NHibernate.Mapping.Attributes; |
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
RewriteEngine on | |
RewriteCond %{SERVER_PORT} !^80$ | |
RewriteRule ^(.*) http://%{SERVER_NAME}%{REQUEST_URI} [L] |
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
public override int Read(byte[] buffer, int offset, int count) | |
{ | |
lock (_incomingLock) | |
{ | |
_incomingMemoryStream.Position = 0; | |
var cnt = _incomingMemoryStream.Read(buffer, offset, count); | |
int amountleft = (int)(_incomingMemoryStream.Length - _incomingMemoryStream.Position); | |
var newMs = new MemoryStream(); | |
if (amountleft > 0) | |
{ |
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
-- Serverside -- | |
nowjs.on('connect', function() { | |
util.log('Sending Message?'); | |
this.now.receiveMessage('SERVER', 'Welcome to NowJS.'); | |
}); | |
everyone.now.distributeMessage = function(message) { | |
everyone.now.receiveMessage(this.now.name, message); |
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
List<normutils.data.Entities.DHCPLease> _leases; | |
using (ISession session = Global._DatabaseConn.OpenSession()) | |
{ | |
using (ITransaction transaction = session.BeginTransaction()) | |
{ | |
// Get list of all Leases | |
//Leases = session.CreateCriteria(typeof(normutils.data.Entities.DHCPLease)).List<normutils.data.Entities.DHCPLease>(); | |
var LQ = session.Query<normutils.data.Entities.DHCPLease>(); | |
_leases = (from v in LQ | |
where v.BindState == "active" |
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
var buffer = _texture.GetBuffer(); | |
buffer.Lock(Axiom.Graphics.BufferLocking.Normal); | |
DirectX does not allow locking of or directly writing to RenderTargets. | |
Use BlitFromMemory if you need the contents. |
OlderNewer