Tutorial by Examples: sin

If you have email column you can mask it with email() mask: ALTER TABLE Company ALTER COLUMN Email ADD MASKED WITH (FUNCTION = 'email()') When user tries to select emails from Company table, he will get something like the following values: [email protected] [email protected] [email protected]
Random mask will show a rundom number from the specified range instead of the actual value: ALTER TABLE Product ALTER COLUMN Price ADD MASKED WITH (FUNCTION = 'random(100,200)') Note that is some cases displayed value might match actual value in column (if randomly selected number matches valu...
See remarks for discussion of closures. Suppose we have an interface: public interface IMachine<TState, TInput> { TState State { get; } public void Input(TInput input); } and then the following is executed: IMachine<int, int> machine = ...; Func<int, int> machineC...
Keychain.h #import <Foundation/Foundation.h> typedef void (^KeychainOperationBlock)(BOOL successfulOperation, NSData *data, OSStatus status); @interface Keychain : NSObject -(id) initWithService:(NSString *) service_ withGroup:(NSString*)group_; -(void)insertKey:(NSString *)key with...
.iloc uses integers to read and write data to a DataFrame. First, let's create a DataFrame: df = pd.DataFrame({'one': [1, 2, 3, 4, 5], 'two': [6, 7, 8, 9, 10], }, index=['a', 'b', 'c', 'd', 'e']) This DataFrame looks like: one two a 1 6 b 2 ...
Command Structure is sqlcmd -S yourservername\instancename -d database_name -o outputfilename_withpath -Q "your select query" Switches are as follows -S for servername and instance name -d for source database -o for target outputfile (it will create output file) -Q fo...
It crops the images in square shape. This cordova project uses two plugins: Cordova Camera Plugin -- https://github.com/apache/cordova-plugin-camera Cordova Crop Image Plugin -- https://github.com/jeduan/cordova-plugin-crop The Camera plugin is combined with the Crop Image Plugin by ...
.loc uses labels to read and write data. Let's setup a DataFrame: df = pd.DataFrame({'one': [1, 2, 3, 4, 5], 'two': [6, 7, 8, 9, 10], }, index=['a', 'b', 'c', 'd', 'e']) Then we can print the DataFrame to have a look at the shape: print df This will o...
Given an interface: public interface Logger { void log(String message); } Rather than usage: public void doJob(Logger logger) { if (logger != null) { logger.log("[doJob]:Step 1"); } // ... if (logger != null) { logger.log("[doJob]:Step 2&q...
Given these sample data: IDSTATUSSTATUS_TIMESTATUS_BY1ONE2016-09-28-19.47.52.501398USER_13ONE2016-09-28-19.47.52.501511USER_21THREE2016-09-28-19.47.52.501517USER_33TWO2016-09-28-19.47.52.501521USER_23THREE2016-09-28-19.47.52.501524USER_4 Items identified by ID values must move from STATUS 'ONE' to...
Although the @enum macro is quite useful for most use cases, it can be excessive in some use cases. Disadvantages of @enum include: It creates a new type It is a little harder to extend It comes with functionality such as conversion, enumeration, and comparison, which may be superfluous in some...
Consider a base class Vehicle and its derived class Car as follows: #import <Foundation/Foundation.h> @interface Vehicle : NSObject { NSString *vehicleName; NSInteger vehicleModelNo; } - (id)initWithName:(NSString *)name andModel:(NSInteger)modelno; - (void)print; @end ...
Assuming we have the following function: function foo(tab) return tab.a end -- Script execution errors out w/ a stacktrace when tab is not a table Let's improve it a bit function foo(tab) if type(tab) ~= "table" then error("Argument 1 is not a table!", 2) end ...
Usage to list all folders and files in the current directory: dir A target directory can also be specified: dir C:\TargetPath When specifying a path with spaces, it must be surrounded by quotes: dir "C:\Path With Spaces"
In this context, using the this pointer isn't entirely necessary, but it will make your code clearer to the reader, by indicating that a given function or variable is a member of the class. An example in this situation: // Example for this pointer #include <iostream> #include <string>...
This is an actual useful strategy to differentiate member data from parameters... Lets take this example : // Dog Class Example #include <iostream> #include <string> using std::cout; using std::endl; /* * @class Dog * @member name * Dog's name * @function bark * ...
I common problem encounter when scrapping a web is how to enter a userid and password to log into a web site. In this example which I created to track my answers posted here to stack overflow. The overall flow is to login, go to a web page collect information, add it a dataframe and then move to t...
In some cases you may want to change which notification you use based on a tag in the Alert keys. You can do this using the Lookup feature. Note: Lookup only works if you are using OpenTSDB and sending data to the Bosun to be indexed. For other backends or non-indexed data you have to use lookupSeri...
Small, simple csv files can be built using just a text editor, because a CSV file is simply text. If you have spreadsheet software available these are usually an easy way to open and save CSV files. Reading and writing them, or otherwise processing their contents is done more efficiently using the ...
There are several ways to implement a plugin system for a Java application. One of the simplest is to use URLClassLoader. The following example will involve a bit of JavaFX code. Suppose we have a module of a main application. This module is supposed to load plugins in form of Jars from 'plugins' f...

Page 116 of 161