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
package ejercicios; | |
import java.util.ArrayList; | |
import java.util.Random; | |
import java.util.Arrays; | |
public class Conjuntos{ | |
private static ArrayList<String> union(ArrayList<String> primero, ArrayList<String> segundo){ | |
ArrayList<String> retVal = new ArrayList<String>(primero); | |
for(String worte: segundo){ | |
if(!primero.contains(worte)) |
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
document.addEventListener('invalid', (function(){ | |
return function(e) { | |
//prevent the browser from showing default error bubble / hint | |
e.preventDefault(); | |
// optionally fire off some custom validation handler | |
// myValidation(); | |
}; | |
})(), true); |
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
# -*- coding:utf-8 -*- | |
from __future__ import absolute_import | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
import json | |
import uuid | |
import time | |
import gevent |
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
import {PipeTransform, Pipe} from 'angular2/core'; | |
@Pipe({ name: 'highlight' }) | |
export class HighLightPipe implements PipeTransform { | |
transform(text: string, [search]): string { | |
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text; | |
} | |
} | |
/** Usage: |
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
*.tmp | |
# Word temporary | |
~$*.doc* | |
# Excel temporary | |
~$*.xls* | |
# Excel Backup File | |
*.xlk |
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
import time | |
import json | |
import gevent | |
from uuid import uuid4 | |
from locust import HttpLocust, TaskSet, task, ResponseError, events, Locust | |
import websocket | |
class SocketClient(object): |
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
# Copyright 2017, Google, Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License") | |
FROM node:6-onbuild | |
EXPOSE 3000 | |
ENV LANGUAGE English | |
ENV API_KEY 123-456-789 |
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
import websocket | |
import thread | |
import time | |
import sys | |
port = sys.argv[1] | |
def on_message(ws, message): |
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
> tsc --lib es2016,dom --experimentalDecorators true --emitDecoratorMetadata true lazy.module.ts |
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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.IOException; | |
import java.nio.file.*; | |
public class FileWatcher { | |
private static final Logger log = LoggerFactory.getLogger(FileWatcher.class); | |
private Thread thread; |
OlderNewer