 |
|  |
|
|
| | 1 | Down at the Shooting Range | by the Delaware Water Gap / fernando (397,488) | | 2 | brynn / re: brynn (369,907) | | 3 | Down at the Shooting Range | by the Delaware Water Gap / brynn (368,674) | | 4 | Down at the Shooting Range | by the Delaware Water Gap / brynn (368,317) | | 5 | Down at the Shooting Range | by the Delaware Water Gap (264,858) | | 6 | Down at the Shooting Range | by the Delaware Water Gap / And Then There Were Trees, and Bullets, and Guns, and Horses, and Indians and Outlaws | What What West... (215,911) | | 7 | Chevrolet Mako Shark Corvette Concept | 1961 / Corvette Stingray Sport Coupe | 1963 (53,314) | | 8 | Chevrolet Mako Shark Corvette Concept | 1961 (48,502) | | 9 | Crysis Single Player Custom Maps / Crysis Warhead | The Expansion Pack (17,241) | | 10 | S.T.A.L.K.E.R. Clear Sky | Screenshots (DX9) / S.T.A.L.K.E.R. Clear Sky | Screenshots (DX10 - DX10.1) (16,226) |
|
|
 |
|  |
|
|
 |
The Alarm that Cried 'Fire!'| icy; Wednesday, December 26, 2007 | | Reads: 241 |
There is a fire alarm system in our building; as I am sure is the case with all other buildings on the island of Manhattan. Our fire alarm system, however is tested vigorously, which I sincerely hope is NOT THE CASE with other fire alarm systems on the same island. These are regular tests, maybe as regular as twice a month, a week, a day. Sometimes they do an upgrade of some sort and test if it works; sometimes there is a construction on one of the floors and they have to test it for operationality. Sometimes they just test it to test the test. The bottom line is we regularly are harrassed by the loud pitch of the audio and the flashes of the visual signals.
These tests are introduced with an announcement, something that would sound like: "We will be conducting a test on the fire alarm system. Please disregard all audio and visual signals. Again, this is a test of the public broadcast system..." - oh sorry, that's something else.
Most of the time, though, the tests are not introduced, but are rather preceeded by the announcement. We get the test first, and the information that the test was just a test and not a bad-ass fire afterwards.
The situation in our building is dire, as far as I can fathom. If we ever have a real fire, that fire alarm system will functions as it is supposed to; and I am pretty much sure that none of us will move our butts in the slightest manner, because we will be sure that it is "just a test" and that we are to "disregard all the audio and visual signals". We are so keen on these alarms that the lung piercing loud noise is just an ambient sound for most of us. The visual signals? Peh, I don't even notice them anymore. It's as if somebody is taking pictures inside, which is quite normal for our studio.
The bottom line is: we ALL WILL burn and die in this building, with the alarms blazing and lights flashing. No one will panic, start screaming and running. We'll just be sitting, listening to music with the headphones and sipping our coffees, trying to block out the alamrs, sure that it is just another test.
... there it goes again... now, where is my coffee... |  | Technorati Ping Request Confirm| icy; Sunday, December 02, 2007 | | Reads: 255 |
I've been working on the "Ping Services" issue this Sunday afternoon. All for a higher good than this crummy site.
I'll post a nicely working C# code here later this evening so that you can have fun with it as well :)
Cheers
Code sample
I have an XML document containing a list of ping sites and the function below grabs it to loop through. Some ping sites accept different parameters, some don't so I just typed a copule of simple fields to enable / disable them. You can add / remove more nodes to extend the functionality.
XML document looks like this <services> <service> <name>Google BlogSearch</name> <masquaradeName>SokSa.com</masquaradeName> <url>http://blogsearch.google.com</url> <methodName>weblogUpdates.extendedPing</methodName> <rssLink>True</rssLink> </service> </services>
What my pinger does is after every post, depending on the type of the post, whether it's a blog post or a regular thread, it sends update request to all the registered ping services. The configuration XML defines what parameters are going to be sent and with what name. Almost all ping services take similar, if not same, parameters; but some enable more - like google - so the XML configuration comes quite handy.
private void SendPing(bool isBlog) { System.Xml.XmlDocument blogPingList = new XmlDocument(); blogPingList.Load("blogPingServices.xml");
foreach (XmlNode service | in blogPingList.DocumentElement.SelectNodes("service")) { string ping = service.SelectSingleNode("url").InnerText; string url = "http://www.soksa.com"; string siteName = service.SelectSingleNode("masquaradeName").InnerText; string methodName = service.SelectSingleNode("methodName").InnerText; string rssLink = service.SelectSingleNode("rssLink").InnerText;
System.Net.HttpWebRequest request = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(ping); request.Method = "POST"; request.ContentType = "text/xml";
using (System.IO.Stream stream = (System.IO.Stream)request.GetRequestStream()) using (XmlTextWriter xml = new XmlTextWriter(stream, System.Text.Encoding.UTF8)) { xml.WriteStartDocument(); xml.WriteStartElement("methodCall"); xml.WriteElementString("methodName", methodName);
xml.WriteStartElement("params");
xml.WriteStartElement("param"); xml.WriteElementString("value", siteName); xml.WriteEndElement();
xml.WriteStartElement("param"); xml.WriteElementString("value", isBlog ? "http://www.soksa.com/default.aspx" : "http://www.soksa.com/threadList.aspx"); xml.WriteEndElement();
if (rssLink == "True") { xml.WriteStartElement("param"); xml.WriteElementString("value", isBlog ? "blog.rss" : "posts.rss"); xml.WriteEndElement(); } xml.WriteEndElement(); xml.WriteEndElement(); } } }
What'smissing from this system is the response coming back from the ping services. I should also take action on Exceptions, for which I did not care a lot for this pretty exercise.
Cheers |
|  |
| |
|
|