Skip to content

Instantly share code, notes, and snippets.

View ElemarJR's full-sized avatar
🏠
Working from home

Elemar Rodrigues Severo Junior ElemarJR

🏠
Working from home
View GitHub Profile
define(['amplify'],
function (amplify) {
var
mentionsDecoder = function(
data,
status,
xhr,
success,
error) {
<html>
<head>
<title>RequireJS demo</title>
<link rel="stylesheet" href="css/toastr.css">
<link rel="stylesheet" href="css/toastr-responsive.css">
</head>
<body>
<button id="incrementButton">Increment</button>
<button id="decrementButton">Decrement</button>
(function (){
var root = this;
define('jquery', [], function () { return root.$; });
define('toastr', [], function () { return root.toastr; });
$('#incrementButton').click(function() {
require(['js/app/counter'], function(c) {
c.increment();
});
});
define(['jquery', 'toastr'],
function ($, toastr) {
var
logJquery = function (message) {
var elem = $("<li>" + message + "</li>");
$("#output").append(elem);
},
logToastr = function (message) {
toastr.success(message);
define(['./logger'],
function (logger) {
var
_c = 0,
increment = function () {
logger.log("incrementing counter to " + ++_c);
return _c;
},
decrement = function() {
logger.log("decrementing counter to " + --_c);
var counterConsoleAdapter = (function (base) {
var
repeat = function(times, m) {
for (var i = 0; i < times; i++)
m();
},
increment = function (times){
if (times === undefined) times = 1;
repeat(times, function () {
console.log("incrementing counter " +
var counter = (function () {
var
_c = 0,
increment = function () {
return ++_c;
},
decrement = function() {
return --_c;
},
var MyClass = function(data) {
var dataChanging = [],
dataChanged = [];
this.data = function(value) {
if (value !== undefined && value !== data) {
for (var i = 0; i < dataChanging.length; i++) {
if (!dataChanging[i](this, value)) {
return data;
}
using System;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading.Tasks.Dataflow;
namespace TPLDataflow
{
class Program
{
static void Main(string[] args)
{
Console.Title = "TPL Dataflow";
var source = new[] {
"elemarjr", "leandronet", "vquaiato",
"juanplopes", "rodrigovidal", "cleytonferrari",
"diogodamiani", "sricanesh", "rodrigokono"
};