Tutorial by Examples: and

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 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...
Please note that this example uses OpenCV 3.1. import org.opencv.core.Mat; import org.opencv.core.MatOfRect; import org.opencv.core.Point; import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; import org.opencv.o...
//Create a layout var tableLayout = new sap.ui.commons.layout.MatrixLayout({ layoutFixed : false, columns : 2, width : "100%", height : "100%", widths : [ "20%","80%"] }).addStyleClass('dsAvailLayout'); sap.ui.table.Table.extend(...
You can use async methods to handle asynchronous executions. For example POST and GET requests. Let say below is your get data method. Task<List> GetDataFromServer(int type); You can call that method as shown below var result = await GetDataFromServer(1); However, in real day practic...
Add the following to Web.config (in Views folder), within <appSettings>: <add key="ClientValidationEnabled" value="true"/> <add key="UnobtrusiveJavaScriptEnabled" value="true"/> Add the jqueryval bundle to BundleConfig.cs: bundles.Add(n...
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...
It is possible to pass multiple bound values as a CommandParameter using MultiBinding with a very simple IMultiValueConverter: namespace MyProject.Converters { public class Converter_MultipleCommandParameters : MarkupExtension, IMultiValueConverter { public object Convert(object...
On error move to labelled code and see if there is a specific error that needs to be handled. Public Const cErrCodeNotNumber = 2262 ' This value must be a number. Public Const cErrCodeNumericOverflow = 2263 ' The number is too large. Private Sub MySub() Dim objConn As ADODB.Connection ...
There are three modes of XAML bindings exists for either Binding and x:Bind: OneTime: Update happens only once, on initialization of the view during InitializeComponent() call. (ViewModel[sends data when initializing] -> View) OneWay: View is updated when ViewModel changes. But not in the rev...
List of commands that will be introduced here: ls #view contents of a directory touch #create new file mkdir #create new directory cp #copy contents of one file to another mv #move file from one location to another rm #delete a file or directory ls examples jennifer@my_co...
michael@who-cares:~$ The symbol ~ after the who-cares: is the current directory. ~ actually means the person's home directory. In this case, that's /home/michael. michael@who-cares:~$ cd Downloads michael@who-cares:~/Downloads$ Looks for Downloads in the current directory, then makes that th...
Encryption is used to transform data in its orignal format (Eg: The contents of a letter, Credentials part of authorizing a financial transaction) to something that cannot be easily reconstructed by anyone who is not intended to be part of the conversation. Basically encryption is used to preve...
To decouple and reuse the same error logging code for all your services you need two boilerplate classes and tuck them away in a library somewhere. ErrorhandlerAttribute implementing IServiceBehavior. FaultErrorhandler implementing IErrorhandler which logs all the exceptions. [AttributeUsage(Attr...
We can add adaptivity to any subclass of UIView which we add on view controller in nib file. Lets take an example of adding adaptivity using size classes to a view. Add a view on view controller as: Now we need to pin this view to it's superview for fixing it's size and position using con...
Pandas don't support missing in attributes of type integer. For example if you have missings in the grade column: df= pd.read_csv("data.csv", dtype={'grade': int}) error: Integer column has NA values In this case you just should use float instead of integers or set the object dtype. ...
Checking Requirements Run bin/symfony_requirements for checking symfony requirements and php cli setting. Install all packages that needed to run a symfony project. Setting your php.ini for example setting timezone and short_open_tag. Setting both php.ini for your php webserver (eg: /etc/php/apache...
(Tested with ANTLR 4.5.3, Eclipse Neon, ANTLR 4 IDE 0.3.5, and Java 1.8) Download the latest ANTLR. Make sure to get the complete ANTLR Java binaries jar. Save to any appropriate location, for example the folder where other Java libraries are stored. It doesn’t matter where, just remember the loc...

Page 99 of 153