Announcement

Collapse
No announcement yet.

The Control-V Thread.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31

    pthread_cond_t cv_notfull = PTHREAD_COND_INITIALIZER;
    pthread_cond_t cv_notempty = PTHREAD_COND_INITIALIZER;
    pthread_cond_t cv_busfull = PTHREAD_COND_INITIALIZER;

    pthread_mutex_t bus_access = PTHREAD_MUTEX_INITIALIZER;

    void *cvpass(void *pass_id)
    {
    int *my_id = (int *) pass_id;
    int trips = 0;
    while (trips < T) {
    while (pthread_mutex_trylock(&bus_access)) ;
    while (pthread_cond_wait(&cv_notfull, &bus_access)) ; // wait for access
    // cout<<*my_id<<" acquires lock\n";
    cout<<"Passenger "<<*my_id<<" gets in\n";
    id_queue.push_back(*my_id);
    num_passengers++;
    // cout<<"# passengers: "< if (num_passengers == C) { // signal when full
    // sleep(1); // wait for bus to be ready to receive bus_full
    // cout<<"Bus full, signaling bus_full\n";
    pthread_cond_signal(&cv_busfull);
    }
    // pthread_mutex_unlock(&bus_access);
    // cout<<*my_id<<" releases lock\n";

    pthread_cond_wait(&cv_notempty, &bus_access);
    if (on_bus(id_queue, *my_id))
    {
    id_queue.remove(*my_id);
    cout<<"Passenger "<<*my_id<<" gets off\n";
    num_passengers--;
    // cout<<"# passengers: "< }
    pthread_mutex_unlock(&bus_access);
    trips++;
    }
    pthread_exit(NULL);
    }

    Comment


    • #32
      nothing in there...

      Comment


      • #33
        I gots nothing either.. damn
        “I give you a new commandment, that you love one another. Just as I have loved you, you also should love one another. By this everyone will know that you are my disciples, if you have love for one another.”
        - John 13:34-35 (NRSV)

        Comment


        • #34
          was working on a Civ2 scenario...
          Attached Files
          Visit First Cultural Industries
          There are reasons why I believe mankind should live in cities and let nature reclaim all the villages with the exception of a few we keep on display as horrific reminders of rural life.-Starchild
          Meat eating and the dominance and force projected over animals that is acompanies it is a gateway or parallel to other prejudiced beliefs such as classism, misogyny, and even racism. -General Ludd

          Comment


          • #35
            You want one page with a bunch of white space and a few easy to read tags?

            Or you want a garbled WYSIWYG crap making reference to a bunch of CSS files.


            Ted Striker commenting on what he thinks CSS is in another thread.

            Comment


            • #36
              You can already do this indirectly, by making civ-specific tech trees. But you are right that real Civ-dependent improvements would be much better. It would allow, for example, "flavour improvements" much like "flavour units". For example, the Arabs could build Bazaars and Mosques instead of Cathedrals and Marketplaces, with the same effects.


              An answer I wrote in the Civ3-Conquests forum, when I feared the server would crash (I copy my answers very often, for fear they get eaten by the server)
              "I have been reading up on the universe and have come to the conclusion that the universe is a good thing." -- Dissident
              "I never had the need to have a boner." -- Dissident
              "I have never cut off my penis when I was upset over a girl." -- Dis

              Comment


              • #37
                pad-zahr
                OMG, that's really weird
                "The world is too small in Vorarlberg". Austrian ex-vice-chancellor Hubert Gorbach in a letter to Alistar [sic] Darling, looking for a job...
                "Let me break this down for you, fresh from algebra II. A 95% chance to win 5 times means a (95*5) chance to win = 475% chance to win." Wiglaf, Court jester or hayseed, you judge.

                Comment


                • #38
                  It was amazing I won. I was running against peace and prosperity and incumbency
                  Eventis is the only refuge of the spammer. Join us now.
                  Long live teh paranoia smiley!

                  Comment


                  • #39
                    Isnt this the time of year when the parisians desert the city?
                    from the help me I'm going to paris thread
                    We need seperate human-only games for MP/PBEM that dont include the over-simplifications required to have a good AI
                    If any man be thirsty, let him come unto me and drink. Vampire 7:37
                    Just one old soldiers opinion. E Tenebris Lux. Pax quaeritur bello.

                    Comment


                    • #40
                      There was in fact, very little sense of anything afterwarsd.
                      Concrete, Abstract, or Squoingy?
                      "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                      Comment


                      • #41
                        CWnd* blah;
                        "The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
                        Ben Kenobi: "That means I'm doing something right. "

                        Comment


                        • #42
                          Kristy Wright

                          Comment


                          • #43
                            C002


                            Carrier route 2.

                            Comment


                            • #44
                              \be
                              x^2_{\rm max/min}=1 - \frac{1}{3} (1+y^2)(1-\cos \theta \pm \sqrt{3} \sin \theta),
                              \ee
                              with
                              \be
                              \theta = \frac{1}{3} \arctan \left( -\frac{\sqrt{4(1 + y^2)^6 - (2 (1 + y^2)^3 - 27y^2 \cos^22\beta)^2}}{2 (1 + y^2)^3 - 27y^2 \cos^22\beta} \right).
                              \ee
                              don't ask....

                              Comment


                              • #45
                                Hmmm. It's a bit long, but here goes:

                                When W32.Blaster.Worm is executed, it does the following:


                                Creates a Mutex named "BILLY." If the mutex exists, the worm will exit.


                                Adds the value:

                                "windows auto update"="msblast.exe"

                                to the registry key:

                                HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run

                                so that the worm runs when you start Windows.


                                Generates an IP address and attempts to infect the computer that has that address. The IP address is generated according to the following algorithms:

                                For 40% of the time, the generated IP address is of the form A.B.C.0, where A and B are equal to the first two parts of the infected computer's IP address.

                                C is also calculated by the third part of the infected system's IP address; however, for 40% of the time the worm checks whether C is greater than 20. If so, a random value less than 20 is subtracted from C. Once the IP address is calculated, the worm will attempt to find and exploit a computer with the IP address A.B.C.0.

                                The worm will then increment the 0 part of the IP address by 1, attempting to find and exploit other computers based on the new IP address, until it reaches 254.


                                With a probability of 60%, the generated IP address is completely random.


                                Sends data on TCP port 135 that may exploit the DCOM RPC vulnerability. The worm sends one of two types of data: either to exploit Windows XP or Windows 2000. For 80% of the time, Windows XP data will be sent; and for 20% of the time, the Windows 2000 data will be sent.

                                NOTES:
                                The local subnet will become saturated with port 135 requests.
                                Due to the random nature of how the worm constructs the exploit data, this may cause computers to crash if it sends incorrect data. This may manifest as svchost.exe generating errors as a result of the incorrect data.
                                While W32.Blaster.Worm cannot spread to the Windows NT or Windows 2003 server, unpatched computers running these operating systems may crash as a result of the worm's attempts to exploit them. However, if the worm is manually placed and executed on a computer running these operating systems, it can run and spread.


                                Uses Cmd.exe to create a hidden remote shell process that will listen on TCP port 4444, allowing an attacker to issue remote commands on an infected system.


                                Listens on UDP port 69. When the worm receives a request from a computer to which it was able to connect using the DCOM RPC exploit, it will send msblast.exe to that computer and tell it to execute the worm.


                                If the current date is the 16th through the end of the month for the months of January to August, or if the current month is September through December, the worm will attempt to perform a DoS on Windows Update. However, the attempt to perform the DoS will succeed only if one the following conditions is true:
                                The worm runs on a Windows XP computer that was either infected or rebooted during the payload period.
                                The worm runs on a Windows 2000 computer that was infected during the payload period and has not been restarted since it was infected.
                                The worm runs on a Windows 2000 computer that has been restarted since it was infected, during the payload period, and the currently logged in user is Administrator.


                                The DoS traffic has the following characteristics:
                                Is a SYN flood on port 80 of windowsupdate.com.
                                Tries to send 50 RPC packets and 50 HTTP packets every second.
                                Each packet is 40 bytes in length.

                                Some fixed characteristics of the TCP and IP headers are:
                                IP identification = 256
                                Time to Live = 128
                                Source IP address = a.b.x.y, where a.b are from the host ip and x.y are random. In some cases a.b are random.
                                Destination IP address = dns resolution of "windowsupdate.com"
                                TCP Source port is between 1000 and 1999
                                TCP Destination port = 80
                                TCP Sequence number always has the two low bytes set to 0; the 2 high bytes are random.
                                TCP Window size = 16384


                                The worm contains the following text, which is never displayed:

                                I just want to say LOVE YOU SAN!!
                                billy gates why do you make this possible ? Stop making money and fix your software!!
                                Earlier I wrote en e-mail to my brother about the Blaster worm

                                Asmodean
                                Im not sure what Baruk Khazad is , but if they speak Judeo-Dwarvish, that would be "blessed are the dwarves" - lord of the mark

                                Comment

                                Working...
                                X