User Controls

  1. 1
  2. 2
  3. 3
  4. ...
  5. 2552
  6. 2553
  7. 2554
  8. 2555
  9. 2556
  10. 2557
  11. ...
  12. 2642
  13. 2643
  14. 2644
  15. 2645

Posts by aldra

  1. aldra JIDF Controlled Opposition
    some dong probably
  2. aldra JIDF Controlled Opposition
    Originally posted by SCronaldo_J_Trump thats a pretty yummy looking cat.

    come back and check when you're not tweaking
  3. aldra JIDF Controlled Opposition
    Originally posted by Lanny It says "sex determination system" right there though… are you denying the sex/gender distinction or are you criticizing the (obviously minority, and not here represented) position that sex is a social construct?

    since there's a biological basis for sex, claiming a gender contradictory to that is utterly meaningless. it's ironic how the vast majority of those people eschew labels and roles until they start making them up themselves.
  4. aldra JIDF Controlled Opposition
    Originally posted by SBTlauien I had tried this and some other things. None worked. The problem, like Lanny said, is that "AF_INET", "SOCK_STREAM", and all of the others, are just integers. I think the compiler just uses them as a reference. So getting my char* to one of those integers is going to be easiest just leaving my long if-elseif statement. I thought about a switch-case but it was more of a curiosity.
    regardless of their actual data type, commandline arguments are stored as strings. argv[1] is a pointer to a string (a character array). in this case your socket() function is likely expecting an integer but is getting a character array so is having trouble. you'll want to pull the integer value out of the string, easiest ways are to either cast the variable to a different type or use math to convert the character array to an int.


    let's assume the following works to load the commandline arguments as strings:


    int main(int argc, char ** argv)
    {
    char firstParam[256];
    char secondParam[256];

    strncpy(firstParam,argv[1]);
    strncpy(secondParam,argv[2]);



    to cast, or convert variables, you could do this (could be done more cleanly but I figure this is easier to read):


    int main(int argc, char ** argv)
    {
    char firstParam[256];
    char secondParam[256];

    strncpy(firstParam,argv[1]);
    strncpy(secondParam,argv[2]);

    int intFirstParam=atoi(firstParam);
    int intSecondParam=atoi(secondParam);



    Honestly not sure how well atoi works but eh.

    If you want to use raw math, try the following:


    int main(int argc, char ** argv)
    {
    char firstParam[256];
    char secondParam[256];
    int intFirstParam;
    int x=0;


    strncpy(firstParam,argv[1]);

    int baseVal=0;
    for(x=0;x<256;x++)
    {
    if(firstParam[x]>47 && firstParam[x]<58)
    {
    firstParam+=(10^baseVal)*firstParam[x];
    baseVal++;
    }
    elseif(firstParam[x]==0)
    {
    break;
    }
    }



    reason that approach works is because C stores strings as arrays - each character is an ASCII value and the end of the string is marked with a 0 (null terminator). example:

    char youAreAFaggot[16] = "faggot";

    youAreAFaggot (chars) = {'f', 'a', 'g', 'g', 'o', 't', "\0"}
    youAreAFaggot (ints) = {102, 97, 103, 103, 111, 116, 0}


    Next question…

    will look at that in a few


    ***just realised I'm calculatiing decimals backwards. fuck. will fiix later

    Post last edited by aldra at 2017-01-10T05:49:20.092764+00:00
  5. aldra JIDF Controlled Opposition
  6. aldra JIDF Controlled Opposition
    Originally posted by Bill Krozby I'm almost tempted to buy the same model they use and do my own study , for science!

    lol I considered this back when I drank heaps, they're fucking expensive and fiddly though
  7. aldra JIDF Controlled Opposition
    Originally posted by Bill Krozby I just don't see how your breath can tell how much alcohol is in your blood. I can see how it can tell how much is in your lungs/mouth lol.


    yeah it picks up the saliva on your breath, and determines the amount of alcohol inside it. when you've got alcohol in your blood the same levels show up in your saliva I'd assume, but I've never really looked into the biology behind it
  8. aldra JIDF Controlled Opposition
    those handheld testers need to be calibrated daily and aren't accurate enough to be relied upon for fines, court proceedings etc.. the proper blood/saliva tests they have at the police station are, but they're too bulky and expensive to be used at checkpoints.

    they basically just use the portable testersto determine whether it's worth bringing you back to the station to be tested/charged.


    as for being able to 'beat' them, there are a bunch of tricks but nobody's been able to say for sure which ones work and which don't - the cops put out a lot of disinfo to stop people from trying
  9. aldra JIDF Controlled Opposition
    Originally posted by -SpectraL Implying that I have something to be shameful about. Your "strawman" claim doesn't really carry much weight without demonstrative examples.

    no, I was referring to malice not being able to feel shame. the 'you should know better' part was about you willingly associating with these people for what, close to 30 years?
  10. aldra JIDF Controlled Opposition
    I have this urge to pull her nosering
  11. aldra JIDF Controlled Opposition
    Originally posted by the holy ghost neopets

    I call it that too
  12. aldra JIDF Controlled Opposition
    you of all people should know it's not possible to shame someone who does not feel shame, spectral
  13. aldra JIDF Controlled Opposition
    Originally posted by SBTlauien I'd like start my program by running a command similar to this…

    "./my program AF_INET SOCK_STREAM"

    Where "AF_INET" and "SOCK_STREAM" are arguments into my program and are also used as arguments to socket().


    oh right. if they're integers you can pass them directly, if they're strings no.


    int main(int argc, char ** argv) {
    socket_fd = socket(argv[1], argv[2], 0);
    .....
    ...
    .


    in that code argc is an integer that contains the number of arguments passed and argv is a pointer to a pointer (**) to the first character in a string.

    in c(99) you will normally create a fixed-length character array to store a string in -

    char myString[12] = 'word';

    if you can't or don't want to allocate fixed memory manually you need to create a pointer to where to store the string (by default it allocates random unused memory):

    char * myString = 'word';

    I haven't done any C programming in quite a while so what you're doing seems a bit problematic. you can't pass the strings directly to your socket() function because they're in the form of pointers, and you can't pass the location of the data to it because it's coded to accept a string, not a location. I'm assuming you're using the inbuild socket() function so you can't change what it expects as parameters.

    This link touches on what I mean:

    https://www.tutorialspoint.com/cprogramming/c_passing_pointers_to_functions.htm

    I think you SHOULD be able to copy the string from the pointer into a character array and pass that to the socket thus:



    int main(int argc, char ** argv)
    {
    char firstParam[256];
    char secondParam[256];

    strncpy(firstParam,argv[1]);
    strncpy(secondParam,argv[2]);

    socket_fd = socket(firstParam, secondParam, 0);

    }
  14. aldra JIDF Controlled Opposition
    it might just be too early in the morning but I'm not following what you're trying to accomplish
  15. aldra JIDF Controlled Opposition
    oh right, I was thinking of this:

  16. aldra JIDF Controlled Opposition
    Originally posted by HampTheToker


    lol

    walking on sunshine?
  17. aldra JIDF Controlled Opposition
    Originally posted by RisiR I'm also glad "victim" is cool again.

  18. aldra JIDF Controlled Opposition
    Originally posted by Bill Krozby towards being a medical assistant/ lvn / physical therapist

    honestly seems like a pretty good fit for you as long as you can tone down the drinking at work and talking shit to customers. as I understand it having a felony really limits your employment opportunities in the US, but mid-level medical jobs (what's an LVN though, some kind of nurse?) are always in demand.
  19. aldra JIDF Controlled Opposition
    Originally posted by Malice I wonder if anyone has ever started a service around this. "I will give you HIV in exchange for…". Hmm, the clientele it would attract wouldn't have much purchasing power…

    https://aidsetc.org/blog/bug-chasers-gay-men-and-intentional-pursuit-hiv-narrative-analysis
  20. aldra JIDF Controlled Opposition
    hts is a total fag though regardless
  1. 1
  2. 2
  3. 3
  4. ...
  5. 2552
  6. 2553
  7. 2554
  8. 2555
  9. 2556
  10. 2557
  11. ...
  12. 2642
  13. 2643
  14. 2644
  15. 2645
Jump to Top