-
Press the Windows + R keys to open the Run dialog, type eventvwr.msc, and press Enter.
-
If prompted by UAC, then click/tap on Yes (Windows 7/8) or Continue (Vista).
-
In the left pane of Event Viewer, double click/tap on Windows Logs to expand it, click on System to select it, then right click on System, and click/tap on Filter Current Log.
A. Click/tap on the drop down arrow to the right of Event sources, check the USER32 box, and click/tap in the field.
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] |
- 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
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
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
/* | |
* 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
/** | |
* 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
## 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
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
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
classpath group: 'edu.sc.seis.gradle', name: 'launch4j', version: '2.4.3' // dependency for the launch4J plugin | |
} | |
} |
NewerOlder