Tutorial by Examples: check

first you add System.Security.Cryptography namespace to your project public string GetSha1Hash(string filePath) { using (FileStream fs = File.OpenRead(filePath)) { SHA1 sha = new SHA1Managed(); return BitConverter.ToString(sha.ComputeHash(fs)); ...
The code Here is a simple flink application using a stateful mapper with an Integer managed state. You can play with the checkpointEnable, checkpointInterval and checkpointMode variables to see their effect: public class CheckpointExample { private static Logger LOG = LoggerFactory.getLogge...
Before 1.2, the only way to persist state/retain a checkpoint after a job termination/cancellation/persistant failure was through a savepoint, which is triggered manually. Version 1.2 introduced persistent checkpoints. Persistent checkpoints behave very much like regular periodic checkpoints except...
A binary tree is BST if it satisfies any one of the following condition: It is empty It has no subtrees For every node x in the tree all the keys (if any) in the left sub tree must be less than key(x) and all the keys (if any) in the right sub tree must be greater than key(x). So a straightf...
This function tells whether a given time lies within a a given time interval. (require '[clj-time.core :as t]) (def date1 (t/date-time 2016 11 5)) (def date2 (t/date-time 2016 12 5)) (def test-date1 (t/date-time 2016 12 20)) (def test-date2 (t/date-time 2016 11 15)) (t/within? (t/interva...
DB backup Database backup is a must before starting any Dynamics CRM upgrade process. This is mandatory as to always have the option to rollback in case of any major roadblock. Wrong Estimation DO NOT underestimate the work involved in a CRM Upgrade process. Audit your current Microsoft Dynamics...
Dialog dlg; DialogGroup dGrp; DialogField dialogField; dlg = new Dialog("Evil Dialog"); dGrp = dlg.addGroup("A Group"); dialogField = dlg.addFieldValue(extendedTypeStr(NoYesId), NoYes::Yes, "I hereby sell my soul"); if (dlg.run()) { info(dialogField.valu...
Different procedures can give out the same result, but they would use different processing time. In order to check out which one is faster, a code like this can be used: time1 = Timer For Each iCell In MyRange iCell = "text" Next iCell time2 = Timer For i = 1 To 30 MyRan...
Let's say we have a component that should only be displayed if the user is logged in. So we create a HOC that checks for the authentication on each render(): AuthenticatedComponent.js import React from "react"; export function requireAuthentication(Component) { return class Auth...
To complete this objective following tasks are required. Foreach Loop Container: To iterate over a user configured directory for files. Expression Task: To update a variable if file exists. Steps First goto Solution Explorer double click on Project.params and create a parameter FolderPat...
A common problem might be trying to iterate over Array which has no values in it. For example: Dim myArray() As Integer For i = 0 To UBound(myArray) 'Will result in a "Subscript Out of Range" error To avoid this issue, and to check if an Array contains elements, use this oneliner: If...
Methods used: .DriveExists(strDrive) returns (True/False) .FileExists(strFile) returns (True/False) .FolderExists(strFolder) returns (True/False) The following code checks for the existence of a file using the "FileExists" method of a file system object. For checking the existence of...
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <p> <input id="cbGroup1" type="checkbox">Select all <input name="cbGroup1" type="checkbox" value="value1_1">Group1 v...
// Token from another example. This token is expired var tokenString = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmb28iOiJiYXIiLCJleHAiOjE1MDAwLCJpc3MiOiJ0ZXN0In0.HE7fK0xOQwFEr4WDgRWj4teRPZ6i3GLwD5YCm6Pwu_c" token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error...
Nokogiri is somewhat like a browser, in that it will attempt to provide something useful even if the incoming HTML or XML is malformed. Unfortunately it usually does it silently, but we can ask for a list of the errors using errors: require 'nokogiri' doc = Nokogiri::XML('<node><foo/&gt...
Here I assume that project app url is APP_URL=http://project.dev/ts/toys-store Set the writable permission to storage_path('framework/sessions') the folder. Check the path of your laravel project 'path' => '/ts/toys-store', the root of your laravel project. Change the name of your cookie 'co...
This example will help to verify the given time is within a period or not. To check the time is today, We can use DateUtils class boolean isToday = DateUtils.isToday(timeInMillis); To check the time is within a week, private static boolean isWithinWeek(final long millis) { return System.c...
A bracket is considered to be any one of the following characters: (, ), {, }, [, or ]. Two brackets are considered to be a matched pair if the an opening bracket (i.e., (, [, or {) occurs to the left of a closing bracket (i.e., ), ], or }) of the exact same type. There are three types of matched p...
You can check R Version using the console version
Sometimes the download takes longer than the cell is being displayed. In this case it can happen, that the downloaded image is shown in the wrong cell. To fix this we can not use the UIImageView Extension. We still will be using Alamofire however we will use the completion handler to display the im...

Page 12 of 12