Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: 5 , ,

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448

    5 , ,

    - , .

    1) ,
    2) , ( -, -... you know).

    :
    : C++

    1. "int func(int a, int b, int c, int d)", "int func(int a, b, c, d)". - .
    2. min(), max(), sum() abs() ( , - - abs() - , ). min(), max() sum() - ( , inline-), n , , . :
      Code:
      int a[5] = { 1, 2, 3, 4, 5 };
      cout << sum(a) << endl; // 15
      cout << sum(a, 1) << endl; //    [1] ,  14
      cout << sum(a, 1, 3) << endl; // 5 (a[1] + a[2])
      cout << sum(a, 0, -1) << endl; // 10 (  )
      . , func(a, from, to) ( , ).
    3. sizeof() . ,
      Code:
      #if sizeof(long double) == 8
      ...
      #else
      ...
      #endif

      Code:
      struct SomeStructImGoingToSendAcrossTheNetwork {...};
      #if sizeof(SomeStructImGoingToSendAcrossTheNetwork) != 68
      #    error Your compiler has some strange views on padding...
      #endif
    4. newa[]. new[]<->malloc(), newa[]<->alloca(). ( alloca() + cast + for placement new- ). - alloca(). C++ 15+ , alloca().


    4 , , (, regex-) C++1x.

    . , C++ rant -
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  2. #2
    Registered User
    Join Date: Aug:2008
    Location: Varna
    Posts: 291
    1 . . . . 50/50

    . jscript html. , , , , .

    (memcpy, memxchg, memmove). .

    sizeof. . sizeof. () . SOA AOS . , . .

    . . device, . .

    . .

  3. #3
    Registered abUser ike's Avatar
    Join Date: Jul:2004
    Location: sofi
    Posts: 4,965
    int . int8_t, int16_t, int32_t, int64_t, int128_t . 0 runtime, . , .
    Have no fear ike iz here.
    CPU Cx486DLC@40MHz, RAM 4MB, VGA Trident 512KB, HDD Conner 160MB, Monitor 14" Color

  4. #4
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    - PHP

    1. ( )
    2. ( )
    3. - , .
    4. - UTF8 . , , ucfirst.
    5. .

    3 , ..
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  5. #5
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    OFF: Born, IDE PHP , 4/$ - ?
    - PHP ...

    @ike, , ,
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  6. #6
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    Quote Originally Posted by anrieff View Post
    OFF: Born, IDE PHP , 4/$ - ?
    - PHP ...
    .
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  7. #7
    Registered User
    Join Date: Dec:2003
    Posts: 2,817
    php : - $object->method()[2]

    , 5.4
    Last edited by zlozi; 5th August 2011 at 16:41.
    Gigabyte DS3P, E4400@9x333, 2x2Gb Super T@1000Mhz, Gigabyte GTX460OC 768Mb

  8. #8
    hmm BornToDrink's Avatar
    Join Date: Aug:2005
    Location: .
    Posts: 11,573
    .. -:
    $object->method(2);

    :
    Code:
    public function method($id = null)
    {
        $arr = array(...);
        return ($id !== null) ? $arr[$id] : $arr;
    }
    , .
    - chain, - :
    Code:
    $object->method()->returnById(2);
    $object->method()->returnArray();
    Hey, mother, I come bearing a gift. I'll give you a hint. It's in my diaper and it's not a toaster.
    .

  9. #9
    Registered User 's Avatar
    Join Date: Feb:2006
    Location:
    Posts: 653
    ,

    1 inline if ,

    2 switch for the fancy of it

    3 dict.key, dict['key']

    4 ++ ++

    5 length, range,
    Code:
    >>> a = ['Mary', 'had', 'a', 'little', 'lamb']
    >>> for i in range(len(a)):
    ...     print i, a[i]
    ...
    0 Mary
    1 had
    2 a
    3 little
    4 lamb
    : if chovek e gladen qde : if gladen e chovek qde. , ...

  10. #10
    Banned haste's Avatar
    Join Date: Mar:2006
    Location:
    Posts: 759
    Quote Originally Posted by View Post
    ,

    1 inline if ,

    2 switch for the fancy of it
    ' . if ... elif .. else ... ?
    Quote Originally Posted by View Post
    3 dict.key, dict['key']
    ' Web2py. "" Django , "-" .
    Quote Originally Posted by View Post
    4 ++ ++
    Quote Originally Posted by View Post
    5 length, range,
    Code:
    >>> a = ['Mary', 'had', 'a', 'little', 'lamb']
    >>> for i in range(len(a)):
    ...     print i, a[i]
    ...
    0 Mary
    1 had
    2 a
    3 little
    4 lamb
    , . len() list ( ' iterable).
    Quote Originally Posted by View Post
    : if chovek e gladen qde : if gladen e chovek qde. , ...
    . :
    Code:
    If chovek == 'gladen':
        qde()
    (' ) Python. 5 , '' . :
    1. , GIL CPython, , .
    2. ' /binding (C & C++ -) Python , .
    3. IDLE, ! , , IPython, !
    4. Community- !

  11. #11
    Pesho's Avatar
    Join Date: Nov:2001
    Location: Sofia
    Posts: 5,169
    Quote Originally Posted by haste View Post
    1. , GIL CPython, , .
    Guido. , GIL.
    , !

  12. #12
    Nuclear's Avatar
    Join Date: Sep:2004
    Location: , . ()
    Posts: 3,352
    :

    1. malloc(), . , free() ( ), .

    2. - - #if, #for? , .
    function pointer , "element123->function()" "element123->function(element123)". this pointer , statement- 2 . , "->".

    3. char () , - :

    char mystring[20];
    ........
    mystring="Hello, World";
    strcpy.

    , .

    4. , malloc free ( 1 - , pointer ). :

    strlen(itoa(myint));

    , (same as typedef struct { char str[10] }; array_10).

    , 4 .
    . HWBG !

  13. #13
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    Quote Originally Posted by Nuclear View Post
    :

    1. malloc(), . , free() ( ), .
    ...
    OFF: , .. malloc().

    libc- . "" (pools) , , "" , /. , malloc() :

    Code:
    malloc(size):
        size   0..28  ->    pool-  32- 
        size   29..252  ->    pool-  256- 
        size   253..16 ->      (         )
        size e  16 ->    low-fragmentation  (  ,    ,     )
    , free() . , *alloc() . -, N-4 4 . malloc(10), 32- , vs . 4 (, , ), __+4. 18 . , free() , , 0 28 , .
    /Hidden: -
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  14. #14

    Join Date: Jun:2002
    Location: 85435
    Posts: 4,619
    pain in the arse! (Java)
    - 2D .
    X570 Aorus Elite || R5 3600x || NH-D14 || 32GB RAM || GTX1070Ti Ultra Silent || PCE-AC56 || 850 EVO+MP510+HDDs || SSR-650RT all in Dark Base 900 || EV2736W || G29 || Obutto Ozone+Sparco R333

  15. #15
    Eclipse Plugin Developer aphex's Avatar
    Join Date: Mar:2003
    Location: Karlsruhe
    Posts: 546
    @Satanail : swt swing ?
    swt JFaces .

    .
    We are drowning in information, but starving for knowledge and time!

  16. #16
    The Conquerer I Be RazorJack's Avatar
    Join Date: Jul:2001
    Location:
    Posts: 3,108
    C#

    1 - case sensitive.

    2 - - ()

    3 - properties, this.

    4 - windows api , LoadLibrary ..

    5 - winforms tooltip, .

    5

    -----------------------

    Delphi:


    x+=y x=y=z ...

  17. #17

    Join Date: Jun:2002
    Location: 85435
    Posts: 4,619
    Quote Originally Posted by aphex View Post
    @Satanail : swt swing ?
    swt JFaces .
    Swing. - .... , . , , .
    X570 Aorus Elite || R5 3600x || NH-D14 || 32GB RAM || GTX1070Ti Ultra Silent || PCE-AC56 || 850 EVO+MP510+HDDs || SSR-650RT all in Dark Base 900 || EV2736W || G29 || Obutto Ozone+Sparco R333

  18. #18
    Bombera's Avatar
    Join Date: Jul:2001
    Location: 4EVA
    Posts: 13,833
    1, , HeapAlloc/HeapReAlloc malloc HeapSize. , , .
    , , VirtualAlloc VirtualQuery.
    EVGA X299 FTW K|i9-7960X@4.7|4x8 Patriot Viper Steel 4000|GTX 1660 Ti|970 EVO 1 TB|Seasonic Focus GX-1000|Xigmatek Elysium|
    Rampage IV Extreme BE|E5-1680v2@4.7|4x4 HyperX 1866|Cougar Aqua 240|GTX 1050 Ti|970 EVO 1/4 TB|CM 850 SilentPro|HAF-X|

  19. #19
    N/A Demoman's Avatar
    Join Date: Sep:2005
    Location:
    Posts: 3,098
    ANSI C:
    1. String - , .
    2. .h .c .
    3.
    4. div mod / %
    5. Native .

  20. #20
    Registered User
    Join Date: Aug:2006
    Location:
    Posts: 4,052
    Quote Originally Posted by Demoman View Post
    ANSI C:
    1. String - , .
    . *char[] ?
    Quote Originally Posted by Demoman View Post
    2. .h .c .
    . , object code.
    Quote Originally Posted by Demoman View Post
    3.
    ? , ?
    Quote Originally Posted by Demoman View Post
    4. div mod / %
    #define
    Quote Originally Posted by Demoman View Post
    5. Native .
    - hashmap .. ?

    --------- 18:56 --------- : 18:53 ---------

    AS3:
    * - error handling .
    Java:
    * - boilerplate! ( Rich Hickley clojure)

    X86:
    * quirks

  21. #21
    Registered User
    Join Date: Nov:2005
    Location:
    Posts: 3,317
    Quote Originally Posted by Demoman View Post
    ANSI C:
    1. String - , .
    2. .h .c .
    3.
    4. div mod / %
    5. Native .
    #.
    ... , .
    - . 2180 - .

  22. #22
    N/A Demoman's Avatar
    Join Date: Sep:2005
    Location:
    Posts: 3,098
    Quote Originally Posted by drunky View Post
    #.
    PIC- C#?

  23. #23
    Teh AimeR AimeR's Avatar
    Join Date: Dec:2006
    Location: //
    Posts: 4,307
    Quote Originally Posted by Demoman View Post
    PIC- C#?
    300 - http://en.wikipedia.org/wiki/.NET_Micro_Framework
    ASUS X570-P|R7 5800X3D@NH-U14S|2X16G DDR4 3200 Corsair VENGEANCE LPX|Samsung 980 PRO 1TB|Radeon RX 7900 XTX 24G|AOC CQ32G1|Corsair RM750x|CM 693

  24. #24
    Registered User
    Join Date: Mar:2004
    Location:
    Posts: 3,748
    Quote Originally Posted by anrieff View Post
    1) ,
    2) , ( -, -... you know).
    . ?
    newa[]. new[]<->malloc(), newa[]<->alloca(). ( alloca() + cast + for placement new- ). - alloca(). C++ 15+ , alloca().
    - ? , Type arr[size]; ?

    alloca() .

    Java:
    1. Array-of-structures . Java array of references, - ( ).
    2. . , , . , .
    3. Generics , ArrayList , (Int/Char/Double/...)Array ( for (int x: intlist) {...}; for (Integer x: intlist) {...}; ).

    100% Java C/C++. , JIT , . JIT- boxing/unboxing, , JRE, .

  25. #25
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,448
    , , . ( , , ).
    , , GCC , , , . - , , , , - .
    ... ( Python, Java Brainfuck...) , . ... , , 2-3
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |