Installation or Setup Slim framework
Install Composer
Open cmd
Go to Root directory of your Project Folder and Run Following Command.
composer require slim/slim "^3.0"
Now you will have vendor directory in your project
Next Create Index.php in root folder and add following co...
Sympy is made for symbolic math, so let's have a look at some basic integration and differentiation.
from sympy import symbols, sqrt, exp, diff, integrate, pprint
x, y = symbols(...
Using the command git tag lists out all available tags:
$ git tag
<output follows>
v0.1
v1.3
Note: the tags are output in an alphabetical order.
One may also search for available tags:
$ git tag -l "v1.8.5*"
<output follows>
v1.8.5
v1.8.5-rc0
v1.8.5-rc1
v1.8.5...
Kotlin uses == for equality (that is, calls equals internally) and === for referential identity.
JavaKotlina.equals(b);a == ba == b;a === ba != b;a !== b
See: https://kotlinlang.org/docs/reference/equality.html
You can use django rest framework permission classes to check request headers and authenticate user requests
Define your secret_key on project settings
API_KEY_SECRET = 'secret_value'
note: a good practice is to use environment variables to store this secret value.
Define a permission ...
Prior to iOS 7 when you want to scan a QR code, we might need to rely on third party frameworks or libraries like zBar or zXing. But Apple introduced AVCaptureMetaDataOutput from iOS 7 for reading barcodes.
To read QR code using AVFoundation we need to setup/create AVCaptureSession and use captureO...
One of the features in SugarCRM 7.x is being able to easily add and extend custom endpoints to accomplish what you require.
In this example, we'll create a couple of custom endpoints to return some data about the request.
This custom file is being placed in custom/clients/base/api/DescriptionAPI.p...
Both are used to define error handling for a website, but different software refers to different config elements.
customErrors are a legacy (backwards compatable) element, used by Visual Studio Development Server (aka. VSDS or Cassini).
httpErrors are the new element which is only used by IIS7.
T...
A quick way to test your xpath is in your browser developer tool console.
Format is
$x('//insert xpath here')
$ - specifies it is a selector.
x - specifies it is using xpaths
Example:
$x("//button[text() ='Submit']")
When this command is entered it will return all occurrences...
Suppose you want the user to select keywords from a menu, we can create a script similar to
#!/usr/bin/env bash
select os in "linux" "windows" "mac"
do
echo "${os}"
break
done
Explanation:
Here select keyword is used to loop through a list ...
Since Git 2.13, multiple usernames and email addresses could be configured by using a folder filter.
Example for Windows:
.gitconfig
Edit: git config --global -e
Add:
[includeIf "gitdir:D:/work"]
path = .gitconfig-work.config
[includeIf "gitdir:D:/opensource/"]
...
If we want to remove some database connection from the list of database connections.
we need to use QSqlDatabase::removeDatabase(),however it's a static function and the way it work is a little wired.
// WRONG WAY
QSqlDatabase db = QSqlDatabase::database("sales");
QSqlQuery query(&...
Ubuntu
# sudo apt-get update
# sudo apt-get install vlc vlc-plugin-pulse mozilla-plugin-vlc
Windows
Recommended
The normal and recommended way to install VLC on a Windows operating system is via the installer package.(Download Link)
if you want to iterate over numbers in reverse order? It's simple. You can use the downTo() function defined in the
standard library
for (i in 4 downTo 1) print(i) // prints "4321"
Is it possible to iterate over numbers with arbitrary step, not equal to 1? Sure, the step() function will help you
for (i in 1..4 step 2) print(i) // prints "13"
for (i in 4 downTo 1 step 2) print(i) // prints "42"
To create a range which does not include its end element, you can use the until function:
for (i in 1 until 10) { // i in [1, 10), 10 is excluded
println(i)
}
This will be a very basic app which will illustrate different ModalpresentationStyle in iOS. According to documentation found here, There are 9 different values for UIModalPresentationStyle which are as follows,
fullScreen
pageSheet
formSheet
currentContext
custom
overFullScreen
overCurrent...
When generating new Angular 2 components in a .NET Core project, you may run into the following errors (as of version 0.8.3):
Error locating module for declaration
SilentError: No module files found
OR
No app module found. Please add your new Class to your component.
Identica...