Dear All
I am facing below mention problem plz suggest me solution.
Op of date command:
> date
Tue Jan 1 12:17:52 IST 2008
Now i want Jan 1 12: or Jan 1 12 op in some another variable.
I had tried awk but if give me problem when there is date comes in 2 digit i.e. greater that 9.... (1 Reply)
Dear Experts,
I have a scenario where I have to form sql queries in a file using echo command.
I have file1 which has more than 10 lac numbers. For each Number in file 1, I need to create 5 sql queries resulting in 50 lac queries totally.
For doing this I use the below simple method,
for i... (5 Replies)
I have a data like as follows, I need to format it as shown in as below. Request you to help me here ?
I/P
aa|3|1
aa|4|2
bb|3|1
bb|4|1
cc|3|26
cc|4|1
O/P
aa|3|1|4|2
bb|3|1|4|1
cc|3|26|4|1
Thanks,
Srikanth (5 Replies)
I need help to create varieties of football formation. The available positions are:
GK
SW
DR
DC
DL
WBR
DM
WBL
MR
MC
ML
AMR
AMC
AML
ST
But the conditions are:
a. the maximum number in 1 formation:
GK is 1
SW is 1 (1 Reply)
https://www.unix.com/programming/252468-perl-script-create-football-formation.html https://www.unix.com/members/43551.html, it is not repeated question. please read it before u block my question. Unblock it for me. Thanks:mad: (0 Replies)
Discussion started by: Tzeronone
0 Replies
LEARN ABOUT PHP
imagesetpixel
IMAGESETPIXEL(3) 1 IMAGESETPIXEL(3)imagesetpixel - Set a single pixelSYNOPSIS
bool imagesetpixel (resource $image, int $x, int $y, int $color)
DESCRIPTION imagesetpixel(3) draws a pixel at the specified coordinate.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $x
- x-coordinate.
o $y
- y-coordinate.
o $color
- A color identifier created with imagecolorallocate(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
imagesetpixel(3) example
A random drawing that ends with a regular picture.
<?php
$x = 200;
$y = 200;
$gd = imagecreatetruecolor($x, $y);
$corners[0] = array('x' => 100, 'y' => 10);
$corners[1] = array('x' => 0, 'y' => 190);
$corners[2] = array('x' => 200, 'y' => 190);
$red = imagecolorallocate($gd, 255, 0, 0);
for ($i = 0; $i < 100000; $i++) {
imagesetpixel($gd, round($x),round($y), $red);
$a = rand(0, 2);
$x = ($x + $corners[$a]['x']) / 2;
$y = ($y + $corners[$a]['y']) / 2;
}
header('Content-Type: image/png');
imagepng($gd);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example : imagesetpixel()
SEE ALSO imagecreatetruecolor(3), imagecolorallocate(3), imagecolorat(3).
PHP Documentation Group IMAGESETPIXEL(3)