Tutorial by Examples: sin

To enable SSH create a file called ssh in the /boot directory of your SD card. Identify the drive letter associated with your SD card. Open a command prompt (press Win+R on your keyboard to open the Run window. Then, type cmd) Enter the following at the command prompt (replacing Drive...
This is a quick guide to get Robot Framework 3.0 working on a Windows machine using Python 2.7.11 - It does not go into too much depth on the why and how, it simply gets you up and running. First things are first, let't go and install Python! Download Python 2.7.11 for Windows. (Windows x86-64 ...
There are many ways of creating DataFrames. They can be created from local lists, distributed RDDs or reading from datasources. Using toDF By importing spark sql implicits, one can create a DataFrame from a local Seq, Array or RDD, as long as the contents are of a Product sub-type (tuples and ca...
import pyglet from pyglet.gl import * win = pyglet.window.Window() @win.event() def on_draw(): #OpenGL goes here. Use OpenGL as normal. pyglet.app.run()
import pyglet from pyglet.gl import * win = pyglet.window.Window() glClear(GL_COLOR_BUFFER_BIT) @win.event def on_draw(): glBegin(GL_POINTS) glVertex2f(x, y) #x is desired distance from left side of window, y is desired distance from bottom of window #make as many vertexes as...
Create new named range called ‘MyRange’ assigned to cell A1 ThisWorkbook.Names.Add Name:="MyRange", _ RefersTo:=Worksheets("Sheet1").Range("A1") Delete defined named range by name ThisWorkbook.Names("MyRange").Delete Access Named Range by name...
Formulas tab > Defined Names group > Name Manager button Named Manager allows you to: Create or change name Create or change cell reference Create or change scope Delete existing named range Named Manager provides a useful quick look for broken links.
Macros can trigger compiler warnings and errors through the use of their Context. Say we're a particularly overzealous when it comes to bad code, and we want to mark every instance of technical debt with a compiler info message (let's not think about how bad this idea is). We can use a macro that d...
Let's say you need to add a field to every document in a collection. import pymongo client = pymongo.MongoClient('localhost', 27017) db = client.mydb.mycollection for doc in db.find(): db.update( {'_id': doc['_id']}, {'$set': {'newField': 10} }, upsert=False, multi=False...
This approach was introduced in JSR 286. In JSR 168,render parameters set in processAction of a portlet were available only in that portlet.With the Public Render Parameters feature, the render parameters set in the processAction of one portlet will be available in render of other portlets also.In ...
This is one approach which has been there since JSR 168.It allows us to share attributes using portlet session.A portlet session can have different types of scopes: Portlet scope(attributes available only within portlet) Application scope(attributes available within whole application[war]) In...
The eventing mechanism is an extended version of the public render param,with additonal feature to pass custom objects to other portlets,but with an overhead of event phase. To achieve this,this mechanism consists of Publisher portlet Processor(consumer) portlet,where both may be part of differ...
This example assumes that you have already added Fresco to your app (see this example): SimpleDraweeView img = new SimpleDraweeView(context); ImageRequest request = ImageRequestBuilder .newBuilderWithSource(Uri.parse("http://example.com/image.png")) .setProgressiveRende...
Below is the list of some mistakes that developers often make during the use of AngularJS functionalities, some learned lessons and solutions to them. 1. Manipulating DOM through the controller It's legal, but must be avoided. Controllers are the places where you define your dependencies, bind you...
Problem definition: An 8 puzzle is a simple game consisting of a 3 x 3 grid (containing 9 squares). One of the squares is empty. The object is to move to squares around into different positions and having the numbers displayed in the "goal state". Given an initial state of 8-puzzle...
In Laravel documentation, a symbolic link (symlink or soft link) from public/storage to storage/app/public should be created to make files accessible from the web. (THIS PROCEDURE WILL CREATE SYMBOLIC LINK WITHIN THE LARAVEL PROJECT DIRECTORY) Here are the steps on how you can create symbolic lin...
We will follow the official guide for spring-boot and spring-data-jpa. We will be building the application using gradle. Create the gradle build file build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath("org.springframework....
In SCSS variables begin with $ sign, and are set like CSS properties. $label-color: #eee; They are only available within nested selectors where they’re defined. #menu { $basic-color: #eee; color: $basic-color; } If they’re defined outside of any nested selectors, then they can be us...
Eclipse does not give you the possibility to change the font size of the views like 'Project Explorer' or 'Servers', which looks ugly on Linux since Eclipse uses the default (desktop) font size. But you can edit specific configuration files to get the proper font sizes. To fix this annoying font si...
Different platforms can have separate implementations of the same method. This example also illustrates how build tags and file suffixes can be used together. File main.go: package main import "fmt" func main() { fmt.Println("Hello World from Conditional Compilation Doc!&...

Page 131 of 161