Tutorial by Examples: er

You may want to do this if the remote repository is migrated. The command for changing the remote url is: git remote set-url It takes 2 arguments: an existing remote name (origin, upstream) and the url. Check your current remote url: git remote -v origin https://bitbucket.com/develop/myrep...
A higher-order function, as opposed to a first-order function, can have one of three forms: One or more of its parameters is a function, and it returns some value. It returns a function, but none of its parameters is a function. Both of the above: One or more of its parameters is a fu...
If we have a c++ project that uses a config.h configuration file with some custom paths or variables, we can generate it using CMake and a generic file config.h.in. The config.h.in can be part of a git repository, while the generated file config.h will never be added, as it is generated from the cu...
If you have a cmake module . You can create a folder called in to store all config files. For example,you have a project called FOO, you can create a FOO_config.h.in file like: //=================================================================================== // CMake configuration file, base...
Correlated (also known as Synchronized or Coordinated) Subqueries are nested queries that make references to the current row of their outer query: SELECT EmployeeId FROM Employee AS eOuter WHERE Salary > ( SELECT AVG(Salary) FROM Employee eInner WHERE eInner.Dep...
Inheritance among models can be done in two ways: a common abstract class (see the "Model mixins" example) a common model with multiple tables The multi tables inheritance will create one table for the common fields and one per child model example: from django.db import models c...
// An 8-bit 'byte' value: byte aByte = (byte)0b00100001; // A 16-bit 'short' value: short aShort = (short)0b1010000101000101; // Some 32-bit 'int' values: int anInt1 = 0b10100001010001011010000101000101; int anInt2 = 0b101; int anInt3 = 0B101; // The B can be upper or lower case. // A ...
The following example shows other ways you can use the underscore in numeric literals: long creditCardNumber = 1234_5678_9012_3456L; long socialSecurityNumber = 999_99_9999L; float pi = 3.14_15F; long hexBytes = 0xFF_EC_DE_5E; long hexWords = 0xCAFE_BABE; long maxLong = 0x7fff_ffff_ffff_ffffL;...
You can use Map<String, List<String>> myMap = new HashMap<>(); instead of Map<String, List<String>> myMap = new HashMap<String, List<String>>(); However, you can't use List<String> list = new ArrayList<>(); list.add("A"); ...
We can have three cases to analyze an algorithm: Worst Case Average Case Best Case #include <stdio.h> // Linearly search x in arr[]. If x is present then return the index, // otherwise return -1 int search(int arr[], int n, int x) { int i; for (i=0; i<n; i...
Not everything in a bindings library will have the same name in C# as it does in Java. In C#, interface names start with "I", but Java has no such convention. When you import a Java library, an interface named SomeInterface will become ISomeInterface. Similarly, Java doesn't have propert...
For simple cases, you can filter data directly. a = np.random.normal(size=10) print(a) #[-1.19423121 1.10481873 0.26332982 -0.53300387 -0.04809928 1.77107775 # 1.16741359 0.17699948 -0.06342169 -1.74213078] b = a[a>0] print(b) #[ 1.10481873 0.26332982 1.77107775 1.16741359 0.176999...
The Null literal (written as null) represents the one and only value of the null type. Here are some examples MyClass object = null; MyClass[] objects = new MyClass[]{new MyClass(), null, new MyClass()}; myMethod(null); if (objects != null) { // Do something }...
A statement is usually a test on a variable or the return value of a function. To test those values, we can use some relational operators: OperatorMeaningExample==Equal to1 == 1 is TRUE, 1 == 2 is FALSE!=Not equal to1 != 2 is TRUE, 1 != 1 is FALSE<Less than1 < 2 is TRUE, 2 < 1 is FALSE>...
A std::tuple<T...> can be used to pass multiple values around. For example, it could be used to store a sequence of parameters into some form of a queue. When processing such a tuple its elements need to be turned into function call arguments: #include <array> #include <iostream>...
std::integer_sequence itself is about holding a sequence of integers which can be turned into a parameter pack. Its primary value is the possibility to create "factory" class templates creating these sequences: #include <iostream> #include <initializer_list> #include <uti...
import AlamofireImage Alamofire.request("https://httpbin.org/image/png").responseImage { response in debugPrint(response) print(response.request) print(response.response) debugPrint(response.result) if let image = response.result.value { print(&quot...
HTTPS server with http location: server { listen 443; root /var/www/ location / { ... } location /http { rewrite ^ http://$host$request_uri? permanent; } } HTTP server redirects to HTTPS except one location: server { root /var/www/ locat...
Below example shows how to change the hyperlink for "ID" and "Title(LinkTitle)" field inside the list view using CSR. Step1 : Create a JS file and paste below code (function () { function registerRenderer() { var ctxForm = {}; ctxForm.Templates = {}...
Redirect without query params: RewriteRule ^route$ /new_route_without_query [L,R=301,QSD] Redirect with query params: RewriteCond %{QUERY_STRING} ^$ RewriteRule ^/?route$ %{REQUEST_URI}?query=param1&query2=param2 [NC,L,R=301]

Page 337 of 417