jQuery clearQueue with Examples

AmitDiwan
Updated on 31-Dec-2019 06:21:53

157 Views

The clearQueue() method in jQuery is used to remove all items from the queue.SyntaxThe syntax is as follows −$(selector).clearQueue(queue)Above, the queue is the name of the queue.ExampleLet us now see an example to implement the jQuery clearQueue() method − Live Demo    $(document).ready(function(){       $(".button1").click(function(){          var div = $("div");          div.animate({height: 250}, "slow");          div.animate({left: "+=200", top: "+=100" }, "slow");          $("span").text(div.queue().length);       });       $(".button2").click(function(){          $("div").clearQueue();       });    }); ... Read More

ImageFill Function in PHP

Ankith Reddy
Updated on 31-Dec-2019 06:21:35

403 Views

The imagefill() function is used to fill the image.Syntaximagefill(img, x, y, color)ParametersimgCreate a blank image with imagecreatetruecolor().x x-coordinate of start pointy y-coordinate of start pointcolor The fill color.ReturnThe imagefill() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imageDashedLine Function in PHP

George John
Updated on 31-Dec-2019 06:20:51

95 Views

The imagedashedline() function draws a dashed line.Syntaximagedashedline( $image , $x1 , $y1 , $x2 , $y2 , $color )Parametersimage Create a blank image with imagecreatetruecolor().x1 Upper left x-coordinatey1 Upper left y-coordinatex2 Bottom right x-coordinatey2 Bottom right y-coordinatecolor The fill color.ReturnThe function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imagefilledrectangle Function in PHP

Arjun Thakur
Updated on 31-Dec-2019 06:20:11

1K+ Views

The imagefilledrectangle() function draws a filled rectangle.Syntaximagefilledrectangle( $img, $x1, $y1, $x2, $y2, $color )Parametersimage Create a blank image with imagecreatetruecolor().x1x-coordinate for point 1.y1 y-coordinate for point 1.x2 x-coordinate for point 2.y2 y-coordinate for point 2.color The fill color.ReturnThe imagefilledrectangle() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

imagefilledellipse Function in PHP

Chandu yadav
Updated on 31-Dec-2019 06:19:07

169 Views

The imagefilledellipse() function is used to draw a filled ellipse.Syntaximagefilledellipse( $img, $cx, $cy, $width, $height, $color )Parametersimg This creates a blank image with imagecreatetruecolor()cx x-coordinate of the center.cy y-coordinate of the center.width The ellipse width.height The ellipse height.color The fill color.ReturnThe imagefilledellipse() function returns TRUE on success or FALSE on failure.ExampleThe following is an example:OutputThe following is the output:

Setting Up Background Color Using CSS

AmitDiwan
Updated on 30-Dec-2019 12:49:36

226 Views

To set background color using CSS, use the background-color property.ExampleLet us now see an example − Live Demo .demo {    text-decoration: overline underline;    background-color: red; } Details Examination Center near ABC College. Exam begins at 9AM. OutputExampleLet us now see another example − Live Demo .demo {    text-decoration: overline underline; } Details Examination Center near ABC College. Exam begins at 9AM. Output

Relative Positioning in CSS

AmitDiwan
Updated on 30-Dec-2019 12:44:26

273 Views

With relative positioning, the element is positioned relative to its normal position. For this, use position: relativeExampleLet us now see an example − Live Demo div.demo {    position: relative;    color: white;    background-color: orange;    border: 2px dashed blue;    left: 50px; } Demo Heading This is demo text. This is demo text. position: relative; This is another demo text. Output

Static Positioning in CSS

AmitDiwan
Updated on 30-Dec-2019 12:19:26

165 Views

With static positioning, the elements are not affected by the top, bottom, left, and right properties. For this, use position: static.ExampleLet us now see an example − Live Demo div.static {    position: static;    color: white;    background-color: orange;    border: 2px dashed blue; } Demo Heading This is demo text. This is demo text. position: static; This is another demo text. Output

Setting Line Height Using CSS

AmitDiwan
Updated on 30-Dec-2019 12:10:35

96 Views

To set line height, use the line-height property. Followng are the property values −line-height: normal|number|length|initial|inherit;ExampleLet us now see an example − Live Demo div {    line-height: 1.9; } Demo Heading This is demo text. This is another demo text. OutputExampleLet us now see another example − Live Demo div {    line-height: 200%; } Demo Heading This is demo text. This is another demo text. Output

Python Program to Print Diamond Shape

Pradeep Elance
Updated on 30-Dec-2019 11:53:13

436 Views

The looping features in python can be used to create many nicely formatted diagrams using various characters from the keyboard. One such shape is diamond shape which will involve multiple loops. This is because we have to print the character both vertically and horizontally. Also we have to take care of the shape gradually growing from top till middle and then gradually shrinking from middle till the bottom. For this reason, we will use two for loops each containing one more for loop inside it.Below is the code for creating the diamond shape.Exampledef Shape_of_Diamond(shape): a = 0 for m in ... Read More

Advertisements