cilaes's Profile User Rating: -----

Reputation: 9 Worker
Active Members
Active Posts:
74 (0.08 per day)
12-December 11
Profile Views:
Last Active:
User is offline Jun 29 2014 06:47 AM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Your Car:
Dream Kudos:
Icon   cilaes has not set their status

Posts I've Made

  1. In Topic: Problem With Bank + Atm Program please Help

    Posted 22 Jun 2014


    Have you done any research on NullPointerException and what it means? Are theAccount and PIN valid objects?

    Throwing randomness at your problem and then replying again to your thread that your problem has yet to be solved isn't the way to go about it.
  2. In Topic: How to add play again choice to Hi Lo game

    Posted 22 Jun 2014

    Alex, these gentlemen aren't here to complete your homework for you. Andrew's solution will work regardless whether you get user input or not.

    do {
       // This code will run as long as the condition is TRUE
    } while (TRUE);

    You could also wrap everything you want to loop in a while(TRUE) loop.
  3. In Topic: I Had A Security Problem-PHP/MYSQL On My Site How Can I Prevent This?

    Posted 8 Oct 2012

    Your original problem didn't have to do with not using prepared statements, though. Just bad model design.
    DELETE FROM `table` WHERE `ID`='$id' && `user_ID`='$uid'
  4. In Topic: Similar to HTMLAgilityPack for CSS?

    Posted 29 Aug 2012

    View PostSkydiver, on 29 August 2012 - 01:42 PM, said:

    Use the @ string prefix to make things a little bit more readable. Also use a more descriptive variable name.
    string urlPattern = @"url\(\'?(.*[^\'])\'?\)";

    A quick note about converting everything to lowercase: don't. Just use the option in regular expressions to ignore case. That way you won't have to deal with:
    - incorrect conversion of a URL that is supposed to be mixed case.
    - the Turkish-I problem in case there is a Turkish I is the HTML that stored raw rather than encoded.
    - the overhead of now having 2 copies of your HTML in memory.

    Thanks for the tips. I was using the IgnoreCase option when I had the Regex and Match split into two parts before I discovered MatchCollections and put them together on the same line. I thought that maybe it'd give me issues and I was at the point of just finding the minimum viable solution to put me on the right path.

    I was also wondering why the escaping in a string had to be doubled up, but now I know it's not taken as verbatim literal until the @ is applied. Valuable information.

    I'm also doing some reading up on my regular expressions (I can't count how many times I've been through this)... because that .* wild card isn't very secure at all.
  5. In Topic: Similar to HTMLAgilityPack for CSS?

    Posted 29 Aug 2012

    I've been fighting this for a while and have finally found a plausible solution. I wanted to share it so that if anyone searches for the same they'll have somewhere to start.

    I know there are many flaws with my REGEX, however it gets the job done right now. A big thing I want to point out that had me hung up for a long time is MatchCollection. I was just using Match and was looking for a problem in my regex for not matching recursively, and MatchCollection is what did the trick.

            public List<string> listStyleImages()
                List<string> lstStyleImages = new List<string>();
                string theHTML = this.strHTML.ToLower();
                string re2 = "url\\(\\'?(.*[^\\'])\\'?\\)";
                MatchCollection matches = Regex.Matches(theHTML, re2);
                foreach (Match match in matches)
                return lstStyleImages;

    I am very open to suggestions on improving this tidbit.

My Information

Member Title:
D.I.C Head
Age Unknown
May 25
United States
Years Programming:
Programming Languages:

Contact Information

Skype  altschulec



cilaes has no profile comments yet. Why not say hello?