mysql_connect
(PHP 4, PHP 5)
mysql_connect — 打开一个到 MySQL 服务器的连接
Warning
本扩展自 PHP 5.5.0 起已废弃，并在将来会被移除。应使用 MySQLi 或 PDO_MySQL 扩展
来替换之。参见 MySQL：选择 API 指南以及相关 FAQ 以获取更多信息。用以替代本函数
的有：
• mysqli_connect()
• PDO::__construct()
说明
resource mysql_connect ([ string $server [, string $username [, string
$password [, bool $new_link [, int $client_flags ]]]]] )
打开或重复使用一个到 MySQL 服务器的连接。
参数
server
MySQL 服务器。可以包括端口号，例如 "hostname:port"，或者到本地套接字的路径
，例如对于 localhost 的 ":/path/to/socket"。
如果 PHP 指令 mysql.default_host 未定义（默认情况），则默认值是
'localhost:3306'。在 SQL 安全模式时，参数被忽略，总是使用 'localhost:3306'
。
username
用户名。默认值由 mysql.default_user 定义。在 SQL 安全模式时，参数被忽略，总
是使用服务器进程所有者的用户名。
password
密码。默认值由mysql.default_password定义。在 SQL 安全模式时，参数被忽略，总
是使用空密码。
new_link
如果用同样的参数第二次调用 mysql_connect()，将不会建立新连接，而将返回已经
打开的连接标识。参数 new_link 改变此行为并使 mysql_connect() 总是打开新的连
接，甚至当 mysql_connect() 曾在前面被用同样的参数调用过。
client_flags
client_flags 参数可以是以下常量的组合：MYSQL_CLIENT_SSL，
MYSQL_CLIENT_COMPRESS，MYSQL_CLIENT_IGNORE_SPACE 或
MYSQL_CLIENT_INTERACTIVE。进一步信息见MySQL 客户端常量。
返回值
如果成功则返回一个 MySQL 连接标识，或者在失败时返回 FALSE。
更新日志
版本 说明
4.3.0 添加 client_flags 参数。
4.2.0 添加 new_link 参数。
3.0.10 对 server 添加 ":/path/to/socket" 支持。
3.0.0 对 server 添加 ":port" 支持。
范例
Example #1 mysql_connect() 例子
Example #2 mysql_connect() 例子：使用 hostname:port 语法
Example #3 mysql_connect() 例子：使用 ":/path/to/socket" 语法
注释
Note:
本扩展自 PHP 5.5.0 起已废弃，并在将来会被移除。应使用 MySQLi 或 PDO_MySQL
扩展来替换之。参见 MySQL：选择 API 指南以及相关 FAQ 以获取更多信息。用以替
代本函数的有：
□ mysqli_connect()
□ PDO::__construct()
Note:
只要将 server 指定为 "localhost" 或 "localhost:port"，MySQL 客户端库会越过
此值并尝试连接到本地套接字（Windows 中的名字管道）。如果想用 TCP/IP，应该用
"<IP_ADDRESS>" 代替 "localhost"。如果 MySQL 客户端库试图连接到一个错误的本地套
接字，则应该在 PHP 配置中设定 的正确路径并把 server 留空。
Note:
脚本一结束，到服务器的连接就被关闭，除非之前已经明确调用 mysql_close() 关闭
了。
Note:
可以在函数名前加上一个 @ 来抑制出错时的错误信息。
参见
• mysql_pconnect() - 打开一个到 MySQL 服务器的持久连接
• mysql_close() - 关闭 MySQL 连接
User Contributed Notes 36 notes
===============================================================================
The post from 'Graham_Rule at ed dot ac dot uk' should include the following
WARNING:
WARING: THE VALUES OF THESE DIRECTIVES WILL BE EXPOSED IF ANY OF THE CODE
INCLUDES THE phpinfo() FUNCTION.
The phpinfo() function will print these values clear as day. I highly suggest
against this method of storing MySQL authentication information.
I recommend creating connect and cleanup functions in a separate include file.
If security is a concern, locate the include file outside of your web root
folder.
Simply include your connnection.php file in your script and anywhere you use
the mysql_query() function include a call to the GetMyConnection() function.
===============================================================================
If you encounter speed problems using this command to a distant server, you can
add the line "skip-name-resolve" in your my.cnf to fix it.
===============================================================================
The use of mysql connections can become tricky with objects. I am using
mysql_connect() in a database class I wrote and the class destructor calls
mysql_close. Because I have several of these database objects, mysql_connect
reuses existing connections. This is fine except when the script reaches the
end of execution and PHP's garabage collection calls all the objects'
__destruct() functions. mysql_close() throws a warning that the connection is
invalid, in my case for one object. This is happening with objects which use an
existing connection, as the connection has already been closed. I solved the
problem by forcing mysql_connect() to create a new connection each time. This
is not efficient but is sufficient for my purposes for now.
I wouldn't say this is a bug per-se, but it's something to look out for. I
imagine using mysqli is the ultimate solution...
===============================================================================
Be carefull here if you use utf8.
The file db.opt of your database should contain the following lines:
default-character-set=utf8
default-collation=utf8_general_ci
It means that your database is created to use the utf8 characterset.
One way to accomplish this is:
CREATE DATABASE my_database DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Then, after connecting to it from PHP you should use:
mysql_set_charset("UTF8", $connection);
If you don't do this, you will get ugly problems in case other software is
reading and writing to the same database!!!!!!
===============================================================================
Note that named pipe on Windows is unusable since PHP 5.3, and TCP connection
shall be used even in localhost.
===============================================================================
Hopefully this saves someone some grief.
My dev computer is windows and runs wampserver. I have frequent problems with
PHP being unable to connect to MySQL after periods of extreme DB activity.
Long story short, it was because I was not running mysql via named-pipes and
Windows was running out of available ports to serve PHP. Apparently, on
windows, you have 5000 ports to work with and once they are opened, they remain
so for 120 seconds before being released. This causes problems with mysql/
networking because a new port is requested for each connection.
You can read more about the problem at:
(Link too long and had to be broken up)
http://dev.mysql.com/doc/refman/5.0/en
/can-not-connect-to-server.html#can-not-connect-to-server-on-windows
?>
Since mysql is on localhost, I can just enable named-pipes (which is how you
should have mysql setup if you don't need networking) to get around the problem
instead of the workaround listed on that page.
For details, see:
http://dev.mysql.com/tech-resources
/articles/securing_mysql_windows.html
===============================================================================
In case anyone else is getting "Client does not support authentication protocol
requested by server; consider upgrading MySQL client" error. The problem is the
new password hashing method used by MySQL >= 4.1 mentioned below.
Either update your PHP to v5 where the new password hashing is supported or use
old_password() in MySQL 4.1.
FROM: http://www.digitalpeer.com/id/mysql
UPDATE mysql.user SET password=old_password("youroldhashpassword") WHERE user =
'youruserid' and host ='yourhost'
then do
FLUSH PRIVILEGES
===============================================================================
If you prefer to use a hostname instead of an ip on your connection string in a
script (to be able to change the ip at will), but don't want the overhead of
dns lookups, just add it to your /etc/hosts file (in windows: %WINDIR%/system32
/drivers/etc/hosts).
For example, add the following to your hosts file (changing the bogus ip to
your server's real ip):
<IP_ADDRESS> mysqlserver1
Note: On linux, make sure you have "order: hosts,bind" on your /etc/host.conf
file.
On a script, make the mysql connection like so:
$sid = mysql_connect ("mysqlserver1", "user", "pass");
?>
Note: this sample is in php, but it can be any other programming language (just
type "ping mysqlserver1" on a prompt, on your server)
And there you have it! If your server ever gets assigned a different ip, just
update the hosts file with the new one (every script will work as-is, even if
under different hostnames).
===============================================================================
Sometimes, I want that MySQL service start automatically when my app need it.
This is specially true if you work in a development PC and/or in an small
intranet environment.
You can do something like this: if the mysql_connect() function returns FALSE,
try to force the initialization of the MySQL service!
For example, under Windows:
In Linux of course you can try "/etc/init.d/mysqld start" but you will need
special permissions.
Regards.
===============================================================================
MYSQL_CLIENT_SSL is not working, use MySQLi and mysqli->ssl_set()
===============================================================================
connect to mysql via named pipe under windows :
in my.ini, add this:
[mysqld]
enable-named-pipe
then connect to the server, then connect to mysql using
mysql_connect('.')
===============================================================================
Another solution to the security problems of putting usernames and passwords
into scripts. I haven't found this documented anywhere else so thought I'd
suggest it for the online documentation. ........
Don't put passwords for mysql into scripts which may be read by any user on the
machine. Instead put them into an Apache configuration file and make sure that
it is not world-readable. (Apache reads its main config files as root.)
For example, add this to your httpd.conf (and chmod it to 600 or 660) then tell
your apache to reload itself (apachectl graceful).
php_value mysql.default_user fred
php_value mysql.default_password secret
php_value mysql.default_host server.example.com
Then all you need in your PHP code is
$handle = mysql_connect() or die(mysql_error());
The passwords etc will only be picked up by scripts running in the named
directory (or a sub-directory). The same may be done for virtualhosts etc.
If you don't want to keep reloading your Apache server then you ay test things
putting the php_value directives into a (world readable) .htaccess file.
(Clearly not for production use.)
If you need to debug the values that are being supplied (or not) then use this
snippet:
@syslog(LOG_DEBUG, "Using user=".ini_get("mysql.default_user").
" pass=".ini_get("mysql.default_password").
" host=".ini_get("mysql.default_host"));
(This assumes that you are not running in 'safe_mode' and that you are on a
unix of some sort.)
===============================================================================
When you connect and expect to use a stored procedure,you must pass a special
flag to MySQL via the connect command, otherwise you will not get the results
returned, and it will result in this error:
PROCEDURE AlexGrim.GetStats_ForumCategories can't return a result set in the
given context
To fix this, change you connection string, adding ",false,65536" as the last 2
fields:
$this->con = mysql_connect($this->h,$this->u,$this->p,false,65536);
===============================================================================
The addition of entries to httpd.conf to stop .inc files being served by Apache
is certainly useful and to be recommended.
But it doesn't change the fact that these files have to be readable by Apache
so that the PHP processor can get at them.
As long as your don't have multiple, possibly untrusted, users on your machine
then that's OK. But when you are running a large multi-user service with
thousands of users its always possible that one of them will look at your .inc
files and take a note of the passwords you have in them. They could even copy
them into their own scripts and modify your databases!
Even if local users are trusted, there is always the possibility of a rogue
script (PHP or some nastier language) being installed by an ignorant user.
That script might then read your .inc files (whether or not they are in the web
publishing tree) and expose your password.
===============================================================================
to use load data local infile function from mysql (at mysql 4.0.16, php 4.3.3),
set fifth parameter of mysql_connect() to CLIENT_LOCAL_FILES(128), which based
on MYSQL C API ( also mysql server support load file, check by "show variables
like 'local_infile' ")
Thank 'phpweb at eden2 dot com' to point this out
===============================================================================
In MySQL4.1 and later, the default password hashing format has changed making
it incompatible with 3.x clients.
I found out mysql_connect() works on server versions >= 4.1 when your MySQL
user password is blank because password authentication isn't done in that case,
otherwise you need to use another connection method (e.g. mysqli).
Also if you are using old MySQL tables on a new server (i.e. the passwords are
stored in the old format), then the server will use the old auth method
automatically and this function should work in all cases.
Hopefully this will help someone, it had me confused for a while because some
of the users on my 4.1 server could connect and some couldn't.
===============================================================================
A little note if your scripts sleep a lot, you want to run exactly the same SQL
statement 2+ times and you have the "MySQL has gone away" error a lot.
Try setting the 4th parameter to TRUE as it seems sometimes PHP doesn't spot
that resource ID x which it used for the last identical lookup is now dud and
so tries to use it, thus bypassing tests such as is_resource() and causing a
failure.
This is for when mysql_ping() doesn't work for your situation of course.
===============================================================================
Recently, I saw an obscure problem where I could connect to MySQL from the PHP
via Apache and MySQL via the MySQL console, and could not connect via the
PHP-CLI. This was in Windows (XP). I usually use MySQLi extension, but also
tried MySQL, and both refused to work.
I restarted the service multiple times, and the PHP-CLI still would not
connect.
This eventually cleared up.
I made sure to stop the service. Then, I downloaded a zipped binary-package
from dev.mysql.com and started the server a few times from the commandline
(mysqld/mysqld-nt, where mysqld-nt is tuned specifically for Windows) and
stopped it ("mysqladmin shutdown"). I was then able to successfully connect
from the PHP-CLI ("php -r "mysql_connect('localhost', 'root', ''); ").
Making sure it was stopped, I started the regular server from the commandline,
and that was then successful. I then stopped it and started it via the Services
panel, and everything still worked.
I'm assuming that when the service was restarted initially, there was a
component that had died and refused to be shutdown even though the service
appeared to be stopped, but shutting it down via mysqladmin killed everything
entirely.
===============================================================================
If you are trying to open multiple, separate MySQL connections with the same
MySQL user, password, and hostname, you must set $new_link = TRUE to prevent
mysql_connect from using an existing connection.
For example, you are opening two separate connections to two different
databases (but on the same host, and with the same user and password):
$db1 = mysql_connect($dbhost, $dbuser, $dbpass);
$rv = mysql_select_db($dbname1, $db1);
$db2 = mysql_connect($dbhost, $dbuser, $dbpass);
$rv = mysql_select_db($dbname2, $db2);
At this point, both $db1 and $db2 will have selected the database named by
$dbname2.
The workaround is to require that the second MySQL connection is new:
$db1 = mysql_connect($dbhost, $dbuser, $dbpass);
$rv = mysql_select_db($dbname1, $db1);
$db2 = mysql_connect($dbhost, $dbuser, $dbpass, TRUE);
$rv = mysql_select_db($dbname2, $db2);
Now, $db1 should have selected $dbname1, and $db2 should have selected
$dbname2.
This has been documented on the mysql_select_db page as well.
Note: This occurs only when the server, username, and password parameters are
identical for each mysql_connect statement.
===============================================================================
My situation: "I could connect to MySQL from the PHP via Apache and MySQL via
the MySQL console, and could not connect via the PHP"
But, PHP only can connect to MySQL using mysql_connect("localhost", "root",
"password");
"Its selinux not allowing apache to make remote connections"
Solution:
setsebool -P httpd_can_network_connect=1
===============================================================================
Portable connections: If you migrate your source code from one to different
servers and you would like to avoid re-configuration on a new serve, user the
$_SERVER['SERVER_NAME'] flag as:
This makes a conditional connection to mysql database. It automatically chooses
the correct server according to the server name from where your script runs.
Hopefully, you like this portable configuration.
===============================================================================
Just in case you didn't know. You can use mysql_connect in a function to
connect to a database and the connection is a super-global... meaning you can
use mysql_query in other functions or in no function at all and PHP will use
the connection that you opened. This is a handy bit of knowledge that helps if
you have a large site with lots of scripts. If you create one function to
connect to a db, and call that function in all your scripts, it makes for
easier code maintenance since you only have to update one line of code to
change your mysql connection instead of updating all your scripts individually.
===============================================================================
The too many connections issue can be due to several problems.
1. you are using pconnect. This can tie up many connections and is not really
needed for MySQL as new connections are really fast.
2. Apache children are hanging around for too long - combine this with pconnect
and you have recipe for disaster.
 And don't use
pconnect.
===============================================================================
===============================================================================
if between first and second call with same arguments there was another call
with another argument, initial connection link is not reused, but new
connection is created instead, regardless of new_link argument.
for example, here only one single link will be opened and then reused:
and here _three_ separate links will be opened:
so if you wanted to switch between connections just by call to mysql_connect,
and rely on its internal link caching, you can be wasting your database
connections.
===============================================================================
Coderlit and angelo,
this may be the solution:
===============================================================================
If you trying to connect to a remote server, here are a few things that can go
wrong. Perhaps this list will save someone some time:
1. You may need to get in touch with the remote server's tech support:
a. to ensure that you can get through its firewall. It is not necessarily
enough to have your server number listed in the recipient site's cpanel remote
access host list. It depends on how the server company has things set up;
b. to find out what port number they are using for database connections, which
may not be the default used by mysql_connect;
c. If you are using ODBC, the host to which you are trying to connect may or
may not have any ODBC drivers installed; and
d. If you are working from a dynamic IP, they may be set up to accommodate it,
or you may have to use a proxy. See http://forge.mysql.com/wiki/MySQL_Proxy .
2. If you are working from a shared server yourself, the server number you were
sent in the sign-up letter is probably NOT the server number you should be
using to connect to a remote database. You need the server number of the
machine on which your site is sitting, not your virtual account server number
on that machine. You can get this from your own tech support.
I am grateful to Jonathan Jones at Bluehost for this analysis.
===============================================================================
Ever wonder what "default username" is?
\n";
echo "CURRENT USER: ", $row[1], "
\n";
?>
Both are ODBC@localhost in my win2k install, so my advice for windows is:
- create a MySQL user named ODBC with no password
- add localhost to ODBC user [right-click ODBC]
- set schema previleges to ODBC@localhost
- use mysql_connect() with no parms, or do not use ;)
This turns to work also with odbc_connect:
odbc_connect("myDSN", "", "")
===============================================================================
If you are getting MySQL Errors like #2006: MySQL server has gone away, and you
are using mysql_connect() and pcntl_fork() then make shure that you are
reconnecting to the mysql server with each created child which you fork()ed.
I pulled my hair out for many days because i was using the same mysql
connection for each child and was getting that "MySQL server has gone away"
errors.
Here is a simple example:
===============================================================================
I just wanted to share a common wrapper that I use for executing one line SQL
statements. Its an easy wrapper to use that takes care of the connection open/
close. Optionally, the mysql_connect can be replaced with mysql_pconnect for
persistent connections.
function executeQuery( $query, $db, $nocon )
{
if( $nocon != "nocon" )
if( $db != "" ) connect( $db );
else connect( "pascal_crm" );
$result= mysql_query( $query );
$err = mysql_error();
if( $err != "" ) echo "error=$err ";
if( $nocon != "nocon" )
mysql_close();
return $result;
}
Here's a related mysql_pconnect trivia question:
http://www.codesplunk.com/nr/questions/php17.html
===============================================================================
hello,every one.
do use "<IP_ADDRESS>" instead of "localhost" for php5.4-win7 if you feel the
speed is slow.because win7 use ipv6 default.
"localhost" is for ipv4.
===============================================================================
Whenever you open two connections to a single database,
you are likely not to get any error when selecting not existing db.
Pay attention and you may save few hours of debugging.
===============================================================================
After upgrading mysql sever to 5.5.21 from 5.0.9 on centos, my WinXP stopped
being able to connect with host with the error message
'Bad Handshake'.
Eventual solution to problem was to remove MYSQL_CLIENT_SSL from the call to
mysql_connect().
I will also report this as a bug.
===============================================================================
[EDIT by danbrown AT php DOT net: The issue this user is illustrating is a
common problem when dealing with multiple databases from PHP. Note his
comments at the end of the code for an explanation.]
Looks like I learned this the hard way:
===============================================================================
MySQL connection string regexp:
~mysql://([^:@/]*):?([^@/]*)@?([^/]*)/?([^/]*)~
===============================================================================
If you are getting an error "Can't assign requested address" you may have a
problem with the mysql port. I had just moved my server to Mac OS X 10.6 and
mysql_connect was giving this error. Going into the /etc/php.ini file and
setting the default port number to 3306 fixed the problem.
mysql.default_port = 3306
The php.ini file suggests that PHP will select the port by using the
$MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services, but in this case it is
not so. /etc/services on my machine has 3306 listed, but it didn't get picked
up.
This is sort of a bug report, in that the documented feature isn't working.
Please don't delete this until the community decides how to address the
problem. This is one of those hair pulling exercises to get fixed.


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import sdil.models.Address @(name: String, address: Address, checked: Boolean = false)


Man Utd target Erling Haaland admits his "five girlfriends" are behind his success
Norwegian wonderkid Erling Haaland has enjoyed a remarkable rise at Red Bull Salzburg, where he has netted 22 times in just 16 appearances this season
by Jake Polden, https://www.mirror.co.uk/authors/jake-polden/Erling Haaland says his five "girlfriends" are key to his sudden success - but he's not the Lothario this would suggest.
The Norwegian wonderkid was in fact referring to the five footballs he took home for each of his hat-tricks, admitting he even sleeps with them.
Haaland has enjoyed a remarkable rise since bursting onto the scene at Red Bull Salzburg, where he has netted 22 times in just 16 appearances this season.
His performances have caught the eye of top clubs in Europe including Barcelona, Real Madrid and the Premier League's very own Manchester United.
It seems likely that he will join RB Leipzig in the summer unless one of the aforementioned table a bid in the region of £80million.
Haaland has been tight-lipped over his future in recent months, but has spoken out about his love for the game and his pride in netting hat-tricks.
"I sleep with the five balls that I have for each hat-trick I scored. I lie in bed and I feel good with them," Haaland told Dagbladet.
"I look at them every day. They are my girlfriends."
Haaland is becoming an increasing important part of the Norway national team.
On his international aims, he added: "The objective is two victories. If we still can't qualify, winning is important for the FIFA ranking.
"There will also be two important tests in the Nations League play-offs in March."


|
Enter a username and password to send a message as a specific user. Leave the username
blank to send a message without associating it with a user.
The password is optional if you have already sent a message authenticated as that user.
In that case, the password field will be disabled. You may discard a user's authentication
credentials and "logout" by clicking on the "Logout" button.
|
User Accounts
| Username | Password | Admin |
|


Cross-validated linear discriminant calculations determine the optimum number of features. Test and training scores from successive cross-validation steps determine, via a principal components calculation, a low-dimensional global space onto which test scores are projected, in order to plot them. Further functions are included that are intended for didactic use. The package implements, and extends, methods described in J.H. Maindonald and C.J. Burden (2005) <https://journal.austms.org.au/V46/CTAC2004/Main/home.html>.
| Version: | 0.59 |
| Depends: | R (≥ 3.0.0) |
| Imports: | MASS, multtest |
| Suggests: | knitr |
| Published: | 2018-06-15 |
| Author: | John Maindonald |
| Maintainer: | John Maindonald <jhmaindonald at gmail.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| URL: | http://maths-people.anu.edu.au/~johnm/ |
| NeedsCompilation: | no |
| Citation: | hddplot citation info |
| Materials: | README |
| In views: | Multivariate |
| CRAN checks: | hddplot results |
| Reference manual: | hddplot.pdf |
| Vignettes: |
Feature Selection Bias in Classification of High Dimensional Data |
| Package source: | hddplot_0.59.tar.gz |
| Windows binaries: | r-devel: hddplot_0.59.zip, r-release: hddplot_0.59.zip, r-oldrel: hddplot_0.59.zip |
| OS X binaries: | r-release: hddplot_0.59.tgz, r-oldrel: hddplot_0.59.tgz |
| Old sources: | hddplot archive |
Please use the canonical form https://CRAN.R-project.org/package=hddplot to link to this page.


|
Totally Not Mario 2D!
1.0
LCOM 2020/2021 T08G01
|
Functions | |
| int | vbe_get_mode_info_AT_HOME (in_port_t mode, vbe_mode_info_t *vbe_mode) |
| Xpm images with the life graphics. More... | |
| int | draw_pixel (uint16_t x, uint16_t y, uint32_t color, char *mem_ptr) |
| Colours a pixel at certain coordinates in a specified buffer. More... | |
| void | draw_xpm_ (xpm_map_t xpm, uint16_t x, uint16_t y, char *mem_ptr) |
| Draws an xpm map at certain coordinates to a spcified buffer. More... | |
| void | draw_xpm (xpm_map_t xpm, uint16_t x, uint16_t y) |
| Draws an xpm map at certain coordinates to the main buffer. More... | |
| void | draw_to_background (xpm_map_t xpm, uint16_t x, uint16_t y) |
| Draws an xpm map at certain coordinates to the background buffer. More... | |
| void | draw_img (xpm_image_t *img, uint16_t x, uint16_t y) |
| Draws an xpm img at certain coordinates to the main buffer. More... | |
| void | draw_start_menu () |
| Draws start menu to the main buffer. More... | |
| void | draw_pause_menu () |
| Draws pause menu to the main buffer. More... | |
| void | draw_end_menu () |
| Draws end menu to main buffer. More... | |
| void | draw_cursor (uint16_t x, uint16_t y) |
| Draws cursor at certain coordinates to the main buffer. More... | |
| void | load_background () |
| Loads background and menu images to certain buffers. More... | |
| void | background_to_buffer () |
| Loads background to main buffer. More... | |
| void | draw_lives (uint8_t no_lives) |
| Draws the grphics for a given number of lives on screen. More... | |
| void | draw_score (uint8_t score) |
| Draws a given score on the screen. More... | |
| void | draw_time (uint8_t sec, uint8_t min, uint8_t hour) |
| Draws given time on the screen. More... | |
| void | changeBuffer () |
| Loads main buffer to video memory. More... | |
| void | clearScreen () |
| Clears main buffer. More... | |
| #define | VBE_INTERRUPT 0x10 /** @brief VBE INTERUPT ADDRESS */ |
| #define | VBE_CALL 0x4F00 /** @brief VBE CALL SPECIFIER */ |
| #define | VBE_MODE_INFO 0x0001 /** @brief VBE GET INFO FUNCTION */ |
| #define | VBE_SET_MODE 0x0002 /** @brief VBE SET MODE FUNCTION */ |
| #define | VBE_LINEAR 1<<14 /** @brief VBE LINEAR MEMORY ARRANGEMENT */ |
| #define | VBE_SUCCESS_CALL 0x00 /** @brief VBE CALL WAS SUCCESFUL */ |
| #define | VBE_FUNC_SUP 0x4F /** @brief VBE FUNCTION SUPPORTED */ |
| #define | VBE_D_600p 0x115 /** @brief VBE MODE USED */ |
Basic graphics functions used in the game
| #define VBE_CALL 0x4F00 /** @brief VBE CALL SPECIFIER */ |
| #define VBE_D_600p 0x115 /** @brief VBE MODE USED */ |
| #define VBE_FUNC_SUP 0x4F /** @brief VBE FUNCTION SUPPORTED */ |
| #define VBE_INTERRUPT 0x10 /** @brief VBE INTERUPT ADDRESS */ |
| #define VBE_LINEAR 1<<14 /** @brief VBE LINEAR MEMORY ARRANGEMENT */ |
| #define VBE_MODE_INFO 0x0001 /** @brief VBE GET INFO FUNCTION */ |
| #define VBE_SET_MODE 0x0002 /** @brief VBE SET MODE FUNCTION */ |
| #define VBE_SUCCESS_CALL 0x00 /** @brief VBE CALL WAS SUCCESFUL */ |
| void background_to_buffer | ( | ) |
Loads background to main buffer.
| void changeBuffer | ( | ) |
Loads main buffer to video memory.
| void clearScreen | ( | ) |
Clears main buffer.
| void draw_cursor | ( | uint16_t | x, |
| uint16_t | y | ||
| ) |
Draws cursor at certain coordinates to the main buffer.
| void draw_end_menu | ( | ) |
Draws end menu to main buffer.
| void draw_img | ( | xpm_image_t * | img, |
| uint16_t | x, | ||
| uint16_t | y | ||
| ) |
Draws an xpm img at certain coordinates to the main buffer.
| x | x coordinate of the top-lef-most pixel of the the image in the buffer |
| y | y coordinate of the top-lef-most pixel of the the image in the buffer |
| void draw_lives | ( | uint8_t | no_lives | ) |
Draws the grphics for a given number of lives on screen.
| no_lives | number of lives |
| void draw_pause_menu | ( | ) |
Draws pause menu to the main buffer.
| int draw_pixel | ( | uint16_t | x, |
| uint16_t | y, | ||
| uint32_t | color, | ||
| char * | mem_ptr | ||
| ) |
Colours a pixel at certain coordinates in a specified buffer.
| x | x coordinate of the pixel |
| y | y coordinate of the pixel |
| colour | colour info of the pixel |
| mem_ptr | pointer to start of the the buffer to be drawn to |
| void draw_score | ( | uint8_t | score | ) |
Draws a given score on the screen.
| score | score to be drawn |
| void draw_start_menu | ( | ) |
Draws start menu to the main buffer.
| void draw_time | ( | uint8_t | sec, |
| uint8_t | min, | ||
| uint8_t | hour | ||
| ) |
Draws given time on the screen.
| sec | Seconds value |
| min | Minutes value |
| hour | Hours value |
| void draw_to_background | ( | xpm_map_t | xpm, |
| uint16_t | x, | ||
| uint16_t | y | ||
| ) |
Draws an xpm map at certain coordinates to the background buffer.
| x | x coordinate of the top-lef-most pixel of the the image in the buffer |
| y | y coordinate of the top-lef-most pixel of the the image in the buffer |
| void draw_xpm | ( | xpm_map_t | xpm, |
| uint16_t | x, | ||
| uint16_t | y | ||
| ) |
Draws an xpm map at certain coordinates to the main buffer.
| x | x coordinate of the top-lef-most pixel of the the image in the buffer |
| y | y coordinate of the top-lef-most pixel of the the image in the buffer |
| void draw_xpm_ | ( | xpm_map_t | xpm, |
| uint16_t | x, | ||
| uint16_t | y, | ||
| char * | mem_ptr | ||
| ) |
Draws an xpm map at certain coordinates to a spcified buffer.
| xpm | xpm to be drawn |
| x | x coordinate of the top-lef-most pixel of the the image in the buffer |
| y | y coordinate of the top-lef-most pixel of the the image in the buffer |
| mem_ptr | pointer to start of the the buffer to be drawn to |
| void load_background | ( | ) |
Loads background and menu images to certain buffers.
| int vbe_get_mode_info_AT_HOME | ( | in_port_t | mode, |
| vbe_mode_info_t * | vbe_mode | ||
| ) |
Xpm images with the life graphics.
Our own vbe_get_mode_info()


To build, install Python 3 and V8, then run:
../js.metaret/jsm_build.py jsm_dev/example_development.jsm
This reads jsm_dev/example_development.jsm
:
metafun gcd( self, a, b )
{
if (a > b)
metaret self, a-b, b;
if (b > a)
metaret self, b-a, a;
return a;
}
...and transforms it into 100% standard JS: jsm_out_build/example_development.js
...and then minifies:
jsm_out_mini/example_development.js
GCD(910,1235)=
Since we now have 100% standard JavaScript, metaret_standalone.js
is not needed anymore.
See also example_development.html and the main article.


{{site.user_description}}
These languages and techniques are but a selection of the skills I have picked up during my education and short time in the industry
"A man is only as good as his tools." ~ Emmert Wolf


Fortress Web is a web application that interface with Fortress and a
directory server like OpenLDAP or ApacheDS.
What technologies are in use?
Fortress Web was built using established Open Source technologies including
Apache Wicket (Web UI framework), Spring
Framework (glue), Maven (dependencies)
and runs inside any reasonably compliant Java Servlets container.
Access control decisions are enforced using Fortress Realm which itself
uses declarative Java EE Security and Spring Security policy hooks that are wired to
connect back to the Fortress
Core RBAC component.
Fine-grained access control decisions are enforced using Fortress ARBAC delegated
access management.
Commander server-side is a Java Web
program artifact and is wholly dependent on Fortress
but also needs a V3 compliant LDAP
server like OpenLDAP. For more information on installing and setting up OpenLDAP check out
Fortress ApacheDS Quickstart
What can Fortress Web do?
Contained within this application are Web pages to perform ANSI RBAC administration along with IETF password policies
and viewing the security audit trail and history of changes.
What are the conditions of use?
This software development kit is open source, thus free to use and distribute via the Apache License, Version 2.0.
It was developed and tested on open systems like Ubuntu and Centos and was helped along
by the following open source products:
- The OpenLDAP Project
- The Apache Software Foundation
- The Eigenbase Project
- Ehcache


| Dear{name}, |
| Thank you for verifying your details. This mail confirms your bulk purchasing. |
| Discount Coupons |
| Your Coupons Details are Coupon Code is {couponCode} Start Date {startDate} End Date {endDate} |
| For any queries, complaints or suggestions, please email us at<EMAIL_ADDRESS>or call<PHONE_NUMBER> and 0124-4309570/71/72, between 9:30 AM - 7:30 PM. |
| Thanks |
| Milagrow Human Tech www.milagrowhumantech.com |


--- layout: post title: ! '[Objective-C] Singletons' categories: - Objective-C tags: - objC - Objective-C - singleton status: publish type: post published: true meta: aktt_notify_twitter: 'yes' _edit_last: '1' dsq_thread_id: '274549185' aktt_tweeted: '1' --- Some days ago i'm read at @CocoaSamurai blog a post intitled "Singletons: You're doing them wrong" Ok, but what is Singleton and for whats is needed?
A singleton class returns the same instance no matter how many times an application requests it. A typical class permits callers to create as many instances of the class as they want, whereas with a singleton class, there can be only one instance of the class per process. A singleton object provides a global point of access to the resources of its class. Singletons are used in situations where this single point of control is desirable, such as with classes that offer some general service or resource. DevPedia-CocoaCoreCode sample MyClass.h
#import
@interface MyClass : NSObject {
}
+(MyClass*)sharedInstance;
-(void)sharedMethod;
@end
MyClass.m
@implementation MyClass
static MyClass* _sharedInstance = nil;
+(MyClass*)sharedInstance
{
@synchronized([MyClass class])
{
if (!_sharedInstance)
[[self alloc] init];
return _sharedInstance;
}
return nil;
}
-(void)sharedMethod {
NSLog(@"Hello i'm a singleton class");
}
@end
To call you need only
[[MyCllass sharedInstance] sharedMethod];
When do you use a Singleton class it is created only a one instance the first time it is requested and thereafter ensures that no other instance can be created. And is not possible to you calling copy, release or retain in a instance of singleton class.
I recommend to read a @CocoaSamurai blog post about use of singletons "Singletons: You're doing them wrong"
See ya


PopularTorrentBot Documentation¶
PopularTorrentBot is a simple telegram bot that tells you which are the most popular torrents for a given date. It will give you information on a series of categories of torrents. These are:
- movies
- TV-series
- software
- ebooks
- music
- games
- all
This bot was created as the final project for the course of Introduction to Service Design and Engineering course at UNITN.
If the category is either movie or TV-series then the bot will also fetch the relevant information from IMBD (by using the excelent OMDb API service), and shows it to you.
As mentioned above, OMDb API is used to fetch movie/tv-series information. For the torrent information we use the torrentapi service. And for saving informaiton we use a mix of a local database in SQLite and Pastebin. In Pastebin we store the bulk of the data and in the database we just store key value pairs, where the key is composed of the date + category, and the value is a pastebin URL. In this way, when we get asked for information on a category for a specific date we can just pull the data from Pastebin.
You can use the bot by adding @ptorrentsbot as a contect in Telegram.
If you want to run everything yourself then you can refer to the instructions here.
Structure of the application¶
The image below shows the structure of the application. The workstation images denote applications developed as part of this project (so the Torrent service, database service, and the telegram bot). The globes denote external services. The direction of the arrows indicate the flow of data.
We can see that the torrent service consumes data fromt the OMDb service and from the torrentapi service, and is in turn consumed by the telegram bot. The database service is consumed by the telegram bot, and the bot can send data to the database service, and this in turn can send data to the Pastebin service. The telegram bot uses the Telegram API to get new events (messages), computes the appropiate response and then once again uses the Telegram API to send said response.
How to access the services¶
The torrent and database services can be accessed at the followng URLs (refer to their respective documentations in the links shown in the following section).
- Database Service: http://tupini07.pythonanywhere.com
- Torrent Service: https://torrent-service-sde.herokuapp.com
Structure of the project¶
This repository contains 3 different projects:
- The database service
- The torrent service
- The telegram bot
These are executed as standalone applications, and can communicate freely between themselves. Documentation for each of these parts can be seen by visiting the following links:
Credits¶
We use python-telegram-bot as the library to create the telegram bot.
We also use a modified version of the rarbgapi library to get data from torrents. The modifications that were made are (possibly a pull request to the project will be done in the future):
- Now it is possible to request multiple categories at once
- Torrent object now also contains IMDB data as well as seeder and leecher information
- New bundle category keys have been created


UK online supermarket Ocado strikes AI deal in Japan
UK online supermarket Ocado is venturing further outside its main market, announcing Friday a deal to provide artificial intelligence (AI) capabilities to Japanese retail giant Aeon.
"We are pleased to announce the signing of an agreement... to develop Aeon's online grocery business in Japan using the Ocado Smart Platform," the British group said in a statement.
Aeon chief executive Motoya Okada referred to Ocado as a "state-of-the-art, exciting and transformative partner" that will align with its own "strategy of accelerating Aeon's digital shift to serve Japan's consumers".
It is Ocado's first partner in Asia, having already expanded into the United States.
Under the Aeon deal, the first warehouse operated largely by robots will serve Japan's Kanto region from 2023, to be followed by further "customer fulfilment centres" in the two years thereafter.
Ocado's share price soared 12 percent to £13.53 in morning trade, topping London's benchmark FTSE 100 index which was down slightly overall.
"Ocado's future relies on growing the Solutions business—where it builds state of the art robotic warehouses that fulfil tens of thousands of online orders a week for its partners," said Sophie Lund-Yates, equity analyst at Hargreaves Lansdown.


BELLATRIX Load Testing Report
Total Execution Time: 00:02:32.7768879
Test Scenarios Execution Times
Test Scenario: Bellatrix.Web.Tests.Controls.AnchorControlTestsChrome.ClickOpensAutomateThePlanetUrl_When_DefaultClickIsSet_Chrome
Average Execution Time:<PHONE_NUMBER>5 seconds
Max Execution Time:<PHONE_NUMBER> seconds
Min Execution Time:<PHONE_NUMBER> seconds
Times Executed: 2
Times Passed: 2
Times Failed: 0
Weight: 1
Failed Assertions: 2
All Assertions: 20


Implements multinomial CDF (P(N1<=n1, ..., Nk<=nk)) and tail probabilities (P(N1>n1, ..., Nk>nk)), as well as probabilities with both constraints (P(l1<N1<=u1, ..., lk<Nk<=uk)). Uses a method suggested by Bruce Levin (1981) <doi:10.1214/aos/1176345593>.
| Version: | 1.0.0 |
| Imports: | fftw |
| Suggests: | testthat |
| Published: | 2018-04-24 |
| Author: | Alexander Davis |
| Maintainer: | Alexander Davis <ajdavis2 at mdanderson.org> |
| License: | AGPL-3 |
| NeedsCompilation: | no |
| Materials: | README |
| In views: | Distributions |
| CRAN checks: | pmultinom results |
| Reference manual: | pmultinom.pdf |
| Vignettes: |
pmultinom |
| Package source: | pmultinom_1.0.0.tar.gz |
| Windows binaries: | r-devel: pmultinom_1.0.0.zip, r-release: pmultinom_1.0.0.zip, r-oldrel: pmultinom_1.0.0.zip |
| OS X binaries: | r-release: pmultinom_1.0.0.tgz, r-oldrel: pmultinom_1.0.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=pmultinom to link to this page.


Gameday 19: Penguins @ Devils
by penguinsslawPenguins @ Devils
Prudential Center | Newark, NJ
7:00PM Eastern | ESPN+ | MGS+ | AT&TSN-PT | NHL.tv
The Penguins cross the river from New York as they take on the New Jersey Devils in a Friday-night divisional matchup.
What many may have circled on their calendar as the first matchup between first overall pick Jack Hughes and first place GOAT Sidney Crosby, it unfortunately won’t live to that billing as the Penguins announced that 87 underwent successful core muscle surgery to repair a sports hernia that has been plaguing him since training camp.
Crosby will miss about 6 weeks, though the recovery time does vary.
It’s Malkin’s turn to lead the team, which traditionally has gone exceedingly well for the Penguins, though Crosby has not had his health issues of old. If the Penguins are to right the ship after falling in overtime to the Rangers on Tuesday night, they are going to need 71 to be fire.
The Penguins finally broke the power play drought, and even without 87, they do face a struggling Jersey PK (and penalty kill) this evening; the Devils are 5th worst in the league a man down, allowing goals on 25.9% of opposition power plays.
Guentzel – Malkin – Rust
Galchenyuk – Bjugstad – Lafferty
Kahun – McCann – Simon
Aston-Reese – Blueger – Tanev
Dumoulin – Marino
Pettersson – Schultz
Johnson – Riikola
Murray
The Devils won the draft lottery in the offseason and did some significant retooling. The first part of this independent clause resulted in Jack Hughes joining the club, the latter brought in PK Subban (trade with Nashville), Wayne Simmonds (signed in free agency), and Nikita Gusev (trade from Vegas).
The shakeups have been well documented but haven’t particularly been translated into success. The Devils have struggled out to a 5-8-4 start, sitting last in the league with just 14 points through 17 games.
Taylor Hall has 15 points to lead the team across those 17 games but just 2 goals, and Hughes didn’t find the score sheet until the 7th game of the season. Since then he’s posted a total of 9 points.
PK Subban has just 5 points so far on the year.
Predictably, the Devils live at the bottom of the scoring chart, notching just 43 total markers on the year – 2nd worst in the league. They also allow the league’s second most goals per game at 3.65. That’s… not a great combination.
Hall – Hughes – Palmieri
Boqvist – Hischier – Bratt
Coleman – Zajac – Gusev
Wood – Zacha – Simmonds
Butcher – Subban
Greene – Severson
Mueller – Tennyson
Blackwood
Exorcise the Devils.
Truckvember charges on.
Go Pens.


--- layout: post status: publish published: true title: Live Blogging from Cubs vs. Cardinals - 9/19 author: display_name: Corey Fineran login: Corey email<EMAIL_ADDRESS>url: '' author_login: Corey author_email<EMAIL_ADDRESS>wordpress_id: 1475 wordpress_url: http://ivyenvy.com/?p=1475 date: '2009-09-19 15:36:57 +0000' date_gmt: '2009-09-19 21:36:57 +0000' categories: - Ivy Envy - The Cubs - Live Blogging tags: [] comments: [] ---
This live-blogging will be done today by Brian, who you may have heard lately on the podcast. He’s at the Cubs vs. Cardinals game in St. Louis and was interested in doing this.
****We had technical difficulties and we are picking this up late***
3:36:27 PM: it looked like scales helped the home run over the wall
3:53:35 PM: cubs need to score some runs dempster is pitching a good game
4:13:22 PM: double plays are killing the cubs
4:25:51 PM: cubs trying to rally in the 9th
4:45:53 PM: cubs lost. they are basically officially out of the playoffs wait till next year folks... go cubbies
***Technology somewhat failed us on this one. Sorry guys. Brian, thanks for trying to let us in on what was going on***


English football's 10 current longest serving managers after Mauricio Pochettino axe
The Tottenham Hotspur boss was sacked earlier this week and replaced by Jose Mourinho, as the Argentinean's reign as the fifth longest-serving boss in England came to a close
Mauricio Pochettino's sacking as Tottenham Hotspur manager wasn't just good news for Spurs incumbent Jose Mourinho.
Because the surprise Tuesday evening departure of the Argentinean also meant that English football's established managerial order was shaken up.
Ex-Southampton manager Pochettino was sitting fifth in the list of durable bosses up and down the four divisions when the axe fell on him, with his five-and-half year stint at Spurs marking him out as the third longest-serving Premier League manager currently in a job.
But his shock departure from North London meant an entry into the top five for Liverpool's Jurgen Klopp, just a few short months after he bested Pochettino to win the Champions League.
Meanwhile, a new top-flight name battled his way into the elite which features some less heralded lower league names.
Here's the new-look top 10 as Mourinho takes his place all the way down at No.91.
10. Chris Wilder (Sheffield United) - 3 years, 6 months, 11 days
9. Mark Cooper (Forest Green Rovers) - 3 years, 6 months, 14 days
8. John McGreal (Colchester United) - 3 years, 6 months, 19 days
7. Lee Johnson (Bristol City) - 3 years, 9 months, 17 days
6. Nigel Clough (Burton Albion) - 3 years, 11 months, 16 days
5. Jurgen Klopp (Liverpool) - 4 years, 1 month, 15 days
4. John Coleman (Accrington Stanley) - 5 years, 2 months, 5 days
3. Sean Dyche (Burnley) - 7 years, 24 days
2. Eddie Howe (Bournemouth) - 7 years, 1 month, 11 days
1. Gareth Ainsworth (Wycombe) - 7 years, 1 month, 30 days


Quadros
Trello
Todo
Create simple kanban
In progress
Create a respo
Done
Think about development idea


You can manually set control of this location using this form. Note that Flagship will maintain location control automatically via the results of recorded battles.
The chosen objective will remain secret until an assault is declared on this location.


There are two modes in which to use RTStim: Static mode and Dynamic mode. Most of you will probably want to use static mode but you should be aware of the capabilities of each mode . Static mode can be used when the experimenter wants to create a fixed sequence of events. Static mode requires no programming by the user and a new Sequnce Builder GUI is avavilable in RTStim 2.0. Dynamic mode is used when the sequence of events is not fixed. The use of dynamic mode requires programming by the user. Please have a look at the RTStim API if you would like to use dynamic mode.The following is a list of the type of events available in RTStim:
Visual Stimuli
Auditory Stimuli
- Displays .bmp images
- Image resolution of 800x600 or 1024x768
- Image depth 8-bit, 16-bit or 24-bit
- BitBlitting (the horizontal and vertical dimensions must be a multiple of 4)
- Synchronization with the vertical retrace
- Short movies
Input/Output
- Playback of .wav files (uses 44.1kHz sampling rate)
- 24-bit depth audio
- Hardware interrupt synchronization with external hardware using the motherboard parallel port.
- Three 8-bit ports for IO on the PCI DIO-24 card Response-pad interface is hardware interrupt driven on the PCI DIO-24 card.
1. Running the Examples
To run the static mode examples run "RTCentralApp" then in the GUI enter:Stimulus Directory: /home/rtstim/rtstim_release_2.0/paradigms/xxxx/where xxxx is a paradigm directory (see Building a Sequence) choosen from the list below. Press the "GO" button to start the sequence of scheduled events. If the application is not found you should verify that the PATH environment variable was set correctly during the installation. This can be checked by doing "which RTCentralApp". If the PATH is set correctly, the absolute path of the RTCentralApp program will be displayed.
User Application: /home/rtstim/rtstim_release_2.0/stim/stimbitblt/: display bitblt images on a specified background images with different positions. demo/: display some full screen images. movie/: display bounch of full screen images with given frame rate, just like playing a movie. sync/: example of sync event. resp/: example of respond event. stereo/: example of playing sound event. If you are having any difficulties getting RTStim to run please send us the RTStim log file (see installation).
2. Building a Sequence
To build a static mode sequence there are to methods: (1) Use the GUI sequence builder or (2) Manually. Regardless of the method used to build a sequence, the first step in building a working sequence is the creation of a paradigm directory. You can name the paradigm directory whatever you like but each paradigm directory must contain the following three files:
- sequence.txt: the list of scheduled events, the event times and event properties (built by Sequence Builder GUI or manually).
- image_list.txt: a list of absolute paths to the .bmp files used by the sequence.
- sound_list.txt: a list of absolute paths to the .wav files used by the sequence.
The sequence.txt file uses a syntax of "label=xxx" where label may designate the event type or some specific parameter associated with that event and xxx designates the value given to that label. For a complete table of events and associated parameter labels follow this link. Please have a look at the sequence.txt files for each of the examples above. This will give you a quick introduction to the proper structure of a sequence file. The Sequence Builder GUI is convenient in that it gives you choices for parameter labels associated with a choosen event type.
3. Running a Sequence
To run your paradigm's sequence file start the "RTCentralApp" then in the appropriate text GUIs enter:Stimulus Directory: /home/rtstim/rtstim_release_2.0/paradigms/xxxx/where xxxx is the paradigm directory for your paradigm. Press the "GO" button to start the sequence of scheduled events. Whe using static mode the User Application is always that given above . When using dynamic mode the User Application will be the user-space program you have created using the RTStim API, and the paradigm directory will contain the image_list.txt and sound_list.txt files but not the sequence.txt file.
User Application: /home/rtstim/rtstim_release_2.0/stim/stim4. RTStim Utilities
sim_sync is a user-space program (located in the Utils/ directory) that will allow you to simulate a synchronization with external hardware. sim_keypad is a user-space program (located in the Utils/ directory) that will allow you to simulate a response pad interaction with RTStim. For appropriate electrical connections between the RTStim machine's PCI DIO-24 port and the parallel port of the Linux machine (usually a laptop) running the simulation programs please refer to the file named "connect". a log file utility for examining any error messages produced as the RTStim module is loaded (see installation).


| RFC 6749 | The OAuth 2.0 Authorization Framework |
| RFC 6750 | The OAuth 2.0 Authorization Framework: Bearer Token Usage |
| RFC 6755 | An IETF URN Sub-Namespace for OAuth |
| RFC 6819 | OAuth 2.0 Threat Model and Security Considerations |
| RFC 7009 | OAuth 2.0 Token Revocation |
| RFC 7519 | JSON Web Token (JWT) |
| RFC 7521 | Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants |
| RFC 7522 | Security Assertion Markup Language (SAML) 2.0 Profile for OAuth 2.0 Client Authentication and Authorization Grants |
| RFC 7523 | JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants |
| RFC 7591 | OAuth 2.0 Dynamic Client Registration Protocol |
| RFC 7592 | OAuth 2.0 Dynamic Client Registration Management Protocol |
| RFC 7662 | OAuth 2.0 Token Introspection |
| RFC 7797 | JSON Web Signature (JWS) Unencoded Payload Option |
| RFC 7636 | Proof Key for Code Exchange by OAuth Public Clients |
| RFC 7800 | Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs) |
| RFC 8176 | Authentication Method Reference Values |
| RFC 8252 | OAuth 2.0 for Native Apps |
| RFC 8414 | OAuth 2.0 Authorization Server Metadata |
| that's 428 A4 pages, and only includes published RFC |
The word should appears in RFC 6749 75 times, may 69 times and optional 27 times.
With very little effort, pretty much anything can be called OAuth 2.0 compliant.
| Flow | Interactive | Use case | |
|---|---|---|---|
| client_credentials | ❌ | machine-to-machine communication | |
| no subject, no refresh_token | |||
| password | ❌ | password brokerage for legacy apps | |
| only for 100% trusted clients - user hands over the password to the client | |||
| implicit | ✅ | public JavaScript clients | |
| no backend involvement, no refresh_token | |||
| authorization_code | ✅ | most common | |
| similar to implicit, but with backend involvement |
OAuth 2.0 is not an authentication protocol and an access token is not proof of authentication.
The advantage to this is that anyone can read the instructions on the Facebook Developers Page and make their website a client.
The disadvantage is that they have no security.
OIDC mandates that discovery endpoint is available at /.well-known/openid-configuration.
It allows clients to retrieve all OpenID provider metadata, such as token / introspection URLs or JSON Web Keys.
JSON Web Tokens (JWT) is an open standard (RFC 7519) method for representing claims securely between two parties.
{
"iat":<PHONE_NUMBER>, // issued at timestamp
"exp":<PHONE_NUMBER>, // expires timestamp
"iss": "https://localhost:44356/openid", // issuer
"aud": "dummy_user_app_client", // audience (maps to CLIENT ID only)
"sub": "d01440edc505489e904878ce9738865a" // subject
}
{
"exp":<PHONE_NUMBER>, // expires timestamp
"iss": "https://localhost:44356/openid", // issuer
"aud": [ // resource APIs that can consume this token
"dev.contacts.api"
],
"client_id": "dummy_user_app_client", // client
"sub": "d01440edc505489e904878ce9738865a", // subject
"email"<EMAIL_ADDRESS>// custom claim
"scope": [ // scopes
"contacts.view",
]
}
Simplest way to add token validation to an ASP.NET Core app is to use IdentityServer4.AccessTokenValidation Nuget package.
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddAuthentication("Bearer").AddIdentityServerAuthentication(o =>
{
o.Authority = "https://my.identityserver.io/openid";
o.SupportedTokens = SupportedTokens.Jwt;
});
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseAuthentication();
app.UseMvc();
}
Simplest way to add token issuing to an ASP.NET Core app is to use IdentityServer4 Nuget package.
public void ConfigureServices(IServiceCollection services)
{
services.AddIdentityServer().
AddClientStore().
AddResourceStore().
AddSigningCredential(LoadCertificate());
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseIdentityServer();
}
Until ASP.NET Core, ASP.NET never shipped with a comprehensive authorization framework.
| Level | Mechanism | Source |
|---|---|---|
| ⛅ Accessing an API endpoint | 🔒 authorization framework | access_token scopes |
| Can you interact with an API in any way? | ||
| 🌤 Role / permission verification | 🔒 authorization framework | profile / policy service |
| Can you invoke a specific operation in the API? For example: send a message. | ||
| ☀ Business workflow rules | 🗂 business logic | custom |
| Can you invoke a specific operation, with specialized conditions in the API? For example: send a message to user X. |
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
services.AddAuthorization(o =>
{
o.AddPolicy("ViewOrders",
p => p.RequireAuthenticatedUser().RequireClaim("scope", "orders.view"));
});
}
[HttpGet("")]
[Authorize("ViewOrders")]
public async Task GetAll()
{
// omited for brevity
}
public class VerifiedRequirement : IAuthorizationRequirement
{
public int OrderLimit { get; set; } = 10000;
}
public class VerifiedCustomerHandler : AuthorizationHandler<VerifiedRequirement, Order>
{
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context,
VerifiedRequirement requirement, Order order)
{
if (order.Total < requirement.OrderLimit || context.User.Claim<bool>("IsVerifiedCustomer"))
{
context.Succeed(requirement);
}
return Task.CompletedTask;
}
}
public async Task<IActionResult> Post(Order orderRequest,
[FromServices]IAuthorizationService authz)
{
var order = ComputeTotalAndMap(orderRequest);
var requirement = new VerifiedRequirement();
var authzResult = await authz.AuthorizeAsync(User, requirement, order);
if (authorizationResult.Succeeded)
{
// process
}
return Forbid();
}


Homomorphic computations in R for privacy-preserving applications. Currently only the Paillier Scheme is implemented.
| Version: | 0.2-1 |
| Imports: | R6, gmp, sodium |
| Suggests: | distcomp, knitr, rmarkdown, survival |
| Published: | 2017-04-28 |
| Author: | Balasubramanian Narasimhan [aut, cre] |
| Maintainer: | Balasubramanian Narasimhan <naras at stat.Stanford.EDU> |
| BugReports: | http://github.com/bnaras/homomorpheR/issues |
| License: | MIT + file LICENSE |
| URL: | http://github.com/bnaras/homomorpheR |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | homomorpheR results |
| Reference manual: | homomorpheR.pdf |
| Vignettes: |
Distributed Stratified Cox Regression using Homomorphic Computation MLE using Homomorphic Computation Introduction to Homomorphic Computation |
| Package source: | homomorpheR_0.2-1.tar.gz |
| Windows binaries: | r-devel: homomorpheR_0.2-1.zip, r-release: homomorpheR_0.2-1.zip, r-oldrel: homomorpheR_0.2-1.zip |
| OS X binaries: | r-release: homomorpheR_0.2-1.tgz, r-oldrel: homomorpheR_0.2-1.tgz |
| Old sources: | homomorpheR archive |
Please use the canonical form https://CRAN.R-project.org/package=homomorpheR to link to this page.


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
R
S
T
U
V
W
Y
C
cameraPreview
- Variable in class pt.com.gmv.lab.implant.ar.
ImplantActivity
A surface where the camera preview is captured.
CameraPreviewHandler
- Interface in
pt.com.gmv.lab.implant.interfaces.camera
An interface to the camera preview mechanism.
CameraPreviewSurface
- Class in
pt.com.gmv.lab.implant.rendering.surfaces
Surface where the preview from the camera is shown.
CameraPreviewSurface(Context)
- Constructor for class pt.com.gmv.lab.implant.rendering.surfaces.
CameraPreviewSurface
Creates a new surface, registering a callback for the surface so we can get hold of the surface creation and destruction.
changeCameraSize(int, int)
- Static method in class pt.com.gmv.lab.implant.jni.
ARToolkitPlus
Changes the resolution of the camera after the camerafile was already loaded
clear()
- Method in class pt.com.gmv.lab.implant.rendering.poi.util.
Matrix
Clears the matrix values
close()
- Method in class pt.com.gmv.lab.implant.ar.marker.
MarkerCameraPreview
Interrupts the CaptureTimer thread, halting image analysis.
close()
- Method in interface pt.com.gmv.lab.implant.interfaces.camera.
CameraPreviewHandler
Closes the camera preview.
Color
- Class in
pt.com.gmv.lab.implant.rendering.marker.wavefront.parts
A class representing a vertex color.
Color(int, int, int, int)
- Constructor for class pt.com.gmv.lab.implant.rendering.marker.wavefront.parts.
Color
Creates a new color with 4 components.
Color(int, int, int)
- Constructor for class pt.com.gmv.lab.implant.rendering.marker.wavefront.parts.
Color
Creates a new color with 4 components.
convertLocationToVector(Location, POI, WorldVector)
- Static method in class pt.com.gmv.lab.implant.readers.model.
POI
Converts a location to a vector.
convertVectorToLocation(WorldVector, Location, Location)
- Static method in class pt.com.gmv.lab.implant.readers.model.
POI
Converts a vector to a Location with latitude and longitude.
copyToBuffer(ShortBuffer)
- Method in class pt.com.gmv.lab.implant.rendering.marker.wavefront.parts.
Face
Copies the various vertex indices, that make a face, to a native buffer.
copyToBuffers(IntBuffer, IntBuffer)
- Method in class pt.com.gmv.lab.implant.rendering.marker.wavefront.parts.
Vertex
Copies vertex and color values to the corresponding native buffers, to be drawn by Open GL ES.
createPOIModels()
- Method in class pt.com.gmv.lab.implant.ar.poi.
POIActivity
Override to create and return a collection of POIModel from the information gathered from various data sources.
cross(WorldVector, WorldVector)
- Method in class pt.com.gmv.lab.implant.rendering.poi.util.
WorldVector
Transforms the vector into the cross vector of two other vectors.
Cube
- Class in
pt.com.gmv.lab.implant.rendering.marker.java.models
A Cube done in Java.
Cube()
- Constructor for class pt.com.gmv.lab.implant.rendering.marker.java.models.
Cube
Creates a new cube.
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
L
M
N
O
P
R
S
T
U
V
W
Y


5 Biggest request from the Fortnite community
by Jimmy RussoFortnite has improved immensely with the release of Fortnite Chapter 2, although there are still some common requests from the community.
Epic made some massive changes to Fortnite Chapter 2 that addressed many of the community’s complaints. They brought the loot pool back to the basics, made chests spawn at a 100% rate, made the storm see-through, nerfed grenades when we asked for it, and generally seem committed to improving their game.
Epic has clearly prioritized polishing Fortnite over adding new content to the game. The player opinion is split on this, but it’s making for one of the best seasons we’ve ever seen.
- Read More: Epic responds to Fortnite Supply Drop bug
That doesn’t mean that Fortnite is perfect, however. Here are five of the most requested changes from the Fortnite community.
Unvault the Patch Notes
This is the biggest request of the Fortnite community right now: unvault the patch notes.
Every video game publication on the internet, including this one, has complained about the lack of patch notes in Fortnite. We don’t need to get into it here. The point is: the community is sick of the lack of communication from Epic.
FoV Slider
This has to be one of the longest-standing requests in Fortnite. Players have been asking for an FoV (field of view) slider since stretched resolution was taken out of Fortnite.
For the console players who never got a chance to stretch their FoV, this slider will give you more vertical visibility and a massive advantage in competitive Fortnite.
Unfortunately, the aesthetic of the game is sacrificed to achieve this. Epic seems to care more about how streamers present their game, in this case.
Console/Controller Optimization
We’ve covered this issue at length in past posts, but Fortnite on a console is a dumpster fire.
Epic needs to fix the console Fortnite experience, especially if they continue with the forced cross-platform system. There are some specific controller issues as well, such as the ability to place a trap, but these are minor when you consider the massive issues with Xbox, Playstation, and Switch.
Land Vehicle
A land vehicle would be the perfect addition to Fortnite Chapter 2. Out of all of the mobility items that Epic could add to Fortnite, a land vehicle makes the most sense.
There are already a ton of EGO vehicles around the map, and it looks like you should be able to drive them. Open these up or give us something new to drive around the map.
Siphon
Siphon was one of the most beloved additions to Fortnite from the most vocal Fortnite players, but Epic removed it soon after it was implemented – citing unhealthy aggression as the reason.
The real reason? Good players were rolling over bad players at a rate that had never been seen before.
Now, though, with skill-based matchmaking and bots, good and bad players are separated. Bad players are getting more wins than ever while above-average players are getting fewer wins than ever.
Everyone can benefit from siphon in Fortnite now that we’re split into different tiers of skill. Skill-based matchmaking probably isn’t going anywhere anytime soon, so adding siphon is a great way to improve the overall experience.
What do you want to see changed in Fortnite? Let us know in the comments.


---
creation_epoch:<PHONE_NUMBER>
lastmod_epoch:<PHONE_NUMBER>
categories: ['Curriculum Vitae']
title: Bio
---
Rodney Beede
M.S. in Computer Science
- University of Colorado at Boulder
- "A Framework for Benevolent Computer Worms" 2012
Security Work
- Black Hat USA - Arsenal - 2023 - Cloud AuthZ Trainer (CAZT)
- BSides San Antonio 2023 - Workshop - Pen-Testing Cloud REST APIs - (materials on GitHub)
- BSides San Antonio 2022 - Workshop - Pen-testing Cloud REST APIs - (materials on GitHub)
- BSides San Antonio 2021 - Presented talk - Common Cloud Vulnerabilities with Walkthroughs
- AWS Certified Security - Specialty certification - May 2021
- CISSP - January 2020
- BSides San Antonio 2020 - Presented talk - Automating Attacks Against Google Home Device Provisioning
- BSides San Antonio 2019 - Presented talk - Real-world attacks against Rackspace. A review of real-world attacks we see every week at Rackspace against us or our customers. Examples include phishing, DDoS amplification, credential brute force attacks, fraud for crypto-mining or spam campaigning. Also some of the vulnerability testing we perform on ourselves (red teaming missions).
- CVE-2019-5630 - Cross-Site Request Forgery (CSRF) vulnerabilities on API endpoints using Flash. Vendor release patch 6.5.69
- CVE-2019-11535 - RE6400 and RE6300 through versions <IP_ADDRESS> allows for remote command execution
- CVE-2019-8346 - XSS in ManageEngine ADSelfService Plus param adscsrf
- CVE-2019-5615 - Rapid7 insightVM (nexpose) also exposes clear-text password for backups and keystore (chased vendor to add clear-text disclosure, original work for admin-hashes by another)
- Slack vulnerability (#496095) where any third party add-on can post to announcements-only channel
- OSCP - March 2019
- "Unattended, Unlocked, Unprotected Terminals - User Security Training with USB Rubber Ducky" - August 21, 2018
- "Making App Password Changes Easier" - August 6, 2018
- BSides San Antonio 2018 - CTF winning team
- "Cloud API Service Accounts and Managing a Jungle of Credentials" - InnoTech Oklahoma; October 5, 2017
- "Single Sign-On Watering Hole" vuln. presentation at BSidesOK 2017
- "Shadow IT In The Cloud" - Oklahoma Retailers InfoSec Forum, 2016
- "Case Study: Seagate's Amazon AWS Cloud Security" – InnoTech & IWS9, 2016
- Discovered CVE-2015-8503 XSS in Tenable SecurityCenter; 2016
- Discovered data disclosure vuln in Google Spreadsheets; 2015
- "Case Study: Seagate's OpenStack Swift Security" – InnoTech 2015; CSA&IAPP 2014
- CSA Certificate of Cloud Security Knowledge (CCSK) - 2014
- Authored chapter "Object Storage" in the OpenStack Security Guide
- Discovered CVE-2013-3627: McAfee Agent v4.6 Denial of Service
- AppSec USA (OWASP) - CTF winning team – 2012 & 2013
- Misc Security Blog Posts
Personal website: https://www.rodneybeede.com/


Cascade Classifiers
What are cascade classifiers ?
If you talk about the word classifier, it means something that can classify, create a boundary, make a distinction about some thing. Like we can classify between sugar and salt, tea and coffe etc. and basically we are classifying the objects into categories. Similiarly, cascade classifiers are used to classify stuff but in terms of images. Let's say an image has a face, so a face cascade classifier can tell us if there is a face or not. Eyes , nose,etc.
Origins
So basically this approach of calssifying things was introduced by Paul Viola and Michael Jones in their paper Rapid Object Detection using a Boosted Cascade of Simple Features. So it is a machine learning based approach where a lot of positive images(images that we want our classifier to classify) and negative images were trained in order to create cascade classifier.
How to make your own cascade classifier ?
You can always make your own cascade classifer.  There should be both positive and negative images.
- You need knowledge of python and basic OpenCV and you're all set .
- Follow these links - link1 and link2
- These articles can give you a pretty good jist about creating your own cascade classifiers if you're curious.
Using cascade classifiers
Cascade calssifiers can be used to detect a lot of features in images or in a love video like faces, facial features, hand recognition and as you can create your own classifiers also, there is no limit to them. With a good amount of training images you can make your own and use them for future. There are also many good classifiers available on the internet as well. You can always download them and use them for your work. To use cascade classifiers all you need is python in your system, OpenCV library and the .xml file. I have also created a jupyter notebook where i have shown how to use these classifiers in your programs.
So you have completed this topic. Congratulations
Hope you learnt something new
Happy Learning!! 📚


Home
Contact
Product
Blog
Gliss starter template
Use this document as a way to quickly start any new kickass project.


Initial
After upgrade
//SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
interface ILib {
function version() external view returns(uint);
}
contract LibV1 is ILib {
uint public override version = 1;
}
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner, "not onwer!");
_;
}
}
contract Proxy is Ownable {
ILib public lib;
constructor(ILib libAddress) public {
lib = libAddress;
}
function upgrade(ILib newLib) public onlyOwner {
lib = newLib;
}
function version() public view returns(uint) {
return lib.version();
}
}
// INSECURE
mapping (address => uint) private userBalances;
function withdrawBalance() public {
uint amountToWithdraw = userBalances[msg.sender];
(bool success, ) = msg.sender.call.value(amountToWithdraw)(""); // At this point, the caller's code is executed, and can call withdrawBalance again
require(success);
userBalances[msg.sender] = 0;
}
// SECURE
mapping (address => uint) private userBalances;
function withdrawBalance() public {
uint amountToWithdraw = userBalances[msg.sender];
userBalances[msg.sender] = 0;
(bool success, ) = msg.sender.call.value(amountToWithdraw)(""); // The user's balance is already 0, so future invocations won't withdraw anything
require(success);
}
// INSECURE
mapping (address => uint) private userBalances;
function transfer(address to, uint amount) {
if (userBalances[msg.sender] >= amount) {
userBalances[to] += amount;
userBalances[msg.sender] -= amount;
}
}
function withdrawBalance() public {
uint amountToWithdraw = userBalances[msg.sender];
(bool success, ) = msg.sender.call.value(amountToWithdraw)(""); // At this point, the caller's code is executed, and can call transfer()
require(success);
userBalances[msg.sender] = 0;
}
// bad
contract auction {
address highestBidder;
uint highestBid;
function bid() payable {
require(msg.value >= highestBid);
if (highestBidder != address(0)) {
(bool success, ) = highestBidder.call.value(highestBid)("");
require(success); // if this call consistently fails, no one else can bid
}
highestBidder = msg.sender;
highestBid = msg.value;
}
}
// good
contract auction {
address highestBidder;
uint highestBid;
mapping(address => uint) refunds;
function bid() payable external {
require(msg.value >= highestBid);
if (highestBidder != address(0)) {
refunds[highestBidder] += highestBid; // record the refund that this user can claim
}
highestBidder = msg.sender;
highestBid = msg.value;
}
function withdrawRefund() external {
uint refund = refunds[msg.sender];
refunds[msg.sender] = 0;
(bool success, ) = msg.sender.call.value(refund)("");
require(success);
}
}
mapping (address => uint256) public balanceOf;
// INSECURE
function transfer(address _to, uint256 _value) {
/* Check if sender has balance */
require(balanceOf[msg.sender] >= _value);
/* Add and subtract new balances */
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
}
// SECURE
function transfer(address _to, uint256 _value) {
/* Check if sender has balance and for overflows */
require(balanceOf[msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]);
/* Add and subtract new balances */
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
}
SafeMath.sol
library
// INSECURE
contract Auction {
address currentLeader;
uint highestBid;
function bid() payable {
require(msg.value > highestBid);
require(currentLeader.send(highestBid)); // Refund the old leader, if it fails then revert
currentLeader = msg.sender;
highestBid = msg.value;
}
}
buyKey()
function (which costs 300,000+ gas).


Resizing the browser dynamically changes the image. Image with the colour tint:
Green is large.
Red is medium.
Blue is small.


Your invitation was sent! Thanks for inviting your friends to join BitGo! You've sent all your invitations. Check out your Activity Feed to see the status of your rewards.
You are about to send:
{{ invitation.amount | bgBitcoinFormat:'name':null:null:null:true }} to {{ invitation.email }}
Message: {{ invitation.message }}


People Keep on learnin' Soldiers Keep on warrin'
World, Keep on turnin' Cause it won't be too long.
Powers Keep on lyin', While your people Keep on dyin'
World, Keep on turnin', Cause it won't be too long.

I'm so glad that I know more than I knew then.
Gonna keep on tryin' till I reach the highest ground.
Teachers, Keep on teachin' Preachers, Keep on preachin',
World, keep on turnin', 'Cause it won't be too long. Oh, no
Lovers, Keep on lovin' While believers Keep on believin'.
Sleepers, Just stop sleepin' 'Cause it won't be too long. Oh, no!

I'm so glad that I know more than I knew then.
Gonna keep on tryin' till I reach the highest ground.


It's important to have a voting plan and I want to help. Type in your address and we'll begin!
Validating Address...
You can vote at:
Voting begins on
Like this application? Me too.


Page Areas:
Content (Accesskey 0)
Navigation (Accesskey 1)
AsTeRICS Help
Navigation:
Content:
Your web browser must have JavaScript enabled in order for this application to display correctly. In case no contents or no menu is displayed, please also try
Firefox
or
Chrome
.


* I would do but having a lil boy has changed my training and my freedom to do what i want. * Work commitments * unable to travel * Time restraint * http://emptyhandway.blogspot.com/2014/12/karate-seminars-value-for-knowledge.html * Not aware of any, no time * Time * We try, again it is difficult with a young family. However we do make a conscious effort with competitions, but the attention is now to seminars. But again, most are a long way to travel * Not aware of any * Used to but time is limited presently * Location * Not at high enough level yet 5th kyu. * Time * Hasn't happened for me yet * Usually distance/cost. * Not high enough grade yet * Never see any advertised near Inverness * Haven't had time yet * I work most weekends * None that i have been able to attend * I would like to, but haven't been able to due to other commitments * Time restrictions * Not had the chance or cost too much. * Time * Club offers many additional guest trainers and events * THIS IS NOT ALLOWED IN OUR GROUP * Fear of not fitting in * Limited training time * Time * No time * Time * I'm too old and tired now, but I used to * Expensive, have other commitments * I do not feel comfortable * Little visibility of courses .. also a lack of time to do it * not enough time * Expensive. * Expensive. * Time restrictions * Would like to. Often run on same day I teach. * Not aware of them * Cost and availability * Confidence * Usually too far away * None near by * Not aware of them * Money and time * Too junior * Time * There are not the seminars locally that there used to be. * Time constraints. * Travel reasons * I'm not really aware of any that I would be able to go to. * Not enough local to area in time ive been doing it * Experience/grade/skill level * Not got the confidence * Would like to but none close * No need, too young * Time/cost * No need, too young * Haven't been invited, also time pressure. Our club would probably welcome it. We took the instructors group to Okinawa to train under Tetsuhiro Hokama Hanshi * Geographical isolation * Not promoted * cant make the extra time * Convenience * Used to but now unless it is someone I really want to train with I don't have the time. * Aiming to attend some soon * Happy with current commitment level * Cost of travel from Northern Ireland


Shorter legend names
- alias() function to specify a custom series name
- aliasByNode(2) to alias by a specific part of your metric path
- aliasByNode(2, -1) you can add multiple segment paths, and use negative index
- groupByNode(2, 'sum') is useful if you have 2 wildcards in your metric path and want to sumSeries and group by
Series as parameter
- Some openfalcon functions allow you to have many series arguments
- Use #[A-Z] to use a openfalcon query as parameter to a function
-
Examples:
- asPercent(#A, #B)
- prod.srv-01.counters.count - asPercent(#A) : percentage of count in comparison with A query
- prod.srv-01.counters.count - sumSeries(#A) : sum count and series A
- divideSeries(#A, #B)
- If a query is added only to be used as a parameter, hide it from the graph with the eye icon
Stacking
- You find the stacking option under Display Styles tab
- When stacking is enabled make sure null point mode is set to 'null as zero'
Templating
- You can use a template variable in place of metric names
- You can use a template variable in place of function parameters
- You enable the templating feature in Dashboard settings / Feature toggles
Max data points
- Every openfalcon request is issued with a maxDataPoints parameter
- Openfalcon uses this parameter to consolidate the real number of values down to this number
- If there are more real values, then by default they will be consolidated using averages
- This could hide real peaks and max values in your series
- You can change how point consolidation is made using the consolidateBy openfalcon function
- Point consolidation will effect series legend values (min,max,total,current)
- If you override maxDataPoint and set a high value performance can be severely effected


GBP/USD keeps the attention on 1.30 – Commerzbank
by Pablo PiovanoCable’s continue its march north with the next target at 1.30 and possibly above, suggested Karen Jones, Team Head FICC Technical Analysis at Commerzbank.
Key Quotes
“GBP/USD continues to square up to the psychological resistance at 1.3000 and the recent high at 1.3013. Directly above here we have the 200 week ma at 1.3116, the 50% retracement of the move down from 2018 at 1.3167, the 5 year downtrend at 1.3185 and the 1.3187 May high and these remain our short term targets, this is TOUGH resistance and we look for the market to fail here. Above here lies 1.3382 the 2019 high”.


Example: Inserting operators between digits so that the result is 10.
1 2 5 5
There are given 4 digits from 1 to 9. The task is to fill in numerical operators (+, −, ×, ÷, √ and !) so that the result of the created expression is 10.
However, the program has more options. It is possible to change the number of entered digits, allowed operations and result. Finding a solution for higher number of digits may take a very long time. If you don't want to find all solutions, but only a limited number, check Find the first X solutions, it'll be faster.
There may be no solution for a given input.


Pryce Yebesi's Portfolio
I'm a sophomore studying computer science and physics at Washington University in St. Louis. What gets me excited is the process of taking napkin sketch ideas all the way to fully fleshed out products. I am intensely passionate about problem solving, ideation, and product. In the future I aim to work developing products that solve pervasive problems. LANGUAGES: Proficiency in Java, JavaScript, C, Matlab, Python, PHP, Linux, and HTML
Chat Room app
Chat room app made with Socket-io and Node Js in JavaScript. Many a long night went into this. One of the most fun projects I have done.
Monopoly
Javascript and CSS Monopoly game board
Pokemon game clone
Pokemon game clone made in Love 2d. I am making it with my younger brother he is very creative and loves art. Working with love has been very interesting it is alot like C as a langauge
Dgit Platform
Me and my friends are trying to start a company Ill add a link later to explain what we are trying to build once I get our website up
Add me on linkedin I love meeting new people check out what I am working on at my github
My photography I love taking pictures of my cats, the food I make, and friends
Hidden Talents
Hidden Talents
I am an amatuer stand up comedian, I love doing open mics when I find the time, I took a stand up comedy class an have been going ever since
I love cooking and I have been cooking ever since I was 9. Recently I made noodles from scratch they were awesome pictures are above.
Click here to get a random message:


Scandio.ajax = {};
Register ajax namespace on scandiojs object
Scandio.ajax = {};
Loads a in requested
specified set of files from CDNs
Example: Scandio.ajax.libs({cdnjs: [{repository: 'bacon.js', version: '0.6.8', file: 'Bacon.min.js'}]})
will be passed to the handler and inject the library as a <scipt />
right after the html’s head-section.
Callback function for each cdn should be defined on the Scandio.cdns-object below.
Scandio.ajax.libs = function(requested) {
Iterate over each cdn holding multiple libs
Scandio.util.each(requested, function(libs, cdn) {
Check if the cdn has a callback otherwise trigger warn-message
if (Scandio.isFunction( Scandio.ajax.cdns[cdn] )) {
Invoke callback and…
Scandio.util.each(libs, function(lib) {
…load the library
Scandio.ajax.script(Scandio.ajax.cdns[cdn](lib.repository, lib.version, lib.file), lib.success || undefined);
});
} else {
Scandio.debug.warn('CDN: ' + cdn + ' not defined in Scandio.ajax.cdns!');
}
});
};
Object containing callback function per cdn invoked by requiring libs
Every callback gets repository, version and file
as parameters
Scandio.ajax.cdns = {
Callback for cdnjs called as in Scandio.libs({cdnjss: [...]})
'cdnjs' : function(repository, version, file) {
return "//cdnjs.cloudflare.com/ajax/libs/"+repository+"/"+version+"/"+file;
}
};
Loads a in requested
specified set of files by folder
Example: Scandio.ajax.plugins({'scandio.js/example/scripts/': ['alert', 'log']});
will load alert and log from their respective folder.
Notes: the extension is ommited and the path is relative to window.location.origin
Scandio.ajax.plugins = function(requested) {
var
url = null,
resultUrls = [];
Each requested
set of scripts
Scandio.util.each(requested, function(scripts, folder) {
As script…
Scandio.util.each(scripts, function(script) {
…and loading it by folder and script-name
url = window.location.origin + '/' + folder + script + '.js';
Scandio.ajax.script(url);
resultUrls.push(url);
});
});
return resultUrls;
};
Loads a set of libs and plugin files based on a condition (the when
key)
E.g.: Calling Scandio.ajax.maybe({when: true, libs:…, plugins:…})
The libs and plugins object literal should be used as in Scandio.ajax.libs
and Scandio.ajax.plugins
Scandio.ajax.maybe = function(requested) {
var
url = null,
resultUrls = [];
Each requested
set of scripts
Scandio.util.each(requested, function(request) {
if (request.when) {
if (Scandio.isObject( request.libs )) { Scandio.ajax.libs(request.libs); }
if (Scandio.isObject( request.plugins )) { Scandio.ajax.plugins(request.plugins); }
}
});
return resultUrls;
};
Helper function responsible for loading js-script-files
Parameters are ´url´ as fully qualified url and an optional success
callback
Scandio.ajax.script = function(url, success) {
Create script element and set its type
var
script = document.createElement("script"),
head = document.head || document.getElementsByTagName('head')[0];
script.type = "text/javascript";
Bind to readyState or register ´onload´ callback
if (script.readyState) {
Callback for IE’s onreadystatechange
(I feel seesick)
script.onreadystatechange = function(){
if (script.readyState == "loaded" || script.readyState == "complete") {
script.onreadystatechange = null;
Invoke callback if passed and type is function
if (Scandio.isFunction(success)) { success(); }
}
};
} else {
Bind onload
callback on script element
script.onload = function(){
Invoke callback if passed and type is function
if (Scandio.isFunction(success)) { success(); }
};
}
Set the url
script.src = url;
Append it to the head
Note: Binding it to body not possible cause it may not be parsed if Scandio.libs
is
called in html’s head-section
head.appendChild(script);
return url;
};


Measuring the Window and Document
This example shows how to measure the size of the window and document.
Window size
Click me to find out
Document size
Click me to find out


-
Drought has 14 communities on the brink of waterlessness
www.latimes.com
Under the blistering Central Valley sun, Filiberta Sanchez and her toddler granddaughter strolled down a Parkwood sidewalk lined with yellow weeds, ...
-
Winter Is (Probably) Coming (Soon) | TechCrunch
techcrunch.com
That's the gist of a recent interview that venture capitalist Bill Gurley gave. His words matter because they cut to the simple fact that too many ...
-
Should We All Take a Bit of Lithium? - NYTimes.com
www.nytimes.com
THE idea of putting a mind-altering drug in the drinking water is the stuff of sci-fi, terrorist plots and totalitarian governments. Considering the ...
-
Coffee Is Killing Your Productivity
www.slate.com
This article originally appeared in Inc. You already know that caffeine is a drug, but really thinking about what that means in terms of ...
-
Hong Kongers’ miserable sex lives are making a baby drought worse
qz.com
Hong Kong's Family Planning Association has just released a new study that highlights what it calls a "prevalence of sexual problems" among Hong Kong ...
-
To keep customers coming back, some Chinese restaurants are lacing noodles ...
qz.com
Forget Colorado, stoners. The real frontier of narcotic edibles is in Shaanxi province, China. A restaurant owner there just confessed to police that ...
-
The markets kind of freaked out this week, and no one knows why
qz.com
No one ever really knows why financial markets do whatever they do. (Though it's possible to have some pretty high-conviction guesses.) But this ...
-
How Facebook and Google are taking over your online identity
qz.com
When Facebook executives meet potential advertisers, their biggest selling point is that the company knows whom it's advertising to. In contrast to ...
-
Discover Magazine: The latest in science and technology news, blogs and ...
discovermagazine.com
From venues to volcanoes, 11 ideas for a uniquely geeky wedding
-
Shellshock: All you need to know about the Bash Bug vulnerability
www.symantec.com
Web servers at risk as new vulnerability potentially affects most versions of Linux and Unix, as well as Mac OS X.
-
Hello world!
www.economist.com
“I CALL this a playground,” says Vinay Patel, gesturing to a score of monitors in the computer lab of Avanti House School in North London: “I tell ...
-
Don’t panic
www.economist.com
“BOOM! Earth’s population could hit 12 billion by 2100”. That was the headline on Wired.com which greeted research by Patrick Gerland and others of ...
-
5 Quirks of the Human Brain Every Marketer Should Understand
blog.hubspot.com
Learn about the cognitive biases that can limit your marketing efforts -- and how to master them.
-
Miss a Payment? Good Luck Moving That Car - NYTimes.com
dealbook.nytimes.com
The thermometer showed a 103.5-degree fever, and her 10-year-old’s asthma was flaring up. Mary Bolender, who lives in Las Vegas, needed to get her ...
-
Why Every Media Website Redesign Looks the Same
mashable.com
The media website you keep seeing again -- and again, and again.
-
India's Mars mission cost less than 'Gravity' movie
money.cnn.com
India's successful mission to Mars is a triumph of low-cost engineering and government efficiency.
-
Apple pulls back faulty iPhone software update
money.cnn.com
Apple withdrew the software update on Wednesday -- shortly after it was released -- following widely-reported issues.
-
Why innovation and start-ups are thriving in ‘flyover country’
www.washingtonpost.com
Silicon Valley doesn't have a monopoly on creating America's future.
-
Apple Fanboys Angry iPhone Costs So Little
humoropedia.com
You may want to pay as little as possible for a smartphone. But some people want to pay as much as possible. It should come as no surprise though. It ...
-
The Perfect Writer
medium.com
Some time ago someone asked me what made for a perfect writer. Here is my list.
-
Supreme Court Justice Ruth Bader Ginsburg: I'm Not Going Anywhere
www.elle.com
"Kagan is on my left, and Sotomayor is on my right. So we look like we're really part of the court and we're here to stay."
-
The ROI of UX: Digital Marketing NOW
digitalmarketingnow.com
User Experience (UX) has gained a lot of press in recent years, but is there any cost justification? Read on to uncover the very real ROI of UX.
-
Digital Business Technologies Dominate Gartner 2014 Emerging Technologies ...
www.forbes.com
By Hung LeHong and Jackie Fenn Gartner, Inc. Imagine this: As you leave for work in the morning, your house automatically turns down the heat and ...
-
Experimental medicine
www.economist.com
TEXAS has a higher share of uninsured citizens than any state in America. Until recently Shane, a 38-year-old from Houston, was one of them. “I just ...
-
Layoffs hit Freedom Communications as it ceases publication of L.A. ...
www.latimes.com
Layoffs hit the Orange County Register on Tuesday after owner Freedom Communications ceased publication of its Los Angeles daily five months after it ...
-
The freedivers who swim with whales
www.bbc.com
A group of researchers who risk their lives to swim side-by-side with sperm whales and humpbacks are hoping to get a unique insight into the animals' ...


--- layout: data_model title: AuthenticationHeaderType this_version: 1.0.1 ---
The IP Authentication Header is used to provide connectionless integrity and data origin authentication for IP datagrams and to provide protection against replays. http://www.ietf.org/rfc/rfc2402.txt
| Field Name | Type | Description |
|---|---|---|
| Next_Header0..1 | IANAAssignedIPNumbersType |
Identifies the type of header immediately following the Authentication header. Uses the same values as the IPv4 Protocol field. |
| Header_Ext_Len0..1 | HexBinaryObjectPropertyType |
An 8-bit field specifying the length of the AH in 32-bit words. |
| Security_Parameters_Index0..1 | HexBinaryObjectPropertyType |
The SPI is an arbitrary 32-bit value that, in combination with the destination IP address and security protocol (AH), uniquely identifies the Security Association for this datagram. The set of SPI values in the range 1 through 255 are reserved by the Internet Assigned Numbers Authority (IANA) for future use. http://www.ietf.org/rfc/rfc2402.txt |
| Sequence_Number0..1 | HexBinaryObjectPropertyType |
This unsigned 32-bit field contains a monotonically increasing counter value (sequence number). |
| Authenication_Data0..1 | HexBinaryObjectPropertyType |
This is a variable-length field that contains the Integrity Check Value (ICV) for this packet. The field must be an integer multiple of 32 bits in length. |


Duration
10 minutes
Goals
This lab covers how to launch an Android system Activity (i.e. an Activity installed with Android and not part of your application). You will start the web browser Activity and pass it the address of the web page you would like it to display. The red line in the image below indicates the part of the app you will be working on here.
Required assets
The provided Resources folder for this part contains a subfolder named Completed with a solution you can use to check your work. This lab is a continuation of the previous one. If you did not complete the previous exercise, you can use the Completed solution from the previous part as starter code for this part.
Challenge
Use the guidelines here to work through the exercise on your own. Alternatively, you can use the step-by-step instructions given below.
- Open AboutActivity.cs.
- Locate the
OnLearnMoreClick
method. - Create an Intent with
ActionView
and anhttp://
Data value to launch the browser. - Call
StartActivity
and pass it the Intent. - Run the app to test your work.
Steps
Below are the step-by-step instructions to implement the exercise.
Launch the web browser
- Open AboutActivity.cs.
-
Locate the
OnLearnMoreClick
method. -
Create an Intent with an Action of
ActionView
. You can pass the symbolic constantIntent.ActionView
to the Intent constructor or create the Intent first and then use theSetAction
method. -
Set the Data of the Intent to a web address such as
http://www.xamarin.com
. The Data in an Android URI so you will need to use theAndroid.Net.Uri.Parse
method to convert a string to a URI. Once you have a URI, use theSetData
method to load it into the Intent. The code is shown below, hidden behind a button. -
Call
StartActivity
and pass it the Intent. - Run the app to test your work. Navigate to the About Activity. Touch the "LEARN MORE" button. Verify the web browser launches and displays the page you specified in the Data.
Summary
In this section, you started an Activity that was not part of your app. This is one of the core strengths of the Android platform since it lets your app take advantage of other Activities installed on the device. This helps you because it means there is less code to write to get your app ready for market. It also helps the user because they get to use their favorite Activities for things like Contacts, Camera, Email, Web etc. instead of the nonstandard versions each app developer might create if they built their own.