Tutorial by Examples: al

var_dump(filter_var(true, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)); // true var_dump(filter_var(false, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)); // false var_dump(filter_var(1, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)); // true var_dump(filter_var(0, FILTER_VALIDATE_BOOL...
Validates value as float, and converts to float on success. var_dump(filter_var(1, FILTER_VALIDATE_FLOAT)); var_dump(filter_var(1.0, FILTER_VALIDATE_FLOAT)); var_dump(filter_var(1.0000, FILTER_VALIDATE_FLOAT)); var_dump(filter_var(1.00001, FILTER_VALIDATE_FLOAT)); var_dump(filter_var('1', FILTE...
Validates a value is a valid MAC address var_dump(filter_var('FA-F9-DD-B2-5E-0D', FILTER_VALIDATE_MAC)); var_dump(filter_var('DC-BB-17-9A-CE-81', FILTER_VALIDATE_MAC)); var_dump(filter_var('96-D5-9E-67-40-AB', FILTER_VALIDATE_MAC)); var_dump(filter_var('96-D5-9E-67-40', FILTER_VALIDATE_MAC)); v...
After launching Visual Studio 2015, go to File → New → Project. In the New Project dialog box, browse in the templates tree to Visual C# → Windows → Universal and select Blank App (Universal Windows). Next, we need to fill the form to describe the Application: Name: this is the name of the appli...
Callback-based: db.notification.email.find({subject: 'promisify callback'}, (error, result) => { if (error) { console.log(error); } // normal code here }); This uses bluebird's promisifyAll method to promisify what is conventionally callback-based code like above. blueb...
Content has been moved back to good 'ol JSP wiki page
PHP 5.x5.4 When you build REST API's, you may need to reduce the information of an object to be passed to the client application. For this purpose, this example illustrates how to use the JsonSerialiazble interface. In this example, the class User actually extends a DB model object of a hypotetica...
[JsonObject("person")] public class Person { [JsonProperty("name")] public string PersonName { get; set; } [JsonProperty("age")] public int PersonAge { get; set; } [JsonIgnore] public string Address { get; set; } } Person person = new...
TCO is only available in strict mode As always check browser and Javascript implementations for support of any language features, and as with any javascript feature or syntax, it may change in the future. It provides a way to optimise recursive and deeply nested function calls by eliminating the n...
Log into your AWS Console and click on Lambda under the Services tab. Under Functions you'll be able to Create a Lambda function using the same-labeled button. You'll be shown a screen where you can select a blueprint. These are simply starting points to existing Lambda functions fo...
Using a CDN: <!DOCTYPE html> <head> <script src="https://cdn.jsdelivr.net/rxjs/4.1.0/rx.min.js"></script> </head> <body> <script> // `Rx` is available var one$ = Rx.Observable.of(1); var onesub = one$.subscribe(function (...
The setup on the app side requires two things: Configuring the app’s entitlement, and enabling the universal links by turning on the Associated Domains capability in the project. Handling Incoming Links in your AppDelegate. 1. Configuring the app’s entitlement, and enabling universal links. ...
Detailed instructions on getting facebook-graph-api set up or installed.
A common usecase for the ready() hook is to access the DOM, e.g. to initiate a Javascript plugin, get the dimensions of an element etc. The problem Due to Vue's asynchronous DOM update mechanism, it's not guaranteed that the DOM has been fully updated when the ready() hook is called. This usually ...
PHP provides an alternative syntax for some control structures: if, while, for, foreach, and switch. When compared to the normal syntax, the difference is, that the opening brace is replaced by a colon (:) and the closing brace is replaced by endif;, endwhile;, endfor;, endforeach;, or endswitch;, ...
Assuming we want to modify bit n of an integer primitive, i (byte, short, char, int, or long): (i & 1 << n) != 0 // checks bit 'n' i |= 1 << n; // sets bit 'n' to 1 i &= ~(1 << n); // sets bit 'n' to 0 i ^= 1 << n; // toggles the value of bit 'n' Us...
Creating and returning an image object by loading the image data from the file at the specified path. Example: UIImage *image = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[cellCountry objectForKey:@"Country_Flag"] ofType:nil]]; Using Array: Example NSM...
SP.SOD.executeOrDelayUntilScriptLoaded( function(){ deleteItem(1); }, "sp.js"); function deleteItem(id){ var clientContext = new SP.ClientContext(); var list = clientContext.get_web().get_lists().getByTitle("List Title"); var item = list.getItemById(id); it...
SP.SOD.executeOrDelayUntilScriptLoaded(showDialog,"sp.js"); function showDialog(){ var options = SP.UI.$create_DialogOptions(); options.url = "/mySite/lists/myList/NewForm.aspx"; options.dialogReturnValueCallback = myCallBackFunction; SP.UI.ModalDialog.show...
SP.SOD.executeOrDelayUntilScriptLoaded(showDialog,"sp.js"); function showDialog(){ SP.UI.ModalDialog.showModalDialog( { url: "/org/it/web/wik/Lists/ExampleCode/DispForm.aspx?ID=6" } ); }

Page 59 of 269