In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73.
So, be sure if you have Java in your system. If not, then follow the procedure:
# Install wget with yum
yum -y install w...
The best way to install and configure a Symfony2 project is described in the official documentation as follows:
Mac OS X / Linux
$ sudo curl -LsS http://symfony.com/installer -o /usr/local/bin/symfony
$ sudo chmod a+x /usr/local/bin/symfony
Windows
c:\> php -r "file_put_contents('sym...
How to implement Firebase Real-Time database in Android applications.
Setup/Installation:
First, install the Firebase SDK (guide)
Register your project using the Firebase console
After successfuly completing the two steps above, add the following dependency in your application level ...
So, Before writing out optimiser functions , we need to install a couple of caching plugins.
bash $ npm install --save-dev gulp-cached
bash $ npm install --save-dev gulp-remember
You might wonder why two caches eh!. gulp-cached , passes only modified or new content down the pipeline to other ...
NOTE
This page illustrates use of gulp plugins like browser-sync ,
gulp-watch and run-sequence , and continues discussing
gulp-workflow-automation from where we left off at
Gulpjs-workflow-automation-1 of 2. In case you landed here , consider
going through that post first.
Default Task
...
ValueExpression ve = AdfmfJavaUtilities.getValueExpression(<binding>, String.class);
String <variable_name> = (String) ve.getValue(AdfmfJavaUtilities.getELContext());
Here "binding" indicates the EL expression from which the value is to be get.
"variabl...
ValueExpression ve = AdfmfJavaUtilities.getValueExpression(<binding>, String.class);
ve.setValue(AdfmfJavaUtilities.getELContext(), <value>);
Here "binding" indicates the EL expression to which the value is to be stored.
"value" is the desired val...
AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext();
MethodExpression me;
me = AdfmfJavaUtilities.getMethodExpression(<binding>, Object.class, new Class[] { });
me.invoke(adfELContext, new Object[] { });
"binding" indicates the EL expression from wh...
Peudo-random generators are frequently useful when designing simulation environments. The following VHDL package shows how to use protected types to design a pseudo-random generator of boolean, bit and bit_vector. It can easily be extended to also generate random std_ulogic_vector, signed, unsigned....
If we want to display a jquery calendar for end user who can pick maximum date as current date in the calendar. The below code will useful to this scenario.
<?php
use yii\jui\DatePicker;
use yii\widgets\ActiveForm;
?>
<?php $form = ActiveForm::begin(['id' => 'profile-form']); ?>...
For some forms you want display the days from future/past days and other days need to disabled, then this scenario will help.
<?php
use yii\jui\DatePicker;
use yii\widgets\ActiveForm;
?>
<?php $form = ActiveForm::begin(['id' => 'profile-form']); ?>
.....
<?php
$day = '+...
If you want to have calendar for from date and to date and also to date calendar days always will be greater than from date field, then below scenario will help.
<?php $form = ActiveForm::begin(['id' => 'profile-form']); ?>
.....
<?= $form->field($model, 'from_date')->widget(D...
If your page is for displaying or editing information about a particular type of record, it may be helpful to use a standard controller to reduce the amount of boilerplate code you need to write.
By using a standard controller, your page will be displayed with an ?id=SALESFORCE_ID parameter, and yo...
This example uses Dice and the black spots on the dice (the pips) as our object. As the example is quite long, first explaining some key concepts is critical to understanding the example.
Understanding the first example, "Getting a static image, detecting items on it, and outputting the result...
Start from a Cython program with a entrypoint:
def do_stuff():
cdef int a,b,c
a = 1
b = 2
c = 3
print("Hello World!")
print([a,b,c])
input("Press Enter to continue.")
Create a setup.py file in the same folder:
from distutils.core import set...
For automation of the above procedure in Windows use a .bat of the similar contents:
del "main.exe"
python setup.py build_ext --inplace
del "*.c"
rmdir /s /q ".\build"
pyinstaller --onefile "main.py"
copy /y ".\dist\main.exe" ".\main.exe&q...
To add Numpy to the bundle, modify the setup.py with include_dirs keyword and necessary import the numpy in the wrapper Python script to notify Pyinstaller.
program.pyx:
import numpy as np
cimport numpy as np
def do_stuff():
print("Hello World!")
cdef int n
n = 2
...