Tutorial by Examples: bac

[footag foo="value of 1" attribute-2="value of 2"] In wordpress admin we use pre defined shortcodes by writing the shortcode name inside square brackets and optionally adding attributes to it separating by space.
ActionMailer supports three callbacks before_action after_action around_action Provide these in your Mailer class class UserMailer < ApplicationMailer after_action :set_delivery_options, :prevent_delivery_to_guests, :set_business_headers Then create these methods under the private ...
For browsers that do not support the progress element, you can use this as a workaround. <progress max="100" value="20"> <div class="progress-bar"> <span style="width: 20%;">Progress: 20%</span> </div> </pr...
Sometimes we need to change words position from one place to another or reduce size of the words and change the color of words automatically to improve the attraction of our website or web apps. JQuery helps a lot with this concept using fadeIn(), hide(), slideDown() but its functionality are limite...
This is an example on how to use React Native's BackAndroid along with the Navigator. componentWillMount registers an event listener to handle the taps on the back button. It checks if there is another view in the history stack, and if there is one, it goes back -otherwise it keeps the default beha...
Darken #demo { @refcolor: #f0b9b8; background: @refcolor; border: 1px solid darken(@refcolor, 25%); } The above code makes use of the darken() function to set the border color as a shade that is 25% darker than the reference color (which is also the background color). Less compiler ca...
Exec sp_configure 'backup compression default',1 GO RECONFIGURE;
$ sleep 500 & [1] 7582 Puts the sleep command in background. 7582 is the process id of the background process.
$ jobs [1] Running sleep 500 & (wd: ~) [2]- Running sleep 600 & (wd: ~) [3]+ Running ./Fritzing & First field shows the job ids. The + and - sign that follows the job id for two jobs denote the default job and next candidate def...
$ fg %2 sleep 600 %2 specifies job no. 2. If fg is used without any arguments if brings the last process put in background to the foreground. $ fg %?sle sleep 500 ?sle refers to the baground process command containing "sle". If multiple background commands contain the string, it w...
$ bg [8]+ sleep 600 &
There are many examples where backticks are used inside a query but for many it's still unclear when or where to use backticks ``. Backticks are mainly used to prevent an error called "MySQL reserved word". When making a table in PHPmyAdmin you are sometimes faced with a warning or alert ...
This script demonstrates how to receive complicated GUI events from different controls in the same event callback function. We'll be using two ListView controls for that. Now every time an action is detected on one of those ListView controls, we want a precise description of what happened and have ...
Using parameters passed by reference An event may define a ByRef parameter meant to be returned to the caller: Public Event BeforeSomething(ByRef cancel As Boolean) Public Event AfterSomething() Public Sub DoSomething() Dim cancel As Boolean RaiseEvent BeforeSomething(cancel) If...
To get the list of all backup operations performed on the current database instance: SELECT sdb.Name AS DatabaseName, COALESCE(CONVERT(VARCHAR(50), bus.backup_finish_date, 120),'-') AS LastBackUpDateTime FROM sys.sysdatabases sdb LEFT OUTER JOIN msdb.dbo.backupset bus ON bus.database_nam...
Full width table cell background images <html xmlns:v="urn:schemas-microsoft-com:vml"> <head> <style> v:* { behavior: url(#default#VML); display: inline-block; } </style> </head> <body> <center> <...
This example shows how to update a UI component from a background thread by using a SynchronizationContext void Button_Click(object sender, EventArgs args) { SynchronizationContext context = SynchronizationContext.Current; Task.Run(() => { for(int i = 0; i < 10; i++) ...
This is a snippet of master report. Two parameters and the connection (for example, jdbc) are passing to the subreport. One value is returned from the subreport back to the master report, this value (variable) can be used in master report <subreport> <reportElement x="0" y=&...
$ gzip extremelylargefile.txt & $ bg $ disown %1 This allows a long running process to continue once your shell (terminal, ssh, etc) is closed.
Unwind Segues Unwind Segues give you a way to “unwind” the navigation stack and specify a destination to go back to. The signature of this function is key to Interface Builder recognizing it. It must have a return value of IBAction and take one parameter of UIStoryboardSegue. The name of the ...

Page 6 of 12