Tutorial by Examples: c

Consider a structure of the following classes should be constructed in XAML an then read into a CLR object: namespace CustomXaml { public class Test { public string Value { get; set; } public List<TestChild> Children { get; set; } = new List<TestChild>(); ...
Consider a structure of the following classes should be constructed in XAML an then read into a CLR object: namespace CustomXaml { public class Test { public string Value { get; set; } public List<TestChild> Children { get; set; } = new List<TestChild>(); ...
sed -i -e cmd file will modify file even if its permissions are set to read-only. This command behaves similarly to sed -e cmd file > tmp; mv -f tmp file rather than sed -e cmd file > tmp; cat tmp > file; rm tmp The following example uses gnu sed: $ echo 'Extremely important data' &gt...
You can use concatenation to join strings "end to end" while outputting them (with echo or print for example). You can concatenate variables using a . (period/dot). // String variable $name = 'Joel'; // Concatenate multiple strings (3 in this example) into one and echo it once done. ...
This is one of the simplest lambda function. It is equivalent to Hello World program. To create your first program follow the below mentioned steps. Login to AWS Console Click Lambda under compute Click create a Lambda Function Skip select blueprint section In configure trigger click on the...
If A is a complex and quadratic matrix there exists a unitary Q such that Q*AQ = T = D + N with D being the diagonal matrix consisting of the eigenvalues and N being strictly upper tridiagonal. A = [3 6 1 23 13 1 0 3 4]; T = schur(A); We also display the runtime of schur dependent on ...
T qobject_cast(QObject *object) A functionality which is added by deriving from QObject and using the Q_OBJECT macro is the ability to use the qobject_cast. Example: class myObject : public QObject { Q_OBJECT //... }; QObject* obj = new myObject(); To check whether obj is a my...
The purpose of this documentation is to use a scanner without any user interface. A common use is to upload a PDF scanned file directly to Google Drive or Dropbox just by pressing scanner-buttons. scanbd permits to trigger actions from the scanner buttons, it uses sane. What make things a little b...
QObjects come with their own alternative lifetime concept compared to native C++'s raw,unique or shared pointers. QObjects have the possibility to build an objecttree by declaring parent/child relationships. The simplest way to declare this relationship is by passing the parent object in the const...
To create a user dev with password password123 MongoClient mongo = new MongoClient("localhost", 27017); MongoDatabase db = mongo.getDatabase("testDB"); Map<String, Object> commandArguments = new BasicDBObject(); commandArguments.put("createUser", "dev&qu...
To get data from testcollection collection in testdb database where name=dev import org.bson.Document; import com.mongodb.BasicDBObject; import com.mongodb.MongoClient; import com.mongodb.ServerAddress; import com.mongodb.client.MongoCollection; import com.mongodb.client.MongoCursor; import c...
This example adds a new parameter to MyTestFunction if $SomeUsefulNumber is greater than 5. function MyTestFunction { [CmdletBinding(DefaultParameterSetName='DefaultConfiguration')] Param ( [Parameter(Mandatory=$true)][int]$SomeUsefulNumber ) DynamicParam {...
File.Move In order to move a file from one location to another, one simple line of code can achieve this: File.Move(@"C:\TemporaryFile.txt", @"C:\TemporaryFiles\TemporaryFile.txt"); However, there are many things that could go wrong with this simple operation. For instance, wh...
3D touch has been introduced with iPhone 6s Plus. There are two behaviors added with this new interface layer: Peek and Pop. Peek and Pop in a nutshell Peek - Press hard Pop - Press really hard Checking for 3D support You should check if the device has a 3D touch support. You can do this by che...
The leader key could be used as a way to create a mapping with a key-binding that can be overridden by the end user. The leader is the \ key by default. In order to override it, the end-user would have to execute :let g:mapleader='somekey(s)' before defining the mapping. In a typical scenario, the...
A1:A4 have A,B,C,D. B1 have the following formula: =ARRAYFORMULA({A1:A4,ROW(A1:A4)}) Result ABC1AA12BB23CC34DD4
// Main frame class declaration class CMainFrame : public CMDIFrameWndEx { DECLARE_DYNAMIC(CMainFrame) protected: // declare our pane CDockablePane m_wndPane; // .... other class memebers public: CMainFrame(); protected: afx_msg int OnCreate(LPCREATEST...
wxPython Classic is a Python 2 build of the wxPython library. Generation of the python bindings require a large number of manual interventions and the documentation is simply the wxWidgets documentation which contains some annotations on wxPython mechanisms as such there is normally a delay of weeks...
If you want to setup quickly elasticsearch you can use the searchkick gem : gem 'searchkick' Add searchkick to models you want to search. class Product < ActiveRecord::Base searchkick end Add data to the search index. Product.reindex And to query, use: products = Product.search &...
The local configuration of sane is inside /etc/saned.d /etc/sane.d/dll.conf # /etc/sane.d/dll.conf - Configuration file for the SANE dynamic backend loader # # Backends can also be enabled by configuration snippets under # /etc/sane.d/dll.d directory -- packages providing backends should drop...

Page 567 of 826