PHP STATIC VARIABLE EXAMPLE

  • PHP only supports static variables within the scope of a function definition
  • Static variables are, in fact, variable. The “static” means that the variable retains its value between calls to whatever that variable’s scope is (function, class, procedure, etc.)
  • Variables in PHP can only be static within the context of a function. Once a script exits, all variables are released. If you need to share variables between scripts, then you’ll need to either use sessions (I would think this would usually be the best solution), send them via form POST or GET data, or use a database for data persistence.

here is an example paste of static variable in PHP

you can see the output here

 

Understanding Association, Aggregation, Composition and Dependency relationship

A relationship defines the connection between objects. This explains how objects are connected to each other’s and how they will behave.

Association

It represents a relationship between two or more objects where all objects have their own lifecycle and there is no owner. The name of an association specifies the nature of relationship between objects. This is represented by a solid line.

Let’s take an example of relationship between Teacher and Student. Multiple students can associate with a single teacher and a single student can associate with multiple teachers. But there is no ownership between the objects and both have their own lifecycle. Both can be created and deleted independently.

Aggregation

It is a specialized form of Association where all object have their own lifecycle but there is ownership. This represents “whole-part or a-part-of” relationship. This is represented by a hollow diamond followed by a line.

Let’s take an example of relationship between Department and Teacher. A Teacher may belongs to multiple departments. Hence Teacher is a part of multiple departments. But if we delete a Department, Teacher Object will not destroy.

Composition

It is a specialized form of Aggregation. It is a strong type of Aggregation. In this relationship child objects does not have their lifecycle without Parent object. If a parent object is deleted, all its child objects will also be deleted. This represents “death” relationship. This is represented by a solid diamond followed by a line.

Let’s take an example of relationship between House and rooms. House can contain multiple rooms there is no independent life of room and any room cannot belongs to two different house if we delete the house room will automatically delete.

Let’s take another example of relationship between Questions and options. Single questions can have multiple options and option cannot belong to multiple questions. If we delete questions options will be automatically deleted.

Dependency

It represents a relationship between two or more objects where an object is dependent on another object(s) for its specification or implementation. This is represented by a dashed arrow.

Let’s take an example of relationship between client and service. A client is dependent on the service for implementing its functionalities.

Let’s take another example of relationship between a client and a supplier. A client is dependent on the supplier for supplying products. If the supplier will not supply the products, client cannot use those products.

Actual References :

dotnettricks

 

 

A clock-style timepicker for Bootstrap (or jQuery)

ClockPicker

Browser support

All major browsers are supported, including IE 9+. It should look and behave well enough in IE 8.

Device support

Both desktop and mobile device are supported. It also works great in touch screen device.

Dependencies

ClockPicker was designed for Bootstrap in the beginning. So Bootstrap (and jQuery) is the only dependency(s).

Since it only used .popover and some of .btn styles of Bootstrap, I picked these styles to build a jQuery plugin. Feel free to use jquery-* files instead of bootstrap-* , for non-bootstrap project.

iOS 10 Design Guidelines for iPhone and iPad

While Apple calls iOS 10 their biggest release ever, most of the new features are consumer-facing, like Widgets, Siri/Messages integration, and expanded notifications.
For designers, the only noticeable design changes are bolder titles and bigger use of cards, as seen in native apps like Music and News. Whereas iOS 7 started with a widespread use of thin fonts, iOS 10 is going back to using bolder texts.

READ MORE

WinDirStat is a disk usage statistics viewer and cleanup tool for various versions of Microsoft Windows.

WinDirStat is a disk usage statistics viewer and cleanup tool for various versions of Microsoft Windows.

On start up, it reads the whole directory tree once and then presents it in three useful views:

  • The directory list, which resembles the tree view of the Windows Explorer but is sorted by file/subtree size,
  • The treemap, which shows the whole contents of the directory tree straight away,
  • The extension list, which serves as a legend and shows statistics about the file types.