Tutorial by Examples: sin

The example is for illustration purpose of using libraries and helpers and not a valid code. Do not copy / paste it on your projects. HELPER helpers/sendEmail_helper.php if ( ! function_exists('sendEmail')) { function sendEmail($email, $subject, $message, $lang, $cc = null, $file = null) { ...
Use EXCEPT to prevent updates to unchanged records MERGE TargetTable targ USING SourceTable AS src ON src.id = targ.id WHEN MATCHED AND EXISTS ( SELECT src.field EXCEPT SELECT targ.field ) THEN UPDATE SET field = src.field WHEN...
If you want to parse more complex command-line arguments, e.g. with optional parameters, than the best is to use google's GWT approach. All classes are public available at: https://gwt.googlesource.com/gwt/+/2.8.0-beta1/dev/core/src/com/google/gwt/util/tools/ToolBase.java An example for handling ...
const md = Rx.Observable.fromEvent(document, 'mousedown').map(true); // `md` will emit `true` whenever the mouse is pressed const mu = Rx.Observable.fromEvent(document, 'mouseup').map(false); // `mu` will emit `false` whenever the mouse is depressed
const source = Rx.Observable.range(1, 3) .map(x => x * x); const subscription = source.subscribe( x => console.log(`Next: ${x}`), err => console.log(`Error: ${err}`), () => console.log(`Completed`) ); // => Next: 1 // => Next: 4 // => Next: 9 // => Compl...
const source = Rx.Observable.range(1, 3) .map((x, idx, obs) => `Element ${x} was at position ${idx}`); const subscription = source.subscribe( x => console.log(`Next: ${x}`), err => console.log(`Error: ${err}`), () => console.log(`Completed`) ); // => Next: Element 1...
Often when building a Docker image, the Dockerfile contains instructions that runs programs to fetch resources from the Internet (wget for example to pull a program binary build on GitHub for example). It is possible to instruct Docker to pass set set environment variables so that such programs per...
From inside the interative Julia shell (also known as REPL), you can access the system's shell by typing ; right after the prompt: shell> From here on, you can type any shell comand and they will be run from inside the REPL: shell> ls Desktop Documents Pictures Templates Downloa...
brew install zsh sudo echo '/usr/local/bin/zsh' >> /etc/shells chsh -s /usr/local/bin/zsh
You can create extension methods to improve usability for nested collections like a Dictionary with a List<T> value. Consider the following extension methods: public static class DictListExtensions { public static void Add<TKey, TValue, TCollection>(this Dictionary<TKey, TColl...
This works well for single level right click context menu. All you need to do is create a registry entry under Classes Root HKEY_CLASSES_ROOT for specific extension. If you want to create a entry for all types of files choose * else choose extension like .pdf etc. var regmenu = Registry.ClassesR...
When you need multi level menus, with multiple parameters SharpShell comes to rescue. https://github.com/dwmkerr/sharpshell has umpteen number of examples and it works perfect even for single level to multi level custom context menus. Key thing is to create class with attributes [ComVisible(true)]...
Bash can easily create lists from alphanumeric characters. # list from a to z $ echo {a..z} a b c d e f g h i j k l m n o p q r s t u v w x y z # reverse from z to a $ echo {z..a} z y x w v u t s r q p o n m l k j i h g f e d c b a # digits $ echo {1..20} 1 2 3 4 5 6 7 8 9 10 11...
With AspNetCore you can develop the application on any platform including Mac,Linux,Window and Docker. Installation and SetUp Install visual Studio Code from here Add C# extesnion Install dot net core sdk. You can install from here Now you have all the tools available. To develop the applic...
This basic example shows how an application can instantiate a classloader and use it to dynamically load a class. URL[] urls = new URL[] {new URL("file:/home/me/extras.jar")}; Classloader loader = new URLClassLoader(urls); Class<?> myObjectClass = loader.findClass("com.exampl...
This example combines multiple variants of MonoBehaviour singletons found on the internet into one and let you change its behavior depending on global static fields. This example was tested using Unity 5. To use this singleton, all you need to do is extend it as follows: public class MySingleton ...
Most printable characters can be included in string or regular expression literals just as they are, e.g. var str = "ポケモン"; // a valid string var regExp = /[Α-Ωα-ω]/; // matches any Greek letter without diacritics In order to add arbitrary characters to a string or regular expression,...
This is a basic project that uses FXML, created with NetBeans (New Project -> JavaFX -> JavaFX FXML Application). It contains just three files: Main Application class package org.stackoverflow; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Par...
This is a snippet of master report. Two parameters and the connection (for example, jdbc) are passing to the subreport. One value is returned from the subreport back to the master report, this value (variable) can be used in master report <subreport> <reportElement x="0" y=&...
This is a snippet of master report. The datasource is passed to the subreport with help of net.sf.jasperreports.engine.data.JRBeanCollectionDataSource constructor <field name="someFieldWithList" class="java.util.List"/> <!-- ...... --> <subreport> <r...

Page 91 of 161