Tutorial by Examples

A list of available IDEs to create classes, triggers, Visualforce/Lightning pages/components. Force.com IDE – plugin for Eclipse JedIDE – plugin for IntelliJ IDEA & standalone Force.com IDE MavensMate – plugin for Sublime Text and Atom and VS Code FuseIT SFDC Explorer - This is a standalon...
public void SaveNewEmployee(Employee newEmployee) { // best practice - wrap all database connections in a using block so they are always closed & disposed even in the event of an Exception // best practice - retrieve the connection string by name from the app.config or web.config (dep...
The easiest way to install and manage various versions of Ruby with rbenv is to use the ruby-build plugin. First clone the rbenv repository to your home directory: $ git clone https://github.com/rbenv/rbenv.git ~/.rbenv Then clone the ruby-build plugin: $ git clone https://github.com/rbenv/rub...
It is best to use latest SLIME from Emacs MELPA repository: the packages may be a bit unstable, but you get the latest features. Portale and multiplatform Emacs, Slime, Quicklisp, SBCL and Git You can download a portable and multiplatform version of Emacs25 already configured with Slime, SBCL, Qui...
In Emacs M-x slime will start slime with the default (first) Common Lisp implementation. If there are multiple implementations provided (via variable slime-lisp-implementations), other implementations can be accessed via M-- M-x slime, which will offer the choice of available implementations in mini...
CL-USER> (+ 2 3) 5 CL-USER> (sin 1.5) 0.997495 CL-USER> (mapcar (lambda (x) (+ x 2)) '(1 2 3)) (3 4 5) The result that is printed after evaluation is not only a string: there is full-on Lisp object behind it which can be inspected by right-clicking on it and choosing Inspect. Multi...
Examples ES6/ES2015 to ES5 (via Babel): This ES2015 syntax // ES2015 arrow function syntax [1,2,3].map(n => n + 1); is interpreted and translated to this ES5 syntax: // Conventional ES5 anonymous function syntax [1,2,3].map(function(n) { return n + 1; }); CoffeeScript to ...
// This iterates through a range between two DateTimes // with the given iterator (any of the Add methods) DateTime start = new DateTime(2016, 01, 01); DateTime until = new DateTime(2016, 02, 01); // NOTICE: As the add methods return a new DateTime you have // to overwrite dt in the itera...
C++17 namespace a { namespace b { template<class T> struct qualifies : std::false_type {}; } } namespace other { struct bob {}; } namespace a::b { template<> struct qualifies<::other::bob> : std::true_type {}; } You can enter both the a and b n...
Suppose the make fails: $ make Launch it instead with make VERBOSE=1 to see the commands executed. Then directly run the linker or compiler command that you'll see. Try to make it work by adding necessary flags or libraries. Then figure out what to change, so CMake itself can pass correct argum...
Example: Invoke different constructors by passing relevant parameters import java.lang.reflect.*; class NewInstanceWithReflection{ public NewInstanceWithReflection(){ System.out.println("Default constructor"); } public NewInstanceWithReflection( String a){ ...
Reflection is useful when it is properly used for right purpose. By using reflection, you can access private variables and re-initialize final variables. Below is the code snippet, which is not recommended. import java.lang.reflect.*; public class ReflectionDemo{ public static void main(St...
Minikube creates a local cluster of virtual machines to run Kubernetes on.It is the simplest method to get your hands dirty with Kubernetes on your local machine. Documentation for Minikube can be found at http://kubernetes.io/docs/getting-started-guides/minikube/ Requirements On macOS, xhyve ...
var baseType = typeof(List<>); var genericType = baseType.MakeGenericType(typeof(String)); var instance = Activator.CreateInstance(genericType); var method = genericType.GetMethod("GetHashCode"); var result = method.Invoke(instance, new object[] { });
This iterates from 4 to 13 (inclusive). for i in 4..13 puts "this is #{i}.th number" end We can also iterate over arrays using for names = ['Siva', 'Charan', 'Naresh', 'Manish'] for name in names puts name end
If your enum class is required to have static fields, keep in mind they are created after the enum values themselves. That means, the following code will result in a NullPointerException: enum Example { ONE(1), TWO(2); static Map<String, Integer> integers = new HashMap<>(); ...
Compare two Strings ignoring case: "School".equalsIgnoreCase("school"); // true Don't use text1.toLowerCase().equals(text2.toLowerCase()); Languages have different rules for converting upper and lower case. A 'I' would be converted to 'i' in English. But in Turkish a 'I' ...
Once you installed Ubuntu, you might want to get the latest patches and updates. Using Ubuntu's easy to use package manager Aptitude, the OS along with all future packages that is installed using this manner can be kept up to date. Download the latest package lists by refreshing information from ...
The Java language provides three operator for performing bitwise shifting on 32 and 64 bit integer values. These are all binary operators with the first operand being the value to be shifted, and the second operand saying how far to shift. The << or left shift operator shifts the value g...
public class InsertIntoConcurrentHashMap { public static void main(String[] args) { ConcurrentHashMap<Integer, SomeObject> concurrentHashMap = new ConcurrentHashMap<>(); SomeObject value = new SomeObject(); Integer key = 1; SomeObject ...

Page 550 of 1336