Tutorial by Examples: ect

The Symfony Installer is a command line tool that helps you to create new Symfony applications. It requires PHP 5.4 or higher. Downloading and installing the Symfony Installer on Linux / MacOS Open a terminal and execute the following commands: sudo mkdir -p /usr/local/bin sudo curl -LsS https:/...
cx_Freeze - a tool can package your project to excutable/installer after install it by pip, to package demo.py, we need setup.py below. import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = { &...
Gin is a web framework written in Golang. It features a martini-like API with much better performance, up to 40 times faster. If you need performance and good productivity, you will love Gin. There will be 8 packages + main.go controllers core libs middlewares public routers services...
You'll often want to assign something to an object if it is None, indicating it has not been assigned. We'll use aDate. The simplest way to do this is to use the is None test. if aDate is None: aDate=datetime.date.today() (Note that it is more Pythonic to say is None instead of == None.) ...
This code will prompt you to create the directory with :w, or just do it with :w!: augroup vimrc-auto-mkdir autocmd! autocmd BufWritePre * call s:auto_mkdir(expand('<afile>:p:h'), v:cmdbang) function! s:auto_mkdir(dir, force) if !isdirectory(a:dir) \ && (a:f...
a simple yet very useful command: :g/ending/m$ moves lines containing ending to the end of the buffer. m means move $ means end of buffer, while 0 means beginning of buffer.
I'm in a controlled room with a single minew beacon that use IBEACON protocol. BLEController needs to extend CBPeripheralDelegate I'll use the first BLE to connect after the search has stop. Modify the method StopSearchBLE() class BLEController: CBCentralManagerDelegate, CBPeripheralDelegate...
By default modules are placed on ${WILDFLY}/modules directory but you can have more directories with modules, just edit your standalone.conf (or standalone.conf.bat if you are on Microsoft Windows) and properly set the variable JBOSS_MODULEPATH For example in Unix/Linux/MacOSX: JBOSS_MODULEPATH=&q...
The redis-py client provides two classes StrictRedis and Redis to establish a basic connection to a Redis database. The Redis class is provided for backwards compatibility and new projects should use the StrictRedis class. One of the recommended ways to establish a connection, is to define the con...
Unlike the VisibleExp property, defined in Aspx, you manipulate AllowSelect property of a data view though BLC or BLC extension code. The AllowSelect property makes it possible to use more complex boolean expressions (in comparison to the VisibleExp property) and, if necessary, retrieve additional i...
You can include/install Select2 in one of the two ways Directly using CDN's in your project under the head section of your project. link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet"/> <script src="https://cdnjs...
In Rx Subjects have internal states that can control their behavior. A common use-case form Subject is subscribing it to multiple Observables. The following example creates two different Observables and subscribes a Subject to both of them. Then it tries to print all values that went through: let ...
The following 4 properties are available for PXSelector and PXSegmentMask input controls to define size range for a drop-down window: MinDropWidth: gets or sets the minimum drop-down control width MinDropHeight: gets or sets the minimum drop-down control height MaxDropWidth: gets or sets the ma...
In this topic we will base on this table of users : CREATE TABLE sch_test.user_table ( id serial NOT NULL, username character varying, pass character varying, first_name character varying(30), last_name character varying(30), CONSTRAINT user_table_pkey PRIMARY KEY (id) ) +---...
In the File menu, choose the 'Import...' option. This opens up the Import dialog box, which asks for the type of project/file you want to import. For a basic Java project, choose 'Existing Projects into Workspace' from the 'General' folder. Next, select the directory where the project(s) is lo...
No Mutual SSL In this example, we might use the CA File (ca.pem) that you generated during the "How to configure a ReplicaSet to support TLS/SSL?" section. We will assume that the CA file is located in your current folder. We will assume that your 3 nodes are running on mongo1:27017, mon...
Using find() const inventory = [ {name: 'apples', quantity: 2}, {name: 'bananas', quantity: 0}, {name: 'cherries', quantity: 5} ]; function findCherries(fruit) { return fruit.name === 'cherries'; } inventory.find(findCherries); // { name: 'cherries', quantity: 5 } /*...
Processing Field collection items with Rules is fun, really! Have a look at this Rule (in Rules export format): { "rules_calculate_sum_of_prices_in_all_field_collection_items" : { "LABEL" : "Calculate sum of prices in all field collection items", "PLUGIN...
To develop an application for watchOS, you should start with Xcode. Xcode only runs on macOS. At the time of writing, the latest version is Xcode 8.3. If you want to start a new project from scratch: Boot up your Mac and install Xcode from the App Store if it's not already installed. Choo...
$BucketName = 'trevorrekognition' $FileName = 'kitchen.jpg' New-S3Bucket -BucketName $BucketName Write-S3Object -BucketName $BucketName -File $FileName $REKResult = Find-REKLabel -Region us-east-1 -ImageBucket $BucketName -ImageName $FileName $REKResult.Labels After running the script ab...

Page 89 of 99