This file contains hidden or 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
// From Map<String, List<IChamp>> to Map<String, List<Champ>> (with Champ implements IChamp) | |
Map<String, List<Champ>> champs = (Map<String, List<Champ>>) (Map<String, ?>) myClass.myMethode(); |
This file contains hidden or 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
(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey |
This file contains hidden or 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
tree.addListener(SWT.MeasureItem, paintListener); | |
tree.addListener(SWT.PaintItem, paintListener); | |
tree.addListener(SWT.EraseItem, paintListener); | |
Listener paintListener = new Listener() { | |
@Override | |
public void handleEvent(Event event) { | |
switch(event.type) { | |
case SWT.MeasureItem: { | |
TreeItem item = (TreeItem)event.item; |
This file contains hidden or 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
new TraverseListener() { | |
public void keyTraversed(TraverseEvent e) { | |
if (e.detail == SWT.TRAVERSE_TAB_NEXT) { | |
e.doit = false; | |
// Action | |
} | |
} | |
}; |
This file contains hidden or 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
; Setup.exe config file | |
; Using Inno setup : http://www.jrsoftware.org/ | |
; Install extra .exe and .msi | |
[Setup] | |
AppName=App Name | |
AppVersion=1.0 | |
DefaultDirName={pf}\MyFolder | |
Compression=lzma2 |
This file contains hidden or 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
function timestampToDateString(timestamp){ | |
var a = new Date(UNIX_timestamp * 1000); | |
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']; | |
var year = a.getFullYear(); | |
var month = months[a.getMonth()]; | |
var date = a.getDate(); | |
var hour = a.getHours(); | |
var min = a.getMinutes(); | |
var sec = a.getSeconds(); | |
var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ; |
This file contains hidden or 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
var array = <?php echo '["' . implode('", "', $array) . '"]' ?>; |
This file contains hidden or 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
1. Download ShellExView: http://www.nirsoft.net/utils/shexview.html | |
This program does not require installation, just right click and run as Administrator | |
2. From the menu, click on Options then click on Filter by Extension Type and select Context Menu. | |
3. On the list, you'll see some of the entries with pink background, those are installed by the third party software | |
4. Hold down CTRL Key and select all of them then click on the red button on top left corner to disable. | |
5. Click on the Options again and select Restart Explorer |
This file contains hidden or 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 Boolean isNetworkAvailable() { | |
ConnectivityManager connectivityManager | |
= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); | |
return activeNetworkInfo != null && activeNetworkInfo.isConnectedOrConnecting(); | |
} |
This file contains hidden or 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
####################### | |
# Subdomain redirection | |
####################### | |
RewriteEngine on | |
RewriteBase / | |
# Check if this is the noredirect query string | |
RewriteCond %{QUERY_STRING} (^|&)m=0(&|$) | |
# Set a cookie, and skip the next rule | |
RewriteRule ^ - [CO=mredir:0:www.website.com] |
NewerOlder