Custom routing provides specialized need of routing to handle specific incoming requests.
In order to defining custom routes, keep in mind that the order of routes that you add to the route table is important.
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute(&qu...
For instance, two tables are given,
T1
id x y
8 42 1.9
9 30 1.9
T2
id signal
8 55
8 56
8 59
9 57
9 58
9 60
The goal is to get the new table T3:
id x y s1 s2 s3
8 42 1.9 55 ...
Let's say we want to replace only numbers with 2 digits: regular expression will find them with (\d\d)
SELECT REGEXP_REPLACE ('2, 5, and 10 are numbers in this example', '(\d\d)', '#')
FROM dual;
Results in:
'2, 5, and # are numbers in this example'
If I want to swap parts of the text, I us...
Let's say you have an object like this:
var myObject = {
name: 'Peter'
}
Later in your code, you try to access myObject.name and you get George instead of Peter. You start wondering who changed it and where exactly it was changed. There is a way to place a debugger (or something else) on e...
In the simple example, we simply set the width of the rectangle to that of it's parent. Let's consider a more complicated example:
ApplicationWindow {
visible: true
width: 400
height: 640
Rectangle{
id: rect
anchors.centerIn: parent
height: 100
...
Sample Data:
CREATE TABLE table_name ( id, list ) AS
SELECT 1, 'a,b,c,d' FROM DUAL UNION ALL -- Multiple items in the list
SELECT 2, 'e' FROM DUAL UNION ALL -- Single item in the list
SELECT 3, NULL FROM DUAL UNION ALL -- NULL list
SELECT 4, 'f,,g' FROM DUAL; -- NULL item...
Sample Data:
CREATE TABLE table_name ( id, list ) AS
SELECT 1, 'a,b,c,d' FROM DUAL UNION ALL -- Multiple items in the list
SELECT 2, 'e' FROM DUAL UNION ALL -- Single item in the list
SELECT 3, NULL FROM DUAL UNION ALL -- NULL list
SELECT 4, 'f,,g' FROM DUAL; -- NULL item...
Sample Data:
CREATE TABLE table_name ( id, list ) AS
SELECT 1, 'a,b,c,d' FROM DUAL UNION ALL -- Multiple items in the list
SELECT 2, 'e' FROM DUAL UNION ALL -- Single item in the list
SELECT 3, NULL FROM DUAL UNION ALL -- NULL list
SELECT 4, 'f,,g' FROM DUAL; -- NULL item...
User can add custom route, mapping an URL to a specific action in a controller. This is used for search engine optimization purpose and make URLs readable.
routes.MapRoute(
name: "AboutUsAspx", // Route name
url: "AboutUs.aspx", // URL with parameters
defaults: new { c...
You can implement the swipe-to-dismiss and drag-and-drop features with the RecyclerView without using 3rd party libraries.
Just use the ItemTouchHelper class included in the RecyclerView support library.
Instantiate the ItemTouchHelper with the SimpleCallback callback and depending on which functi...
var dict = ["name": "John", "surname": "Doe"]
// Set the element with key: 'name' to 'Jane'
dict["name"] = "Jane"
print(dict)
using System.Net;
using System.IO;
...
string requestUrl = "https://www.example.com/submit.html";
HttpWebRequest request = HttpWebRequest.CreateHttp(requestUrl);
request.Method = "POST";
// Optionally, set properties of the HttpWebRequest, such as:
request.AutomaticD...
using System.Net;
using System.IO;
...
string requestUrl = "https://www.example.com/page.html";
HttpWebRequest request = HttpWebRequest.CreateHttp(requestUrl);
// Optionally, set properties of the HttpWebRequest, such as:
request.AutomaticDecompression = DecompressionMethods.GZ...
Common table expressions support extracting portions of larger queries. For example:
WITH sales AS (
SELECT
orders.ordered_at,
orders.user_id,
SUM(orders.amount) AS total
FROM orders
GROUP BY orders.ordered_at, orders.user_id
)
SELECT
sales.ordered_at,
sales.total,...