This file contains hidden or 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
| <!DOCTYPE html><html lang="en"><head><title>test</title></head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"><meta name="groc-relative-root" content=""><meta name="groc-document-path" content="test"><meta name="groc-project-path" content="src/test.js"><link rel="stylesheet" type="text/css" media="all" href="assets/style.css"><script type="text/javascript" src="assets/behavior.js"></script><body><div id="meta"><div class="file-path">src/test.js</div></div><div id="document"><div class="segment"><div class="comments doc-section"><div class="wrapper"><p><span class='doc-section-header'>Method renderChildViews </span></p> | |
| <p>Renders collection child views.</p> | |
| <p>Parameters:</p> | |
| <ul> | |
| <li><p><strong>collection must be an Array.</strong><br/>(- collection of child models who have views created.)</p></li> | |
| <li><p><strong>$el must be an Object.</strong><br/>(- Element to append child view |
This file contains hidden or 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
| filesize(500); // "500 B" | |
| filesize(500, {bits: true}); // "4 kbit" | |
| filesize(265318, {base: 2}); // "259.1 KiB" | |
| filesize(265318); // "265.32 kB" | |
| filesize(265318, {round: 0}); // "265 kB" | |
| filesize(265318, {output: "array"}); // [265.32, "kB"] | |
| filesize(265318, {output: "object"}); // {value: 265.32, symbol: "kB", exponent: 1, unit: "kB"} | |
| filesize(1, {symbols: {B: "Б"}}); // "1 Б" | |
| filesize(1024); // "1.02 kB" | |
| filesize(1024, {exponent: 0}); // "1024 B" |
This file contains hidden or 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
| -- ---------------------------- | |
| -- Procedure structure for `sp_split` | |
| -- ---------------------------- | |
| DROP PROCEDURE IF EXISTS `sp_split`; | |
| delimiter ;; | |
| CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_split`(IN toSplit text, IN target char(255)) | |
| BEGIN | |
| # Temp table variables | |
| SET @tableName = 'tmpSplit'; | |
| SET @fieldName = 'variable'; |
This file contains hidden or 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
| # The second SET statement is optional, and could be ignored if you have a well formed delimited string | |
| SET @var = 'test, w00t, w00tz'; | |
| SET @var := REPLACE(@var, ' ', ''); | |
| SET @var := CONCAT("('", REPLACE(@var, ",", "'),('"), "')"); | |
| SET @sql := CONCAT('INSERT INTO table VALUES ', @var); | |
| # Verify the query, exeute via prepared statement | |
| SELECT @sql AS `query`; |
This file contains hidden or 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
| BEGIN | |
| DECLARE `uuid` CHAR(50); | |
| DECLARE parent CHAR(255); | |
| DECLARE singular CHAR(255); | |
| DECLARE source CHAR(255); | |
| SET `uuid` = (SELECT udf_uuid(guid)); | |
| SET parent = (SELECT udf_type(guid)); | |
| SET singular = (SELECT udf_singular(type)); | |
| SET source = (SELECT CONCAT(type, udf_capitalize(parent), 's')); |
This file contains hidden or 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
| filesize(500); // "3.91Kb" | |
| filesize(500, true); // "3.9k" | |
| filesize(1500); // "1.46KB" | |
| filesize("1500000000"); // "1.40GB" | |
| filesize("1500000000", 0); // "1GB" | |
| filesize(1212312421412412); // "1.08PB" | |
| filesize(1212312421412412, true); // "1.1P" - shorthand output, similar to *nix "ls -lh" |
This file contains hidden or 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
| /** | |
| * Data attributes facade | |
| * | |
| * @type {Object} | |
| */ | |
| var data = { | |
| /** | |
| * Getter | |
| * | |
| * @param {Object} obj Element to query |
NewerOlder