Time of Update: 2014-11-27
標籤:hibernate這個問題困惑了我好久,當然百度裡有一大堆,可是我的這種情況似乎很少參考過這篇比較好的(解決了很多人問題吧):http://blog.csdn.net/biangren/article/details/8010018可是還是未能解決我的問題,現在終於解決了。我的原因在於:映射類的主鍵設定為String類型,而對應檔:<hibernate-mapping package="com.hibernate.Set"> <class
Time of Update: 2014-11-27
標籤:抓包 上傳 webshell wsockexpert在Web滲透的過程中,最為麻煩的一個環節就是上傳WebShell,之前曾介紹過利用Database Backup來上傳,這也屬於最為簡單和古老的一種方法。本文將介紹另外一種利用抓包來上傳WebShell的方法,目標網站採用南方資料5.0,實驗平台採用IIS搭建,如何利用IIS搭建ASP網站可參考博文http://yttitan.blog.51cto.com/70821/1579372。首先登入網站後台,找到上傳點。650)
Time of Update: 2014-11-27
UVA 12452 Plants vs. Zombies HD SP 樹形dp(水,12452zombies題目連結:點擊開啟連結題意:給定n個點的樹[0,n)開始所有邊都是無色。有3種操作:1、選一個點染其相連的邊 花費1002、選一個點染其相連的2條邊 花費1753、選一個點染其相連的所有邊 花費500問:染完所有邊的最小花費。邊可以重複染,點只能被操作一次。#include <string>#include <iostream>#include
Time of Update: 2014-11-27
矩陣連乘(備忘錄方法:自頂向下遞迴),連乘自頂向下#include<iostream>#include<vector>#include<iterator>#include<algorithm>using namespace std;/**矩陣連乘(備忘錄方法:自頂向下遞迴)*/vector<vector<int>>
Time of Update: 2014-11-27
EXCEL
Time of Update: 2014-11-27
USACO 1.3 Mixing Milk(貪心),usacomixingUSACO Mixing Milk簡單的貪心,讀入資料,按單價從小到大排序,然後從最便宜的買起,直到買夠為止。/* ID:twd30651 PROG:milk LANG:C++*/#include<iostream>#include<fstream>#include<stdlib.h>using namespace std;int N;int M;typedef struct
Time of Update: 2014-11-27
不帶緩衝的IO的標準輸入到標準輸出,緩衝io在POSIX標準中提供了函數open, read, write, lseek以及close提供不帶緩衝的IO,這些函數都是使用檔案描述符;在Linux/Unix系統中將標準輸入複製到標準輸出簡單實現如下:#include <unistd.h>#define BUFFSIZE 4096int main(int argc, char **argv){ int n; char buf[BUFFSIZE]; while((
Time of Update: 2014-11-27
POJ2991 Crane 【線段樹+計算幾何】,poj2991craneCraneTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3777 Accepted: 1031 Special JudgeDescriptionACM has bought a new crane (crane -- jeřáb) . The crane consists of n
Time of Update: 2014-11-27
hdu2102 (dfs)搜尋水題,hdu2102dfs題意就不多說了 肯見很多人都是用bfsA的 然後我就果斷用dfs做了 和其他深搜都一樣就是注意下裡面的一些剪枝 不然很容易就逾時#include<stdio.h>#include<string.h>#include<iostream>using namespace std;char
Time of Update: 2014-11-27
自己實現strchr函數,strchr函數#include <iostream>using namespace std;// 自己實現strchr函數char * Strchr(char to[], char Ch);int main(){char to[30], ch, *p;cout << "請輸入字串:";cin >> to;cout << "請輸入一個字元:";cin >> ch;p =
Time of Update: 2014-11-27
Kaggle競賽題目之——Predicting a Biological Response,kagglepredictingPredict a biological response of molecules from their chemical properties從分子的化學屬性中預測其生物反應。The objective of the competition is to help us build as good a model as possible so that we can,
Time of Update: 2014-11-27
winform編程設定listview選中行,winformlistview在做項目中,需要用到listview顯示資料。同時,項目要求,通過檢索使用者輸入的資料,程式通過搜尋,確定資料所在的行並通過程式設定為選中狀態並高亮顯示。同時,正常響應按一下滑鼠響應的效果,單擊時,程式設定的選中行清除選中狀態。類似的效果如下:以選中第4行為例,我的實現代碼如下:
Time of Update: 2014-11-27
自己實現strcat函數,strcat函數#include <iostream>using namespace std;// 自己實現strcat函數void Strcat(char to[], char from[]);int main(){char to[30], from[30];cout << "請輸入第一個字串:";cin >> to;cout << "請輸入第二個字串:";cin >>
Time of Update: 2014-11-27
飄逸的python,飄逸pythondis — Disassembler for Python bytecode,即把python代碼反組譯碼為位元組碼指令.使用超級簡單:python -m dis xxx.py當我在網上看到while 1比while True快的時候,我感到很困惑,為何會有這種區別呢?於是使用dis來深入.假設est_while.py代碼如下.#coding=utf-8while 1: passwhile True:
Time of Update: 2014-11-27
用命令列方式升級Android SDK,androidsdk為什麼用命令列?因為google網站國內很難訪問,用Android SDK Manager下載很麻煩。但是我有美國的伺服器,用命令列可以升級SDK,然後複製下來。1. 安裝javaUbuntu 13.10 安裝Oralce JDK2. 下載Android SDKwget http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz 解壓後,進入目錄的tools目錄,執行:root@
Time of Update: 2014-11-27
自己實現atoi函數,atoi函數#include <iostream>#include <string>using namespace std;// 自己實現atoi函數的過程int My_atoi(const char * p);int main(){string s;cout << "請輸入一個字串:";cin >>
Time of Update: 2014-11-27
HDU 4135-Co-prime(容斥原理),hdu4135-co-prime題目連結:傳送門題意:求區間[a,b]內與n互質的數的個數。思路:用容斥求出[1-b]與n互質的個數—[1-(a-1)]內與n互質的個數。 #include <algorithm>#include <iostream>#include <cstring>#include <cstdlib>#include <string>#include <
Time of Update: 2014-11-27
616nyoj 新手dp,616nyojdp新手dp時間限制:1000 ms |
Time of Update: 2014-11-27
Python bisect模組,pythonbisect模組Python的bisect模組是內建模組,bisect模組實現了一個演算法用於插入元素到有序列表。在一些情況下,這比反覆排序列表或構造一個大的列表再排序的效率更高。Bisect是二分法的意思,這裡使用二分法排序,將待插入的元素插入到合適的位置 bisect模組提供了如下幾個函數:(下面函數中的lo和hi用於指定列表的區間,預設的是整個列表)bisect.bisect_left(a, x, lo=0, hi=len(a))
Time of Update: 2014-11-27
自己實現的strcmp函數,strcmp函數#include <iostream>using namespace std;// 自己實現strcmp函數int Strcmp(char to[], char from[]);int main(){char to[30], from[30];int flag;cout << "請輸入第一個字串:";cin >> to;cout <<