Tutorial by Examples: ect

Derives from DispatcherObject Key members public object GetValue(DependencyProperty dp); public void SetValue(DependencyProperty dp, object value); Summary Classes derived from DependencyObject participate in the dependency property system, which includes registering dependency properties ...
public function drawDisplayObjectUsingBounds(source:DisplayObject):BitmapData { var bitmapData:BitmapData;//declare a BitmapData var bounds:Rectangle = source.getBounds(source);//get the source object actual size //round bounds to integer pixel values (to aviod 1px str...
The first step in accessing a data source via ADO is creating an ADO Connection object. This is typically done using a connection string to specify the data source parameters, although it is also possible to open a DSN connection by passing the DSN, user ID, and password to the .Open method. Note t...
To initialize react-native init MyAwesomeProject To initialize with a specific version of React Native react-native init --version="0.36.0" MyAwesomeProject To Run for Android cd MyAwesomeProject react-native run-android To Run for iOS cd MyAwesomeProject react-native run-io...
On of the overloads of the Select extension methods also passes the index of the current item in the collection being selected. These are a few uses of it. Get the "row number" of the items var rowNumbers = collection.OrderBy(item => item.Property1) .ThenBy...
server { listen 80 default_server; listen [::]:80 default_server; server_name example.com www.example.com; return 307 https://$host$request_uri; } A 301 redirect is also an alternative but if a POST is made to a 301, then many clients will resubmit the request as a GET - whic...
server { server_name example.com; return 301 $scheme://example.net$request_uri; }
CAShapeLayer *mask = [[CAShapeLayer alloc] init]; mask.frame = CGRectMake(50, 50, 100, 100); CGFloat width = 100; CGFloat height = 100; CGMutablePathRef path = CGPathCreateMutable(); CGPathMoveToPoint(path, nil, 30, 30); CGPathAddLineToPoint(path, nil, width, 30); CGPathAddLine...
To execute a script file with the bash interpreter, the first line of a script file must indicate the absolute path to the bash executable to use: #!/bin/bash The bash path in the shebang is resolved and used only if a script is directly launch like this: ./script.sh The script must have exe...
You can override 4 methods of SKScene to detect user touch class GameScene: SKScene { override func touchesBegan(touches: Set<UITouch>, withEvent event: UIEvent?) { } override func touchesMoved(touches: Set<UITouch>, withEvent event: UIEvent?) { ...
To produce nested JSON object, you need to simply add one JSON object to another: JSONObject mainObject = new JSONObject(); // Host object JSONObject requestObject = new JSONObject(); // Included object try { requestObject.put("lastname", lastname); reques...
Driver: 12c R1 11g R2 (Note: the driver is not included in Maven Central!) Driver class initialization: Class.forName("oracle.jdbc.driver.OracleDriver"); Connection URL Older format, with SID "jdbc:oracle:thin:@<hostname>:<port>:<SID>" Newer...
Introduction When the 80286 was invented, it supported the legacy 8086 Segmentation (now called "Real Mode"), and added a new mode called "Protected Mode". This mode has been in every x86 processor since, albeit enhanced with various improvements such as 32- and 64-bit addressin...
Switching into Protected Mode is easy: you just need to set a single bit in a Control Register. But staying in Protected Mode, without the CPU throwing up its hands and resetting itself due to not knowing what to do next, takes a lot of preparation. In short, the steps required are as follows: ...
Longer portions of text containing special characters can be escaped with a CDATA section. CDATA sections can only appear in element content. <?xml version="1.0"?> <document> This is a CDATA section : <![CDATA[ plenty of special characters like & < > " ; ...
It is good practice to test the calling program's __name__ variable before executing your code. import sys def main(): # Your code starts here # Don't forget to provide a return code return 0 if __name__ == "__main__": sys.exit(main()) Using this pattern ens...
Now it's time to go through the Meteor Cordova Phonegap Integration documentation. Since that documentation was written, XCode and Yosemite have been released, which has caused some hiccups in installation. Here are the steps we had to go through to get Meteor compiled to an iOS device. Upgrade ...
The --url flag can be tricky to use. There is a 60 second window to authenticate, and then the username/password randomly resets. So be sure to have robomongo open and ready to configure a new connection when you run the command. # get the MONGO_URL string for your app meteor mongo --url $METEOR...
Run meteor, open another terminal window, and run the following command. mongoexport --db meteor --collection foo --port 3001 --out foo.json
Did you know about the --url flag? Very handy. meteor mongo --url YOURSITE.meteor.com

Page 35 of 99