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
// Filename: HttpServer.cs | |
// Author: Benjamin N. Summerton <define-private-public> | |
// License: Unlicense (http://unlicense.org/) | |
using System; | |
using System.IO; | |
using System.Text; | |
using System.Net; | |
using System.Threading.Tasks; |
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
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "1 - Debug CRA Tests", | |
"type": "node", | |
"request": "launch", | |
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/react-scripts", | |
"runtimeArgs": [ | |
"--inspect-brk", |
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
/** | |
Converte número separados por vírgulas p/ pontos, e decimal por vírgula. | |
string valor | |
Ex. formatNumberBR("839,66,123,1,234,560.0000000001") => "839.661.231.234.560,0000000001" | |
*/ | |
function formatNumberBR(valor) { | |
return valor.replace(/\./g, '|').replace(/,/g, '').replace(/(\d)(?=((\d{3})+)(?:\|))/g, '$1.').replace(/\|/g, ','); | |
} |
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
public class MyClass { | |
public static void main(String args[]) { | |
String results = FizzBuzz(1,20); | |
System.out.println(results); | |
} | |
public static String FizzBuzz(int k, int l){ | |
String n = ""; | |
for(int i=k;i<=l;i++){ | |
if(i%3==0) |
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
/** 201808222232 */ | |
var delayApps = (function ($, window, document, undefined) { | |
return function (apps,delay) { | |
var _apps = "function"===typeof apps ? [apps] : apps instanceof Array ? apps : undefined; | |
if("undefined"===typeof apps&&!(apps instanceof Array)) { return false; } | |
var _self = this; | |
var _delay = delay || 10000; | |
var __timeout = _self.setTimeout(function () { | |
"object"===typeof console&&"function"===typeof console.log&&console.log('Starting apps.'); | |
$.each(_apps,function (ndx,_app) { |
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
#!/usr/bin/env python | |
""" | |
Very simple HTTP server in python. | |
Usage:: | |
./dummy-web-server.py [<port>] | |
Send a GET request:: | |
curl http://localhost |
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
var adicionarProduto = function(sku,qtd,seller){ | |
var id = sku; | |
var quantity = qtd||1; | |
var seller_id = seller||1; | |
var product = { | |
id: id, | |
quantity: quantity, | |
seller: seller_id | |
}; |
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
<?php | |
namespace CHH; | |
trait MetaObject | |
{ | |
protected static $__metaClass; | |
static function setMetaClass(MetaClass $metaClass) | |
{ |
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
<script type="text/javascript"> | |
$(document).ready(function (param) { | |
place_google_conversion_img_tag(); | |
}); | |
var place_google_conversion_img_tag = function () { | |
// não passa deste ponto se não for a página "finaliza-compra" | |
if(!$('body').hasClass("finaliza-compra")) return false; | |
// não passa deste ponto se já foi inserida a tag. |
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
var _removeUnavaliableStyle = window.removeUnavaliableStyle; | |
// function override | |
window.removeUnavaliableStyle = function (selector) | |
{ | |
// fix on/off label style | |
if(typeof selector=="undefined") | |
jQuery(".topic label").removeClass("sku-picked"); | |
_removeUnavaliableStyle(selector); | |
} |
NewerOlder