A Pen by Rubens Mariuzzo on CodePen.
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
use deleteme; | |
create table assets ( | |
item_name varchar(32) primary key, | |
dynamic_cols blob | |
); | |
INSERT INTO assets VALUES | |
('MariaDB T-shirt', COLUMN_CREATE('campo_padre', COLUMN_CREATE('hijo', 'valor del hijo'))); |
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
// Proposed solution for an exercise given to a friend: http://pastebin.com/hjFCZYE7 | |
function printList(linePrefix, list) { | |
for (var i = 0; i < list.length; i++) { | |
if (typeof list[i] === 'string') { | |
console.log(linePrefix + '.' + i + ': ' + list[i]); | |
} else { | |
printList(linePrefix + '.' + i, list[i]); | |
} | |
} |
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
{ | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".sass-cache", | |
"node_modules", |
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
/** | |
* Convert an hexadecimal value in a integer base-10. | |
* @param hex An hexadecimal value to convert. | |
* @return An integer base-10 equivalent to the given hexadecimal value. | |
*/ | |
function hex2int(hex) { | |
return parseInt(hex, 16); | |
} |
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
/** | |
* Check if a word or phrase is a palindrome in 106 characters of JavaScript. | |
*/ | |
function isPalindrome(s) { | |
return s.match(/[a-zA-Z]/g).join('').toLowerCase()==s.match(/[a-zA-Z]/g).reverse().join('').toLowerCase(); | |
} |
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
/// <summary> | |
/// Return the expression text | |
/// </summary> | |
/// <typeparam name="TModel"></typeparam> | |
/// <param name="expression"></param> | |
/// <returns></returns> | |
public static string GetExpressionText<TModel>(Expression<Func<TModel, object>> expression) | |
{ | |
var expr = (LambdaExpression)expression; | |
if (expr.Body.NodeType == ExpressionType.Convert) |
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
for (var i = 0; i < list.Count; i++) | |
{ | |
var first = i == 0; | |
var last = i == list.Count - 1; | |
var current = i + 1; | |
var previous = i; | |
if (first || previous % 3 == 0) | |
{ | |
@Html.Raw("<div class=\"row\">"); |
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
/// <summary> | |
/// Return the full name of an entity. | |
/// </summary> | |
public String FullName() | |
{ | |
get | |
{ | |
return String.Join(" ", new String[] { this.FirstName, this.MiddleName, this.LastName, this.SecondLastName }); | |
} | |
} |
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
{ | |
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme", | |
"detect_slow_plugins": false, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"font_size": 11, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"ignored_words": |
OlderNewer