Tutorial by Examples: c

\documentclass[12pt]{article} \usepackage{lastpage} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{lipsum} % for dummy text \pagestyle{myheadings} \pagestyle{fancy} \fancyhf{} \setlength{\headheight}{30pt} \renewcommand{\headrulewidth}{1pt} \renewcommand{\footrulewidth}{2p...
#include opencv2/opencv.hpp> #include vector> using namespace std; using namespace cv; int main() { Mat3b img = imread("test.jpg"); imshow("Original", img); // Cluster int K = 8; int n = img.rows * img.cols; Mat data = img.reshape(1, n); data.convertTo(data, CV_32F); ...
To create a NSUserActivity object, your app must declare the types of activities it supports in its Info.plist file. Supported activities are defined by your application and should be unique. An activity is defined using a reverse-domain style naming scheme (i.e. "com.companyName.productName.ac...
There are three different properties for styling list-items: list-style-type, list-style-image, and list-style-position, which should be declared in that order. The default values are disc, outside, and none, respectively. Each property can be declared separately, or using the list-style shorthand p...
import tensorflow as tf # good idea tf.reset_default_graph() # DO MODEL STUFF # Pretrained weighting of 2.0 W = tf.get_variable('w', shape=[], initializer=tf.constant(2.0), dtype=tf.float32) # Model input x x = tf.placeholder(tf.float32, name='x') # Model output y = W*x y = tf.multiply(W,...
Here 2 examples of recursive anonymous functions based on previous example. Firstly, simple infinite loop: InfiniteLoop = fun R() -> R() end. Secondly, anonymous function doing loop over list: LoopOverList = fun R([]) -> ok; R([H|T]) -> R(T) end. These two func...
using Newtonsoft.Json.Linq; using System.Collections.Generic; public class JsonFieldsCollector { private readonly Dictionary<string, JValue> fields; public JsonFieldsCollector(JToken token) { fields = new Dictionary<string, JValue>(); CollectFields...
Let's say Joe owns a website that allows you to log on, view puppy videos, and save them to your account. Whenever a user searches on that website, they are redirected to https://example.com/search?q=brown+puppies. If a user's search doesn't match anything, than they see a message along the lines ...
Let's say that Bob owns a social website that allows users to personalize their profiles. Alice goes to Bob's website, creates an account, and goes to her profile settings. She sets her profile description to I'm actually too lazy to write something here. When her friends view her profile, this co...
Let's say that Bob owns a site that lets you post public messages. The messages are loaded by a script that looks like this: addMessage("Message 1"); addMessage("Message 2"); addMessage("Message 3"); addMessage("Message 4"); addMessage("Message 5&qu...
If you don't think that malicious scripts can harm your site, you are wrong. Here is a list of what a malicious script could do: Remove itself from the DOM so that it can't be traced Steal users' session cookies and enable the script author to log in as and impersonate them Show a fake "Yo...
public class Equatable { public string field1; public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var type = obj.GetType(); if (GetType() != type) re...
Navigation bars are essentially a list of links, so the ul and li elements are used to encase navigation links. <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">...
Ensure you met all requirements, as per Requirements Mount the temporary API filesystems: cd /location/of/new/root mount -t proc proc proc/ mount --rbind /sys sys/ mount --rbind /dev dev/ mount --rbind /run run/ (optionally) If you need to use an internet connection in the c...
Changing root is commonly done for performing system maintenance on systems where booting and/or logging in is no longer possible. Common examples are: reinstalling the bootloader rebuilding the initramfs image upgrading or downgrading packages resetting a forgotten password building softwar...
For creating custom annotations we need to decide Target - on which these annotations will work on like field level, method level, type level etc. Retention - to what level annotation will be available. For this, we have built in custom annotations. Check out these mostly used ones: @Target...
This way can be so helpfull, but, some people (like me) are afreak of repeat code, and like you are showin us, it means that I need to create a contact controller with the same code on each proyect that we have, so, I thing that this can be helpfull too This is my class, that can be on a DLL or wha...
You can create a new notebook in RStudio with the menu command File -> New File -> R Notebook If you don't see the option for R Notebook, then you need to update your version of RStudio. For installation of RStudio follow this guide
Chunks are pieces of code that can be executed interactively. In-order to insert a new chunk by clicking on the insert button present on the notebook toolbar and select your desired code platform (R in this case, since we want to write R code). Alternatively we can use keyboard shortcuts to insert a...
You can run the current chunk by clicking Run current Chunk (green play button) present on the right side of the chunk. Alternatively we can use keyboard shortcut Ctrl + Shift + Enter (OS X: Cmd + Shift + Enter) The output from all the lines in the chunk will appear beneath the chunk. Splitting Co...

Page 808 of 826