Tutorial by Examples: st

Flexbox is a CSS3 module, standardized by the World Wide Web Consortium. It is a layout mode for element arrangement such that the elements behave predictably when the page layout must accommodate different display sizes. Because it is a part of CSS3, you don't need to install anything. It can be u...
Built-in forms are great but sometimes there is a need to customize them, adding new fields or simply changing CSS attributes. This example is applicable to several use cases but here it is presented regarding PasswordChangeForm and its use in a Bootstrap website. The solution is to create another...
from django.test import TestCase from myapp.forms import MyForm class MyAppTests(TestCase): def test_forms(self): form_data = {'field1': 'fieldvalue1'} form = MyForm(data=form_data) self.assertTrue(form.is_valid())
Detailed instructions on getting jq set up or installed. Install on Mac Using brew: $ brew install jq Then test: $ echo '{"name": "john"}' {"name": "john"} $ echo '{"name": "john"}' | jq '.' { "name": "john&quo...
Ubuntu: lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. $ sudo lshw | less (or more) $ sudo lshw -ht...
Source Link Open the Terminal and write the following commands. 1-Update and upgrade package your system ubuntu: sudo su sudo apt-get -y update sudo apt-get -y upgrade sudo apt-get -y dist-upgrade sudo apt-get -y autoremove 2-Installing Dependenices: sudo apt-get install libopencv...
In Python 3.6, PEP 487 added the __init_subclass__ special method, which simplifies and extends class customization without using metaclasses. Consequently, this feature allows for creating simple plugins. Here we demonstrate this feature by modifying a prior example: Python 3.x3.6 class Base: ...
Open Visual Studio and Select File -> New Project Select AWS Lambda Project with Tests (.NET Core) Next the Select Blueprint screen will display. Select Empty Function and Click the Finish button: Go to Tools -> NuGet Package Manager -> Package Manager Console. In the console win...
Open Function.cs and replace the class code with the following: public class Function { /// <summary> /// A simple function that takes a birth date and returns Age in years /// </summary> /// <param name="input"></param> /// <returns>Age is years&...
Right Click your project and select Publish to AWS Lambda... The Upload to AWS Lambda screen will appear. Make sure the correct region is selected. Keep all of the defaults. Then only enter the Function Name: AWSLambdaFunctionAgeInYears and then click next. On the next page, sele...
After Step 3 above, Visual Studio will open the View Function window with your function loaded. On the bottom left of this screen, enter the following json into the Sample Input box: { "month": "10", "day": "28", "year": "1979" } ...
Paste this snippet somewhere in the http {} Block; or place it in it's own file in the /etc/nginx/conf.d/ folder. Also see the official docs for logging to syslog. # # Access Log # log_format fmt_syslog '[$time_local] $status $remote_addr $http_host "$request" $body_bytes_sent $reque...
A usual Website just needs 3 HTTP Methods: GET, HEAD and POST. Block all other Methods by using limit_except: location / { [...] # Note: GET includes HEAD limit_except GET POST { deny all; } [...] }
The create-* commands in Grails automatically create unit or integration tests for you within the src/test/groovy directory. It is of course up to you to populate these tests with valid test logic, information on which can be found in the section on Unit and integration tests. To execute tests you ...
import grails.rest.* @Resource(uri='/books') class Book { String title static constraints = { title blank:false } } Simply by adding the Resource transformation and specifying a URI, your domain class will automatically be available as a REST resource in either XM...
If you prefer to keep the declaration of the URL mapping in your UrlMappings.groovy file then simply removing the uri attribute of the Resource transformation and adding the following line to UrlMappings.groovy will suffice: "/books"(resources:"book") Extending your API to in...
# for use in npm scripts npm install electron-packager --save-dev # for use from cli npm install electron-packager -g
Detailed instructions on getting alfresco-share set up or installed.
Detailed instructions on getting fonts set up or installed.
When investigating some geometric problem, there are a number of questions you might want to ask yourself to narrow down the scope of the question. How many dimensions are you dealing with? Is it 2d, 3d, a specific number of higher dimensions, or without respect to dimensionality? In case of a 2...

Page 308 of 369