Tutorial by Examples

This example shows how to take image and display it correctly on the Android device. Firstly we have to create sample application with one button and one imageview. Once user clicks on the button camera is launched and after user selects picture it will be displayed with the proper orientation on ...
import tensorflow as tf filename_queue = tf.train.string_input_producer(["file.csv"], num_epochs=1) reader = tf.TextLineReader() key, value = reader.read(filename_queue) col1, col2 = tf.decode_csv(value, record_defaults=[[0], [0]]) with tf.Session() as sess: sess.run(tf.initializ...
TFRecord files is the native tensorflow binary format for storing data (tensors). To read the file you can use a code similar to the CSV example: import tensorflow as tf filename_queue = tf.train.string_input_producer(["file.tfrecord"], num_epochs=1) reader = tf.TFRecordReader() key, s...
To randomly shuffle the examples, you can use tf.train.shuffle_batch function instead of tf.train.batch, as follows: parsed_batch = tf.train.shuffle_batch([serialized_example], batch_size=100, capacity=1000, min_after_dequeue=200) tf.train.shuffle_batch (as well as tf.train.batch) crea...
As the official website of Swagger says : Swagger is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. ...
A trait is a reusable set of methods and fields that can be added to one or more classes. trait BarkingAbility { String bark(){ "I'm barking!!" } } They can be used like normal interfaces, using implements keyword: class Dog implements BarkingAbility {} def d = new Dog() asser...
List of commonly used S3 AWS CLI Commands Create Bucket aws s3 mb s3://bucket-name Remove Bucket aws s3 rb s3://bucket-name List Buckets aws s3 ls List contents inside the bucket aws s3 ls s3://bucket-name List Bucket with a path aws s3 ls s3://bucket-name/path Copy file aws s3...
In this example, I created a form which is used to register a new user. In the options passed to the form, I give the different roles a user can have. Creating a reusable class for my form with configured data class and an extra option that fills the choice field to pick a userrole: class UserType...
To be able do deal with form events, it's important to attach the request, that is send to a controller action after submitting a form, to the form created in that action. public function registerAction(Request $request) { $data = new ExampleObject(); $form = $this->createForm(Example...
Basic grid In Ionic you can declare rows by setting the row class to a element. Rows will be elements which are horizontally aligned and anything inside this element everything will belong to the row. Inside the row you can declare different width columns. You have a choice of the following declara...
Almost every application has some kind of a list. Ionic has it's own build-in ready-to-go list item CSS declarations to make it easy to do lists inside your application. You can either use HTML elements and declare a class for the or use the directive ion-list to make them. Example of a directive is...
Preset Ionic CSS will have a theme and pre-set colors for it. You can modify or override the basic values in the ionic.css or in your custom CSS file. You can also define these with SASS and to use SASS in Ionic you just need to run the ionic setup sass command in your terminal. Basic usage of colo...
Assume you want to undo a dozen of commits and you want only some of them. git rebase -i <earlier SHA> -i puts rebase in "interactive mode". It starts off like the rebase discussed above, but before replaying any commits, it pauses and allows you to gently modify each commit as i...
docker logs --follow <containerid> This tails the output of the running container. This is useful if you did not set up a logging driver on the docker daemon.
If you use the LOAD DATA INFILE command to populate a table with existing data, you will often find that the import fails due to duplicates. There are several possible ways to overcome this problem. LOAD DATA LOCAL If this option has been enabled in your server, it can be used to load a file that ...
Each shiny app contains two parts: A user interface definition (UI) and a server script (server). This example shows how you can print "Hello world" from UI or from server. UI.R In the UI you can place some view objects (div, inputs, buttons, etc). library(shiny) # Define UI for appl...
By default the ArrayAdapter creates a view for each array item by calling toString() on each item and placing the contents in a TextView. Example: ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, myStringArray); where androi...
AmCharts provides a load-balanced, reliable CDN for loading the libraries directly from our web server. Use https://www.amcharts.com/lib/3/ as a base URL for includes. <script src="https://www.amcharts.com/lib/3/amcharts.js"></script> <script src="https://www.amcharts...
To do that, [download][1] a required amCharts product ZIP archive. Unzip it and place somewhere on your web server. I.e. in /amcharts/ sub-directory. Then simply load them using <script> tags: <script src="amcharts/amcharts.js"></script> <script src="amcharts/...
Besides main required functional includes, you may need other includes, like themes and plugins. Those reside in /themes/ and /plugins/ sub-directories respectively. I.e.: <script src="https://www.amcharts.com/lib/3/amcharts.js"></script> <script src="https://www.amc...

Page 911 of 1336