Check your screen's names by typing:
xrandr -q
Then disable one of them: (notice VGA-1 is the name of the screen, will differ, e.g. HDMI-1 if the screen is connected via HDMI)
/* | |
* Just for fun :) AND, OR and XOR with only "+ * - 2", plus "( ) 1" for NOT | |
*/ | |
function not(a) { | |
return (a-1)*(a-1); | |
return a*(a-1)+(a+1)-2*a; | |
return (a-2)*a+1; | |
return and(a-1,a-1); | |
} |
int a[1]; | |
a[0]=1; | |
if(0[a]==a[0]==1); | |
// a[b] == *(a+b) == *(b+a) == b[a] |
This is just a little script, which can tell you if your hoster/php verion supports namespaces. Upload to your htdocs/webroot and naviagte your browser to the page. It might tell you "Namespaces seem to work!" or something like "Parse error: syntax error, unexpected T_STRING in /var/www/httpdocs/nst.php on line 1"
02:16 bernhard@horst:~> time for i in {1..10000}; do sed -n -e '1p' edt.txt > /dev/null;done | |
real 1m23.424s | |
user 0m44.611s | |
sys 0m8.801s | |
02:18 bernhard@horst:~> time for i in {1..10000}; do sed -e '1!d' edt.txt > /dev/null;done | |
real 1m23.036s | |
user 0m45.827s | |
sys 0m10.609s |
<?php | |
/** | |
* One-pointer Circular Buffer | |
* | |
* This comes without any overwrite | |
* checks or FIFO functionality. | |
* You'll need SPL. | |
* | |
* @author Bernhard Häussner | |
* @date 2011-09-07 |
#!/bin/bash | |
# USAGE: Will create a .tar.gz with CSVs of all tables in schema. | |
# Configure below and run as root (i.e. the user mysql runs as) | |
# | |
# The script will (or should) SELECT * INTO OUTFILE your tables | |
# and save them into csv files under /tmp dir first, then name them | |
# like the tables and move them thogether into a directory. Then | |
# it will tar everything together and chown you the tarball. | |
# Schema to export: |
// This is a little demo File on how to bind event listeners | |
// to own, non-DOM objects with jQuery. | |
// Since calling the default action is calling the identically | |
// named methods of our custom action and that would usually | |
// mean triggering the event again we use this handy callback: | |
function preventSelfcallCallback (event) { | |
event.preventDefault(); | |
} |
-- Tip: You can use IF() and AVG() together to get a percentage value | |
-- without doing subquerys | |
-- - | |
-- Basic usage: | |
-- SELECT AVG(IF( predicate ,100,0)) as percentage FROM table | |
-- Example: | |
-- - | |
SELECT | |
AVG(IF(f.mid,100,0)) as `percentage filed` | |
FROM |
/** | |
* Return something as filename-save string. | |
* | |
* Result will contain only 0-9, a-z and "-". | |
* It converts german umlauts, you might want | |
* to add some conversions for your target | |
* language. | |
*/ | |
function filesc(str) { |