Skip to content

Instantly share code, notes, and snippets.

@NiteshKant
NiteshKant / HttpAwesomeServer.java
Created April 29, 2014 04:19
A URI based router for RxNetty, How Awesome :)
package io.reactivex.netty.examples.java;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import io.netty.handler.codec.http.HttpHeaders;
import io.reactivex.netty.RxNetty;
import io.reactivex.netty.protocol.http.server.HttpServerRequest;
import io.reactivex.netty.protocol.http.server.HttpServerResponse;
import io.reactivex.netty.protocol.http.server.RequestHandler;
import io.reactivex.netty.protocol.text.sse.ServerSentEvent;
@gangaaloori
gangaaloori / sql_queries_practice.sql
Created October 28, 2013 06:27
Contains some important queries that I practiced upon
--display employees details along with thier managers details
select e1.empno, e1.ename, e1.job, e2.ename as manager, e2.job as manager_job, e1.sal from emp e1 left join emp e2 on e1.mgr=e2.empno;
--display employees details along with their manager details(manager name, job, dept name), dept details
select e1.empno, e1.ename, e1.job, e1.sal, d1.dname, e2.ename as manager, e2.job as manager_job, d2.dname as manager_dept
from emp e1 left join emp e2 on e1.mgr=e2.empno
inner join dept d1 on e1.deptno=d1.deptno
inner join dept d2 on e2.deptno=d2.deptno
order by e1.empno
@itavero
itavero / JAXBCollection.java
Last active March 14, 2023 10:03
Generic serializer / marshaller / unserializer / unmarshaller class to convert objects into strings and vice versa. Uses the JAXB lib. Personally used this class for converting messages received/sent to a queue (JMS).
/*
* Copyright (c) 2013, Arno Moonen <info@arnom.nl>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions: