Sunday, November 7, 2010

lazy loungy Boston weekend

I am suddenly unable to begin explaining how much I'll miss Boston.

Thursday, October 14, 2010

another myopic realist

"I have never met anyone who was as _______ as they claimed.
[... and] I need new glasses."

-random OKCupid profile

Wednesday, July 21, 2010

fixed ExpertPDF caching my pdf.css file

This drove me nuts so I was one happy camper when I figured out what was happening!

I appended a "?ver=<%= DateTime.Now.ToString() %>" to the link tag href value.

<link id="lnkPdfStylesheet" runat="server" href="/css/pdf.css" rel="stylesheet" type="text/css" media="all" />


ExpertPDF and Caching of URLs

Wednesday, July 14, 2010

execute Javascript inside ASP.NET UpdatePanel

inside the Page_Load:

//upnlControl is an UpdatePanel defined in the .aspx
ScriptManager.RegisterClientScriptBlock(upnlControl,
upnlControl.GetType(), upnlControl.ClientID,
"$(document).ready(someNamespace.init);", true);

inside the js file:

// namespace
var someNamespace = someNamespace ? someNamespace : {
/*
* handleSomeClickEvent
* handles some click event
* when something is clicked
* inside the update panel
*/
handleSomeClickEvent:function() {
alert('Wow! This runs every time the element is clicked!');
},
/*
* Init
* Initializer that will run
* on each page load.
*/
init: function() {
// setup event handlers
$('.someSelector').click(someNamespace.handleSomeClickEvent);
}
};
// kickoff someNamespace.init when DOM is ready.
$(document).ready(someNamespace.init);

Thursday, July 8, 2010

birthday resolutions

MUST DO
1. bake red velvet cake
2. study for the GRE (to take in August and in October if necessary)
3. take an anthropology class this fall
4. remember to send cards on time for each immediate family members' birthday, anniversary, mother's day, and father's day

TO DO
1. talk more to MJ... in Zhōngwén!*
*saying something cute is sometimes the only way to get him to correct me or talk back
2. sew more... pajama pants, skirts, etc
4. take winter yoga class
5. visit a friend living abroad

Wednesday, July 7, 2010

I just got back from VT...

and that pretty much sums it up.

I'm reading Mountains Beyond Mountains. I'm at the part where Ophelia, with the inherent task in life of being Roald Dahl's daughter, is experiencing the fortune, and eventual misfortune, of falling in love with Paul Farmer.

Its the second book I've read in a really long time. Which makes me happy about my current state of affairs.

I suddenly got weirded out about being 26. Today I ordered the best crepe on the menu at Mr. Crepe, after 1.5 years of visiting Boston, and 1.5 of living in Boston (Fresh tomatoes with scallions and cilantro with brie). Then I also suddenly got weirded out by people leaving: some for a short while, some for good, some already gone. Maybe its empathy for getting left behind, because I've started feeling like maybe my time might be coming, too.

MJ: the 5 - 10 year travel list http://www.foreignpolicy.com/articles/2010/06/21/postcards_from_hell?page=full
MJ: but seriously
MJ: are there any countries that you'd rather see?

Wednesday, June 23, 2010

fixed my missing HTTP Response Content-Type Header in Firefox

And so I posted to the Aspose forums to help a brother out!

http://www.aspose.com/community/forums/245095/response.flush-clears-content-type-header-in-documentation-example-for-aspose.slides-for-.net-.sa/showthread.aspx#245095

"In IIS7 integrated pipeline mode, a call to Response.Flush causes the response to be sent without the content-type header unless a content-length has also been specified. In IIS6 or classic pipeline mode, the content-type header is sent as expected."

Posted by richard_deeming on 8/4/2009 at 7:44 AM
The issue appears to be in the internal HttpResponse.UpdateNativeResponse method:

if (((this._contentType != null) && this._contentTypeSet) && ((bufferedLength > 0L) || this._contentLengthSet))
{
HttpHeaderCollection headers = this.Headers as HttpHeaderCollection;
string str = this.AppendCharSetToContentType(this._contentType);
headers.Set("Content-Type", str);
this._contentTypeSet = false;
}

If the content length has not been set and no content has been generated, the content type header will not be sent.

In contrast, for IIS6 or classic pipeline mode, the WriteHeaders method calls GenerateResponseHeaders, which has:

if ((this._statusCode != 0xcc) && (this._contentType != null))
{
string str2 = this.AppendCharSetToContentType(this._contentType);
headers.Add(new HttpResponseHeader(12, str2));
}

Posted by Microsoft on 8/5/2009 at 2:55 AM
Thank you for your feedback, We are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com/)

Posted by Microsoft on 8/6/2009 at 8:13 PM
Thanks for your feedback.
We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Thank you

Posted by Microsoft on 9/23/2009 at 10:16 AM
This issue will be fixed in the next major release of the ASP.NET and the .NET Framework.
Thank you for submitting this issue on Connect.

http://connect.microsoft.com/VisualStudio/feedback/details/480689/response-flush-clears-content-type-header