Tutorial by Examples: e

Description This is a self-contained running example including/showcasing: minimum dependencies needed, Java Configuration, Bean declaration by annotation and Java Configuration, Dependency Injection by Constructor and by Property, and Pre/Post hooks. Dependencies These dependencies are needed in...
Once an object has an effective type, you should not attempt to modify it through a pointer of another type, unless that other type is a character type, char, signed char or unsigned char. #include <inttypes.h> #include <stdio.h> int main(void) { uint32_t a = 57; // conversion...
To do this first locate config folder in your root. Then open connections.js Locate // someMysqlServer: { // adapter: 'sails-mysql', // host: 'YOUR_MYSQL_SERVER_HOSTNAME_OR_IP_ADDRESS', // user: 'YOUR_MYSQL_USER', //optional // password: 'YOUR_MYSQL_PASSWORD', //optional /...
A problem: Canvas only remembers pixels, not shapes or images This is an image of a circular beach ball, and of course, you can't drag the ball around the image. It may surprise you that just like an image, if you draw a circle on a Canvas you cannot drag that circle around the canvas. That's be...
What is a "Shape"? You typically save your shapes by creating a JavaScript "shape" object representing each shape. var myCircle = { x:30, y:20, radius:15 }; Of course, you're not really saving shapes. Instead, you're saving the definition of how to draw the shapes. Then put...
Most Canvas drawings are either rectangular (rectangles, images, text-blocks) or circular (circles). Circles & rectangles have mathematical tests to check if the mouse is inside them. This makes testing circles and rectangles easy, quick and efficient. You can "hit-test" hundreds of c...
See this Example for a general explanation of dragging Shapes around the Canvas. This annotated example shows how to drag images around the Canvas // canvas related vars var canvas=document.createElement("canvas"); var ctx=canvas.getContext("2d"); canvas.width=378; canvas.h...
Here is an example of an IntentService that pretends to load images in the background. All you need to do to implement an IntentService is to provide a constructor that calls the super(String) constructor, and you need to implement the onHandleIntent(Intent) method. public class ImageLoaderIntentSe...
The exposition pipe operator, %$%, exposes the column names as R symbols within the left-hand side object to the right-hand side expression. This operator is handy when piping into functions that do not have a data argument (unlike, say, lm) and that don't take a data.frame and column names as arg...
Given the 3 points of a quadratic curve the following function returns the length. function quadraticBezierLength(x1,y1,x2,y2,x3,y3) var a, e, c, d, u, a1, e1, c1, d1, u1, v1x, v1y; v1x = x2 * 2; v1y = y2 * 2; d = x1 - v1x + x3; d1 = y1 - v1y + y3; e = v1x - 2 * x1; ...
Open Script Editor. 2.12.4 With Mac OS X Leopard and earlier, and OS X Yosemite and later, Script Editor is located at /Applications/Utilities/Script Editor.app 2.12.4 Between Mac OS X Snow Leopard and OS X Mavericks inclusive, Script Editor is AppleScript Editor. /Applications/Utiliti...
Python's built-in crypto functionality is currently limited to hashing. Encryption requires a third-party module like pycrypto. For example, it provides the AES algorithm which is considered state of the art for symmetric encryption. The following code will encrypt a given message using a passphrase...
Consider the following Python2.x code. Save the file as example.py Python 2.x2.0 def greet(name): print "Hello, {0}!".format(name) print "What's your name?" name = raw_input() greet(name) In the above file, there are several incompatible lines. The raw_input() meth...
c++17 C++17 introduces int std::uncaught_exceptions() (to replace the limited bool std::uncaught_exception()) to know how many exceptions are currently uncaught. That allows for a class to determine if it is destroyed during a stack unwinding or not. #include <exception> #include <strin...
VB_Name specifies the class or module name. Attribute VB_Name = "Class1" A new instance of this class would be created with Dim myClass As Class1 myClass = new Class1
In VBA, this attribute is ignored. It was not ported over from VB6. In VB6, it creates a Default Global Instance of the class (a "shortcut") so that class members can be accessed without using the class name. For example, DateTime (as in DateTime.Now) is actually part of the VBA.Conversio...
This attribute is ignored. It was not ported over from VB6. In VB6, it was used in combination with the VB_Exposed attribute to control accessibility of classes outside of the current project. VB_Exposed=True VB_Creatable=True Would result in a Public Class, that could be accessed from other ...
Creates a Global Default Instance of a class. The default instance is accessed via the name of the class. Declaration VERSION 1.0 CLASS BEGIN MultiUse = -1 'True END Attribute VB_Name = "Class1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_Pr...
Controls the instancing characteristics of a class. Attribute VB_Exposed = False Makes the class Private. It cannot be accessed outside of the current project. Attribute VB_Exposed = True Exposes the class Publicly, outside of the project. However, since VB_Createable is ignored in VBA, inst...
Adds a text description to a class or module member that becomes visible in the Object Explorer. Ideally, all public members of a public interface / API should have a description. Public Function GiveMeATwo() As Integer Attribute GiveMeATwo.VB_Description = "Returns a two!" ...

Page 653 of 1191