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
Message msg = new Message(); | |
msg.setAuthor(author); | |
msg.setText(text); | |
msg.setIsDeleted(false); | |
GregorianCalendar cal = new GregorianCalendar(); | |
cal.setTimeInMillis(System.currentTimeMillis()); | |
msg.setSentTime(cal.getTime()); | |
messageDao.create(msg); |
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
14:01:25,028 WARN JDBCExceptionReporter:100 - SQL Error: -407, SQLState: 23502 | |
14:01:25,028 ERROR JDBCExceptionReporter:101 - DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=17, COLNO=3, DRIVER=3.53.95 | |
Exception in thread "main" org.springframework.orm.jpa.JpaSystemException: org.hibernate.exception.ConstraintViolationException: could not insert: [fksis.domain.entities.Message]; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not insert: [fksis.domain.entities.Message] | |
at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:311) | |
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:369) | |
at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58) | |
at org.springframework.dao.sup |
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
package fksis.domain.entities; | |
import java.io.Serializable; | |
import javax.persistence.*; | |
import java.util.Date; | |
import java.util.Set; | |
/** | |
* The persistent class for the MESSAGE database table. |
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
import types | |
class Target (object): | |
def A(self): | |
print 'in A' | |
def newfun(self): | |
print 'in B' |
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
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
public final class test { | |
public static void main(String[] args) { | |
SimpleDateFormat sdf = new SimpleDateFormat("MMM dd HH:mm:ss yyyy"); | |
try { | |
sdf.parse("Apr 21 09:37:04 2011"); | |
} catch (ParseException e) { |
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
Writer w = SUFS.writeFile("/data/tempfile"); | |
try { | |
w.stream.writeChars("A\nB\nC\n"); | |
} catch (IOException e) { | |
e.printStackTrace(); | |
} | |
w.finish(); | |
public final class SUFS { |
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
# Root logger option | |
log4j.rootLogger=info, stdout | |
log4j.appender.file=org.apache.log4j.RollingFileAppender | |
log4j.appender.file.file=c:\\FKSIS_Messaging_Portlet.log | |
log4j.appender.file.layout=org.apache.log4j.PatternLayout | |
log4j.appender.file.layout.conversionPattern=%d{ABSOLUTE} %5p %t %c{1}:%M:%L - %m%n | |
log4j.appender.file.MaxFileSize=1024KB | |
log4j.appender.file.MaxBackupIndex=10 |
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
>>> d = datetime.datetime.utcfromtimestamp(0) | |
>>> time.mktime(d.utctimetuple()) - time.timezone | |
-3600.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
.block-content { | |
width: 960px; | |
margin: auto; | |
} | |
.block-content-right { | |
float: right; | |
width: 960px; | |
} |
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
Root<Student> studentr = cq.from(Student.class); | |
cq.select(studentr); | |
cq.where(cb.like(studentr.get(Student_.groupNumber).as(String.class), like)); | |
cq.groupBy(studentr.get(Student_.groupNumber)); | |
cq.distinct(true); | |
13:11:34,499 ERROR PARSER:56 - line 1:136: expecting CLOSE, found '(' | |
13:11:34,546 WARN HqlParser:249 - processEqualityExpression() : No expression to process! |