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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package bandeira; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.GraphicsConfiguration; | |
import java.awt.Point; |
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
//Pra colocar um texto | |
g.setColor(Color.GREEN); | |
//Determina a fonte e seu tamanho | |
Font font = new Font("Callibri", Font.PLAIN, 30); | |
g.setFont(font); | |
//Desenha o texto | |
g.drawString("Pedro maluco!", 25, 100); |
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
#!/bin/bash | |
say -r 190 "Up and running. Listening website for changes. I will keep You in touch. Bye."; | |
while [ 1 ] | |
do | |
get_status=$(curl -X POST "http://www.pm.pb.gov.br/concursos/inscricao__cfo/index.php" -d "dt_nascimento=01/01/1987" -d "nm_cpf=xxx.xxx.xxx-xx" -A "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36" -d "modo=1" -d "cd_aluno=" -s | md5); | |
if [ $get_status = "e5948a465a078db264bb770ccea87510" ] | |
then | |
echo "Nothing new. Trying in 5 minutes..."; |
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
#!/bin/sh | |
mencoder -sub $1.srt -ovc xvid -xvidencopts bitrate=-7000000 -oac copy -o $2.avi $1.avi -subwidth 90 -subpos 95 -subfont-text-scale 3 |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script> | |
<script src="skulpt.min.js" type="text/javascript"></script> | |
<script src="skulpt-stdlib.js" type="text/javascript"></script> | |
</head> | |
<body> |
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
vetor = [] | |
qtd_negativo = 0 | |
for i in range(5): | |
print 'Insira o %s numero' % i | |
vetor.append(int(raw_input())) | |
for item in vetor: | |
if item < 0: | |
qtd_negativo += 1 |
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
USERS = {'admin@admin': '123', | |
'user': '123'} | |
GROUPS = {'admin': ['group:sysadmin'], | |
'user': ['group:users']} | |
def groupfinder(userid, request): | |
if userid in USERS: | |
return GROUPS.get(userid, []) |
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
$("div[class~=terminal]").on('DOMNodeInserted', function(){ | |
var current_scroll = this.scrollHeight; | |
var element_height = $(this).height(); | |
var this_element_id = $(this).attr('id'); | |
var is_allowed_to_scroll = $('input[data-scroller='+ this_element_id +']:checked',0).length; | |
if (is_allowed_to_scroll) | |
if (current_scroll > element_height) | |
this.scrollTop = current_scroll |
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
// | |
// 1) Negativo | |
// | |
// Lê 5 valores inteiros, um de cada vez, conta quantos destes valores são negativos e imprime esta informação. | |
// | |
#include <iostream> | |
using namespace std; | |
int main(int argc, const char * argv[]) |
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
// | |
// 1) Intervalos | |
// | |
// Lê um número não conhecido de valores, um de cada vez, e conta quantos deles estão em cada um dos intervalos | |
// [0; 25), [25; 50), [50; 75) e [75; 100] | |
// | |
#include <iostream> | |
using namespace std; |
OlderNewer