Tutorial by Examples

Monthwise difference between two dates(timestamp) select ( (DATE_PART('year', AgeonDate) - DATE_PART('year', tmpdate)) * 12 + (DATE_PART('month', AgeonDate) - DATE_PART('month', tmpdate)) ) from dbo."Table1" Yearwise difference between two dates...
Conditions: package should be at least installed. If not loaded in the current session, not a problem. ## Checking package version which was installed at past or ## installed currently but not loaded in the current session packageVersion("seqinr") # [1] ‘3.3.3’ packageVer...
To check the list of loaded packages search() OR (.packages())
A frequent reason why your read operation may not work is because your security rules reject the operation, for example because you're not authenticated (by default a database can only be accessed by an authenticated user). You can see these security rule violations in the Console output. But it's ...
Model With EF Core, data access is performed using a model. A model is made up of entity classes and a derived context that represents a session with the database, allowing you to query and save data. You can generate a model from an existing database, hand code a model to match your database, or ...
Standard Version To install the standard version, go to the Plugin section of your WordPress installation. Search for "Advanced Custom Fields" and install/activate. You will now have access to a new area in the WordPress administrative area labeled "Custom Fields" where you can ...
The following table compares the features available(1) in EF Core and EF6.x. It is intended to give a high level comparison and does not list every feature, or attempt to give details on possible differences between how the same feature works. Creating a ModelEF6.xEF Core 1.0.0Basic modelling (cla...
<?php echo get_field('my_field_name'); ?> This will echo the value of the field "my_field_name" from the current post.
<?php echo get_field('my_field_name', 123); ?> This will echo the value of "my_field_name" from the post with 123 as its ID.
<?php echo get_field('my_field_name', 'option'); ?> This will echo the value of "my_field_name" from the options page created via ACF.
<?php if( get_field('my_field_name') ){ ?> <?php echo get_field('my_field_name'); ?> <?php }; ?> This will only show the field if content exists depending on content type (i.e., an image is uploaded to the field, text is entered, it is selected, etc.).
A typical payment flow with Stripe can be divided in two steps: Client-side, in your frontend (HTML + Javascript) code, you collect the customer's payment information using Stripe's prebuilt Checkout form or Elements form field(s). This will return a token that you then send to your server. ...
Fabric.js is just like any other JS library just specific to canvas. Easy to setup and get started. All you need to do is download the fabric.js from HERE and include it in your project just like any other JS library for example the way you do it for jQuery. Then create the html file suppose index.h...
First of all we need to add MEDIA_ROOT and MEDIA_URL to our settings.py file MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' Also here you will work with ImageField, so remember in such cases install Pillow library (pip install pillow). Otherwise, you will have such error: I...
The setCustomTitle() method of AlertDialog.Builder lets you specify an arbitrary view to be used for the dialog title. One common use for this method is to build an alert dialog that has a long title. AlertDialog.Builder builder = new AlertDialog.Builder(context, Theme_Material_Light_Dialog); buil...
To define an atom, use an ordinary def, but add an atom function before it, like so: (def counter (atom 0)) This creates an atom of value 0. Atoms can be of any type: (def foo (atom "Hello")) (def bar (atom ["W" "o" "r" "l" "d"])) ...
To read an atom's value, simply put the name of the atom, with a @ before it: @counter ; => 0 A bigger example: (def number (atom 3)) (println (inc @number)) ;; This should output 4
There are two commands to change an atom, swap! and reset!. swap! is given commands, and changes the atom based on its current state. reset! changes the atom's value completely, regardless of what the original atom's value was: (swap! counter inc) ; => 1 (reset! counter 0) ; => 0 This e...
WKWebView resizes the fonts on web content so that a full-sized web page will fit on the device's form factor. If you want the web text in both portrait and landscape to be similar in size to the user's preferred reading size, you need to set it explicitly. Swift // build HTML header for dynamic t...
import javax.swing.JFrame; import javax.swing.SwingUtilities; import javax.swing.WindowConstants; public class Main { public static void main(String[] args) { SwingUtilities.invokeLater(() -> { JFrame frame = new JFrame("Hello World!"); frame...

Page 995 of 1336