Tutorial by Examples: f

You can also use tee command to store the output of a command in a file and redirect the same output to another command. The following command will write current crontab entries to a file crontab-backup.txt and pass the crontab entries to sed command, which will do the substituion. After the substi...
You can pipe your output to multiple files (including your terminal) by using tee like this: $ ls | tee file1 file2 file3
By default tee command overwrites the file. You can instruct tee to append to the file using the –a option as shown below. $ ls | tee –a file
Here we will create a rest APi which will take file object as a multipart parameter from front end and upload it to S3 bucket using java rest API. Requirement :- secrete key and Access key for s3 bucket where you wanna upload your file. code:- DocumentController.java @RestController @Requ...
The curl source packages can be downloaded from the following page: https://curl.haxx.se/download.html However, the best way to install it is to use your package repository. For Linux distros, you can use apt-get, yum or rpm depending on the distribution you are using, so the exact command will b...
In this example, we will plot a sine curve and a hyperbolic sine curve in the same plot with a common x-axis having different y-axis. This is accomplished by the use of twinx() command. # Plotting tutorials in Python # Adding Multiple plots by twin x axis # Good for plots having different y axis ...
In this example, a plot with curves having common y-axis but different x-axis is demonstrated using twiny() method. Also, some additional features such as the title, legend, labels, grids, axis ticks and colours are added to the plot. # Plotting tutorials in Python # Adding Multiple plots by twin ...
Fibonacci Numbers are a prime subject for dynamic programming as the traditional recursive approach makes a lot of repeated calculations. In these examples I will be using the base case of f(0) = f(1) = 1. Here is an example recursive tree for fibonacci(4), note the repeated computations: Non-Dy...
docker-composer.yml web: ... env_file: - ./filename filename variable=value
Locate and open your TIBCO BW bwengine.tra file typlically under TIBCO_HOME/bw/5.12/bin/bwengine.tra (Linux environment) Look for the line that states: *** Common variables. Modify these only. *** Add the following line right after that section tibco.deployment=%tibco.deployment% ...
A simple OGL 4.0 GLSL shader program with vertex position and color attribute. The program is executed with a phyton script. To run the script, PyOpenGL must be installed. A shader program consists at least of a vertex shader and a fragmant shader (exception of computer shaders). The 1st shader s...
We can use typedef to simplify the usage of function pointers. Imagine we have some functions, all having the same signature, that use their argument to print out something in different ways: #include<stdio.h> void print_to_n(int n) { for (int i = 1; i <= n; ++i) printf(...
As we can add multiple elements in Cart array and then add it to cart session, but there are 4 basic elements which Cart class requires to add data successfully in cart session. id (string) qty (number) price (number, decimal) name (String) And if you want to add more options regardin...
Usually, the routes in a controller have the same prefix connected somehow with functionality of this controller. For example: public class ProductsController : ApiController { [Route("api/products")] public IEnumerable<Product> GetProducts() { ... } [Route("a...
First of all you need to create AVAssetWriter NSError *error = nil; NSURL *outputURL = <#NSURL object representing the URL where you want to save the video#>; AVAssetWriter *assetWriter = [AVAssetWriter assetWriterWithURL:outputURL fileType:AVFileTypeQuickTimeMovie error:&error]; if (!...
Given a multidimensional array: my_array = [[1, 2], ['a', 'b']] the operation of flattening is to decompose all array children into the root array: my_array.flatten # [1, 2, 'a', 'b']
string contents = ""; string url = "http://msdn.microsoft.com"; using (System.Net.WebClient client = new System.Net.WebClient()) { contents = client.DownloadString(url); } Console.WriteLine(contents);
import networkx as nx # importing networkx package import matplotlib.pyplot as plt # importing matplotlib package and pyplot is for displaying the graph on canvas b=nx.Graph() b.add_node('helloworld') b.add_node(1) b.add_node(2) '''Node can be called by any python-hashable obj like string,nu...
/** * Apply a radial mask (vignette, i.e. fading to black at the borders) to a bitmap * @param imageToApplyMaskTo Bitmap to modify */ public static void radialMask(final Bitmap imageToApplyMaskTo) { Canvas canvas = new Canvas(imageToApplyMaskTo); final float centerX = imageToApply...

Page 441 of 457