Tutorial by Examples: c

//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //create the WorkSheet ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); //add some dummy data, note that row and column indexes start at 1 for (int i = 1;...
<?php $visit = 1; if(file_exists("counter.txt")) { $fp = fopen("counter.txt", "r"); $visit = fread($fp, 4); $visit = $visit + 1; } $fp = fopen("counter.txt", "w"); fwrite($fp, $visit); echo "Total Site Visits: &qu...
This example illustrates the basics of executing sections of code in parallel. As OpenMP is a built-in compiler feature, it works on any supported compilers without including any libraries. You may wish to include omp.h if you want to use any of the openMP API features. Sample Code std::cout <...
This example shows how to execute chunks of code in parallel std::cout << "begin "; // Start of parallel sections #pragma omp parallel sections { // Execute these sections in parallel #pragma omp section { ... do something ... std::cout <...
This example illustrates a concept to perform reduction or gathering using std::vector and OpenMP. Supposed we have a scenario where we want multiple threads to help us generate a bunch of stuff, int is used here for simplicity and can be replaced with other data types. This is particularly useful...
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //the query or stored procedure name for the database string sqlQuery = "SELECT * FROM myTable"; //create a datatable DataTable dataTable = loadExternalDataSet(sqlQuery); //c...
Fill some cells with text. worksheet.Cells["A1"].Value = "Lorem ipsum"; worksheet.Cells["B2"].Value = "dolor sit amet"; worksheet.Cells["C3"].Value = "consectetur adipiscing"; worksheet.Cells["D4"].Value = "elit sed do ei...
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //create a WorkSheet ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); //create a new list with books List<Book> books = new List<Book>(); ...
used to get request information such as parameter, header information, remote address, server name, server port, content type, character encoding. Index.html <form action="req.jsp"> <input type="text" name="username"> <input type="s...
Good video tutorials about Emacs can be found at emacsrocks.com.
//set the total value of cells in range A1 - A25 into A27 worksheet.Cells["A27"].Formula = "=SUM(A1:A25)"; //set the number of cells with content in range C1 - C25 into C27 worksheet.Cells["C27"].Formula = "=COUNT(C1:C25)"; //fill column K with the s...
If you use formulas, Excel will ask you to save the file every time, even if there were no changes made. To prevent this behaviour you can set the calculation mode to manual. excelPackage.Workbook.CalcMode = ExcelCalcMode.Manual; //fill the sheet with data and set the formulas excelPackage....
//create a new ExcelPackage using (ExcelPackage excelPackage = new ExcelPackage()) { //create 2 WorkSheets ExcelWorksheet worksheet = excelPackage.Workbook.Worksheets.Add("Sheet 1"); ExcelWorksheet worksheet2 = excelPackage.Workbook.Worksheets.Add("Sheet 2"); ...
Add this lane to your Fastfile and run fastlane installAll type:{BUILD_TYPE} in command line. Replace BUILD_TYPE with the build type you want to build. For example: fastlane installAll type:Debug This command will build all flavors of given type and install it to your device. Currently, it doesn't...
A vector is essentially a pointer to a heap-allocated, dynamically-sized list of objects of a single type. Example fn main() { // Create a mutable empty vector let mut vector = Vec::new(); vector.push(20); vector.insert(0, 10); // insert at the beginning println!(&qu...
Slices are views into a list of objects, and have type [T], indicating a slice of objects with type T. A slice is an unsized type, and therefore can only be used behind a pointer. (String world analogy: str, called string slice, is also unsized.) Arrays get coerced into slices, and vectors can be...
package com { package utility { package serialization { class Serializer ... } } }
Dim oDic Set oDic = CreateObject("Scripting.Dictionary") oDic.Add "US", "United States of America" oDic.Add "UK", "United Kingdom"
If oDic.Exists("US") Then msgbox "The Key US Exist. The value is " + oDic("US") Else msgbox "Key Does not exist." End If
If oDic.Exists("UK") Then oDic.remove("UK") End If

Page 660 of 826