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
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
public class pxs extends JFrame { | |
private static final long SLEEP_DELAY = 500L; | |
private static JLabel label; | |
public static void main(String[] args) { | |
JFrame frame = new pxs(); |
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
#!/usr/bin/php | |
<?php | |
date_default_timezone_set('UTC'); | |
/** | |
* oAuth settings from http://dev.netatmo.com/dev/listapps | |
*/ | |
define('APP_ID', ''); | |
define('APP_SECRET', ''); | |
define('USERNAME', ''); | |
define('PASSWORD', ''); |
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
CREATE TABLE `some_table` ( | |
`id` int(4) unsigned NOT NULL AUTO_INCREMENT, | |
`value` varchar(255) NOT NULL DEFAULT '', | |
PRIMARY KEY (`id`), | |
UNIQUE KEY `value` (`value`) | |
); | |
INSERT INTO some_table (value) VALUES ('test') ON DUPLICATE KEY UPDATE id = LAST_INSERT_ID(id); | |
select last_insert_id(); |
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
SELECT * | |
FROM ( | |
SELECT @cnt := COUNT(*) + 1, | |
@lim := 10 | |
FROM t_random | |
) vars | |
STRAIGHT_JOIN | |
( | |
SELECT r.*, | |
@lim := @lim - 1 |
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 urlParams = {}; | |
(function () { | |
var e, | |
r = /([^&=]+)=?([^&]*)/g, | |
d = function (s) { return decodeURIComponent(unescape(s)); }, | |
q = window.location.search.substring(1); | |
while (e = r.exec(q)) | |
urlParams[d(e[1])] = d(e[2]); | |
})(); |
NewerOlder