add_theme_support( 'post-thumbnails', array( 'post' ) );
The above code only allows post thumnails on all posts. To enable the feature on all post types, do:
add_theme_support( 'post-thumbnails' );
In this example, User Table will have a column that references the Agency table.
CREATE TABLE agencies ( -- first create the agency table
id SERIAL PRIMARY KEY,
name TEXT NOT NULL
)
CREATE TABLE users (
id SERIAL PRIMARY KEY,
agency_id NOT NULL INTEGER REFERENCES agencies(id) DEFERR...
Retrolambda lets you run Java 8 code with lambda expressions, method references and try-with-resources statements on Java 7, 6 or 5. It does this by transforming your Java 8 compiled bytecode so that it can run on an older Java runtime.
Backported Language Features:
Lambda expressions are back...
Adding a video that will autoplay on a loop and has no controls or sound. Perfect for a video header or background.
<video width="1280" height="720" autoplay muted loop poster="video.jpg" id="videobg">
<source src="video.mp4" type="...
Glyphicons can be used in text, buttons, toolbars, navigation, forms, etc (Source: W3Schools). Glyphicons are basically icon forms that can be used to style any of the aforementioned. These examples outline the usage of glyphicons inside two types of buttons by simply using a span inside the buttons...
It is known for a while that dealing with loops in Blade has been limited, as of 5.3 there is a variable called $loop available
@foreach($variables as $variable)
// Within here the `$loop` variable becomes available
// Current index, 0 based
$loop->index;
// Current ite...
There are many responsive scenarios where it's necessary to have column units exceeding 12 in a single .row element. This is known as column wrapping.
If more than 12 columns are placed within a single row, each group of
extra columns will, as one unit, wrap onto a new line.
For example, cons...
Typically, you will want to create your SimpleJdbcCalls in a Service.
This example assumes your procedure has a single output parameter that is a cursor; you will need to adjust your declareParameters to match your procedure.
@Service
public class MyService() {
@Autowired
private DataSour...
There are a number of issues with Oracle. Here's how to resolve them.
Assuming your procedure output parameter is ref cursor, you will get this exception.
java.sql.SQLException: Invalid column type: 2012
So change Types.REF_CURSOR to OracleTypes.CURSOR in simpleJdbcCall.declareParameters()
...
The following regex includes 50 states and also Commonwealth/Territory (see www.50states.com):
regex <- "(A[LKSZR])|(C[AOT])|(D[EC])|(F[ML])|(G[AU])|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EHDAINSOT])|(N[EVHJMYCD])|(MP)|(O[HKR])|(P[WAR])|(RI)|(S[CD])|(T[NX])|(UT)|(V[TIA])|(W[AVIY])"
For exampl...
The following regular expression:
us.phones.regex <- "^\\s*(\\+\\s*1(-?|\\s+))*[0-9]{3}\\s*-?\\s*[0-9]{3}\\s*-?\\s*[0-9]{4}$"
Validates a phone number in the form of: +1-xxx-xxx-xxxx, including optional leading/trailing blanks at the beginning/end of each group of numbers, but not ...
In a terminal run sudo apt-get install maven
Once the install is over check that it works correctly with mvn -v the output should look like:
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_121, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/j...
Goto accepts the use of variable value to act as the label to goto.
Example:
@echo off
echo a = 1
echo b = 2
set /p "foo=Enter option:"
goto %foo%
However, you should check the input so it will not go to somewhere that does not exist. Going to an undefined label will terminate...
BFS can be used to find the connected components of an undirected graph. We can also find if the given graph is connected or not. Our subsequent discussion assumes we are dealing with undirected graphs.The definition of a connected graph is:
A graph is connected if there is a path between every p...
The new Bootstrap 4 Navbar Component is improved over it’s Bootstrap 3.x predecessor. In Bootstrap 4, the Navbar is responsive by default and utilizes flexbox to make alignment of Navbar content much easier. It’s also a simple matter of using the new navbar-toggleable-* classes to change the Navbar ...
Suppose we'd like to invoke the JavaScript function JSON.stringify which receives an object, encodes it into a JSON string and returns it.
All we'd have to do is write the function signature, mark it as external and annotate it with the @JS annotation:
@JS("JSON.stringify")
external St...