A Java 8 compatibility kit for Scala.
Most examples are copied from Readme
Converters between scala.FunctionN and java.util.function
import java.util.function._
import scala.compat.java8.FunctionConverters._
val foo: Int => Boolean = i => i > 7
def testBig(ip: IntPredicate) = ip.tes...
IServiceCollection
To start building an IOC container with Microsoft's DI nuget package you start with creating an IServiceCollection. You can use the already provided Collection: ServiceCollection:
var services = new ServiceCollection();
This IServiceCollection is nothing more than an implemen...
QSize MainMenuListView::Header::sizeHint() const
{
// fontmetrics() allows to get the default font size for the widget.
return QSize(menu->headerAreaWidth(), fontMetrics().height());
}
void MainMenuListView::Header::paintEvent(QPaintEvent* event)
{
// Catches the paint event ...
tf.gather_nd is an extension of tf.gather in the sense that it allows you to not only access the 1st dimension of a tensor, but potentially all of them.
Arguments:
params: a Tensor of rank P representing the tensor we want to index into
indices: a Tensor of rank Q representing the indices into ...
For I as Integer = 1 To 10 Step 1
code to execute
Next
Step is optional and Step 1 is the default. Step tells it how to count, so -1 would have it subtract 1 each time and Step 5 would have it add 5 each time thru the loop.
In case the loop need to be stopped, then the Exit For statement c...
If you have modifications to share or just want to try new version in development.
$ hg clone https://bitbucket.org/scons/scons
$ python scons/src/script/scons.py
In this example you will be modifying the Marital Status drop-down list found on the Contacts form (CR302000):
To add new items to the PXStringListAttribute successor
The best way to extend drop-down items hard-coded inside an attribute inherited from the PXStringList or PXIntList attribute is b...
Go will throw an error when there is a variable that is unused, in order to encourage you to write better code. However, there are some situations when you really don't need to use a value stored in a variable. In those cases, you use a "blank identifier" _ to assign and discard the assign...
/* these IN and OUT filerefs can point to anything */
filename in "anyfilehere.xlsx";
filename out "anyfilehere.xlsx";
/* copy the file byte-for-byte */
data _null_;
length filein 8 fileid 8;
filein = fopen('in','I',1,'B');
fileid = fopen('out','O',1,'B');
...
Install JSON Model Genrator plugin of Intellij by searching in Intellij setting.
Start the plugin from 'Tools'
Input the field of UI as following shows ('Path'、'Source'、'Package' is required):
Click 'Generate' button and your are done.
There will be times where you only want to import a specific sheet from an excel file with multiple sheets. To do that, we'll use "SHEET=".
PROC IMPORT
OUT= YourNewTable
DATAFILE= "myfolder/excelfilename.xlsx"
DBMS=xlsx
REPLACE;
SHEET="Sheet1&quo...
If you want users to upload files to your server you need to do a couple of security checks before you actually move the uploaded file to your web directory.
The uploaded data:
This array contains user submitted data and is not information about the file itself. While usually this data is generate...