Tutorial by Examples: cs

Core Graphics context A Core Graphics context is a canvas which we can draw in it and set some properties like the line thickness. Making a context To make a context, we use the UIGraphicsBeginImageContextWithOptions() C function. Then, when we are done with drawing, we just call UIGraphicsEn...
// Mixin to generate hidden classes @mixin generate-hidden-classes { @each $bp in map-keys($grid-breakpoints) { .hidden-#{$bp} { @include media-breakpoint-only($bp) { display: none !important; } } } } // Call to the mixin @include generate-hidden-classes(...
Just add this function to your functions.php. It will remove the version from all enqueued js and css files. function remove_cssjs_ver( $src ) { if( strpos( $src, '?ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_cssjs_ver', 9...
Installers are custom types that implement the IWindsorInstaller interface and are used to register Components to the container, using the fluent registration API. public class MyInstaller : IWindsorInstaller { public void Install(IWindsorContainer container, IConfigurationStore store) {...
// World physics self.physicsWorld.gravity = CGVectorMake(0, -9.8);
These APIs are used to query for video and channel analytics, like views/clicks and votes.
Sample test dataset CSV file stored at the location c:\Users\yc03ak1\Desktop\testing.csv _id city loc pop state 1 A [10.0, 20.0] 2222 PQE 2 B [10.1, 20.1] 22122 RW 3 C [10.2, 20.0] 255222 RWE 4 D [10.3, 20.3] 226622 SFDS 5 E [10...
Data with header, separated by semicolons instead of commas file: table.csv index;name;occupation 1;Alice;Saleswoman 2;Bob;Engineer 3;Charlie;Janitor code: import pandas as pd pd.read_csv('table.csv', sep=';', index_col=0) output: name occupation index 1 Alice Sale...
class My_Plugin() { function __construct() { add_action( 'wp_enqueue_scripts', array( $this, 'init_fe_assets' ) ); } public function init_fe_assests() { wp_enqueue_style( 'my-plugin', plugin_dir_url( __FILE__ ) . 'assets/css/frontend/plugin.css', array(), '0.0.1', true ); ...
In your App_start folder open routeconfig.cs and do this routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, ...
Create a new controller foreg ControllerName: "Home", ActionresultName :"Index" open AreaRegistraion.cs and add the controller name and action name to be rerouted to context.MapRoute( "nameofarea_default", "nameofarea/{controller}/...
<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.goog...
By default, the full indexed document is returned as part of all searches. This is referred to as the source (_source field in the search hits). If we don’t want the entire source document returned, we have the ability to request only a few fields from within source to be returned, or we can set _so...
In order to run Elasticsearch, a Java Runtime Environment (JRE) is required on the machine. Elasticsearch requires Java 7 or higher and recommends Oracle JDK version 1.8.0_73. So, be sure if you have Java in your system. If not, then follow the procedure: # Install wget with yum yum -y install w...
Our goal , is to Make your Images conform to widths and scale appropriately, by generating a battery of images of varied widths, and to minify them Lint your Javascript Minimize your assets - JS/CSS/HTML , thus enabling you to host a lighter than lightest code Watch the css/js/image files for ...
import pandas as pd data = [ {'name': 'Daniel', 'country': 'Uganda'}, {'name': 'Yao', 'country': 'China'}, {'name': 'James', 'country': 'Colombia'}, ] df = pd.DataFrame(data) filename = 'people.csv' df.to_csv(filename, index=False, encoding='utf-8')
The Python function import_csv_to_dynamodb(table_name, csv_file_name, colunm_names, column_types) below imports a CSV file into a DynamoDB table. Column names and column must be specified. It uses boto. Below is the function as well as a demo (main()) and the CSV file used. import boto MY_ACCESS...
require(['N/search'], function(SEARCHMODULE){ var type = 'transaction'; var columns = []; columns.push(SEARCHMODULE.createColumn({ name: 'internalid' })); columns.push(SEARCHMODULE.createColumn({ name: 'formulanumeric', formula: '{quantity}-{...
Use CTRL+SHIFT+O (⌘+SHIFT+O for mac) to navigate to a javaScript function/CSS rule when viewing a file.
Analog to np.loadtxt, np.savetxt can be used to save data in an ASCII file import numpy as np x = np.random.random([100,100]) np.savetxt("filename.txt", x) To control formatting: np.savetxt("filename.txt", x, delimiter=", " , newline="\n", comment...

Page 15 of 24