Tutorial by Examples: f

Custom Setting Custom Setting Field Custom Setting Field Value When the field is checked the validation rule will be disabled, for the running user or in this example, their profile - The rule can also be disabled for a whole Salesforce org - Validation Rule AND( /* the below is the...
If you need to find the last day of the month, you can do complicated DateTime gymnastics or you can use the following method. Say you want to find the last day of February 2021. Do the following: Integer month = 2; Integer day = null; Integer year = 2021; // Create a new DateTime object for ...
To obtain an instance of an HTTP Request, class Illuminate\Http\Request need to be type hint either in the constructor or the method of the controller. Example code: <?php namespace App\Http\Controllers; /* Here how we illuminate the request class in controller */ use Illuminate\Http\Re...
Sometimes we need to accept route params as well as access the HTTP Request params. We can still type hint the Requests class in laravel controller and achieve that as explained below E.g. We have a route that update a certain post like this (passing post id i route ) Route::put('post/{id}', 'Post...
Each signed integer type may be represented in any one of three formats; it is implementation-defined which one is used. The implementation in use for any given signed integer type at least as wide as int can be determined at runtime from the two lowest-order bits of the representation of value -1 ...
from bs4 import BeautifulSoup import requests # Use the requests module to obtain a page res = requests.get('https://www.codechef.com/problems/easy') # Create a BeautifulSoup object page = BeautifulSoup(res.text, 'lxml') # the text field contains the source of the page # Now use a CSS ...
A defer statement consists of a block of code, which will be executed when a function returns and should be used for cleanup. As Swift's guard statements encourage a style of early return, many possible paths for a return may exist. A defer statement provides cleanup code, which then does not need ...
When using a defer-statement, make sure the code remains readable and the execution order remains clear. For example, the following use of the defer-statement makes the execution order and the function of the code hard to comprehend. postfix func ++ (inout value: Int) -> Int { defer { value...
functions.php: function rm_init_js() { wp_enqueue_script( 'custom-ajax-script', get_template_directory_uri() . '/js/ajax.js', array( 'jquery', 'wp-util' ), '1.0', true ); // pass custom variables to JS wp_localize_script( 'custom-ajax-script', 'BEJS', array( 'action' => ...
Scale the image using START. Scale the image using END. Official Docs FitStart This will fit to the smallest size of the container, and it will align it to the start. <ImageView android:layout_width="200dp" android:layout_height="200dp" android:src...
Scale the image using CENTER. Official Docs This expands the image to try to match the container and it will align it to the center, it will fit to the smaller size. Bigger height ( fit to width ) Same width and height.
Scale the image using FILL. Official Docs <ImageView android:layout_width="100dp" android:layout_height="200dp" android:src="@mipmap/ic_launcher" android:id="@+id/imageView" android:scaleType="fitXY&quo...
When write() is called for a named or unnamed pipe or stream socket whose reading end is closed, two things happen: POSIX.1-2001 SIGPIPE signal is sent to the process that called write() POSIX.1-2004 SIGPIPE signal is sent to the thread that called write() EPIPE error is returned ...
Dependencies To install electron you must first install Node.js, which comes with npm. How to install it? Use npm: # Install the `electron` command globally in your $PATH npm install electron -g # OR # Install as a development dependency npm install electron --save-dev
If, during the conversion of: an integer type to a floating point type, a floating point type to an integer type, or a floating point type to a shorter floating point type, the source value is outside the range of values that can be represented in the destination type, the result is undefine...
When starting Zsh, it'll source the following files in this order by default: /etc/zsh/zshenv Used for setting system-wide environment variables; it should not contain commands that produce output or assume the shell is attached to a tty. This file will always be sourced, this cannot be overrid...
function onButtonClick() { navigator.bluetooth.requestDevice({filters: [{services: ['battery_service']}]}) .then(device => { // Connecting to GATT Server... return device.gatt.connect(); }) .then(server => { // Getting Battery Service... return server.getPri...
function onButtonClick() { navigator.bluetooth.requestDevice({filters: [{services: ['heart_rate']}]}) .then(device => { // Connecting to GATT Server... return device.gatt.connect(); }) .then(server => { // Getting Heart Rate Service... return server.getP...
All proxy services events are logged in the wso2carbon log file (located in %CARBON_HOME%/repository/logs). If you want, you can have separate log files for each proxy service. Keep in mind, though, that they will still be logged in wso2carbon log file as well. To do so, you should change the log4...
APT and APT-GET Easiest and fastest way is with apt-get command. This command may be considered as lower-level and "back-end", and support other APT-based tools. There are no fancy loaders, only basic progress info. This is fastest way for installing apps. Usage: sudo apt-get install ...

Page 226 of 457