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 cv2 | |
def draw_text(img, text, | |
font=cv2.FONT_HERSHEY_PLAIN, | |
pos=(0, 0), | |
font_scale=3, | |
font_thickness=2, | |
text_color=(0, 255, 0), | |
text_color_bg=(0, 0, 0) | |
): |
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
create or replace PROCEDURE get_emp_rs (p_deptno IN emp.deptno%TYPE, | |
p_recordset OUT SYS_REFCURSOR) AS | |
BEGIN | |
OPEN p_recordset FOR | |
SELECT emp.ename, | |
emp.empno, | |
emp.JOB, | |
emp.SAL | |
FROM EMP emp inner join dept dept on (emp.DEPTNO = dept.DEPTNO) | |
WHERE emp.deptno = p_deptno |
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 java.io.File; | |
import java.io.IOException; | |
import java.io.Serializable; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
import java.util.HashMap; | |
import java.util.Map; |
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
Stop listener in command window: | |
lsnrctl stop | |
Modify ORACLE_HOME/app/oracle/product/10.2.0/server/NETWORK/ADMIN/listener.ora | |
LISTENER = | |
(DESCRIPTION_LIST = | |
(DESCRIPTION = | |
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) | |
(ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521)) | |
) | |
) |
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
--Creación de tabla con fechas de 50 años | |
CREATE TABLE tb_fc_fechas_continuas | |
( | |
fecha date NOT NULL, | |
CONSTRAINT tb_fc_fechas_continuas_pkey PRIMARY KEY (fecha) | |
); | |
--insersión de los registros 18628 dias existen en 50 años. | |
insert into tb_fc_fechas_continuas | |
select '2000-01-01'::date + d.date |
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
public static String corrigeTargetLinks(String html){ | |
try { | |
Pattern patternContenido, pTarget; | |
Matcher matcherContenido, mTarget; | |
final String PATRON_CONTENIDO_TAG_LINK = "(?i)<a([^>]+)>"; | |
final String PATRON_ATRIBUTO_TARGET = "target=\"((_blank)|(_self)|(_parent)|(_top)+?)\""; | |
patternContenido = Pattern.compile(PATRON_CONTENIDO_TAG_LINK); |
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
private static float tiempoLimpio(String cadena) { | |
float tiempo; | |
cadena = cadena.replace("real", "").replace(" ", "").replace("\t", "") | |
.replace("s", "").replace("m", ":"); | |
tiempo = (60 * Float.parseFloat(cadena.split(":")[0])) | |
+ Float.parseFloat(cadena.split(":")[1]); | |
return tiempo; | |
} |
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 | |
# | |
# nginx - this script starts and stops the nginx daemin | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /usr/local/nginx/logs/nginx.pid |
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
#get root access | |
$su - | |
$ cd /tmp | |
#Remove old Ruby | |
$ yum remove ruby | |
# Install dependencies | |
$ yum groupinstall "Development Tools" | |
$ yum install zlib zlib-devel |
NewerOlder