function myFunction
{
param(
# If parameter 'a' is used, then 'c' is mandatory
# If parameter 'b' is used, then 'c' is optional, but allowed
# You can use parameter 'c' in combination with either 'a' or 'b'
# 'a' and 'b' cannot be used together
[p...
Pretext:
These are detailed instructions on how to set up a Raspberry Pi with the Raspbian operating system.
These instructions are somewhat Windows specific.
Some installation steps may apply to other operating systems as well, but keep the former in mind.
Contents
Requirements
Choosing an ...
Here is the corresponding Java configuration:
Add this annotation to an @Configuration class to have the Spring Security configuration defined in any WebSecurityConfigurer or more likely by extending the WebSecurityConfigurerAdapter base class and overriding individual methods:
@Configuration
@En...
This example uses SqlConnection, but any IDbConnection is supported.
Also any IDbTransaction is supported from the related IDbConnection.
public void UpdateWidgetQuantity(int widgetId, int quantity)
{
using(var conn = new SqlConnection("{connection string}")) {
conn.Open()...
Wrapping a group of inserts in a transaction will speed them up according to this StackOverflow Question/Answer.
You can use this technique, or you can use Bulk Copy to speed up a series of related operations to perform.
// Widget has WidgetId, Name, and Quantity properties
public void InsertWidg...
I found the solution. Please consider below mention steps.
Install wp Markdown Editor plugin.
Then
Install "acf-wp-wysiwyg" for repeater field. Now you have to update in some files. Open this file and go to line number "180" or go to "create_field" function add
echo...
We would be creating mongodb as a replica set having 3 instances. One instance would be primary and the other 2 instances would be secondary.
For simplicity, I am going to have a replica set with 3 instances of mongodb running on the same server and thus to achieve this, all three mongodb instances...
In Scala you can define your own operators:
class Team {
def +(member: Person) = ...
}
With the above defines you can use it like:
ITTeam + Jack
or
ITTeam.+(Jack)
To define unary operators you can prefix it with unary_. E.g. unary_!
class MyBigInt {
def unary_! = ...
}
var ...
[TestCase(0, 0, 0)]
[TestCase(34, 25, 59)]
[TestCase(-1250, 10000, 8750)]
public void AddNumbersTest(int a, int b, int expected)
{
// Act
int result = a + b;
// Assert
Assert.That(result, Is.EqualTo(expected));
}
!!! Container should be positioned relatively or absolutely
$direction - top, bottom, left, right
$margin - margin by the edge in $direction. For top and bottom direction - it's from left to right. For left and right - it's from top to bottom.
$colors - first is a border color, second - is a back...
//define a short alias to avoid chubby method signatures
using AppFunc = Func<IDictionary<string, object>, Task>;
class RequestTimeMiddleware
{
private AppFunc _next;
public RequestTimeMiddleware(AppFunc next)
{
_next = next;
}
public async Task...
Groups can be added and nested within a report to organize the data in a hierarchy of sorted lists. Outer groups supersede any groups within. This directly affects which records are affected by the Previous keyword.
Select Insert, Group from the menu bar.
Select the field to group the data by fr...
The Java Language Specification describes Annotations as follows:
An annotation is a marker which associates information with a program construct, but has no effect at run time.
Annotations may appear before types or declarations. It is possible for them to appear in a place where they could a...
A thing to look out for when using the toString method in Kotlin is the handling of null in combination with the String?.
For example you want to get text from an EditText in Android.
You would have a piece of code like:
// Incorrect:
val text = view.textField?.text.toString() ?: ""
...
You can use the following instructions to install Theano and configure the GPU (assume a freshly installed Ubuntu 14.04):
# Install Theano
sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
sudo pip install Theano
# Install Nvidia drivers, ...
You can run Theano on multiple CPU cores with the OMP_NUM_THREADS=[number_of_cpu_cores] flag.
Example:
OMP_NUM_THREADS=4 python gpu_test.py
The script theano/misc/check_blas.py outputs information regarding which BLAS is used:
cd [theano_git_directory]
OMP_NUM_THREADS=4 python theano/misc/ch...
FirebaseUI is just an open-source library by Google that provides easy UI bindings for Firebase Auth and Firebase Database.
To begin adding FirebaseUI to your app, add these dependencies in your app's build.gradle file:
android {
// ...
}
dependencies {
// Required for FirebaseUI Dat...
Assuming you have already set up an app in Android Studio, add a ListView to a layout
(or skip if that's already done):
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/...