First off you create the form
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
}
Action Method
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Test(FormViewModel formData)
{
// ...
}
Script
<script src="https://code.jquery.com/jquery-1.12.4.min.js"&g...
Exchange/convert a partition to a non-partitioned table and vice versa. This facilitates a fast "move" of data between the data segments (opposed to doing something like "insert...select" or "create table...as select") as the operation is DDL (the partition exchange ope...
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 = '+...
Matplotlib has its own implementation of boxplot. The relevant aspects of this function is that, by default, the boxplot is showing the median (percentile 50%) with a red line. The box represents Q1 and Q3 (percentiles 25 and 75), and the whiskers give an idea of the range of the data (possibly at Q...
In the following example consider you have a solution hosting two projects: ConsoleApplication1 and SampleClassLibrary. The first project will have the classes SampleClass1 and SampleClass2. The second one will have SampleClass3 and SampleClass4. In other words we have two assemblies with two classe...
You will need the guice-bridge in your project.
@ApplicationPath("api")
public class ApiRest extends ResourceConfig {
@Inject
public ApiRest(ServiceLocator serviceLocator, ServletContext servletContext) {
packages("net.sargue.app.api");
GuiceBrid...
To submit form via Ajax with Jquery :
<div id="yourPanel" th:fragment="yourFragment">
<form id="yourForm" method="POST"
th:action="@{/actions/postForm}"
th:object="${yourFormBean}">...
Zero values or zero initialization are simple to implement. Coming from languages like Java it may seem complicated that some values can be nil while others are not. In summary from Zero Value: The Go Programming Language Specification:
Pointers, functions, interfaces, slices, channels, and maps ...
This attribute handles all unhandled exceptions in the code, (this is mostly for Ajax Requests - that deal with JSON - but can be extended)
public class ExceptionHandlerAttribute : HandleErrorAttribute
{
/// <summary>
/// Overriden method to handle exception
/// </summary...
In this example code we will create A blank Opengl Window using LWJGL 3.0+, this doesn't contain steps to create the project in your IDE
Create a class name WindowManager that will contain all the boiler
plate code for creating a opengl context window on screen
WindowManager.java
impor...
function createGoogleDriveTextFile() {
var content,fileName,newFile;//Declare variable names
fileName = "Test Doc " + new Date().toString().slice(0,15);//Create a new file name with date on end
content = "This is the file Content";
newFile = DriveApp.createFile(...
When the range_lookup parameter is either omitted, TRUE, or 1, VLOOKUP will find an approximate match. By "approximate", we mean that VLOOKUP will match on the smallest value that's larger than your lookup_value. Note that your table_array must be sorted in ascending order by lookup values...
In order for your public-private keypair to be of use, you must make your public key freely available to others. Be sure that you are working with your public key here since you should never share your private key. You can export your public key with the following command:
gpg —armor —export EMAI...
Usually to use the converter, we have to define it as resource in the following way:
<converters:SomeConverter x:Key="SomeConverter"/>
It is possible to skip this step by defining a converter as MarkupExtension and implementing the method ProvideValue. The following example conve...
Basics
The generated projects contain a basic Hello World-like application already implemented.
The main project is the core project, that contains all platform-independent code. This is mandatory, but based on your generation settings you can have several more projects for every platform that you...