Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

sph3rex

@sph3rex
About
Posts
53
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • regular expression cleanup!
    S sph3rex

    a regexp like [\x00-\x09\x0B-\x0C\x0E-\x1F\x22\x3B\x3C\x3E\x7C] which is equivalent with if ( (ASCii <=9) || (ASCii == 11) || (ASCii == 12) || ( (ASCii >=14) && (ASCii <=31) ) || (ASCii == 34) || (ASCii == 59) || (ASCii == 60) || (ASCii == 62) || (ASCii == 124) )... hope i didn`t omit any of the ascii numbers or miscalculated their value :sigh:

    Code? Yeah i love it fried together with a glass of wine.

    C# html regex performance help question

  • screensaver
    S sph3rex

    take a look @ GetLastInputInfo on MSDN set the bounds according to SystemInformation.VirtualScreen properties and you got the basic idea how to accomplish. And we really encourage "?" signs here so we know what to answer to :wtf:

    Code? Yeah i love it fried together with a glass of wine.

    C#

  • Multiple Choice Exam in C#
    S sph3rex

    you're half wolf or something? ;P

    Code? Yeah i love it fried together with a glass of wine.

    C# question csharp database xml tutorial

  • Flip
    S sph3rex

    pictureBox.Image.RotateFlip([option]) or in the old fashion way with GetPixel() SetPixel(), reordering the pixel array ... anyway i'm sure google would've give you the right answer in a few seconds ... but owh well

    Code? Yeah i love it fried together with a glass of wine.

    C# help question

  • change css using javascript
    S sph3rex

    there aren't like 300k+ results on this matter ... however

    [content]

    var theObj = document.getElementById("myDiv"); theObj.style.[color/backgroundColor/etc] = "whatever value you want to assign"; Code? Yeah i love it fried together with a glass of wine. modified on Tuesday, November 18, 2008 5:58 AM

    Web Development java javascript css tools question

  • Java Script Phone Number, Email, Zip Code etc Validation
    S sph3rex
    1. for emails you could check the mx records for a given email ... tell your developer to look @ checkdnsrr php function 2) zip codes ... google for maxmind zip codes database (or owh ok ... http://http://www.maxmind.com/[^]... there might be other solutions also you just have to look. 3) phone numbers ... enhance your regex ... depending on the area on which your business is planed there should be some "standardization" regarding the number(for example a list of valid area codes etc.) 4) you might need to rethink your aproach ... but finally that's the developer's business. 5) names ... owh well in this sick world sum1 could call his son r2d2 if he's a fan of Starwars, or tok'ra/go'auld if he's a fan of Stargate or whatever else ... imho there isn't too much you can do without over complicating yourself and the server with all kind of regexes.

    Code? Yeah i love it fried together with a glass of wine.

    Web Development java com business tools help

  • PHP Include speedbump
    S sph3rex

    I already responded (though i was a lil off the subject that time :omg: ) to your question when u first started your 1st thread ... your "problem" is because you have one table that holds the entire body together with the header ... The quickest fix would be adding colspan="2" to this and a rowspan="5" to this: [your content is here ... content, content, content, content, content, content, content, content, content, content, content, content, content, content] Code? Yeah i love it fried together with a glass of wine.

    modified on Tuesday, November 18, 2008 5:02 AM

    Web Development php database com help

  • Popup window problem
    S sph3rex

    var winHndl = window.open("","TestWindow");
    winHndl.document.location = "test.asp";

    window.open("full_path_url","name of the window");

    i was asking why u dun use the "direct" way without having 2 declarations for one thing ... but whatever

    Code? Yeah i love it fried together with a glass of wine.

    Web Development help csharp html asp-net sysadmin

  • Popup window problem
    S sph3rex

    wonder why u dun just use window.open("full_path_url","name of the window");

    Code? Yeah i love it fried together with a glass of wine.

    Web Development help csharp html asp-net sysadmin

  • .NET Runtime 2.0 Error Reporting
    S sph3rex

    Did you install any updates lately? To windows 2003 or any software around? I remember about sum of these issues with Symantec software.

    Code? Yeah i love it fried together with a glass of wine.

    C# csharp help com sysadmin windows-admin

  • String Builder Class in .Net
    S sph3rex

    If he would've read the article that sum guy posted when he last asked this question he would've find out how to use Mid in vb6 to accomplish what he wants. This "write my code cause i dun wanna read anything" is starting to be more than boring.

    Code? Yeah i love it fried together with a glass of wine.

    Visual Basic csharp tutorial

  • How to block user from copying data from webpage using javascript?
    S sph3rex

    make sure they dun have a monitor :sigh:

    Code? Yeah i love it fried together with a glass of wine.

    Web Development javascript tutorial question

  • Data Structure
    S sph3rex

    regexp \b[a-z]+\b\t\t([0-9]+) with option multiline and ignorecase

    Code? Yeah i love it fried together with a glass of wine.

    C# tutorial csharp c++ data-structures question

  • one prolem for publishing project
    S sph3rex

    i dun know german and i won't start learning now ...

    Code? Yeah i love it fried together with a glass of wine.

    C# sharepoint sysadmin help question announcement

  • Navigating using Cursor Keys
    S sph3rex

    take the following as an example var cur_elem = -1; function resetElements(prt,cls,omit) { for(i=0;i<=prt.childNodes.length -1; i++){ if(i != omit) { prt.childNodes[i].className = cls; } } } function dosomething(e) { var code; if (!e) var e = window.event; if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; target_elem = (!document.all) ? document.getElementById("testId") : document.all["testId"]; if(code == 38) { if(cur_elem >= 1) cur_elem -=1; target_elem.childNodes[cur_elem].className = "over"; resetElements(target_elem,"normal", cur_elem); target_elem.className = "activeList"; document.getElementById("notice").innerHTML = "Up:" + cur_elem + " .::. Element content:" + target_elem.childNodes[cur_elem].innerHTML + " .::. Total elements:" + target_elem.childNodes.length; } else if(code==40) { if(cur_elem <= target_elem.childNodes.length-2) cur_elem +=1; target_elem.childNodes[cur_elem].className = "over"; resetElements(target_elem,"normal", cur_elem); target_elem.className = "activeList"; document.getElementById("notice").innerHTML = "Down:" + cur_elem + " .::. Element content:" + target_elem.childNodes[cur_elem].innerHTML + " .::. Total elements:" + target_elem.childNodes.length; } } with defined styles like .normal { background-color:#ffffff; display:block; } .over { background-color:#990000; display:block; } .activeList {display:block} ul.def {display:none;} and with the following html:

    *   some value
    
    • some value 2
    • some value 3
    • some value 4
    • some value 5
    • some value 6

    [empty]

    be aware of the fact that the* elements MUST have no space between because of sum reason i dun understand(spaces are treated are child elements of the UL element in FF and opera.) This is a basic example ... further enhancements are up to you. Code? Yeah i love it fried together with a glass of wine.

    Web Development help csharp javascript php algorithms

  • style property regular expression
    S sph3rex

    style[\s]*=[\s]*"([a-z0-9\s;:]+(?!=[>"])) i presume you can write c# code

    Code? Yeah i love it fried together with a glass of wine.

    Web Development regex csharp html com tutorial

  • How to identify Date in a String
    S sph3rex

    Rather than using the regex aproach i would suggest Date.TryParse(in "string containing date", out date_object) ... as date varies on localization it might be a lil overhead building a regex to handle all kinds of formatting and might require, depending on case, a lot more processing time.

    Code? Yeah i love it fried together with a glass of wine.

    C# tutorial question

  • Searching the inbetweens?
    S sph3rex

    IsMatch returns a boolean whether it found or not your regex expression in the input string. The correct way to use regex would be with this basic regex Regex reg = New Regex("""(.+?)""", RegexOptions.IgnoreCase | RegexOptions.Multiline); MatchCollection mtc = reg.Matches("input string"); this will return a MatchCollection which u can loop through to get every match of the pattern in the input string. Use the GetEnumerator method of the above MatchCollection to loop through the matches.

    Code? Yeah i love it fried together with a glass of wine.

    C# question com algorithms help

  • How to cancel System from Shutdown using C#.net
    S sph3rex

    call "shutdown -a" after fetching the reason either using the System.Process namespace either using Microsoft.VisualBasic.Interaction.Shell to cancel the windows shutdown. Also if the user hits shutdown choosing to abort file download, run with one of the options specified above the following shell command: "shutdown -s" for shutdown or "shutdown -r" for restart or "shutdown -t [time_in_seconds] -[r or s] for a "timed" restart or shutdown.

    Code? Yeah i love it fried together with a glass of wine.

    C# csharp tutorial

  • reading XML
    S sph3rex

    rather use /abcd:Identifier/abcd:Identifier to get only the child nodes labeled "Identifier" of the root "Identifier" node. Use the full power of XPath if you went that way ... w3 has a great tutorial on how to use them "productive" ... http://www.w3schools.com/XPath/xpath_syntax.asp[^]

    Code? Yeah i love it fried together with a glass of wine.

    C# xml database performance help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups