This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% [INPUT] | |
% query = A string representing a valid SQL query to be performed on one or more tables defined within the main workspace. | |
% Only CRUD operations (DELETE, INSERT, SELECT and UPDATE) are supported. | |
% | |
% [OUTPUT] | |
% out = The result of the specified SQL query, whose content depends upon the performed operation: | |
% - for SELECT statements, an m-by-n table representing the result set returned by the database; | |
% - for DELETE, INSERT and UPDATE statements, an integer representing the number of affected rows. | |
function out = table_sql(varargin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% [INPUT] | |
% path = A string representing the path on which to perform the requirements check (optional, default=pwd). | |
% It can be either the path to a Matlab script or the path to a directory containing one or more Matlab scripts at any level of depth. | |
% type = A string representing the requirements check to perform (optional, default=ALL), its value can be one of the following: | |
% - ALL: dependancies and minimum version. | |
% - DEP: dependancies only. | |
% - VER: minimum version only. | |
% extv = A boolean indicating whether to return detailed information concerning the minimum version (optional, default=false). | |
% If false, the result is returned in the form of a string representing the minimum version. | |
% Otherwise, the result is returned in the form of a table listing all the called functions and their respective minimum version (if available). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE PROCEDURE dbo.TextSearch | |
( | |
@Text VARCHAR(100), | |
@Type CHAR(1) = NULL, | |
@Normalized BIT = 0 | |
) | |
AS | |
BEGIN | |
IF (@Text IS NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% [INPUT] | |
% file_path = A char array representing the file path. | |
% | |
% [OUTPUT] | |
% crc32 = A char array representing the CRC32 Checksum of the file. | |
function crc32 = calculate_crc32(file_path) | |
persistent array; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static Int64 IndexOf(this Byte[] value, Byte[] pattern) | |
{ | |
if (value == null) | |
throw new ArgumentNullException("value"); | |
if (pattern == null) | |
throw new ArgumentNullException("pattern"); | |
Int64 valueLength = value.LongLength; | |
Int64 patternLength = pattern.LongLength; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% [INPUT] | |
% ax = An object of type "matlab.graphics.axis.Axes" representing the axis on which the rootogram is plotted (optional, default=gca). | |
% occ = A numeric vector representing the number of occurrences. | |
% exd = A numeric vector representing the expected (fitted) frequencies. | |
% obs = A numeric vector representing the observed (real) frequencies. | |
% flo = A boolean that indicates whether to use floating bars (optional, default=true). | |
% squ = A boolean that indicates whether to use the squared root of frequencies (optional, default=true). | |
% | |
% [OUTPUT] | |
% h_rec = A vector containing the rectangle handles (optional). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% [INPUT] | |
% c1 = A vector of three floats [0,1] representing the first RGB color. | |
% c2 = A vector of three floats [0,1] representing the second RGB color. | |
% c3 = A vector of three floats [0,1] representing the third RGB color. | |
% n1 = An integer [0,512] representing the span of the first gradient (c1 and c2). | |
% n2 = An integer [0,512] representing the span of the second gradient (c2 and c3). | |
% | |
% [OUTPUT] | |
% cmap = An (n1+n2)-by-3 matrix of floats representing the colormap. |