Thursday, April 30, 2015

Tor

direct from https://www.torproject.org/projects/torbrowser.html.en is this explanation: "Tor software protects you by bouncing your communications around a distributed network of relays run by volunteers all around the world" ...I'm reading an article about a drug trafficing web site which has been shut down (was called Silk Road) which made it's users use Tor for anonymity.

Addendum 5/1/2015: Now I've finished reading the article. It seems that Silk Road currently lives again as Silk Road Reloaded and that a different browser named IP2 must be used to interface with it.

mouseenter, mouseleave, and affecting every child but the first one in jQuery

$('#DummyData tr').not('#DummyData tr:first').bind('mouseenter', function () {
   $(this).attr('style', 'background-color: #FFFFCC; cursor: pointer;');
});
$('#DummyData tr').not('#DummyData tr:first').bind('mouseleave', function () {
   $(this).attr('style', 'background-color: #FFFFFF; cursor: pointer;');
});
$('#DummyData tr').not('#DummyData tr:first').bind('click', function () {

 
 

...this would be pretty good for making every row in an HTML table clickable and also highlightable upon mouseover save for the first as perhaps the first is used as a header instead of a data row.

Get the IP Address of the thing poking at you in an ApiController in C#!

string ip = HttpContext.Current.Request.UserHostAddress;

 
 

Addendum 11/2/2015: On a similar note...

HttpContext.Current.Request.Browser.Browser

 
 

...will give you a friendly, simple name for the browser touching you, and if you set a breakpoint in the ApiController while debugging and then open the Immediate Window and type the following you will get a dump of all sort of facts about who is peering in your window from outside:

HttpContext.Current.Request

Tuesday, April 28, 2015

skiplagged.com

Imagine you want to fly (by, yes, airplane) from Austin to Baltimore, but that instead of flying direct from Austin to Baltimore it turns out to be cheaper to book a flight from Austin to Boston with a layover in Baltimore and you just get off in Baltimore midway through what was meant to be a longer journey in the eyes of the airline. You can't take any luggage other than carryon in such a loophole expedition, but you may save a few dollars and you're not technically breaking any laws. skiplagged.com finds pricing to price flights with this quirk in mind and finds people cheap flights that way. There has been at least one lawsuit aimed at pushing this party out of business but they are still around, changing the game, and exposing a secret that airlines would rather you not know about. On the other hand, I've heard that the airline business is a terrible business to be in and that air travel has just gotten progressive worse all of my life. I guess this doesn't help make the lives of the airfare-fed easier by squeezing pricing even more, but it is a legitimate insight in a capitalist society.

May I use a space inside of an id tag in HTML?

No! Don't be stupid. Duh. This details the HTML4 and HTML5 standards for element naming and neither of them allow it. The HTML4 standard is a little more restrained than that of the HTML5 standard and I'd just do things it's way to accomodate both. That criteria: ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").

I learned today that a PlayStation 3 has a Blu-ray player bundled into it!

Why does it need it? I don't want to know.

IsNullOrWhitespace

A more complicated version of this...

if (!String.IsNullOrEmpty(whatever)) {

 
 

...the following will also check to see if a string has characters which are just spaces.

if (!String.IsNullOrWhitespace(whatever)) {