Tutorial by Examples: er

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...
url: /api/data/v8.0/contacts json: { "firstname" : "New", "lastname" : "Contact", "[email protected]" : "/accounts(c6da77b6-d53e-e611-80b9-0050568a6c2d)" } As the parentcustomerid can be an account or ...
docker inspect command can be used to debug the container logs. The stdout and stderr of container can be checked to debug the container, whose location can be obtained using docker inspect. Command : docker inspect <container-id> | grep Source It gives the location of containers stdout an...
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...
Enabling Attribute Routing To enable attribute routing, call MapMvcAttributeRoutes during configuration. public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute(“{resource}.axd/{*pathInfo}”); routes.MapMvcAttributeRoutes(); routes.MapRoute( name: “Default”, ...
Let's explore the syntax differences by comparing two code examples. React.createClass (deprecated) Here we have a const with a React class assigned, with the render function following on to complete a typical base component definition. import React from 'react'; const MyComponent = React.crea...
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...
D is a system programming language and thus allows you to manually manage and mess up your memory. Nevertheless, D uses a garbage collector per default to free unused memory. D provides pointer types T* like in C: void main() { int a; int* b = &a; // b contains address of a aut...
add_action( 'init', function() { register_post_type( 'event', array( 'public' => true, 'label' => 'Events' ); ); }); Registers a new custom post type with a label Events and a slug event
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...
This example by Daniel Baggio was taken directly from this StackExchange answer, but has been reposted for visibility. This class takes an Mat object and returns the BufferedImage object used by the javax.swing libraries. This can be used by a Graphics object to draw the image. private BufferedIma...
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}">...
You can use the raw interpolator if you want a String to be printed as is and without any escaping of literals. println(raw"Hello World In English And French\nEnglish:\tHello World\nFrench:\t\tBonjour Le Monde") With the use of the raw interpolator, you should see the following printed in the ...
To implement the create functionality we need two actions: GET and POST. The GET action used to return view which will show a form allowing user to input data using HTML elements. If there are some default values to be inserted before user adding any data, it should be assigned to the view mode...
By the url ~/Student/Details/5 being: (~: site root, Student: Controller, Details: Action, 5: student id), it is possible to retrieve the student by its id. // GET: Student/Details/5 public ActionResult Details(int? id) { // it good practice to consider that things could go wrong...
What are themes? There are several visual appearance out there for Bootstrap, which can be found from sources, such as Bootswatch, which are modifying the bootstrap.min.css file. You can also create your own theme this way. When to modify themes and when to add new rules to a site.css file? When ...
You will have to import UserNotifications @import UserNotifications; 2.Request authorization for localNotification let center = UNUserNotificationCenter.current() center.requestAuthorization([.alert, .sound]) { (granted, error) in // Enable or disable features based on authorizat...
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...
This example serves as a complement to other examples which talk about how to use the lifecycle methods and when the method will be called. This example summarize Which methods (componentWillMount, componentWillReceiveProps, etc) will be called and in which sequence will be different for a componen...
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...

Page 275 of 417