*
  Мысли   Галерея   Проекты   Тексты  
  Мысли   Галерея   Проекты   Тексты  
Giver: Indian/Chinese Examples  (2009-04-19 11:04:11)

Ворочаю документацию по иксам и смотрю примеры — их качество поражает воображение, например вырезка из официальных примеров :

  rc = XAllocNamedColor(display, screen_colormap, "red", &red, &red);
  if (rc == 0) {
    fprintf(stderr, "XAllocNamedColor - failed to allocated 'red' color.n");
    exit(1);
  }
  rc = XAllocNamedColor(display, screen_colormap, "brown", &brown, &brown);
  if (rc == 0) {
    fprintf(stderr, "XAllocNamedColor - failed to allocated 'brown' color.n");
    exit(1);
  }
...

И так на каждый цвет, коих в примере используют 6, о циклах ребята не слышали, о массивах, видимо, тоже. А вот еще один кусок кода, который на третьем месте у гугла:

int get_byte_order (void) {
        union {
                char c[sizeof(short)];
                short s;
        } order;

        order.s = 1;
        if ((1 == order.c[0])) {
                return LSBFirst;
        } else {
                return MSBFirst;
        }
}

....
    if ((LSBFirst == get_byte_order ())) {
        img->byte_order = LSBFirst;
    } else {
        img->byte_order = MSBFirst;
    }

Если примеры нацелены на новичков, зачем так учить? И не удивительно, что начитавшись таких "примеров" появляются такие перлы в реальных продуктах


dobson от 2020-10-08 18:38:32:
FyfvYQ http://pills2sale.com/ cheap viagra
Maximo от 2020-10-11 22:52:06:
I read a lot is prevacid otc in canada In a statement issued after Wang's apology, Criado-Perezwelcomed the new measures announced by Twitter UK but said amore profound overhaul of the social network's system forhandling abuse was needed.
Berry от 2020-10-11 22:52:07:
I've just started at zolyria To forget is not so easy, because even if you do manage to open your heart and forgive for all of the above reasons, you may not forget easily or quickly. It’s a matter of trust and time, and if over time trust can be reinstated, then eventually you will be able to forget.
Ernesto от 2020-10-11 22:52:07:
Could you ask her to call me? come acquistare cialis in farmacia Yesterday, BT announced that its BT Sport proposition, offering some Premiership rugby and football matches, has attracted 500,000 customers so far. The company is aiming to use the channels to encourage customers to switch to BT Broadband, but they will also be available via Sky.
Emanuel от 2020-10-11 22:52:07:
I like watching football herbalife prolessa duo The "my John Lewis" scheme, which launches on October 30, will not offer points or discounts but treats such as regular prize draws, personalised incentives and ... free tea and cake in one the chain's in-store restaurants each month.
Xavier от 2020-10-11 22:52:08:
Would you like a receipt? zolyria The Union Pacific train derailed around 3:30 p.m. Sunday near Lawtell, La. – a town about 60 miles west of Baton Rouge – while on a nearly 120-mile trip from Lake Charles to Livonia. More than half of the 23 cars that derailed contained "regulated products," that can be toxic. One car was leaking lubricant oil, while another was leaking a highly corrosive substance known as caustic soda, which can cause chemical burns to the skin or lead to permanent blindness if it touches a person's eyes.
Ronny от 2020-10-11 22:52:15:
Could I ask who's calling? alli orlistat 60mg capsules coupons Pressed for a more detailed description of the flavor, food writer Josh Schonwald said the cultured beef had an "animal protein cake" like quality to it, adding that he would like to try it with some of the extras often served with traditional burgers - salt, pepper, ketchup and jalapenos.
Merle от 2020-10-11 22:52:15:
Where do you live? buy viagra in vadodara Hellman & Friedman's deal underscores private equity'sstrong interest in insurance brokers following KKR & Co LP's .8 billion takeover of Alliant Insurance Services Incfrom Blackstone Group LP and the .3 billion takeover byOnex Corp of USI Holdings Corp from the private equityarm of Goldman Sachs Group Inc last year.
Clifton от 2020-10-11 22:52:16:
I'd like to open a personal account where can i buy amoxicillin online But Brazier's generalisations are ones that the only tribe is used to. For every myth about our nature, one of us will show you that we're not like that at all. There was fat chance of getting fat in my household – my mother was a sales rep for a sweetie company, but I was not allowed to eat sweets. We ate hearty meals but rarely had puddings. Of course I never had to fight at the table for my fair share. Now, when dining with others, I am certain to ensure that everyone gets a bit of everything, and indignation rises up in me if my pal forks in less than equitably.
Federico от 2020-10-11 22:52:16:
Could you ask him to call me? augmentin 500 mg et grossesse "We don't want to get aggressive for a while; there are justtoo many uncertainties to get through before we add more risk,"he said, also citing seasonal issues and government budgetpolicy as overhangs.