Tutorial by Examples: current

$user = wp_get_current_user(); foreach($user->data as $key=>$user_data){ if($key == 'user_pass' || $key == 'user_activation_key' || $key=='user_status'){} else{ $nice_key = ucfirst(str_replace('_', ' ', $key)); if($key == 'user_registered'){ $u...
lib.currentURL= TEXT lib.currentURL.data = getIndpEnv:TYPO3_REQUEST_URL
This fetches the value of NOW() in local time, in India Standard Time, and then again in UTC. SELECT NOW(); SET time_zone='Asia/Kolkata'; SELECT NOW(); SET time_zone='UTC'; SELECT NOW();
Javascript timestamps are based on the venerable UNIX time_t data type, and show the number of milliseconds since 1970-01-01 00:00:00 UTC. This expression gets the current time as a Javascript timestamp integer. (It does so correctly regardless of the current time_zone setting.) ROUND(UNIX_TIMEST...
Problem ConcurrentDictionary shines when it comes to instantly returning of existing keys from cache, mostly lock free, and contending on a granular level. But what if the object creation is really expensive, outweighing the cost of context switching, and some cache misses occur? If the same key ...
<div *ngFor="let item of items; let i = index"> <p>Item number: {{i}}</p> </div> In this case, i will take the value of index, which is the current loop iteration.
Use the config.frameworks option to get an array of Symbols that represent each framework.
currentColor is most usefull in inline SVGs. With this you can inherit the parents css color and use it everywhere colors are used in SVG. In this example the first circle uses the text color as fill color, and the second circle uses it as the stroke color. <html> <head> ...
Xcode have ability to run any script with hotkey. Here is example how to assign hotkey ⌘+⌥+⌃+⇧+T to open Terminal app in current project folder. Create bash script and save it in some folder #!/bin/bash # Project Name: $XcodeProject # Project Dir: $XcodeProjectPath # Workspace Dir: $X...
To display current version, we can use VERSION from @angular/core package. import { Component, VERSION } from '@angular/core'; @Component({ selector: 'my-app', template: `<h1>Hello {{name}}</h1> <h2>Current Version: {{ver}}</h2> `, }) export class AppCompone...
Switch to the new opened tab. Close the current windows(In this case the new Tab). Switch back to first window. PROTRACTOR: browser.getAllWindowHandles().then(function (handles) { browser.driver.switchTo().window(handles[1]); browser.driver.close(); browser.driver.switchTo().window(...
Format: cd/ cd/ is set to change the current directory back to the root of the current drive
Swift 3 Serial Queue func serialQueues () { let serialQueue = DispatchQueue(label: "com.example.serial") //default queue type is a serial queue let start = Date () for i in 0...3 { //launch a bunch of tasks serialQueue.a...
$isSecure = Mage::app()->getStore()->isCurrentlySecure(); This will return true if the current url is secure.
$store = Mage::app()->getStore(); $storeId = Mage::app()->getStore()->getStoreId(); $storeCode = Mage::app()->getStore()->getCode(); $websiteId = Mage::app()->getStore()->getWebsiteId(); $storeGroupId = Mage::app()->getStore()->getGroupId(); $storeName = Mage::app()-&...
One of the most critical parts of dealing with NMS code is being able to support mulitple Minecraft versions. There are numerous ways to do this, but a simple solution is to use this code to store the version as a public static field: public static final String NMS_VERSION = Bukkit.getServer().getC...
Sample Data XML Document First, let's define a sample XML document named "books.xml" in our current directory: <?xml version="1.0" encoding="UTF-8"?> <books> <book> <title>Of Mice And Men</title> <author>Joh...
The following prints all stack frames of the current thread: 1 package test; 2 3 import java.lang.StackWalker.StackFrame; 4 import java.lang.reflect.InvocationTargetException; 5 import java.lang.reflect.Method; 6 import java.util.List; 7 import java.util.stream.Collectors; 8 9 pu...
The following prints the current caller class. Note that in this case, the StackWalker needs to be created with the option RETAIN_CLASS_REFERENCE, so that Class instances are retained in the StackFrame objects. Otherwise an exception would occur. public class StackWalkerExample { public stat...

Page 6 of 7