Skip to content

Instantly share code, notes, and snippets.

compile - Dependencies for source set 'main' (deprecated, use 'implementation ' instead).
+--- org.springframework.boot:spring-boot-starter-web:1.4.7.RELEASE
| +--- org.springframework.boot:spring-boot-starter:1.4.7.RELEASE
| | +--- org.springframework.boot:spring-boot:1.4.7.RELEASE
| | | +--- org.springframework:spring-core:4.3.9.RELEASE
| | | | \--- commons-logging:commons-logging:1.2
| | | \--- org.springframework:spring-context:4.3.9.RELEASE
| | | +--- org.springframework:spring-aop:4.3.9.RELEASE
| | | | +--- org.springframework:spring-beans:4.3.9.RELEASE
package zl.ca.test;
public class Fighter extends Person {
private int power;
public Fighter(String name, int age) {
super(name, age);
}
public int getPower() {
@liuzy163
liuzy163 / gist:56e1f8a52c6d3481863e
Created January 20, 2016 14:33
Nested HTML table
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Nested Table</title>
<style>
table {
border-collapse: collapse;
}
@liuzy163
liuzy163 / pivotExample.sql
Last active August 29, 2015 14:22
T-SQL create a simple pivot table
CREATE TABLE OrderItem(
lineItemId int IDENTITY(1,1) NOT NULL,
orderid int NOT NULL,
itemName nchar(10) NOT NULL,
qty int NOT NULL
)
GO
INSERT INTO OrderItem (orderid,itemName,qty)
VALUES (100, 'ipad', 4),
@liuzy163
liuzy163 / gist:727c9c793f51a6288896
Created June 5, 2015 20:04
Use CTE and Table Partition and Ranking Functions to Delete Rows with Duplicates
create procedure dbo.fixDuplication(@accountNumber varchar(255), @productId varchar(30))
as
begin
WITH CTE as
(
select oli.id, oli.serialNumber, row_number()
over (partoliion by serialNumber order by serialNumber) as rownumber
from orderLineItems as oli
join orders as o on o.id=oli.orderId
where o.accountnumber = @accountnumber
@liuzy163
liuzy163 / gist:6f24978e67cf18aac61e
Created June 3, 2015 17:07
JQuery Moves Table Rows
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
function secretChanged(element){
var currentRow = $(element).parents().parents("tr:first");
$("#notes").slideUp(500);
$("#notes").insertAfter(currentRow);
$("#notes").slideDown(500);