Tutorial by Examples: f

Create an instance of Mobile Analytics for Bluemix. Add the Bluemix Mobile Services SDK to your iOS project. After installing the SDK, add these import statements at top of your AppDelegate.swift file: import BMSCore import BMSAnalytics Next you'll need to initialize and send mobile ana...
Floating point Numbers can be formatted as a decimal number using String.format with 'f' flag //Two digits in fracttional part are rounded String format1 = String.format("%.2f", 1.2399); System.out.println(format1); // "1.24" // three digits in fractional pa...
It is sometimes useful to integrate a custom error logging framework to ensure all exceptions are logged. [ServiceContract] [ErrorHandler] public interface IMyService { } [AttributeUsage(AttributeTargets.Interface)] public class CustomErrorHandler : Attribute, IContractBehavior, IE...
Lets say you have a simple ApiController like this: [HttpGet] [Route("test")] public dynamic Test() { dynamic obj = new ExpandoObject(); obj.prop1 = "some string"; obj.prop2 = 11; obj.prop3 = "another string"; ...
Setup Install AWS CLI AWS CLI is an common CLI tool for managing the AWS resources. With this single tool we can manage all the aws resources sudo apt-get install -y python-dev python-pip sudo pip install awscli aws --version aws configure Bash one-liners cat <file> # output a file ...
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...
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...
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.
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/...
wxPython Phoenix is the latest version of wxPython, (currently Sept 2016 without an official release). It supports both Python 2 and Python 3. You can download a snapshot build (i.e. a Python wheel) for your platform and Python version here. wxPython Phoenix utilizes a largely automated mechanism ...
The CEILING function rounds a number up, away from zero, to the nearest multiple of significance. The FLOOR function does the same by rounds the number down towards zero. An example of when CEILING could be be used is if you want to avoid using pennies in your prices and your product is priced at $...
The FIXED function rounds a number to the specified number of decimals defined by the decimals parameter, formats the number in decimal format using a comma as a separator unless specified as not required defined by the parameter no_commas, and returns the result as text. The decimals parameter is o...
Consider a structure of the following classes should be constructed in XAML an then read into a CLR object: namespace CustomXaml { public class Test { public string Value { get; set; } public List<TestChild> Children { get; set; } = new List<TestChild>(); ...

Page 307 of 457