You can store the signing information setting environment variables.
These values can be accessed with System.getenv("<VAR-NAME>")
In your build.gradle you can define:
signingConfigs {
release {
storeFile file(System.getenv("KEYSTORE"))
storePasswo...
Using Alternatives
Many Linux distributions use the alternatives command for switching between different versions of a command. You can use this for switching between different versions of Java installed on a machine.
In a command shell, set $JDK to the pathname of a newly installed JDK; e.g....
If you need to copy a database from one server to another, you have two options:
Option 1:
Store the dump file in the source server
Copy the dump file to your destination server
Load the dump file into your destination server
On the source server:
mysqldump [options] > dump.sql
On th...
Using requestAnimationFrame may on some systems update at more frames per second than the 60fps. 60fps is the default rate if the rendering can keep up. Some systems will run at 120fps maybe more.
If you use the following method you should only use frame rates that are integer divisions of 60 so th...
A conversion that involves calling an explicit constructor or conversion function can't be done implicitly. We can request that the conversion be done explicitly using static_cast. The meaning is the same as that of a direct initialization, except that the result is a temporary.
class C {
std:...
You can use built-in functions to run PHP processes as forks. This is the most simple way to achieve parallel work if you don't need your threads to talk to each other.
This allows you to put time intensive tasks (like uploading a file to another server or sending an email) to another thread so you...
A pointer to member of derived class can be converted to a pointer to member of base class using static_cast. The types pointed to must match.
If the operand is a null pointer to member value, the result is also a null pointer to member value.
Otherwise, the conversion is only valid if the member ...
To discover SQL Server's edition, product level and version number as well as the host machine name and the server type:
SELECT SERVERPROPERTY('MachineName') AS Host,
SERVERPROPERTY('InstanceName') AS Instance,
DB_NAME() AS DatabaseContext,
SERVERPROPERTY('Editio...
To do this first locate config folder in your root. Then open connections.js
Locate
// someMysqlServer: {
// adapter: 'sails-mysql',
// host: 'YOUR_MYSQL_SERVER_HOSTNAME_OR_IP_ADDRESS',
// user: 'YOUR_MYSQL_USER', //optional
// password: 'YOUR_MYSQL_PASSWORD', //optional
/...
To get the list of all backup operations performed on the current database instance:
SELECT sdb.Name AS DatabaseName,
COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime
FROM sys.sysdatabases sdb
LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_nam...
import groovy.json.JsonSlurper;
def jsonSlurper = new JsonSlurper()
File fl = new File('/path/to/fils.json')
// parse(File file) method is available since 2.2.0
def obj = jsonSlurper.parse(fl)
// for versions < 2.2.0 it's possible to use
def old = jsonSlurper.parse(fl.text)
sys.foreignkeys system view returns information about all foreign key relationships in database:
select name,
OBJECT_NAME(referenced_object_id) as [parent table],
OBJECT_NAME(parent_object_id) as [child table],
delete_referential_action_desc,
update_referential_action_desc
from sys.foreign...
After installing a Java SDK, it is advisable to check that it is ready to use. You can do this by running these two commands, using your normal user account:
$ java -version
$ javac -version
These commands print out the version information for the JRE and JDK (respectively) that are on your sh...
When static_cast is used to convert T D::* to T B::*, the member pointed to must belong to a class that is a base class or derived class of B. Otherwise the behavior is undefined. See Derived to base conversion for pointers to members
Example from the Standard, [temp.inst]/17:
template<class T> class X {
X<T>* p; // OK
X<T*> a; // implicit generation of X<T> requires
// the implicit instantiation of X<T*> which requires
// the implicit instantiation of X<T**&...
Having example type like this:
public TestClass
{
public static string StaticPublicField = "StaticPublicFieldValue";
}
We can retrieve value of StaticPublicField:
var fieldExpr = Expression.Field(null, typeof(TestClass), "StaticPublicField");
var labmda = Expression....
Autostash is a very useful configuration option when using rebase for local changes. Oftentimes, you may need to bring in commits from the upstream branch, but are not ready to commit just yet.
However, Git does not allow a rebase to start if the working directory is not clean. Autostash to the res...