Tutorial by Examples: st

"Data": { "DefaultConnection": { "ConnectionString": "Host=localhost;Username=postgres;Password=******;Database=postgres;Port=5432;Pooling=true;" } },
Sinse structs are value types all the data is copied on assignment, and any modification to the new copy does not change the data for the original copy. The code snippet below shows that p1 is copied to p2 and changes made on p1 does not affect p2 instance. var p1 = new Point { x = 1, y =...
We make use of Dispatches great Meteor Github Packages (mgp) package: npm install --save mgp Then, add the following command to your package.json scripts: "mgp": "mgp" Create a file named git-packages.json in your project root. Add a config for every (private) Meteor Gith...
Append the following command to the Codeship setup commands: meteor npm run mgp Now, we need to give Codeship access to these private repositories. There is a Codeship documentation article describing this process in detail but here are the steps that you have to take for Github: Create a new...
Detailed instructions on getting signal-processing set up or installed.
Install openfire or any chat server in your system or on server. For more details click here. Create android project and add these libraries in gradle: compile 'org.igniterealtime.smack:smack-android:4.2.0' compile 'org.igniterealtime.smack:smack-tcp:4.2.0' compile 'org.igniterealtime.smack:smac...
Create a class name ErrorMatcher inside your test package with below code: public class ErrorMatcher { @NonNull public static Matcher<View> withError(final String expectedErrorText) { Checks.checkNotNull(expectedErrorText); return new BoundedMatcher<View, ...
String macros do not come with built-in interpolation facilities. However, it is possible to manually implement this functionality. Note that it is not possible to embed without escaping string literals that have the same delimiter as the surrounding string macro; that is, although ""&quot...
Detailed instructions on getting swt set up or installed.
Detailed instructions on getting encoding set up or installed.
IS NULL / IS NOT NULL -- = NULL does not work like you expect. x <=> y is a "null-safe" comparison. In a LEFT JOIN tests for rows of a for which there is not a corresponding row in b. SELECT ... FROM a LEFT JOIN b ON ... WHERE b.id IS NULL
The standard structure for a project built by SBT is: projectName/ build.sbt project/ <SBT sub-build information> src/ main/ scala/ <Scala source files> java/ <Java source files> resources/ ...
On a desktop version of Chrome, the contents of the page can be inspected. This shows the document object model (DOM) of the HTML, the Cascading Style Sheet styles (CSS), and much more. Enter inspection by one of many options: Right click on a web page, and select Inspect From the Chrome Menu, ...
module main; auto getMemberNames(T)() @safe pure { string[] members; foreach (derived; __traits(derivedMembers, T)) { members ~= derived; } return members; } class Foo { int a; int b; } class Bar : Foo { int c; int d; int e...
<!DOCTYPE html> <html> <head> <title>Styled Maps</title> <meta charset="utf-8"> <style> #map { height: 100%; } </style> </head> <body> <div id="map"></div> <script type="t...
Unsafe is stored as a private field that cannot be accessed directly. The constructor is private and the only method to access public static Unsafe getUnsafe() has privileged access. By use of reflection, there is a work-around to make private fields accessible: public static final Unsafe UNSAFE; ...
$perl -d:MOD script.pl runs the program under the control of a debugging, profiling, or tracing module installed as Devel::MOD. For example, -d:NYTProf executes the program using the Devel::NYTProf profiler. See all available Devel modules here Recommended modules: Devel::NYTProf -- Powerful ...
Mocks are meant as test doubles, that allow interactions with the mocks to be validated, they are not meant to replace the system you are testing. Examples will often demonstrate features of Moq as follows: // Create the mock var mock = new Mock<IMockTarget>(); // Configure the mock to d...
If you want to instantiate an instance of user control inside ASPX code behind page, you need to write user control declaration on Page_Load event as follows: public partial class Default : System.Web.UI.Page { protected void Page_Load(Object sender, EventArgs e) { Control contr...
Like standard ASP.NET built-in server controls, user controls can have properties (attributes) on its definition tag. Suppose you want to add color effect on UserControl.ascx file like this: <uc:UserControl ID="UserControl1" runat="server" Color="blue" /> At t...

Page 251 of 369