This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function clinicimages() { | |
| $this->loadModel('Clinicimages'); | |
| $notesimage = $this->Clinicimages->newEntity(); | |
| if (!empty($this->request->data['clinic_image'])) { | |
| $this->request->data['user_id'] = $this->userInfo['id']; | |
| $files = $this->request->data['clinic_image']; | |
| $res = array(); | |
| $imagek = array(); | |
| foreach ($files as $img => $imags) { | |
| $name = rand(0, 999); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>HTML5 Local Storage Example</title> | |
| <!-- include Bootstrap CSS for layout --> | |
| <link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://developer.mozilla.org/en-US/docs/Web/API/Storage | |
| ==================================================== | |
| var aLength = storage.length; | |
| function populateStorage() { | |
| localStorage.setItem('bgcolor', 'yellow'); | |
| localStorage.setItem('font', 'Helvetica'); | |
| localStorage.setItem('image', 'cats.png'); | |
| localStorage.length; // should return 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| function onSubmit() | |
| { | |
| var fields = $("input[name='anid[]']").serializeArray(); | |
| if (fields.length === 0) | |
| { | |
| alert('please select animities nothing selected'); | |
| // cancel submit | |
| return false; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $items = array(); | |
| foreach($cass as $key=>$val){ | |
| $items[] = $val['cspec_id']; | |
| } | |
| foreach($specilities as $specilitie) {?> | |
| <label class="checkbox-inline"> | |
| <input type="checkbox" <?php | |
| if(in_array($specilitie['id'],$items)) { ?> checked="checked" <?php } ?> name="spid[]" id="inlineCheckbox1" value="<?php echo $specilitie['id']; ?>"> <?php echo $specilitie['spec_name']; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('#demo').pagination({ | |
| dataSource: 'https://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?', | |
| locator: 'items', | |
| totalNumber: 120, | |
| pageSize: 20, | |
| ajax: { | |
| beforeSend: function() { | |
| dataContainer.html('Loading data from flickr.com ...'); | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *public scope to make that variable/function available from anywhere, other classes and instances of the object. | |
| *private scope when you want your variable/function to be visible in its own class only. | |
| *protected scope when you want to make your variable/function visible in all classes that extend current class including the parent class. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Differences between abstract class and interface in PHP | |
| Following are some main difference between abstract classes and interface in php | |
| In abstract classes this is not necessary that every method should be abstract. But in interface every method is abstract. | |
| Multiple and multilevel both type of inheritance is possible in interface. But single and multilevel inheritance is possible in abstract classes. | |
| Method of php interface must be public only. Method in abstract class in php could be public or protected both. | |
| In abstract class you can define as well as declare methods. But in interface you can only defined your methods. | |
| ========================================================================================================================== | |
| 1) Abstract class can have abstract and non-abstractmethods.Interface can have only abstract methods. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| final keyword: | |
| The final keyword in java is used to restrict the user. The java final keyword can be used in many context. Final can be: | |
| variable | |
| method | |
| class | |
| The final keyword can be applied with the variables, a final variable that have no value it is called blank final variable or uninitialized final variable. It can be initialized in the constructor only. The blank final variable can be static also which will be initialized in the static block only. We will have detailed learning of these. Let's first learn the basics of final keyword. | |
| *If you make any variable as final, you cannot change the value of final variable(It will be constant). | |
| *If you make any method as final, you cannot override it,final method is inherited but you cannot override it. | |
| *If you make any class as final, you cannot extend it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <input type="color" data-bind="value: color" /> | |
| Selected: <span data-bind="text: color"></span> | |
| ko.applyBindings({ | |
| color: ko.observable() | |
| }) |