Tutorial by Examples: c

There will be times where you only want to import a specific sheet from an excel file with multiple sheets. To do that, we'll use "SHEET=". PROC IMPORT OUT= YourNewTable DATAFILE= "myfolder/excelfilename.xlsx" DBMS=xlsx REPLACE; SHEET="Sheet1&quo...
Using PROC SQL is a good way to get quick results from a table and throw them into variables. I usually find that when I want to get a count of records I just loaded to a table, I can get that count into a variable with a quick PROC SQL call. PROC SQL; SELECT COUNT(*) INTO:aVariable FROM ...
DATA _null_; CALL SYMPUT('testVariable','testValueText'); ;RUN; In the example above, %PUT &testVariable; will resolve to testvalueText. You may find the need to format your variable within the SYMPUT() call. DATA _null_; CALL SYMPUT('testDate',COMPRESS(PUT(today(...
Here follows a example of what can be done with nested StackViews, giving the user the impression of a continuous scrolling experience using complex user interface elements or alignments.
The big gotcha about scrolling is to determine the offset necessary to present (for instance) a Textfield inside a StackView with is inside the ScrollView. If you try to get the position of Textfield.frame.minY can be 0, because the minY frame is only considering the distance between the element an...
LINQ queries do not execute immediately. When you are building the query you are simply storing the query for future execution. Only when you actually request to iterate the query is the query executed (e.g. in a for loop, when calling ToList, Count, Max, Average, First, etc.) This is considered de...
To generalise what we've demonstrated above: individual things contain a fixed margin of "half-the-whitespace", and the container they are held in should have a padding of "half-the-whitespace". You can apply these styles in your application resource dictionary, and then you won'...
Sometimes Android's logcat is running infinitely with errors coming from some process not own by you, draining battery or just making it hard to debug your code. A convenient way to fix the problem without restarting the device is to locate and kill the process causing the problem. From Logcat 03...
// This is a MiDI clk generator. This takes a #defined BPM and // makes the appropriate clk rate. The queue is used to let other messages // through, but allows a clock to go immediately to reduce clock jitter #define QUEUE_DEPTH 128 #define BPM 121 #define MIDI_SYSRT_CLK 0xF8 // clock...
Let's first create a simple "Hello world!" MailboxProcessor which processes one type of message and prints greetings. You'll need the message type. It can be anything, but Discriminated Unions are a natural choice here as they list all the possible cases on one place and you can easily us...
You can use Scan or TryScan methods to look for specific messages in the queue and process them regardless of how many messages are before them. Both methods look at the messages in the queue in the order they arrived and will look for a specified message (up until optional timeout). In case there i...
The root process scatters the contents in sendbuf to all processes (including itself) using the MPI_Scatter operation. int rank; int size; int sendcount = 1; int recvcount = sendcount; int sendbuf[3]; int recvbuf; int root = 0; MPI_Comm_size (MPI_COMM_WORLD, &size); if (size != 3) ...
Starting from a sequence of static images (for example called frame01.jpg, frame02.jpg and so on) an animated gif can be created using the following command: magick -delay 10 -loop 0 frame*.jpg animation.gif -delay 10 sets the interval between the frames to 0.1 seconds -loop 0 creates a...
Basics require('http').globalAgent.maxSockets = 25 // You can change 25 to Infinity or to a different value by experimenting Node.js by default is using maxSockets = Infinity at the same time (since v0.12.0). Until Node v0.12.0, the default was maxSockets = 5 (see v0.11.0). So, after more tha...
""" CannyTrackbar function allows for a better understanding of the mechanisms behind Canny Edge detection algorithm and rapid prototyping. The example includes basic use case. 2 of the trackbars allow for tuning of the Canny function and the other 2 help with understanding h...
In the last example, you can see that EF figures out which column is the foreign key and where should it point to. How? By using conventions. Having a property of type Person that is named Person with a PersonId property leads EF to conclude that PersonId is a foreign key, and it points to the prima...
You might want to rename the fields in the join table to be a little more friendly. You can do this by using the usual configuration methods (again, it doesn't matter which side you do the configuration from): public class CarEntityTypeConfiguration : EntityTypeConfiguration<Car> { publi...
I have to admit, I'm not really a fan of letting EF infer the join table wihtout a join entity. You cannot track extra information to a person-car association (let's say the date from which it is valid), because you can't modify the table. Also, the CarId in the join table is part of the primary ke...
HERE Android Premium SDK samples Now available on Github! [https://github.com/heremaps/here-android-sdk-examples][1] HERE iOS Premium SDK samples Now available on Github! [https://github.com/heremaps/here-ios-sdk-examples][1] Please refer to the README.md on how to get started. Note the samples ...
As an example we want to set all string properties of a sample class class TestClass { val readOnlyProperty: String get() = "Read only!" var readWriteString = "asd" var readWriteInt = 23 var readWriteBackedStringProperty: String = "" ...

Page 734 of 826