Be the best stalker you can be



I recently retired from an illustrious career in stalking and decided today that I need to pass down my incredible knowledge to aspiring stalkers.

I know it's a bit of a cliché but you're never too young or old to become a stalker.

The following list contains some crucial information you need to know if you want an impeccable career like I had.

  1. Stalkers Anthem

    The first thing that you need to know as stalker is of cource the stalkers anthem, but what is the importance of an anthem?

    Well, think about the scene in Rocky 1 where Sylvester Stallone runs up the stairs with eye of the tiger playing in the background, its all about being inspired, being proud of who you are and what you're about to do.

    So every day before you go out to stalk your stalkee, remember to play the stalkers anthem "Every Breath You Take", thank you Sting - You're an inspiration to all of us!

    Every breath you take
    Every move you make
    Every bond you break
    Every step you take
    I'll be watching you

    Every single day
    Every word you say
    Every game you play
    Every night you stay
    I'll be watching you

    Oh can't you see
    You belong to me
    How my poor heart aches
    With every step you take








  2. Build a shrine



    Building a shrine in honour of your stalkee is quite important, I am sure you're familiar with the phrase "keep your eyes on the prize" - at the end of the day thats what its all about.

    One crucial component to your shrine is of course the use of photos, you need to have as many photos as humanly possible of your stalkee, it would also be highly advisable to pin these photos against a wall, preferably a wall thats not too visible to everyone, e.g. inside a cupboard wall - because you dont want anyone to think you're creepy or anything.

    Also avoid the use of candles in your shrine, you're a stalker not a serial killer! (you also dont want to burn down your cupboard in the process)

  3. Equipment



    Ever wonder what bird watching equipment is really for?

    No stalker can truly be successful without a good pair of binoculars, get yourself the strongest pair money can buy, acquire a really big telescope if that's not good enough. (bird watching is a good cover story though)

    Night vision is also a must have, your stalkee must go to bed eventually like everyone else?

    Also get yourself a strong listening device and become skilled at lock picking in order to plant audio surveillance equipment in their phones, cars etc.

    While on the subject of breaking an entering, why not hide a few high resolution cameras in some discreet areas of their habitat and remember to leave a red rose on their pillow every night before they go to bed.

  4. Social Networking

    The advent of social networking really made stalking a lot easier, facebook, google plus, twitter just to name a few.

    I found that twitter is only second to google plus when it comes to being stalker friendly, while facebook makes it a little bit harder, but with some creative swindling it might become your most powerful stalking ally.

    Now the key to using social networking as a stalking tool is of course the use of aliases, you will most definitely need to create multiple aliases - doing so will make it less suspicious.

    You might ask me how many aliases do you need to be effective, is there some kind of formula I can use?

    Well, I found after doing years of research that there is in fact a relation between your followers on twitter, facebook and google plus and the number of aliases you need, simply multiply by two.

  5. Clothing



    Avoid wearing clothing that would draw too much attention to yourself; as stalker you must be stealth minded towards everything wardrobe related.

    Night times you're ordinarily going to spend most of your time in obscurity up in trees and behind bushes, so make sure that you've got a lot of black clothing in your cupboard (also useful for hiding your shrine).

  6. Join the CIA



    Chances are fairly good that your stalkee will be surrounded by friends, family, a spouse or someone, now in the event of them noticing you, you might need to defend yourself physically (or legally).

    So I would definitely recommended that you go for self-defence classes, a quick solution would be to simply join the CIA - you'll get all the training you need to be an effective stalker plus a good cover story. You would also save a lot of money on equipment etc.

  7. Scheduling

    If you've been paying attention you will realise that stalking is a rather expensive, time consuming endevour.

    You might ask, where will I find the time and money to do all of this? (unless you've already managed to join the CIA)

    Well, with your initial investment of time and money you will be able to gather an immense amount of invaluable information about the comings and goings of your stalkee.

    Remember that your life is nothing more than an extension of the person you're stalking and you wont ever be complete if you cant smell their hair, so you need to schedule and mold your whole life around this person.

    Ideally you must pursue the same career or work in the same office building as your stalkee, doing so will greatly simplify everything.

  8. Golden rules

    1. Never make eye contact
    2. Maintain your distance
    3. Know the law (what is a restraining order?)
    4. Never befriend your stalkee


Remember boys and girls, no is only a few letters away from yes.

Happy stalking!




Post/View comments
 

AjaxControlToolkit (ASP.NET/C#) : CascadingDropDown Extender - Part 2



Source Code

In the previous part of this post we had a quick look at how to use the CascadingDropDown extender, in this part we're going to look at other perhaps more interesting properties but more in particular databinding (something which seems to be a common question about this extender control).

If you ever attempted to use traditional databinding (e.g. binding your DropDownList to a datasource) in conjunction with this extender, you might have noticed your items being overridden, the reason being that the extender takes control of the DropdownList being extended and performs its own databinding.

Note that it performs binding client side (even on initial binding), like seen in the following firebug screenshot:

Cascade Firebug trace
(would have been nice if initial binding didn't perform client side calls and rather retrieved the state of the DropDownLists as part of the main page request)

So basically we're going to have to leave it up to the extender to perform databinding.

Furthermore if we need to provide a default value (e.g. previously selected values), we can do that by setting the SelectedValue property on the extender, like seen in the following snippet.

 
<asp:CascadingDropDown ID="cddlCountries" runat="server" TargetControlID="ddlCountry"
    Category="Country" PromptText="- Please Select -" ServicePath="~/Services/Service.asmx"
    ServiceMethod="GetCountries" SelectedValue='<%# Eval("CountryId") %>' LoadingText="Please wait">
</asp:CascadingDropDown>
 
<asp:CascadingDropDown ID="cddlProvinces" runat="server" TargetControlID="ddlProvince"
    ParentControlID="ddlCountry" Category="Province" PromptText="- Please Select -"
    ServicePath="~/Services/Service.asmx" ServiceMethod="GetProvinces" SelectedValue='<%# Eval("ProvinceId") %>' LoadingText="Please wait">
</asp:CascadingDropDown>
 
<asp:CascadingDropDown ID="cddlCities" runat="server" TargetControlID="ddlCity" ParentControlID="ddlProvince"
    Category="City" PromptText="- Please Select -" ServicePath="~/Services/Service.asmx"
    ServiceMethod="GetCities" SelectedValue='<%# Eval("CityId") %>' LoadingText="Please wait">
</asp:CascadingDropDown>
 


One important thing to note is that the physical placement of the CascadingDropDown extenders in your markup is important, if you swapped your CascadingDropDown nodes around (cddlCountries with cddlCities) your SelectedValue won't be set, this is thanks to the way the JavaScript gets generated for this extension.

So I would suggest that you place your nodes in order of the cascade relation - starting with the top most parent.

Before I realised this small little detail, I made use of contextkeys (enables us to send through additional values) like seen in the following markup:

 
<asp:CascadingDropDown ID="cddlCities" runat="server" TargetControlID="ddlCity" ParentControlID="ddlProvince"
    Category="City" PromptText="- Please Select -" ServicePath="~/Services/Service2.asmx"
    ServiceMethod="GetCities" UseContextKey="true" ContextKey='<%# Eval("CityId") %>'">
 


Which calls a webmethod that looks something like this.

 
[WebMethod]
public CascadingDropDownNameValue[] GetCities(
  string knownCategoryValues,
  string category, string contextKey)
{
    StringDictionary values = CascadingDropDown.ParseKnownCategoryValuesString(knownCategoryValues);
    Int32 ProvinceId = Convert.ToInt32(values["Province"]);
    return City.Get(ProvinceId).Select(p =>
        new CascadingDropDownNameValue(p.Title, p.CityId.ToString(), 
            p.CityId == Convert.ToInt32(contextKey))
    ).ToArray();
}
 


Which brings me to the small concern I mentioned in the previous part of this post, well... its actually more of a general concern when working with Ajax, observe the following image.

Cascade Error

There are a number of things that could have gone wrong in the preceding image causing the error 500, some we can/must catch & handle server side before they even reach the browser, but what about those we can't, or deliberate (for some dark reason) ones?

Unfortunately the creator of this extender didn't provide default functionality to handle these errors, would have been nice if they followed the whole success/failed callback "methodology" that we see when using PageMethods, instead of simply populating the DropDownList with an error 500 message.

I did however manage to create a small little workaround by means of the WebRequestManager, which I hope someone that wants more control over their requests might find useful, observe the following snippet:

 
function pageLoad() {
    Sys.Net.WebRequestManager.add_completedRequest(On_completedRequest);
}
 
function On_completedRequest(sender, eventArgs) {
    var url = sender.get_webRequest().get_url();
    if ((sender.get_statusCode() == 500) && (url == 'Services/Service.asmx/GetCities')) {
        alert(sender.get_statusText());
    }
}
 


Basically I provided a callback (attach event) which will be called when our ajax requests completes and within our handler/callback function we can determine if a request failed (error 500 in this case) and which url caused the failure (url gives us a clue of where we are in the process) then handle it appropriately from there.

Now there is another "non-error" scenario that we can also manage like this, imagine the service used for populating the cascade gets delayed for some reason (e.g. network traffic, database performance), setting the LoadingText for the cascade won't be enough to prevent the user from posting the form.

In order to prevent the user from submitting dodgy data, the basic idea is to disable the submit button (by default), with "please wait" text as button text and as soon as the appropriate request completes we enable the button again (inside our On_completedRequest callback).

All in all I don't think this is a bad extender, we've successfully used it in a few of our projects despite a few small little glitches, but nothing that can't be sorted out.




Post/View comments
 
First 1 2 3 4 5 6 7 8 9 10 Last / 65 Pages (129 Entries)

Latest Posts

MS SQL: Parameter Sniffing


2012-05-21 22:38:48

Be the best stalker you can be


2011-12-13 22:33:54

Syntactic sugar (C#): Enum


2011-08-04 16:50:18

Top 5 posts

Moving items between listboxes in ASP.net/PHP example


Move items between two listboxes in ASP.net(C#, VB.NET) and PHP
2008-06-12 17:07:43

Simple WYSIWYG Editor


Creating a WYSIWYG textbox for your website is actually quite simple.
2007-02-01 12:00:00

C# YouTube : Google API


Post on how to integrate with YouTube using the Google Data API
2011-03-12 08:37:51

Populate a TreeView Control C#


Populate a TreeView control in a windows application.
2009-08-27 16:01:03

Cross Browser Issues: Firefox Word Wrapping


Firefox word wrapping issues
2008-06-09 09:51:21