Tutorial by Examples: ee

Let's create a small piece of code that throws an exception: private void button1_Click(object sender, EventArgs e) { string msg = null; msg.ToCharArray(); } If we execute this, we get the following Exception and stack trace: System.NullReferenceException: "Object reference not...
Incorrect code Sub DoSomething() On Error GoTo CleanFail DoSomethingElse CleanFail: Debug.Print Err.Number Resume Next End Sub Why doesn't this work? If the DoSomethingElse procedure raises an error, execution jumps to the CleanFail line label, prints the error number, a...
Ubuntu: $ cat /proc/cpuinfo Sample Output: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz stepping : 11 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings ...
In this example, one of two different ImageViews should be translated from the ChooserFragment to the DetailFragment. In the ChooserFragment layout we need the unique transitionName attributes: <ImageView android:id="@+id/image_first" android:layout_width="wrap_content...
Requirements: NodeJS : Download page npm or yarn Run the following commands with cmd from new directory folder: npm install -g @angular/cli or yarn global add @angular/cli ng new PROJECT_NAME cd PROJECT_NAME ng serve Open your browser at localhost:4200
This method will create a new Excel Spreadsheet. Pass in the fileName which is a full file path name. using DocumentFormat.OpenXml; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Spreadsheet; using System; .... void Create(string fileName) { using (Sp...
app.component.html <div> <div> <div *ngFor="let user of users"> <button class="btn" [@buttonState]="user.active" (click)="user.changeButtonState()">{{user.firstName}}</button> <...
Java technology is both a programming language and a platform. The Java programming language is a high-level object-oriented language that has a particular syntax and style. A Java platform is a particular environment in which Java programming language applications run. There are several Java platf...
Hello friends before start code we have need to declare dependency for access firebase ui component, so here is the dependency which you can put it in your gradel other wise you can add dependency as jar also. compile 'com.firebaseui:firebase-ui-database:0.4.0' Then after we are querying in fire...
[HttpPost] [Route("api/Fitbit/Activity/Stats")] public async Task<HttpResponseMessage> ActivityStats(FitbitRequestDTO request) { if (string.IsNullOrEmpty(request.PatientId) || string.IsNullOrEmpty(request.DeviceId)) ret...
Arrays can be passed to proceedures by putting () after the name of the array variable. Function countElements(ByRef arr() As Double) As Long countElements = UBound(arr) - LBound(arr) + 1 End Function Arrays must be passed by reference. If no passing mechanism is specified, e.g. myFunction...
use Time::HiRes qw( time ); my $start = time(); #Code for which execution time is calculated sleep(1.2); my $end = time(); printf("Execution Time: %0.02f s\n", $end - $start); This will print execution time of Code in seconds
If you want to take a screenshot of a particular View v, then you can use the following code: Bitmap viewBitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.RGB_565); Canvas viewCanvas = new Canvas(viewBitmap); Drawable backgroundDrawable = v.getBackground(); if(backgroundD...
To add additional restriction to the poReceiptLinesSelection data view, you should invoke Select method on base view and inspect each item in returned PXResultSet independently to decide if it complies with additional restriction(s): public class APInvoiceEntryExt : PXGraphExtension<APInvoiceEn...
Teacher Class: class Teacher { private String name; private double salary; private String subject; public Teacher (String tname) { name = tname; } public String getName() { return name; } private double getSal...
let messageBox:MessageBox = MessageBox() // set messageBox.setObject("TestObject1", forKey:"TestKey1") // get // but don't remove it, keep it stored, so that it can still be retrieved later let someObject:String = messageBox.getObject(forKey:"TestKey1", remov...
<!-- All boilerplate for now --> <Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Application.Resources> </Application.Reso...
Sleep On older Windows system, timeout is not available. However, we can use the sleep command. Usage sleep 1 Very self-explanatory; sleep for 1 second. However, sleep is a deperacted command and should be replaced by timeout. Availability This command is available on old Windows system. ...
Let's say we want to go to the last day of the month, this function will help on it: eom <- function(x, p=as.POSIXlt(x)) as.Date(modifyList(p, list(mon=p$mon + 1, mday=0))) Test: x <- seq(as.POSIXct("2000-12-10"),as.POSIXct("2001-05-10"),by="months") > da...
Dockerize zookeeper-3.4.6 Create a Dockerfile: ####################################################### # Image: img.reg.3g:15000/zookeeper:3.4.6 ####################################################### FROM img.reg.3g:15000/jdk:1.7.0_67 MAINTAINER [email protected] USER root ENV ZO...

Page 45 of 54