Tutorial by Examples

Please download example at: Hello World Project Open project HelloWorld.sqlproj in Visual Studio From the Build menu select Publish HelloWorld... The project will now build and bring up a dialog window Edit the Target database connection Click Publish A pane titled Data Tools Operations shou...
Detailed instructions on getting jax-rs set up or installed.
primary requirement is that java should be installed in your system.there is two option for setting the jersey in the Eclipse IDE is first manually download the jersey jars from this link.and the in the project->add external jars you can add these libraries there.[https://jersey.java.net/download...
Normally, we opt this approach if we want complete encapsulation and don't want to make our methods public. Ascx <div style="width: 100%;"> <asp:Button ID="btnAdd" runat="server" Text="Add" OnClick="btnAdd_Click"></asp:butto...
void parallelAddition (unsigned N, const double *A, const double *B, double *C) { unsigned i; #pragma omp parallel for shared (A,B,C,N) private(i) schedule(static) for (i = 0; i < N; ++i) { C[i] = A[i] + B[i]; } } This example adds two vector (A and B into...
#include <omp.h> #include <stdio.h> int main (void) { int t = (0 == 0); // true value int f = (1 == 0); // false value #pragma omp parallel if (f) { printf ("FALSE: I am thread %d\n", omp_get_thread_num()); } #pragma omp parallel if (t) { printf (&quo...
Reading the content of an InputStream as a byte array: // Reading from a file try (InputStream in = new FileInputStream("in.dat")) { byte[] content = ByteStreams.toByteArray(in); // do something with content } Copying an InputStream to an OutputStream: // Copying the content f...
#include <omp.h> #include <unistd.h> #include <iostream> #include <list> static void processElement (unsigned n) { // Tell who am I. The #pragma omp critical ensures that // only one thread sends data to std::cout #pragma omp critical std::cout <...
How to write a query to get all departments where average age of employees making less than or $70000 is greather than or equal to 35? In order to that we need to write a query to match employees that have a salary that is less than or equal to $70000. Then add the aggregate stage to group the empl...
Let's create a process which is rather long to complete : $ sleep 1000 To pause the process, type Ctrl + Z : ^Z [1]+ Stopped sleep 1000 You can use jobs to see the list of processes running or stopped in the current terminal : $ jobs [1]+ Stopped sleep 10...
To get a list of the processes running in the current terminal, you can use ps : $ sleep 1000 & $ ps -opid,comm PID COMMAND 1000 sh 1001 sleep 1002 ps To kill a running process, use kill with the process ID (PID) indicated by ps: $ kill 1001 $ ps -opid,comm PID COMMAND 1000 sh...
Reading the content of a Reader as a String: // Reading from a file try (Reader reader = new FileReader("in.txt")) { String content = CharStreams.toString(reader); // do something with content } Reading the content of a Reader as a list of line contents: try (Reader reader = n...
Consider the following example: public class Example { public int a, b, c, d; public void doIt() { a = b + 1; c = d + 1; } } If this class is used is a single-threaded application, then the observable behavior will be exactly as you would expect. For instan...
# create the co-process coproc bash # send a command to it (echo a) echo 'echo Hello World' >&"${COPROC[1]}" # read a line from its output read line <&"${COPROC[0]}" # show the line echo "$line" The output is "Hello World".
C:\makefile: helloWorld : [TAB]echo hello world run results: C:\>make echo hello world hello world Note: [TAB] should be replaced by an actual tab, stackoverflow replaces tabs with spaces, and spaces are not used the same as tabs in a makefile.
Convert from wide form to long form Load data USArrests from datasets. data("USArrests") head(USArrests) Murder Assault UrbanPop Rape Alabama 13.2 236 58 21.2 Alaska 10.0 263 48 44.5 Arizona 8.1 294 80 31.0 Arkansas 8...
Convert from long form to wide form To recover data from the previous example, use dcast like so. DTc <- dcast(DTmu, State + UrbanPop ~ Crime) This gives the data in the original wide form. State UrbanPop Murder Assault Rape 1: Alabama 58 13.2 236 21.2 2:...
The WHILE loop is executed untill the condition of end is fulfilled. Simple example: DECLARE v_counter NUMBER(2); --declaration of counter variable BEGIN v_counter := 0; --point of start, first value of our iteration WHILE v_counter < 10 LOOP --exit condition dbms_output....
Loop FOR works on similar rules as other loops. FOR loop is executed exact number of times and this number is known at the beginning - lower and upper limits are directly set in code. In every step in this example, loop is increment by 1. Simple example: DECLARE v_counter NUMBER(2); --declaration...
int val = 10; // val will be printed to the extreme left end of the output console: std::cout << val << std::endl; // val will be printed in an output field of length 10 starting from right end of the field: std::cout << std::setw(10) << val << std::endl; This ...

Page 938 of 1336