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
R

randprin

@randprin
About
Posts
80
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Here John
    R randprin

    i believe, at this point, i'll quote my favorite author, Terry Partchet (in "night watch"): "...Confiscate all weapons, and crime would go down. It made sense. It would have worked, too, if only there had been enough coppers – say, three per citizen. Amazingly, quite a few weapons were handed in. The flaw, though, was one that had somehow managed to escape Swing, and it was this: criminals don’t obey the law. It’s more or less a requirement for the job."

    The Soapbox html com question announcement

  • MQOTD
    R randprin

    DOA! (and it's a sad thing when the movie is actually better then the game)

    The Lounge com tools question

  • Interesting Study Of Advanced Degrees
    R randprin

    over here the rule of thumb is: the degree will make it easier for you to get a job interview. once you passed that hurdle, it's all about experience and knowledge. (although if you want to go into the middle/upper management for any established company a bachelor degree is a minimum)

    The Lounge com question career learning

  • Looking for help querying active directory
    R randprin

    using (var rootDirectory = new DirectoryEntry("LDAP://[Server IP or Host name]", "[user name in the directory]", "[User Password]")) {
    using (var directorySearch = new DirectorySearcher(rootDirectory)) {
    // your filter should be an LDAP Query, the one i put in the sample look a matching name or sAMAccountName
    directorySearch.Filter = string.Format("(|(sAMAccountName={0})(name={0}))", "[User Name you want or account you want]");
    // you can add non standard properties to your query:
    // some samples are "memberOf" for getting all groups the entry you want are related to (1 level up only)
    // or "member" for all members of a group (1 level down only
    directorySearch.PropertiesToLoad.Add("[Name of the property you want, exactly as it appears in the AD]");

               // return an entry if there's a match
               var result = directorySearch.FindOne();
    
               if (result != null) {
                  // by the search result, get the associated directory entry, as the result object can be complex to work with. 
                  var directoryEntry = result.GetDirectoryEntry();
    
                  // Note that entries contain between 40-60 properties by default, plus whatever properties you asked to load 
                  // in the directory search, as long as your domain admin did not restrict access to them 
                  // (in which case the root user you used to start this chain need to have permissions to read those properties)
                  var propertyIwant = directoryEntry.Properties\["Name of the property you want"\];
               }
            }
         }
    

    this should get you started, if you want more then the first item associated with your query, use "FindAll" and then iterate on the results Edit: totally forgot, remember you need to reference System.DirectoryServices to use this code.

    C# tutorial database windows-admin data-structures help

  • New Job
    R randprin

    because all it takes is 20 seconds to break into one (unless your windows are shatter proof)

    The Lounge career learning

  • New Job
    R randprin

    just out of curiosity, how are you leaving your guns in your cars? aren't you worried about it getting stolen? here's it's a crime to leave your gun in a non secure environment (which is why mine is in a secure location at home when i'm not shooting it)

    The Lounge career learning

  • remove server from active directory
    R randprin

    Henry Minute wrote:

    Oh yes it is!

    picky, picky...

    The Lounge css sysadmin windows-admin collaboration help

  • remove server from active directory
    R randprin

    yes, you can, quite easily actually. Edit: sorry, i'll elaborate, as an example it's enough that your LDAP query is based on a common field like common name and no additional tags to ensure it selects only users (or users and groups), and your root entry is the tree root for the active directory, and viola, you can get the entry for a computer and remove it from the tree as if it was any other entry.

    The Lounge css sysadmin windows-admin collaboration help

  • And fanbois the world over fall into catalepsy
    R randprin

    Mladen Jankovic wrote:

    End of the world has started, at least for members of Church The Cult of Apple.

    Fixed it for you.

    The Lounge html ios com sales

  • I swear to the flying Spaghetti Monster, if I had a time machine I would...
    R randprin

    but, but, what would you do with the angry mob of teeagers who had "princess leia in jaba's palace" fantasies...? :laugh:

    The Lounge beta-testing code-review

  • Warning: Are you a freelancer
    R randprin

    1. know what the project parameter are, and how much time and effort you will actually need to complete it.(and offcourse factor in your o0wn profit margins) 2. In Writings: get the client signature on said parameters. 3. should the client decline to sign a written contract stating those variables. DO NOT TAKE THE JOB! following these 3 rules has ensured both my reputation and a steady stream of respectable projects for me to work on .

    The Lounge com lounge career

  • Recent two hours in work
    R randprin

    yeah, the system in question has those, over 10,000 of them in fact. there's just one problem, the team that produced those code gems went about and "fixed" the unit tests so they would never fail... (i'd kill em, but none of them is working for the company any more...)

    The Lounge java code-review

  • Recent two hours in work
    R randprin

    it could be worse, you could have found out your refactoring broke a module that should not even be aware of your refactoring...

    The Lounge java code-review

  • Fuck 'em all.
    R randprin

    it's because we approach those countries with a western point of view (rights of the individual, code of conduct, Janeva convention etc). Where as the common attitudes in those countries is the degradation of anyone not of the ruling elites (which means anyone of different religion/sect, women etc) and the absolute disregard to other people's rights and lives (which means it's perfectly OK to use women and children as human shields, rape and torture anyone, bomb anything and anyone, enslave the population etc). Until we get into Grip with the fact that you cannot maintain a code of conduct with people who not only don't abide by it but actually exploit it in their favor we'll continue to pour resources into these countries without any improvements.

    The Back Room html announcement lounge

  • Fuck 'em all.
    R randprin

    actually the chances the population will revolt against the Taliban are slim to none. As anyone who tries to organize any sort of change in power is looking at best at being horribly executed (and most likely at extreme torture for himself and his family).

    The Back Room html announcement lounge

  • Speaking in 'toungues'
    R randprin

    are you seriously attempting to apply logic to religion?! :wtf:

    The Back Room debugging question lounge

  • If only....
    R randprin

    Dalek Dave wrote:

    ...a little plastic thing that defies description

    a novel way to describe sue's lil friend (ahem ahem) i suppose (although these days i gather they're made out of some silicon based material...)

    The Lounge question

  • FGFOTD*
    R randprin

    where is this fantasy land you live in, where you: a. managed to persuade someone to give even the tiniest bit off leeway on the road? AND b. managed to say that to any female over the age of 18 without being sued prompty for sexual harassment?

    The Lounge data-structures question

  • Slow day in the lounge...........
    R randprin

    oh, i'm at work, i just have to, you know, work...

    The Lounge csharp com question

  • What to do...
    R randprin

    alcohol as fuel for programming only works if you're under the age of 25 (and only in combination with pizza, and late night reruns of star trek...)

    The Lounge database security tools performance question
  • Login

  • Don't have an account? Register

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