SpaceX Falcon 9 progress
Just for fun, here's the highlights of launch 4 again:
Labels: .net, geek, mono, open source, ubuntu
I've been running into the same issues. Ultimately, the solution was to change the following config setting:
<serverruntime frequenthitthreshold="1">
The default value here is "2", which means that even static content does not get compressed if it isn't requested twice within a 10 seconds period (frequentHitTimePeriod). Switching to "1" means that the file gets compressed right away.
Hopefully this will fix your problems too :)
- Imad
%windir%\system32\inetsrv\appcmd.exe set config
-section:system.webServer/serverRuntime -frequentHitThreshold:1
Labels: .net, iis7, web development
I’ve always really liked your blog Jeff, but this is a BS post
The problem seems to be that IE can't calculate the height of content in the dynamically resized DIV correctly and thus the padding-bottom and hence my background image (nice rounded corners in this case) wasn' showing.#slidingDiv {
padding-bottom: 10px;
background: white url(../images/box_bottom.gif) bottom no-repeat;
}
Labels: css, javascript, mootools, web development
Labels: .net, spring.net, web development
saveOrUpdate() does the following:
- if the object is already persistent in this session, do nothing
- if another object associated with the session has the same identifier, throw
an exception- if the object has no identifier property, save() it
- if the object's identifier has the value assigned to a newly instantiated
object, save() it- if the object is versioned (by a
or ), and
the version property value is the same value assigned to a newly instantiated
object, save() it otherwise update() the object
and merge() is very different:
- if there is a persistent instance with the same identifier currently
associated with the session, copy the state of the given object onto the
persistent instance- if there is no persistent instance currently associated with the session,
try to load it from the database, or create a new persistent instance- the persistent instance is returned
- the given instance does not become associated with the session, it remains
detached
As our detached objects had an Id and version when we called SaveOrUpdate() they were being updated, and seeing as all update() does is reattach an object to the session, the session had no record of the changes that had been made to that object since it was loaded.
Labels: .net, nhibernate, open source
function doAjaxWebServiceRequest (id) {The returned object will be in JSON format. The lines where I create my callback delegates using the Function.createDelegate method allow me to set the scope of 'this' in my call backs to be the object I making the request from.
var completeDelegate = Function.createDelegate(this, this.callback);
var failureDelegate = Function.createDelegate(this, this.error);
var request = new Request.JSON({url: 'http://hostname/MyWebService.asmx/GetById',
onComplete: completeDelegate,
onFailure: failureDelegate,
urlEncoded: false,
headers: {"Content-type": "application/json"}
});
request.send(JSON.encode({'id': id}));
},
Labels: .net, geek, javascript, mootools, web development
// Add a css class to the element with the id fooUnfortunately when viewing an ASP.NET page in IE that includes a script that uses these functions you get a script error saying that the "Object doesn't support this property or method"
$('foo').addClass('fooStyle');
// Set the width of the foo element
$('foo').setStyle('width', '100px');
// Add a css class to the element with the id fooHowever I then realised that I was trying to call the MooTools Element methods on a vanilla element object rather than a MooTools one. The second line below solved the problems in IE and meant I could go back to the first way of applying the styling.
$('foo').className = 'fooStyle';
// Set the width of the foo element
$('foo').style.width = '100px';
var myelement = document.createElement("a");IE vs Firefox
myelement = $(myelement);
Labels: .net, geek, javascript, mootools, web development
------ Test started: Assembly: Tests.dll ------
TestCase 'Tests.BatchOrderMessageHandlerTests.TestNMock'
failed: NMock2.Internal.ExpectationException : unexpected invocation of foo.DoFoo(<1>, <1>, out)
Expected:
1 time: foo.DoFoo(equal to <1>, equal to <1>, equal to), will set c=<2>, return <1> [called 0 times]
at NMock2.Mockery.FailUnexpectedInvocation(Invocation invocation)
at NMock2.Mockery.Dispatch(Invocation invocation)
at NMock2.Mockery.MockObject.Invoke(Invocation invocation)
at NMock2.Monitoring.Invoker.Invoke(Invocation invocation)
at NMock2.Monitoring.ProxiedObjectIdentity.Invoke(Invocation invocation)
at NMock2.Monitoring.ProxyInvokableAdapter.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Tests.BatchOrderMessageHandlerTests.IFoo.DoFoo(Int32 a, Int32 b, Int32& c)
C:\svn\GLGParnters.TradeIdeas\PositionManager\src\Tests\BatchOrderMessageHandlerTests.cs(136,0): at Tests.BatchOrderMessageHandlerTests.TestNMock()
0 passed, 1 failed, 0 skipped, took 0.77 seconds.
public interface IFoo
{
int DoFoo(int a, int b, out int c);
}
[Test]
public void TestNMock()
{
IFoo foo = _mockery.NewMock();
Expect.Once.On(foo).Method("DoFoo")
.With(1, 1, Is.Out)
.Will(new SetNamedParameterAction("c", 2), Return.Value(1));
int result = 0;
int a = foo.DoFoo(1, 1, out result);
_mockery.VerifyAllExpectationsHaveBeenMet();
Assert.AreEqual(2, result);
}
Labels: .net, geek, open source
Labels: .net, geek, nhibernate, open source