Tutorial by Examples: c

In our functions.php function new_excerpt_more( $more ) { return '.....'; } add_filter('excerpt_more', 'new_excerpt_more'); We should get this:
Open a new command line or terminal window and create a clean folder for testing. Protractor needs two files to run, a spec file and a configuration file. Let's start with a simple test that navigates to the todo list example in the AngularJS website and adds a new todo item to the list. Copy the...
Use the analytical function row_number(): with t as ( select col1 , col2 , row_number() over (order by col1, col2) rn from table ) select col1 , col2 from t where rn between N and M; -- N and M are both inclusive Oracle 12c handles this more easily with OFFSET and FETCH.
Create a new browser bookmark, for example, in Chrome click the star icon at the right in the address bar, make sure the Folder is Bookmarks Bar, and then click the Edit... button: In the edit box that opens paste the following code as the URL: javascript:(function(){var root=(window.location.pa...
If you were to hide a link by setting display: none in the CSS then screen readers wouldn’t find it. Instead, we position it absolutely, with clipping. CSS .offscreen { position: absolute; clip: rect(1px 1px 1px 1px); /* for Internet Explorer */ clip: rect(1px, 1px, 1px, 1px); padding: 0; b...
There are a few way's to install WebSocket's to your project. Here are some example's: npm install --save ws or inside your package.json using: "dependencies": { "ws": "*" },
To add ws to your file's simply use: var ws = require('ws');
To open a new WebSocket, simply add something like: var WebSocket = require("ws"); var ws = new WebSocket("ws://host:8080/OptionalPathName); // Continue on with your code... Or to open a server, use: var WebSocketServer = require("ws").Server; var ws = new WebSocketS...
var WebSocketServer = require('ws').Server , wss = new WebSocketServer({ port: 8080 }); // If you want to add a path as well, use path: "PathName" wss.on('connection', function connection(ws) { ws.on('message', function incoming(message) { console.log('received: %s', message); ...
Spinner It is a type of dropdown input. Firstly in layout <Spinner android:id="@+id/spinner" <!-- id to refer this spinner from JAVA--> android:layout_width="match_parent" android:layout_height="wrap_content"> </Spinner> ...
add_action('wp_head','hook_javascript'); function hook_javascript() { $output="<script> alert('Page is loading...'); </script>"; echo $output; }
<cfinvoke method="#somePrivateMethodName#"> <cfinvokeargument name="argument1" value="one"> </cfinvoke>
invoke("", somePrivateMethodName, {argument1='one'});
app.use() and middleware can be used for "before" and a combination of the close and finish events can be used for "after". app.use(function (req, res, next) { function afterResponse() { res.removeListener('finish', afterResponse); res.removeListener('clos...
When required you can tell Docker to execute additional commands on an already running container using the exec command. You need the container's ID which you can get with docker ps. docker exec 294fbc4c24b3 echo "Hello World" You can attach an interactive shell if you use the -it option...
esc_html should be used anytime we're outputting data inside HTML code. <h4><?php echo esc_html( $title ); ?></h4>
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">Home</a> <img src="<?php echo esc_url( $user_picture_url ); ?>" />
esc_js() is intended to be used for inline JS, inside a tag attribute. For data inside a <script> tag use wp_json_encode(). <input type="text" onfocus="if( this.value == '<?php echo esc_js( $fields['input_text'] ); ?>' ) { this.value = ''; }" name="name&quot...
<input type="text" value="<?php echo esc_attr($_POST['username']); ?>" />
<textarea><?php echo esc_textarea( $text ); ?></textarea>

Page 522 of 826