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
Jan 02, 2017 4:46:33 PM org.apache.tomcat.util.digester.SetPropertiesRule begin | |
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:dindinweb' did not find a matching property. | |
Jan 02, 2017 4:46:33 PM org.apache.catalina.startup.VersionLoggerListener log | |
INFO: Server version: Apache Tomcat/8.5.9 | |
Jan 02, 2017 4:46:33 PM org.apache.catalina.startup.VersionLoggerListener log | |
INFO: Server built: Dec 5 2016 20:18:12 UTC | |
Jan 02, 2017 4:46:33 PM org.apache.catalina.startup.VersionLoggerListener log | |
INFO: Server number: 8.5.9.0 | |
Jan 02, 2017 4:46:33 PM org.apache.catalina.startup.VersionLoggerListener log | |
INFO: OS Name: Windows 10 |
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
select | |
if(@idc <> tmp.id, @nr:= 1, (@nr:=@nr+1)) as rownum, | |
@idc:=tmp.id as xxx, | |
tmp.* | |
from | |
( | |
select | |
f.id, | |
f.foo | |
from |
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
sudo su | |
crontab -e | |
# put this if you check every minute of day if some java process is running. | |
*/1 * * * * sudo /bin/sh /etc/init.d/javarunning.sh |
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
Loading mirror speeds from cached hostfile | |
* base: mirror.trouble-free.net | |
* epel: mirror.math.princeton.edu | |
* extras: mirror.netdepot.com | |
* updates: mirrors.tripadvisor.com | |
* webtatic: us-east.repo.webtatic.com | |
Resolving Dependencies | |
--> Running transaction check | |
---> Package php-pecl-solr2.x86_64 0:2.3.0-1.el6 will be installed | |
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-pecl-solr2-2.3.0-1.el6.x86_64 |
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
DELIMITER $$ | |
drop trigger if exists `bla` $$ | |
CREATE TRIGGER `bla` BEFORE INSERT ON `your_table` | |
FOR EACH ROW | |
BEGIN | |
IF (new.id = 1) THEN | |
SIGNAL SQLSTATE '01000' SET MESSAGE_TEXT = 'message', MYSQL_ERRNO = 1000; | |
END IF; |
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 byte[] runReportToPdf(String reportFile,Map<String, Object> parameters) throws GenericException{ | |
InputStream is=getReportFile(reportFile); | |
Connection conn=getConnection(); | |
byte[] bi=null; | |
try { | |
parameters.put("P_REPORTS_PATH", Application.getInstance().getReportsPath()); | |
parameters.put(JRParameter.REPORT_LOCALE, new Locale("pt", "BR")); | |
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
$.validator.addMethod("dateGreaterThan", function(value, element, params) { | |
var start = moment($(params).val(), "DD/MM/YYYY"); | |
var end = moment(value, "DD/MM/YYYY"); | |
return end.diff(start) >= 0; | |
}, "End date must be greater than start one."); | |
$.validator.addMethod("isValidDate_pt_BR", function(value, element) { | |
return moment(value, "DD/MM/YYYY").isValid(); |
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
DELIMITER $$ | |
DROP FUNCTION IF EXISTS `mask_money` $$ | |
CREATE FUNCTION `mask_money`(valor DOUBLE) RETURNS VARCHAR(50) DETERMINISTIC | |
BEGIN | |
declare tamanho int; | |
declare comeco int; | |
declare str varchar(50); |
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
drop table if exists tmp_date_interval; | |
create temporary table tmp_date_interval(data_tmp date not null primary key)ENGINE=MEMORY; | |
DELIMITER $$ | |
drop procedure if exists `get_date_interval` $$ | |
create procedure get_date_interval(inicio date, fim date) | |
begin |
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
!SESSION 2016-05-30 21:35:57.473 ----------------------------------------------- | |
eclipse.buildId=unknown | |
java.version=1.8.0_77 | |
java.vendor=Oracle Corporation | |
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en | |
Command-line arguments: -os win32 -ws win32 -arch x86_64 | |
!ENTRY org.eclipse.equinox.preferences 4 2 2016-05-30 21:35:58.223 | |
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.equinox.preferences". | |
!STACK 0 |