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 | |
MAX(CASE | |
WHEN checked_status = 0 THEN doc_count | |
ELSE 0 | |
END) file_not_existed, | |
MAX(CASE | |
WHEN checked_status = 1 THEN doc_count | |
ELSE 0 | |
END) file_existed, | |
MAX(CASE |
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
<?php | |
/** | |
* A test case defines the fixture to run multiple tests. To define a test case | |
* 1. implement a subclass of TinyTestCase | |
* 2. define instance variables that store the state of the fixture | |
* 3. initialize the fixture state by overriding setUp() | |
* 4. clean-up after a test by overriding tearDown(). | |
* | |
* @author pcdinh |
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
<?php | |
/** | |
* Class to control the indexing operation. | |
* | |
* @author pcdinh | |
* @since July 25, 2009 | |
* @version $Id$ | |
*/ | |
class IndexerController |
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
<?php | |
include_once './FileNameComponent.php'; | |
/** | |
* Provides methods to parse file name into meaningful parts. | |
* | |
* @author pcdinh | |
* @since July 25, 2009 | |
* @version $Id$ |
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
<?php | |
/** | |
* This class provides page controller service for handling requests to the index page. | |
* | |
* @author pcdinh | |
* @since June 18, 2009 | |
* @version $Id: IndexController.php 250 2009-07-02 10:40:22Z pcdinh $ | |
*/ | |
class IndexController |
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
<?php | |
/** | |
* A set of methods to manipulate files. | |
* | |
* @author pcdinh | |
* @since June 18, 2009 | |
* @version $Id: SearchController.php 407 2009-07-22 04:51:07Z hanhnt83 $ | |
*/ | |
class SearchController |
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
UPDATE documents | |
SET doc_code = REGEXP_REPLACE(doc_code, '.Q[[:digit:]]{1}.', | |
(CASE | |
WHEN REGEXP_LIKE(doc_code, '.(E|L).(10|11|12){1}.') THEN '.4.' | |
WHEN REGEXP_LIKE(doc_code, '.(E|L).0(7|8|9){1}.') THEN '.3.' | |
WHEN REGEXP_LIKE(doc_code, '.(E|L).0(4|5|6){1}.') THEN '.2.' | |
WHEN REGEXP_LIKE(doc_code, '.(E|L).0(1|2|3){1}.') THEN '.1.' | |
END )) | |
WHERE REGEXP_LIKE(doc_code, '.Q[[:digit:]]{1}.') |
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
WITH PostList AS ( | |
SELECT row_number() OVER (ORDER BY p.PostID DESC) Row, | |
p.PostID, p.ThreadID, p.ParentID, p.SortOrder, | |
p.PostDate, p.Subject, p.SectionID ForumID, p.PostAuthor UserName, | |
p.UserID UserID, p.IPAddress, t.ThreadDate, cast(p.[Body] as text) Body | |
FROM cs_Posts p | |
INNER JOIN cs_Threads t ON t.ThreadID = p.ThreadID | |
INNER JOIN cs_Sections s ON s.SectionID = p.SectionID | |
WHERE s.ApplicationType = 0 | |
) |
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
package lucene1; | |
import java.io.StringReader; | |
import org.apache.lucene.analysis.Token; | |
import org.apache.lucene.analysis.TokenStream; | |
import org.apache.lucene.analysis.Analyzer; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
/** | |
* @see Lucene 2.4.1 |
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 * INTO OUTFILE "users.txt" | |
FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' | |
FROM cms.webusers | |
WHERE MONTH(created_time) = '01' AND YEAR(created_time) = '2009'; |
OlderNewer