- Install the latest version in : http://nssm.cc/download
- Unzip it
- through the console navigate to the repository
- Launch nssm.exe install service_name
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
import org.apache.commons.csv.CSVFormat; | |
import org.apache.commons.csv.CSVParser; | |
import java.io.IOException; | |
/* | |
** Gradle import : compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5' | |
*/ |
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
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
classpath group: 'edu.sc.seis.gradle', name: 'launch4j', version: '2.4.3' // dependency for the launch4J plugin | |
} | |
} |
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
import org.apache.poi.openxml4j.exceptions.NotOfficeXmlFileException; | |
import org.apache.poi.ss.usermodel.Cell; | |
import org.apache.poi.ss.usermodel.Row; | |
import org.apache.poi.ss.usermodel.Workbook; | |
/* | |
** Gradle Import : | |
* compile group: 'org.apache.poi', name: 'poi', version: '3.17' | |
* compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.17' |
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
## Template String | |
$(`#id=${var}`); | |
## Parameters Assignment | |
function open(multiCartId = -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
/** | |
* Init an action to be run every sunday at 10 AM. | |
*/ | |
private static void initCron() { | |
final Calendar calendar = Calendar.getInstance(); | |
calendar.set( | |
Calendar.DAY_OF_WEEK, | |
Calendar.SUNDAY |
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
/* | |
* Set logger's appender. If the logger is local, the change will only be local. | |
*/ | |
private void setAppender() { | |
SimpleLayout layout = new SimpleLayout(); | |
FileAppender appender = null; | |
try { | |
appender = new FileAppender(layout, "path/to/your/logs.log", true); //true = append; false = replace | |
} catch (IOException e) { | |
e.printStackTrace(); |
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 c.name 'Column Name' | |
FROM sys.columns c | |
INNER JOIN sys.types t ON c.user_type_id = t.user_type_id | |
LEFT OUTER JOIN | |
sys.index_columns ic ON ic.object_id = c.object_id AND ic.column_id = c.column_id | |
LEFT OUTER JOIN | |
sys.indexes i ON ic.object_id = i.object_id AND ic.index_id = i.index_id | |
WHERE | |
c.object_id = OBJECT_ID('YOUR_TABLE_NAME') |
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
private function copyTableToTable($dbSrc, $dbDest, $tableSrc, $tableDest = null) { | |
if ($tableDest == null) { // If null then assume tables have same name | |
$tableDest = $tableSrc; | |
} | |
$dbDest->query("TRUNCATE TABLE $tableDest"); //Empty Dest table in case it's not already done. | |
$columns = $this->db->query("SELECT c.name FROM" | |
. " sys.columns c" | |
. " INNER JOIN " | |
. " sys.types t ON c.user_type_id = t.user_type_id" | |
. " LEFT OUTER JOIN " |
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
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^http://(www\.)?10.0.1.19 [NC] | |
RewriteCond %{HTTP_REFERER} !^http://(www\.)?10.0.1.19.*$ [NC] | |
RewriteRule \.(gif|jpg|png|pdf)$ - [F] |
OlderNewer