cscript %SystemDrive%\inetpub\AdminScripts\adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
January 27, 2012
January 5, 2012
Windows 7: How to resolve sleep issues
http://support.microsoft.com/kb/976877
*** Very important ***
Check this to see what is preventing the computer from sleeping…
powercfg -requests
Tip: Prevent open files from disabling sleep (System)
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\ Power\ PowerSettings\ 238C9FA8-0AAD-41ED-83F4-97BE242C8F20\d4c1d4c8-d5cc-43d3-b83e-fc51215cb04d]
In there, set Attributes to 0 (the default value is 1, which means hide).”
Then… Power options -> Change Plan Settigns -> Change Advanced Power settings -> Sleep -> Allow sleep with remote opens (make sure show hidden if not shown)
December 14, 2011
December 12, 2011
Logging Blocks: FAQ
Set to local time
Timestamp: {timestamp(local)} will get the local system time
December 11, 2011
December 2, 2011
November 30, 2011
November 29, 2011
RDP: Keep session active
push Start > then type "Local Security Policy" Inside the Local Secuirty Policy Snap in Security settings > Local Policies > Secuirty Options > Microsoft network server: Amount of idle time required before suspending session Default is 15 minutes.
November 27, 2011
EF: Database functions
FROM o in ctx.Orders
WHERE SqlFunctions.DateDiff(“d”, o.OrderDate, o.ActualDate) > 5
select o;
November 25, 2011
ActiveMQ: Consumer
using System;
using Apache.NMS;
using Apache.NMS.Util;
using Apache.NMS.ActiveMQ;
using Apache.NMS.ActiveMQ.Commands;
namespace TestActiveMQ
{
class Program
{
static void Main(string[] args)
{
IConnectionFactory factory = new ConnectionFactory("tcp://localhost:61616/");
using (IConnection connection = factory.CreateConnection())
{
connection.ClientId = "MYID";
connection.Start();
using (ISession session = connection.CreateSession())
{
IMessageConsumer consumer = session.CreateConsumer(new ActiveMQQueue("px_contracts_update"), null, false);
consumer.Listener += consumer_Listener;
Console.ReadLine();
}
connection.Stop();
}
}
private static void consumer_Listener(IMessage message)
{
Console.WriteLine("Got: " + ((ITextMessage)message).Text);
}
}
}