Tutorial by Examples: and

In this example 2000 bytes will be transfered using DMA, Transmit Half Complete and Transmit Complete interrupts achieving the best performance. The first half of the transmit buffer is loaded with new data by the CPU in the Transmit Half Complete interrupt callback while the second half of the buf...
To illustrate this, here is a function that has 3 different "wrong" behaviors the parameter is completely stupid: we use a user-defined expression the parameter has a typo: we use Oracle standard NO_DATA_FOUND error another, but not handled case Feel free to adapt it to your standa...
Each standard Oracle error is associated with an error number. It's important to anticipate what could go wrong in your code. Here for a connection to another database, it can be: -28000 account is locked -28001 password expired -28002 grace period -1017 wrong user / password Here is a way ...
The idea behind the AdhocWorkspace is to create a workspace on the fly. var workspace = new AdhocWorkspace(); string projectName = "HelloWorldProject"; ProjectId projectId = ProjectId.CreateNewId(); VersionStamp versionStamp = VersionStamp.Create(); ProjectInfo helloWorldProject = P...
The MSBuildWorspace is built around the concept of handling MSBuild solutions (.sln files) and their respective projects (.csproj, .vbproj). Adding new projects and documents to this workspace is not supported. string solutionPath = @"C:\Path\To\Solution\Sample.sln"; MSBuildWorkspace ...
Swift: var centralManager:CBCentralManager! centralManager = CBCentralManager(delegate: self, queue: nil) Objective C: @property (nonatomic, strong) CBCentralManager *centralManager; centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil];
Swift: var centralManager:CBCentralManager! centralManager = CBCentralManager(delegate: self, queue: nil, options: [CBCentralManagerOptionRestoreIdentifierKey : "com.companyname.appname.central"]) Objective C: @property (nonatomic, strong) CBCentralManager *centralManager; self....
Design Patterns provide solutions to the commonly occurring problems in software design. The design patterns were first introduced by GoF(Gang of Four) where they described the common patterns as problems which occur over and over again and solutions to those problems. Design patterns have four ess...
it often happened some rows with format issue, data type issue rejected by copy command while try load it by copy command. the query return succeed but some of data rejected. To do troubleshooting save Rejected Data and Exceptions COPY large_tbl FROM :file1 ON site01, :file2 O...
ng build –prod Above given command with extra option like –prod would generate the production build project bundle. Once the above command gets executed in the root directory of your project would appear a directory called dist. In which all the production build bundle of your project appears in ...
lsvirtualenv : List all of the environments. cdvirtualenv : Navigate into the directory of the currently activated virtual environment, so you can browse its site-packages, for example. cdsitepackages : Like the above, but directly into site-packages directory. lssitepackages : Shows contents of ...
&& has precedence over ||, this means that parentheses are placed to evaluate what would be evaluated together. c++ uses short-circuit evaluation in && and || to not do unnecessary executions. If the left hand side of || returns true the right hand side does not need to be evaluate...
To execute a Redis command using Jedis, you make method calls against the Jedis object you created from the pool. Jedis exposes Redis commands as method calls, some example are: - String get(String key) - Long geoadd(String key, double longitude, double latitude, String member) - List<String...
If you have a lot of commands, you shouldn't put them all in the main class. Make a new class and have it implement CommandExecutor Add the following to the class: @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { } In your...
Signals can have a default handler. All you need to do is to give it a body when you declare it. public class Emitter : Object { public signal void my_signal () { print ("Hello from the default handler!\n"); } } This handler will always be called after the connected...
You can declare a UIFont as follows: var font: UIFont! UIFont has more init() methods: UIFont.init(descriptor: UIFontDescriptor, size: CGFloat) UIFont.init(name: String, size: CGFloat) Therefore, you can initialize a UIFont like this: let font = UIFont(name: "Helvetica Neue", s...
Kernel manages operating system resources. User program can only access to those resources by making system calls to the kernel. System call is similar to an API of kernel, which in term, runs kernel tasks your program needs. str = "something" // run on user space x = x + 1 // run on use...
Use top command to exam CPU time allocation between user space and kernel space. Explanation: 24.8 us (user space): 24.8% of CPU time is spent on user process. 0.5 sy (system): 0.5% of CPU time is spent on kernel space. ni (niceness): the ratio of CPU time spent on low priority processes. i...
Instead of this (unfortunately too often seen in the real code) "masterpiece": function isEven(n) { return n % 2 == 0; } function isOdd(n) { if (isEven(n)) { return false; } else { return true; } } You can do the parity check much more effecti...
The Roslyn Quoter A tool for converting an sample C# program to syntax tree API calls. The tool itself can be found here. Enhanced source viewer An easy way to view the Roslyn source code can be found here.

Page 139 of 153