WHY hasn't google fixed this? Bonus - a new word.

by Jesse 19. August 2008 16:50

I happen to notice some activity on my network this evening and, well, that shouldn't, so I looked into it.  Upon a google search regarding UDP port 50085 and came across a term, GateMAC -- search away!  What I found was the following clones (see:ALL THE SAME).  This irritates me to no end.

http://www.pcreview.co.uk/forums/thread-3383218.php

http://www.winvistaclub.com/forum/windows-vista-general-topics/7031-gatemac.html

http://forums.techarena.in/vista-help/891380.htm

http://www.eggheadcafe.com/software/aspnet/31485161/what-is-a-gatemac-network.aspx

http://www.vistax64.com/vista-general/120869-what-gatemac-network.html

http://www.mindfrost82.com/f166-windows-vista/39494-what-gatemac-network.html#post541507

6 of them? I mean seriously. that's ALMOST as bad as having search results of search results.  What the hell!?  This does nothing than waste my time and clutter my searches with CRAP.  From now on, I'm calling them spoogle.  That's right, spam + google = spoogle.  From now on, when I run into spoogles, I'm posting them.  How exactly are these things created?  WHY are they created?  More ads?  More angry blog posts from people like me?  What's the reasoning behind this crap?  Egh, and to think, sometimes I found things useful @ egghead.

Oh and no, none of them contained a useful answer.  I ended up writing a quick IPSec policy that prohibits 50085 udp traffic outside of my home network, period.  Take that.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

Misc | Scam | Weird

New kind of scam - text messages

by Jesse 19. August 2008 11:32

Around 3pm today I get a message on my phone from data@cuofohio.org and the message went as such

Your Credit Union of Ohio services was suspended for suspicious activity, call us at 3054337563

Immediately my BS flags were going off.  For one, CU of Ohio operates in :GASP: Ohio.  305 goes back to FL.  So far, so full of it.  Next, I do a google search for that number -- nothing found useful.  So far, STILL full of it.  The last bit came when I called them from THEIR website ...and low and behold, the message contained a comment about the text message.  Hopefully, if anyone else searches for 305-433-7563, they'll get this page and realize its a fraud.

If it looks like BS and smells like BS...

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Scam

Interesting behavior and a difference between List.Contains( and List.Exists(

by Jesse 19. August 2008 05:30

A nice little suprise this morning!  A quick hit on it - .Contains() returns a bool value and expects you to pass in an object that is in your list whereas .Exists expects a predicate (but still returns a boolean).  Let's dive right into this because its easier to show than blab/explain.  Make a new list, shove it into view state.  Feel free to add this where ever you like, just as long as it is not in pageload, make it a button event.

List<string> Ids = new List<string>();
Ids.Add(
"007");
Ids.Add(
"008");
Ids.Add(
"009");
ViewState.Add(
"Agents", Ids);

Drop a second button out there and add the following code...

List<string> SavedAgents = ViewState["Agents"] as List<string>;
string FoundAgent = "008";

bool ContainsAgent = SavedAgents.Contains(FoundAgent);

bool IsSavedAgent = SavedAgents.Exists(delegate(string agent)
{
    
return agent == FoundAgent;
});
 

This works, both values are true.  "So what's the difference?" -- Create yourself the following object...

[Serializable()]
public class Agent
{
    
public string AgentId { get; set; }
    
public string AgentName { get; set; }
    
public string CurrentLocation { get; set; }
    
public Agent(string agentId, string agentName, string currentLocation)
     {
         
this.AgentId = agentId;
         
this.AgentName = agentName;
         
this.CurrentLocation = currentLocation;
     }
}

and switch out the code just a touch that loads up the viewstate...

List<Agent> agentList = new List<Agent>();
agentList.Add(
new Agent("007", "James Bond", "Las Vegas"));
agentList.Add(
new Agent("008", "Unknown", "Unknown"));
agentList.Add(
new Agent("009", "David Brabham", "UK"));
ViewState.Add(
"Agents", agentList);

and the check behind button 2 like so...

List<Agent> SavedAgents = ViewState["Agents"] as List<Agent>;
Agent foundAgent = new Agent("008", "Unknown", "Unknown"
);
bool
 ContainsAgent = SavedAgents.Contains(foundAgent);
bool IsSavedAgent = SavedAgents.Exists(delegate(Agent
agent)
{
     return agent.AgentId == foundAgent.AgentId;

});

This might surprise you, but ContainsAgent will be false.  If you do "return agent == foundAgent" for the .Exists, it will also be false.  I'm -guessing- it's using reflection.  Because of this, I insist using .Exists instead, since you can test properties directly.  Even more curiously, using the various .Equals yeilds false, such as :

bool IsEqual = Equal(SavedAgents[1], foundAgent); ...or

bool IsEqual = SavedAgents[1].Equals(foundAgent); ...or even

bool IsEqual = foundAgent.Equals(SavedAgents[1]);

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

.Net | C# | Coding

Silverlight header?

by Jesse 17. August 2008 09:50

I've been kicking around this idea for a little while and it gives me a good excuse to use Beta 2 of silverlight -- a new, semi-interactive header for my blog.  I'm not completely sure how this'll work, probably with a master page swap out, but we'll see. 

Ideally, I'd like to have my header, as you see it now, only with ...I don't know, maybe a water effect.  You click or move across it and ripples appear on it.  Something seemingly simple ...maybe?  Well, off to work.

8/18

After some of that work I ran into something interesting -- I'd like to stretch out the header text like I have currently and I happen to find a property named "FontStretch".  After some googling, the jist of it is: some fonts you can stretch, others you can't, and its an enum style value as well (normal, expanded, condensed, like in word) and it appears verdana is not one of them which doesn't add up to me.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Silverlight

Ignored by Ohio State Rep, Dan Stewart, 25th District

by Jesse 12. August 2008 17:19

If you have no interest in politics at all, stop reading now and ignore.

I was part of city government for a while.  Not an elected official or anything but I was kinda higher up in the ranks.  I also was involved in a campaign, "support the peeples court!" (I'm AMAZED that site is still up!) and that was fun as well, which takes me to my next issue...ignoring your constituents, which is a fancy way of saying citizens you represent, is really dumb.  Ignoring the ones that are motivated, with blogs, is even worse.

Recently in Ohio, a certain bill was put up, voted on and passed that was very common sense (yes, I read the bill).  I went to review how MY rep voted and was personally offended to find out he voted NO.  Being a curious person, I genuinely wanted to know why, maybe there's something I missed?  I NEVER RECIEVED A REPLY, at all, ever.  He could've literally drove down the street and made a personal visit but I guess he's too busy.  This is overly annoying and downright offensive ...not for the lack of a visit but the lack of a simple email reply.  For verification, here's my email, minus my home address, copy, paste.

from: Jesse Riley
to: district25@ohr.state.oh.us

date: Thu, May 29, 2008 at 2:11 PM
subject: Vote on SB184
mailed-bygmail.com 

Representative Stewart:
 
I just happened to come across the vote for SB184 and was somewhat surprised by your vote.  On paper, 184 (also dubbed "Castle Doctrine") seems to make a lot of sense, your nay vote cast raises questions -- maybe I'm missing something from this bill or a pitfall somewhere that the 23 nay votes might foresee a problem?  Can you please explain your vote?
 
Jesse Riley

I know for an absolute fact gmail addresses get though their servers.  I also know for an absolute fact they have interns to check these emails.  I hope that at some point Dan Stewart finds this and gives me an answer.  Otherwise, I'm still waiting and I've given you MORE than enough time.  (Honestly I don't expect a reply)

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Government

xsd.exe revisited

by Jesse 12. August 2008 03:04

This morning I was having a battle royale with a small xml file and fighting with the idea of "what's the best way".  As usual, there are approx. 2 billion ways to do it, about 3 of them are the "right" way and, of course, there's 1 that's the best way.  Mildly annoyed (xml files and I have a history, mutual love/hate relationship) I tossed the question out and Lori says to use xsd.exe to create the things I need.  Ahhh yes, xsd.exe, how I remember thee.

the ole xsd has come along since last I used it with 2.0 and I was very happy to see this ...

Option Description

/enableDataBinding

Implements the INotifyPropertyChanged interface on all generated types to enable data binding. The short form is '/edb'.

enable databinding with INotify!  Sweeeeeeet.  They also include a linq aspect of it as well.  Nice.  I don't need the linq part, but that INofity will be perfect.  To create the xsd, I ran ...

xsd C:\xmldata\myXmlFile.xml /out:C:\xmldata\

and get my nice xsd file. From there, I want the classes with that awesome INotify (/edb) and I want to start on a particular element makes a cleaner class (/e:myXmlElement) and I want it in c# (/l:cs) ...

xsd C:\xmldata\myXmlFile.xsd /classes /e:myXmlElement /l:CS /edb /out:C:\xmldata

It's too bad the output class STILL comes with Arrays.  I like lists myself, but can't complain, easy fix.  Now lets make this do something useful...like this. 

StreamReader reader = new StreamReader(Server.MapPath("MyXmlFile.xml"));
XmlSerializer serial = new XmlSerializer(typeof(MyXmlFile));
MyXmlFile xmlData = new MyXmlFile();
xmlData = serial.Deserialize(reader)
as MyXmlFile;
this.RadGrid1.DataSource = xmlData;
this.RadGrid1.DataBind();

Solid.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags:

Home improvment

by Jesse 6. August 2008 03:08

Some aspects of home improvement I hate.  Clean up being number one, closely followed by plumbing.  Well, I had a contractor out a few weeks ago and told him of this side project I might have him tackle regarding some very poorly planned plumbing in the basement.  How bad?  I've hit it with my head many times trying to get things out of the washer.  This isn't a problem for many, but it was becoming painfully obvious something had to be done.  He mentions something called "Shark Bytes Bites" and how easy it is.  I find out there's two brands, Shark Bites and Gator Bites, same thing just from Home Depot and Lowes. 

We've all heard this kinda crap before from an expert that something is "really easy" so I had my doubts.  Guess what?  It is that easy and easier.  In under two hours I did the whole thing.  From water off to water on, the whole deal was painless.  So painless that when I had it all done, I checked everything 2-3 times because I thought I had missed something.  All I needed was a haxsaw (yes, spelled it that way on purpose) and some sandpaper (deburr) and it was a total walk in the park.


Nice, clean, no drama.  I'm a huge fan.  Below is the pipes I cut out and the infamous elbows that would crack me in the skull -- I'm glad they're gone.

One thing they recommend is creating a plumbing manifold, which is brilliant.  If When I do this kind of thing again, I'm going straight for these things.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Cuil

by Jesse 1. August 2008 04:25

I'm sure you've heard by now, there's a new "me too!" search engine, Cuil.  Founded by someone that sold some stuff to google, it was released with a ton of fanfare.  I'm not one to buy the hype, but to give it a fair shake, Let's put it to a simple test.  I am going to conduct a semi-scientific comparison between cuil and the other major search engines.  Yahoo, Google and Live.  First up, I want to find the download for the new KDE 4.1 release.  I will not be logged into any site during these tests and will include the origional search I did along with an image of the first page.  If a good result is returned, it will be highlighted in red.  I will not be using search tools (google tool bar, yahoo tool bar, etc).  I will be going directly to the main site and typing in my search.

-- Test 1 --

Search entered : KDE 4.1 Download

Live : Link

 

 Google : Link

 

Yahoo : Link 

Cuil : Link 

Winner on this one, and this surpised me, Yahoo.  1st return, dead on.  The rest of them, with the exception of Cuil, had acceptable results within the first page (all within first 3).  Cuil disappointed me on this one, but curiously, a LOT of the results came back from l10n.kde.org so thats -close- but it seems the results were more -informational- not discovery.  Onto the next test.  Clear out the cache, and onto the next test.  I want to know what the weather's like in Columbus Ohio...

-- Test 2 --

Search entered : weather conditions columbus ohio

Live : Link

Google : Link

Yahoo : Link

 

Cuil : Link

 

Winner on this one is arguable.  Yahoo and Google provide a quick hit extended forecasts, but all 4 return links on the first page are the weather for the Columbus Ohio.  Now I want to find out something totally different.  I want to find a formula that isn't searched for much but any EET would know about it - LaPlace (pronounced La plaz) Transforms.  More importantly, I'm going to intentionally spell LaPlace as LaPlase and ask for an example...off I go.

-- Test 3 --

Search entered : LaPlase Transform Example

Live : Link

Google : Link 

 

 

Yahoo : Link

Cuil : Link

Winner on this one is google - first two results are examples that I'd expect.  Something strange on the Cuil -- the left most result came back with a keyword spamming "mywebpage.netscape.com" -- hardly site worth looking at.  Next search, I want to use a very vague search, American LeMans (racing).  This should return a ton of stuff for all of them.  With that, let's see what happens...

-- Test 4 --

Search entered : American LeMans

Live : Link

Google : Link

 

Yahoo : Link

Cuil : Link

Initially, there's no winner here either, BUT ...and that's a full wholesome but, Cuil provides something that's pretty sweet -- "Explore by Category"

I like this!  Now THAT is a nice bonus.  Maybe I'd like to look more into a driver or some other bit of racing.  For that, I give them winner of this final test.

Overall, I do NOT think that Cuil will be the end all, fix all to google.  Not in the least bit.  I do think they're category thing is different but I also would like to bring something else up -- the picture associations.  Sometimes there's images that show up with searchs that ...don't add up, at all, such as a Cuil Search for Jim Holmes.

That's ...not what he looks like ...unless there's something he's not telling me about his kids.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Threading

by Jesse 31. July 2008 08:06

Simply put, threading is parallel code execution.  If you have a computer with multiple processors, chances are you have seen the effects of multithreaded programs.  For this code example, there's two calculations done multiple times on different threads.  First one is for Kenetic Energy, Ke = (1/2) * M * V^2 (Kenetic Energy = half mass times velocity squared) and Ohms Law of V = IR (voltage = impedence * resistance). In this example, notice the Kenetic Energy calculation completes before the Ohms Law.

More detail explinations and examples can be found here http://www.albahari.com/threading/.

        const long howManyTimes = 500000000;

        static void Main(string[] args)

        {

            Console.WriteLine("Enter Mass : ");

            double mass = 0;

            double.TryParse(Console.ReadLine(), out mass);

            Console.WriteLine("Enter Velocity : ");

            double velocity = 0;

            double.TryParse(Console.ReadLine(), out velocity);

            //spawn a thread.  This does NOT start the execution of that thread.

            Thread thread = new Thread(delegate() { CalculateKeneticEnergy(mass, velocity); });

            Console.WriteLine("Enter Voltage : ");

            double v = 0;

            double.TryParse(Console.ReadLine(), out v);

            Console.WriteLine("Enter Ohms :");

            double resistance = 0;

            double.TryParse(Console.ReadLine(), out resistance);

            int z = 0;

            double i = 0;

            //start the othe calculation

            thread.Start();

            //Calcuate Amps

            while (z < howManyTimes)

            {

                i = v / resistance;

                z++;

            }

            Console.WriteLine("Amps = " +i.ToString());

           

            //Join tells the host process to wait on other spawned threads, such as this one.

            thread.Join();

            Console.ReadLine();

        }

        static void CalculateKeneticEnergy(double mass, double velocity)

        {

            int i = 0;

            double kE = 0;

            while (i < howManyTimes)

            {

                kE = (0.5 * mass * (velocity * velocity)) / 2;

                i++;

            }

            Console.WriteLine("Kenetic Energy = " + kE.ToString());

        }

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Java - Day 1

by Jesse 31. July 2008 04:14

The only way I ever learn how to use something is to use it outright and not by code examples.  Just doesn't work for me that way.  So I went out and bought "The Complete Reference - Java Seventh Edition" -- it was the only one that had a beginners section, without the "ok, this is a computer".   Just flipping randomly, chapter 11 covers multithreading ooo,  that'll be fun. Chapter 17 covers the Java.util : the collections framework...25 deals with images, fun.  29, "Intorduction to Swing".  Hmm. 

----- Consider items from here on down my notes. ------

I've kinda skimmed over chapter 1-7 so far and I'm on chapter 8.  So far, the syntax is almost 1:1.  Console.WriteLine("string") == System.out.println("string").  Another syntax difference is inheritance.  Inheritance in Java is called "extends".  For instance in C# ...

Public Class Class1{ }

Public Class Class2 : Class1 { }

Class2 would inherit Class1.  In Java, its similiar but different...

class Class1 { }

class Class2 extends Class1 { }

Not that bad, very easy so far.  Method overriding seems to be exactly the same, no difference there.  Same goes for making abstract classes and methods.  There is however a "final" keyword that inhibits overriding.  "final void SayHi();" would stop any inheriting class from overriding that method.

Chapter 9, Packages and interfaces -- Packages are like using includes/usings statements.  I -think- they're DLL style items like in .net, you add them, give a reference in your app, carry on.  Using statements are slightly different (more C/C++ style) -- import java.lang.*; for instance includes everything in the java.lang namespace and like C# you can use a fully qualified name if you wish, such as java.util.Date.  Interfaces are the same too...

interface CallBack {
     void callback(int param);
}

An interesting bit - "you should be careful not to use interfaces casually in performance-critical code" because of the overhead to create the objects.

Imagine that, there's a Try Catch Finally, exactly like in C#, even with the multiple Catch statements (say IOException and Exception).  Same with throws AND threading.  Wow this is becoming annoying, there's even a thread.Join (that means "wait for this thread to complete").

With that, I am stopping @ page 285.  I'm keeping my false sense of empowerment until tomorrow or ...sometime soon.

Currently rated 5.0 by 2 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Like the description says, at my core, I'm a scientist and engineer.  I came from humble beginnings on a 486DX2 Packard Hell playing doom2 on IPX to in a small time retail shop and got into hardware (ISO layers FTW!) and it was all downhill from there.  I'm infinitely curious about almost everything and always wanting to know.

Some of the stuff I'm currently into/researching...

Sitefinity

Ninject

Subsonic

Java

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's, their brother nor their dog's view in anyway.  At all.  Ever.

© Copyright 2007-2008