x <- !is.na(Df)
t(x) %*% x
or
x <- !is.na(Df)
crossprod(x)
crossprod(x) usually slightly faster than t(x) %*% x
x <- !is.na(Df)
t(x) %*% x
or
x <- !is.na(Df)
crossprod(x)
crossprod(x) usually slightly faster than t(x) %*% x
Allow Single URL Through .htaccess Password Protection
#allows a single uri through the .htaccess password protection SetEnvIf Request_URI "/testing_uri$" test_uri #allows everything if its on a certain host SetEnvIf HOST "^testing.yoursite.com" testing_url SetEnvIf HOST "^yoursite.com" live_url Order Deny,Allow AuthName "Restricted Area" AuthType Basic AuthUserFile /path/to/your/.htpasswd AuthGroupFile / Require valid-user #Allow valid-user Deny from all Allow from env=test_uri Allow from env=testing_url Allow from env=live_url Satisfy any
mb_convert_case($str, MB_CASE_TITLE, “UTF-8”);
Створюємо .htpasswd файл
username:password
У .htaccess додаємо
AuthUserFile /path/to/.htpasswd AuthType Basic AuthName "My Files" Require valid-user
'db'=>array(
'connectionString'=>'pgsql:host=localhost;port=5432;dbname=mydbname',
'username'=>'myusername',
'password'=>'mypass',
),
Перевірка чи існує директорія
if [ -d "$DIRECTORY" ]; then # Control will enter here if $DIRECTORY exists. fi
Перевірка чи директорія не існує:
if [ ! -d "$DIRECTORY" ]; then # Control will enter here if $DIRECTORY doesn't exist. fi
net stop IIsadmin net stop w3svc net stop msdepsvc
Можна перевірити який PID зайняв порт.
netstat -aon
як додати обробник події до динамічно створюванихх елементів HTML
$('ul').on('click', 'li', function() { alert( $(this).text() ); });
links:
http://stackoverflow.com/questions/1359018/in-jquery-how-to-attach-events-to-dynamic-html-elements
як вибрати елемент в jQuery використовуючи значення змінної для ID?
row = $('#' + row_id);