As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

YA[Programming]T :: Interview? That's an MVC thing, right?

11920222425100

Posts

  • bowenbowen How you doin'? Registered User regular
    I remember pine, that shit was pretty awesome for email too.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • CantidoCantido Registered User regular
    I'm going to turn some stuff from Quickbooks into security questions. For example, I'm going to explode() an address and make the numerical portion a question.

    I'm also going generate random phone numbers, grab the real one, and shuffle the radio button echos for each one. Will this do the job? If I'm feeling fancy, I'll use more realistic area codes.
    <?php
    $phone = //queried phone number goes here.
    $phoneform = array(3);
      
     for ($i = 0; $i < 4; $i++)
     {
         $fakenum0 = rand(0,9);
         $fakenum1 = rand(0,9);
         $fakenum2 = rand(0,9);
         $fakenum3 = rand(0,9);
         $fakenum4 = rand(0,9);
         $fakenum5 = rand(0,9);
         $fakenum6 = rand(0,9);
         $fakenum7 = rand(0,9);
         $fakenum8 = rand(0,9);
         $fakenum9 = rand(0,9);
         $samplephone($i) = $fakenum0.$fakenum1.$fakenum2."-".$fakenum3.$fakenum4.$fakenum5."-".$fakenum6.$fakenum7.$fakenum8.$fakenum9;
    	 $phoneform($i) = "<input name=\"phone\" type=\"radio\" value=\"".$samplephone($i).">";
    	 
     }
     
     $phoneform(4) = "<input name=\"phone\" type=\"radio\" value=\"".$phone."\">";
     shuffle($phoneform);
    ?>
    
    <form action="" method="post">
    <?php
    for ($i = 0; $i < 4; $i++)
     {
    	echo $phoneform($i); 
     }
    ?>
    
    </form>
    

    3DS Friendcode 5413-1311-3767
  • InfidelInfidel Heretic Registered User regular
    That phone number thing is pointless, don't bother.

    What function is this security question supposed to serve?

    OrokosPA.png
  • CantidoCantido Registered User regular
    edited June 2012
    Infidel wrote: »
    That phone number thing is pointless, don't bother.

    What function is this security question supposed to serve?

    It's one of five questions based on already existing information on a database. The phone number is one of five fields guaranteed to exist within a Quickbooks customer database converted to MySQL. This is also because account production will be exclusive to already existing customers for now. Making a new customer from scratch will not be allowed for a while. Until then, those customers will get a salted customer id number, that when entered, will let them make an online account, already populated with what we have so they can just fill in the blanks and make a password.

    Cantido on
    3DS Friendcode 5413-1311-3767
  • InfidelInfidel Heretic Registered User regular
    Just ask them to fill in the number on file, if you want to use it. Multiple select does nothing but tell whoever is on the other end what the correct answer is.

    OrokosPA.png
  • urahonkyurahonky Registered User regular
    Windows Driver Development kinda sucks :P

  • bowenbowen How you doin'? Registered User regular
    Yeah driver programming is a special kind of hell. They pay is supposedly very good in places where you deal with it... usually.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    Yeah driver programming is a special kind of hell. They pay is supposedly very good in places where you deal with it... usually.

    I can see why. I just can't seem to find any examples that actually compile/run correctly. And when I DO find one it's usually one that is of no help at all. Like I know how to start the driver and read some output. But making IOCTLs to work has been making my head spin.

  • urahonkyurahonky Registered User regular
    Bah! I need to now learn how to do Kernel Mode Code Signing... Another 50 page document!

  • bowenbowen How you doin'? Registered User regular
    File IO in a driver is bad times. You're better off creating a named pipe or something and communicating with a program.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    it's refreshing how much easier life gets when you have a nice robust Rectangle class

  • zeenyzeeny Registered User regular
    Every time I read a comment from Cantido I want to scream "It's not PHP's fault.".

  • bowenbowen How you doin'? Registered User regular
    At least it's not Java :rotate:

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • DrunkMcDrunkMc Registered User regular
    bowen wrote: »
    At least it's not Java :rotate:

    I still love JAVA. I started writing a web crawler in Python and after like 45mins, I was like fuck this, and did it in JAVA in no time. Can't seem to tear myself away! Oh! EXCEPT GUIs!!! FUCK JAVA GUIs!!!!!!!!!

  • CantidoCantido Registered User regular
    edited June 2012
    DrunkMc wrote: »
    bowen wrote: »
    At least it's not Java :rotate:

    I still love JAVA. I started writing a web crawler in Python and after like 45mins, I was like fuck this, and did it in JAVA in no time. Can't seem to tear myself away! Oh! EXCEPT GUIs!!! FUCK JAVA GUIs!!!!!!!!!

    Yes. Java GUIs are a nightmare. Though Java is probably the "funnest" language I've ever used. It feels like you can make anything do anything else with all those libraries.

    Cantido on
    3DS Friendcode 5413-1311-3767
  • urahonkyurahonky Registered User regular
    Try programming a WYSIWYG editor in Java for various programming languages.

  • bowenbowen How you doin'? Registered User regular
    That's dumb. Who would ever want to undertake such a thing.

    8->

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • urahonkyurahonky Registered User regular
    bowen wrote: »
    That's dumb. Who would ever want to undertake such a thing.

    8->

    :bz

  • centraldogmacentraldogma Registered User regular
    an_alt wrote: »
    Hey folks, need some assistance. I'm trying to make use of the EmbossNeedleClient.java available here. It says “All dependencies, including Axis 1.4 and Commons-CLI, are available in lib-1.4.zip” and lib-1.4.zip includes a bunch of jar files. I've added them as a library in Netbeans and it's still giving a package does not exist error.

    Have you checked that the package that does not exist is actually in one of the included libraries? Are the jars added as libraries for that project (not just as general libs)? Are you using a recent version of NetBeans? I seem to remember older versions not always playing nicely with the Axis 1 libraries.

    If all else fails, you can try adding the jar files individually to the classpath.

    The jars are added as libraries for the project.

    I think my Netbeans install might be broken. There appears to be no way to add dependencies, which Netbeans apparently treats differently than libraries. I'll unistall when I get home and use an installer other than the JDK-Netbeans combo.

    An update to this. Installed the everything version of Netbeans and it still wouldn't handle the Jars properly. So I installed eclipse and I recognized the Jars fine and resolved everything.

    So, yeah, apparently Netbeans is busted...

    When people unite together, they become stronger than the sum of their parts.
    Don't assume bad intentions over neglect and misunderstanding.
  • an_altan_alt Registered User regular
    edited June 2012
    DrunkMc wrote: »
    bowen wrote: »
    At least it's not Java :rotate:

    I still love JAVA. I started writing a web crawler in Python and after like 45mins, I was like fuck this, and did it in JAVA in no time. Can't seem to tear myself away! Oh! EXCEPT GUIs!!! FUCK JAVA GUIs!!!!!!!!!

    When I started writing our web services in Java it was like a breath of fresh air. Then I started writing internal utilities in Python. Now when I have add on to the web services it feels so clunky and awkward using Java.

    an_alt on
    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • an_altan_alt Registered User regular
    An update to this. Installed the everything version of Netbeans and it still wouldn't handle the Jars properly. So I installed eclipse and I recognized the Jars fine and resolved everything.

    So, yeah, apparently Netbeans is busted...

    I've found NetBeans has had issues when plugins, add-ons, etc have been added. A full wipe of NetBeans including the install directory and the bit in the users folder can do wonders.

    For a while, I was using Eclipse for Java, Python, and PHP, but kept having a bunch of little issues with each language. Now I use NetBeans for Java (with no extras installed), PyCharm for Python, and a junior developer for PHP.

    Eclipse can be incredibly powerful if you take the time to set it up properly for your workflow and environments.

    Pony wrote:
    I think that the internet has been for years on the path to creating what is essentially an electronic Necronomicon: A collection of blasphemous unrealities so perverse that to even glimpse at its contents, if but for a moment, is to irrevocably forfeit a portion of your sanity.
    Xbox - PearlBlueS0ul, Steam
    If you ever need to talk to someone, feel free to message me. Yes, that includes you.
  • Alistair HuttonAlistair Hutton Dr EdinburghRegistered User regular
    edited June 2012
    DrunkMc wrote: »
    bowen wrote: »
    At least it's not Java :rotate:

    I still love JAVA. I started writing a web crawler in Python and after like 45mins, I was like fuck this, and did it in JAVA in no time. Can't seem to tear myself away! Oh! EXCEPT GUIs!!! FUCK JAVA GUIs!!!!!!!!!

    from crawler import webcrawler?

    Alistair Hutton on
    I have a thoughtful and infrequently updated blog about games http://whatithinkaboutwhenithinkaboutgames.wordpress.com/

    I made a game, it has penguins in it. It's pay what you like on Gumroad.

    Currently Ebaying Nothing at all but I might do in the future.
  • EtheaEthea Registered User regular
    I am having fun writing my own iterators using the boost iterator facade class. I am working on a Heterogeneous computation toolkit ( aka GPU algorithms). We need the ability to use memory allocated by other C or Fortran applications on the host to be used for input and output of our algorithms. Getting to write tons of iterators that transform flat C arrays into tuple style vectors.

  • urahonkyurahonky Registered User regular
    Oh man... C Arrays. So much more difficult (in a sense) than Java arrays.

  • urahonkyurahonky Registered User regular
    DbgPrint (" %02x", pc[i]);
    

    The above code prints out the hexadecimal string that's located at that location. How do I get this string and put it into a char array?
    strcat(output, pc[i]);
    

    Doesn't work (as I suspected... I'm not used to not being able to autobox and stuff) since pc isn't a char array.

  • InfidelInfidel Heretic Registered User regular
    edited June 2012
    urahonky wrote: »
    DbgPrint (" %02x", pc[i]);
    

    The above code prints out the hexadecimal string that's located at that location. How do I get this string and put it into a char array?
    strcat(output, pc[i]);
    

    Doesn't work (as I suspected... I'm not used to not being able to autobox and stuff) since pc isn't a char array.

    That's because there is no string there. You're getting the hexadecimal string respresentation of the byte at pc[ i ].

    Translating to hex there are better ways than using the printf formatting, but you could do it using sprintf into a 3 char array. (Room for two digits and the null, never forget the terminating null.)

    Infidel on
    OrokosPA.png
  • seabassseabass Doctor MassachusettsRegistered User regular
    bowen wrote: »
    That's dumb. Who would ever want to undertake such a thing.

    8->

    Sisyphus?

    Run you pigeons, it's Robert Frost!
  • urahonkyurahonky Registered User regular
    edited June 2012
    Infidel wrote: »
    urahonky wrote: »
    DbgPrint (" %02x", pc[i]);
    

    The above code prints out the hexadecimal string that's located at that location. How do I get this string and put it into a char array?
    strcat(output, pc[i]);
    

    Doesn't work (as I suspected... I'm not used to not being able to autobox and stuff) since pc isn't a char array.

    That's because there is no string there. You're getting the hexadecimal string respresentation of the byte at pc[ i ].

    Translating to hex there are better ways than using the printf formatting, but you could do it using sprintf into a 3 char array. (Room for two digits and the null, never forget the terminating null.)

    Sorry I didn't clarify. That's exactly what I need. I need the hex string representation of the byte at pc.

    e: I just looked up sprintf I hope that I can use this where I'm at...

    urahonky on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    my brain is too dumb to efficiently work with C arrays


    one of the reasons I love C# so much is how easily arrays come to you, and of course the .NET List<T> is civilization

  • urahonkyurahonky Registered User regular
    I miss being able to do:
    String s = "Hello";
    s += ", world!";
    

  • urahonkyurahonky Registered User regular
    edited June 2012
    Let's see if it blue screens again....

    e: nope, phew...

    urahonky on
  • bowenbowen How you doin'? Registered User regular
    C arrays are a pain to deal with, yes.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • EtheaEthea Registered User regular
    You are all weaklings in this thread.

  • bowenbowen How you doin'? Registered User regular
    Well... they're not STL Vector bub!

    That said, I usually prefer arrays to STL anyways for some reason. I don't like dealing with all the iterator nonsense or something.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
  • IncindiumIncindium Registered User regular
    edited June 2012
    So generic extension methods in C# are so nice... I have a generic CachedValues collection that I used to create 3 different dictionaries:
    public static ConcurrentDictionary<int, CachedValues<bool>> FeatureEnabledCache1...
    public static ConcurrentDictionary<int, CachedValues<bool>> FeatureEnabledCache2....
    public static ConcurrentDictionary<Guid, CachedValues<bool>> FeatureEnabledCache3...
    
    Rather than having to implement my 2 methods 3 times over I can just implement them once as generic extension methods:
    public static void SetIsEnabled<T>(this ConcurrentDictionary<T, Feature.CachedValues<bool>> dict, T id, string featureCode, bool isEnabled)...
    public static bool GetIsEnabled<T>(this ConcurrentDictionary<T, Feature.CachedValues<bool>> dict, T id, string featureCode, out bool isEnabled)...
    

    Incindium on
    steam_sig.png
    Nintendo ID: Incindium
    PSN: IncindiumX
  • KolosusKolosus Registered User regular
    edited June 2012
    I just created a plugin for Notepad++ , and now I have to add domain authentication for it.

    Kolosus on
  • GnomeTankGnomeTank What the what? Portland, OregonRegistered User regular
    urahonky wrote: »
    Oh man... C Arrays. So much more difficult (in a sense) than Java arrays.

    Hint: Arrays in C are really just pointers with syntactic sugar around them.
    arr[1]
    

    is equivalent to
    *(ptr++)
    

    assuming ptr was pointing to the start of your array.

    Sagroth wrote: »
    Oh c'mon FyreWulff, no one's gonna pay to visit Uranus.
    Steam: Brainling, XBL / PSN: GnomeTank, NintendoID: Brainling, FF14: Zillius Rosh SFV: Brainling
  • KambingKambing Registered User regular
    GnomeTank wrote: »
    urahonky wrote: »
    Oh man... C Arrays. So much more difficult (in a sense) than Java arrays.

    Hint: Arrays in C are really just pointers with syntactic sugar around them.
    arr[1]
    

    is equivalent to
    *(ptr++)
    

    assuming ptr was pointing to the start of your array.

    *(ptr+1) technically because you aren't reseating the pointer ptr in the offset calculation. ^_^

    @TwitchTV, @Youtube: master-level zerg ladder/customs, commentary, and random miscellany.
  • EtheaEthea Registered User regular
    edited June 2012
    Kambing wrote: »
    GnomeTank wrote: »
    urahonky wrote: »
    Oh man... C Arrays. So much more difficult (in a sense) than Java arrays.

    Hint: Arrays in C are really just pointers with syntactic sugar around them.
    arr[1]
    

    is equivalent to
    *(ptr++)
    

    assuming ptr was pointing to the start of your array.

    *(ptr+1) technically because you aren't reseating the pointer ptr in the offset calculation. ^_^

    or
    [1]arr
    

    Ethea on
  • bowenbowen How you doin'? Registered User regular
    Yay pointers.

    not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
This discussion has been closed.