Jump to content
php.lv forumi

bubu

Administratori
  • Posts

    8,897
  • Joined

  • Last visited

Posts posted by bubu

  1. who_i_am: lasi uzmanīgāk manuāli:

    value should be a bool for the following values of the option parameter:

    ...

    CURLOPT_FOLLOWLOCATION TRUE to follow any "Location: " header that the server sends as part of the HTTP header

    iespējams, ka tāpēc arī nestrādā. 1 !== TRUE

  2. Pamēģini šādi:

    $sql_="call p_invoicelist('2', '1');";
    $rez1=mysql_query($sql_) or die(mysql_error());
    while($data= mysql_fetch_array($rez1)){
     echo $data[xxx];
    }
    mysql_free_result($rez1);
    
    $sql_1="INSERT INTO tb_vv ('name') VALUES (`blabla`)";
    mysql_query($sql_1) or die(mysql_error())

  3. Foruma tēma - "Vispārējas tēmas par PHP vai ar to saistītām lietām". Exif ir pilnīgi nesaistīta lieta ar php. Lūdzu turpmāk izvēlies forumu vairāk pa tēmai.

     

    Un vispār tur ir viss par komentāru/autoru exif lauku uzrakstīts. Lasīt tikai vajag mācēt:

    22.lpp:

    ImageDescription

    A character string giving the title of the image. It may be a comment such as "1988 company picnic" or the like.

    Two-byte character codes cannot be used. When a 2-byte code is necessary, the Exif Private tag UserComment is

    to be used.

    Tag = 270 (10E.H)

    Type = ASCII

    Count = Any

    Default = none

     

    12.lpp:

    2 = ASCII An 8-bit byte containing one 7-bit ASCII code. The final byte is terminated with NULL.

     

    28.lpp:

    UserComment

    A tag for Exif users to write keywords or comments on the image besides those in ImageDescription, and without

    the character code limitations of the ImageDescription tag.

    Tag = 37510 (9286.H)

    Type = UNDEFINED

    Count = Any

    Default = none

    The character code used in the UserComment tag is identified based on an ID code in a fixed 8-byte area at the

    start of the tag data area. The unused portion of the area is padded with NULL ("00.H"). ID codes are assigned by

    means of registration. The designation method and references for each character code are given in Table 6.

    Īsāk sakot - skaties Table 6. 28.lpp. Un sīkākām detaļām http://lmgtfy.com/?q=exif+usercomment+encoding

     

    23.lpp:

    23.lpp.

    Artist

    This tag records the name of the camera owner, photographer or image creator. The detailed format is not specified,

    but it is recommended that the information be written as in the example below for ease of Interoperability. When the

    field is left blank, it is treated as unknown.

    Ex.) "Camera owner, John Smith; Photographer, Michael Brown; Image creator, Ken James"

    Tag = 315 (13Bh)

    Type = ASCII

    Count = Any

    Default = none

     

    Un parasti Windows'am (NT) visi iekšējie stringi ir UCS2 unikodes kodējumā. To by default vari pamēģināt, moš strādā.

  4. Iekš svnserve.conf jābūt rindiņai:

    anon-access = none

    Tas saka, ka visiem anonīmajiem useriem pieeja būs none (citas iespējamās vērtības ir read un write).

    Ar "auth-access" settingu savukārt tu norādi kādas tiesības būs autorizētajiem lietotājiem (autorizācijas jūzerneimi un paroles ir passwd failā).

  5. Nedrīkst domāt par to kā par procentiem. Drīzāk kā par daļām, ja gribi domāt par noslodzi: 1.42 = 142%

     

    Bet precīzāk lasi kaut vai wikipēdijā: http://en.wikipedia.org/wiki/Load_(computing)

    An idle computer has a load number of 0 and each process using or waiting for CPU (the ready queue or run queue) increments the load number by 1. Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states (usually waiting for disk activity), which can lead to markedly different results if many processes remain blocked in I/O due to a busy or stalled I/O system. This, for example, includes processes blocking due to an NFS server failure or to slow media (e.g., USB 1.x storage devices). Such circumstances can result in an elevated load average, which does not reflect an actual increase in CPU use (but still gives an idea on how long users have to wait).

    Systems calculate the load average as the exponentially damped/weighted moving average of the load number. The three values of load average refer to the past one, five, and fifteen minutes of system operation.

    For single-CPU systems that are CPU-bound, one can think of load average as a percentage of system utilization during the respective time period. For systems with multiple CPUs, one must divide the number by the number of processors in order to get a comparable percentage.

    For example, one can interpret a load average of "1.73 0.50 7.98" on a single-CPU system as:

    during the last minute, the CPU was overloaded by 73% (1 CPU with 1.73 runnable processes, so that 0.73 processes had to wait for a turn)

    during the last 5 minutes, the CPU was underloaded 50% (no processes had to wait for a turn)

    during the last 15 minutes, the CPU was overloaded 698% (1 CPU with 7.98 runnable processes, so that 6.98 processes had to wait for a turn)

    This means that this CPU could have handled all of the work scheduled for the last minute if it were 1.73 times as fast, or if there were two (the ceiling of 1.73) times as many CPUs, but that over the last five minutes it was twice as fast as necessary to prevent runnable processes from waiting their turn.

    In a system with four CPUs, a load average of 3.73 would indicate that there were, on average, 3.73 processes ready to run, and each one could be scheduled into a CPU.

  6. $sekundes = 4545634454;
    $minutes = 0;
    
    while($sekundes > 60){
     $minutes = $minutes + 1;
     $sekundes = $sekundes - 60;
    }
    
    echo "Minūtes:$minutes, sekundes: $sekundes";
    

    Var taču vienkāršāk bez cikla, kas visu dienu izpildās:

    $sekundes = 4545634454;
    $minutes = (int)($sekundes / 60);
    $sekundes = fmod($sekundes, 60);
    
    echo "Minūtes:$minutes, sekundes: $sekundes";
    

  7. Ko jūs tur ar muļķībām un visādiem dumiem cikliem ņematies.

    monkuls jau sen parādīja labāko risinājumu:

    No otras puses, kāpēc netaisi uzreiz $string = substr(array_shuffle($characters),0,$lenght); savā funkcijā?
×
×
  • Create New...