|
Name
|
Expression
|
Type requirements
|
Return type
|
|
Range constructor
|
X(i, j)
X a(i, j);
|
i and j are Input Iterators whose value type is convertible
to T [1].
|
X
|
|
Range constructor with bucket count
|
X(i, j, n)
X a(i, j, n);
|
i and j are Input Iterators whose value type is convertible
to T [1].
|
X
|
|
Range constructor with hash function
|
X(i, j, n, h)
X a(i, j, n, h);
|
i and j are Input Iterators whose value type is convertible
to T [1].
|
X
|
|
Range constructor with key equal
|
X(i, j, n, h, k)
X a(i, j, n, h, k);
|
i and j are Input Iterators whose value type is convertible
to T [1].
|
X
|
|
Name
|
Expression
|
Precondition
|
Semantics
|
Postcondition
|
|
Range constructor
|
X(i, j)
X a(i, j);
|
[i,j) is a valid range.
|
Creates an associative container that contains all elements in the range [i,j),
using hasher() as the hash function
and key_equal() as the key equality function.
|
size() is equal to the distance from i to j.
The bucket count is an unspecified default value. The hash
function is hasher(), and the key equality function is key_equal().
|
|
Range constructor with bucket count
|
X(i, j, n)
X a(i, j, n);
|
[i,j) is a valid range.
|
Creates an associative container that contains all elements
in the range [i,j), using at least n
buckets, and using hasher() as the hash function and key_equal()
as the key equality function.
|
size() is equal to the distance from i to j.
The bucket count is greater than or equal to n. The hash
function is hasher(), and the key equality function is key_equal().
|
|
Range constructor with hash function
|
X(i, j, n, h)
X a(i, j, n, h);
|
[i,j) is a valid range.
|
Creates an associative container that contains all elements
in the range [i,j), using at least n
buckets, and using h as the hash function and key_equal()
as the key equality function.
|
size() is equal to the distance from i to j.
The bucket count is greater than or equal to n. The hash
function is h, and the key equality function is key_equal().
|
|
Range constructor with key equal
|
X(i, j, n, h, k)
X a(i, j, n, h, k);
|
[i,j) is a valid range.
|
Creates an associative container that contains all elements
in the range [i,j), using at least n
buckets, and using h as the hash function and k
as the key equality function.
|
size() is equal to the distance from i to j.
The bucket count is greater than or equal to n. The hash
function is h, and the key equality function is k.
|


We have get
,
total number:
Oops, scrapper doesn't finish yet, url is
Url
Submit
Book Infomation
Title:
Author:
Publisher:
Publication Date:
Language:
Category:
Pages Number:
Format:
isbn:
Weight:
List Price:
Our Price:
Description:


Symbol Index for "Resource Type"
Symbol Index for diagram
"Resource Type"
Activity Qualifier Type (Class)
Activity Type (Class)
classifier (Association)
classifier (Association)
Contact Method (Class)
DC/Describing (Generalization Node)
Descriptive Category (Class)
Incident Type (Class)
Intention Type (Class)
Level (Class)
Property Qualifier Type (Class)
Reason For Abandoning (Class)
Reason For Rejection (Class)
Reason Not Required (Class)
Resource Held (Class)
Resource Type (Class)
Resource Type For Activity (Class)
State Type (Class)
Subject Characteristic Type (Class)


|
The Access/SQL Server/ASP.Net Users
Group
Wednesday, Feb 21 2001, 5:45 pm
Develop
Client-Server Applications with Access
This
month you'll learn the different methodologies for accessing SQL Server data
through Access, including: linked-tables, local static tables, pass-through
queries, bound and unbound forms, Access Data Projects (ADPs) and more.
Adam Cogan will show you why you shouldn't use QueryDef.Parameters and
a few other tips/warnings.
Don't
forget we want you to bring your questions - write them down so you don't
forget - We guarantee they will be answered.
Last month Adam
presented the SQL Server naming conventions that SSW uses. They were quite
popular and have been placed here for your convenience. Any
feedback welcomed.
SSW's Standard for naming SQL Server Objects
SSW's Standard for naming Stored Procedures
SSW's Standard for formatting Stored Procedures
SSW's Standard for naming Indexes
SSW's Standard for Relationship naming
|


--- layout: post title: 'My MMOG 2005 wishlist: a' date: 2004-12-31 00:00:00 categories: play social ---
My MMOG 2005 wishlist: a lot of these seems to be around separating off communities within MMOGs - letting roleplayers roleplay, ignoring annoying players, voting players off...


Review your visa status and what may be necessary for you to travel to the U.S. well in advance of the conference.
If you need information from the iRODS Consortium to complete your paperwork, email ugmregistration@irods.org.


Please sign in with you Brown email to request an account. If you don't have a brown.edu email, your Brown University sponsor should submit this form.
brown.edu
See our rates


To facilitate an active and thriving entrepreneurial ecosystem on the campus.
To co-create activities focussing on student's active participation in the entrepreneurial ecosystem from various other clubs in the University, which in turn contributes to the vibrant functioning entrepreneurial ecosystem on the campus.
Think big,Start small,Learn fast!
-Eric Ries
The Venture Development Centre (VDC) was launched in collaboration with Northeastern University, Boston, to roll-out its flagship NU-IDEA program in Entrepreneurship. The NU-IDEA program is a tried & tested start-up ecosystem model at Northeastern, which has evolved over the past ten years aiming at making student ideas and ventures market-ready. The NU-IDEA program officially kicked-off on 28th January 2020 at the GITAM Visakhapatnam campus.
The growing significance of entrepreneurship and unprecedented support extended by the Governments for the development of the culture of Entrepreneurship,The E-club under the aegis of Venture Development Centre aims at delivering for students beneficial programs. And with versatile experience of our mentors in the domain of Entrepreneurship, provides for comprehensive insights on how Entrepreneurship influences and shapes the economy and its potential contribution to the economic growth & prosperity of a country.
| Chai-Chats with M. Sri Bharat, President, GITAM(Deemed to be University) February 14 2020 |
| Speaker Series-A brief about LIfe journey, Mr Sai Prasad vishwanathan, Consultant, Deloitte April 17 2020 |
| Speaker Series-Building an Innovation Ecosystem in Academic Institutions, Dr.Unnat Pandit, Program Director, Atal Innovation Mission May 12 2020 |
| Speaker Series-How to Survive and Thrive in the New Economy, MR. RAHUL NARVEKAR, Founder - The India Networks June 4 2020 |
| Speaker Series-Ideation to launch phase of a startup, Mr Avelo Roy, MD,Kolkata Ventures July 22 2020 |
| Workshop-One step towards Entrepreneurship, Dr. Raja Phani Pappu, Director for Research and Development, GITAM July 18 2020 |
| Workshop-Excellence in Excel, Mr Leben, Director of VDC, GITAM September 5 2020 |
| My SOIL-Webinar on Social Engineering-Innovating for Collective Good, Mr Bollem Rajkumar, GITAM Alumni September 12 2020 |
| Bootcamp-Myths about Data Science vs Machine learning, Mr Thammi Reddy, Hod(CSE),GITAM September 26 2020 |
| Chai-Chats with Dr Subrahmanyam, Dean of Sciences, GITAM-Vizag October 5 2020 |
| WISE-Orientation session for GITAM-VCCI Live Project Support(Entrepreneurship through Experiential Learning),Mr Leben, Director of VDC, GITAM November 13 2020 |
| Workshops & Bootcamps-Cyber Security - A Realm, Mr. Shadab Syed, Information Security Specialist October 5 2020 |
| E-Club Orientation January 28 2021 |
| Webinar on Traits of a Successful Entrepreneur by Mr. Ramesh Loganathan January 28 2021 |
| Session/Workshop on Business model canvas February 15 2021 |
| Workshop on Intellectual Property Rights(IPRs) and IP Management for Start-up. February 26 2021 |
| Business Plan/Protoype Competition to Invite Innovative Business Models from Students Date to be revealed soon |
| Workshop on Protoype/Process Design and Development- Prototyping Date to be revealed soon |
| Field/Exposure visit to Incubation Unit/Patent Facilitation Center/Technology Transfer Centre/Co-working spaces Date to be revealed soon |
This functions of E-Club plans and delivers a series of workshops and boot camps with the motive to foster skill-based education and awareness on entrepreneurship amongst the campus community.
This function of E-Club handles all the events of E-Club and VDC, as the success of any event depends largely on its planning and executing by timely obtaining all the necessary resources.
This function of E-Club handles all the designing- both graphic and video stack. Also, they do the photo & video shooting, editing and releasing all the media of those programs or events on the campus by both E-Club & VDC.
This function of E-Club creates an informal setting(s) to meet like-minded people interested in common topics, such as technology, food, education, sports, etc.
This function of E-Club is responsible for everything you read and all the communications you get on the social media or otherwise regarding any events or programs of both the E-Club and VDC.
This function of E-Club aims to achieve the primary goal of any initiative taken by E-Club and VDC by spreading the awareness of those initiatives, tasks and programs.
This function of E-Club plans and executes speaker series events that hold the reputation as a platform where the GITAM fraternity can both gain the knowledge, and as well as get inspired by the life experiences and stories of successful personalities in the field of business i.e entrepreneurs, innovators, business executives, business-men and business-women.
Women Initiated Social Entrepreneurship.
This function of E-Club primarily promotes the idea of entrepreneurship among women, especially in economically backward communities through collective goal-orientation groups, self-help groups, cooperatives, etc by offering all the skills needed through learning and development of these women. This directly impacts the GDP of the country, while delivering some of the greatest microcosmic innovations.
FUture Entrepreneurs and Leaders.
This function of E-Club focuses on the K-12 category of schools and colleges in the surrounding communities. It conducts programs to encourage entrepreneurship as a career choice for the eager young minds of today and the future leaders of tomorrow by promoting innovation and critical thinking concepts.
This function of E-Club is responsible for designing contests to encourage idea building, idea pooling and idea execution amongst the university fraternity and to recognize the innovative thinking and fostering the culture of building successful businesses.
Societal Outreach for Individual Learning. This function of E-Club provides opportunities and encourages students of the university to recognize, develop and work on bringing awareness on innovation and entrepreneurship in the communities around them, collectively with innovative, sustainable and entrepreneurial approaches.
Feel free to contact us in case of any queries


Bridge Base Online ("BBO") is committed to protecting your privacy. This privacy statement applies to the data collected by BBO through the Bridge Base Online web pages and the original BBO program (collectively, the Site); it does not apply to data collected through other online or offline BBO sites, products or services.
We will ask you when we need information that personally identifies you or allows us to contact you.
We will ask you for your username, password, and a valid email address during the registration process.
You need not enter your real name in the registration form or your profile. The public portion of your profile (Name, country, skill level, other information) will be visible to every other member of the site.
If you choose to engage in commerce on our site, we may ask you for your real name, address, telephone number, and credit card details. You can opt to have us remember your name, address, and telephone number and credit card expiration date as a convenience for you. We will not store your credit card number or credit card security code.
From time to time we may request demographic information.
If you choose to play in tournaments sponsored by a National Bridge Organization ( "NBO" -- for example, the ACBL ) we will ask you for your player number in that NBO to allow us to report your results.
We record visitor IP addresses, usernames, and many details of site activity.
We may record all chat, including private chat between usernames.
We record hands played on the site. This information may be made publicly available.
The personal information collected will be used to operate the Site and to provide the service(s) or carry out the transaction(s) you have requested or authorized.
In support of these uses, BBO may use personal information to provide you with more effective customer service, to improve the Site and any related BBO products or services, and to make the Site easier to use by eliminating the need for you to repeatedly enter the same information or by customizing the Site to your particular preference or interests.
We may use your personal information to provide you with important information about the product or service that you are using, including critical updates and notifications
We may use your personal information to provide you with information about products or services you may be interested in.
Personal information collected on the Site may be stored and processed in the United States or any other country in which BBO or its affiliates, subsidiaries or agents maintain facilities, and by using the Site, you consent to any such transfer of information outside of your country.
BBO may disclose personal information if required to do so by law or in the good faith belief that such action is necessary to (a) conform to the edicts of the law or comply with legal process served on BBO or the Site; (b) protect and defend the rights or property of BBO and our family of Web sites; or (c) act in urgent circumstances to protect the personal safety of users of BBO products or members of the public.
BBO may also disclose your personal information to cooperate with our partners in abuse-related investigations. For instance: ACBL requires that BBO report the names of players who have been banned from ACBL games.
Personally identifiable demographic information will not be shared except as specified above. From time to time, we may publish summaries of our demographic data.
Except as otherwise described in this statement, personal information you provide on the Site will not be shared outside of BBO and its controlled subsidiaries and affiliates without your permission.
Please be aware that this privacy statement and any choices you make on the Site will not necessarily apply to personal information you may have provided to BBO in the context of other, separately operated, BBO products or services.
BBO is committed to protecting the security of your personal information. We use a variety of security technologies and procedures to help protect your personal information from unauthorized access, use, or disclosure. For example, we store the personal information you provide on computer servers with limited access that are located in controlled facilities.
Additionally, when we transmit sensitive personal information (such as a credit card number) over the Internet, we protect it through the use of encryption, such as the Secure Socket Layer (SSL) protocol.
The public portion of your profile (Name, email, country, skill level, other information) will be visible to every other member of the site.
Our support staff and some of our yellow volunteers can look up your IP address and, in addition, identify other aliases that you have might have used previously.
Our support staff can look up your entire profile, aliases, purchase history and chatlogs.
Our accounting staff can look up your prior transactions (including your real name, address and phone number, if you supplied this information during commerce)
BBO routinely discards system logs and other records after approximately 100 days. Parts of some logs ( for example: those relating to commerce, technical support, and some account activity ) are kept indefinitely. Usernames can be disabled but not destroyed.
You may request some private data we hold on our servers for you (such as any address, credit card data, real name field) to be wiped clean for you. Email us at<EMAIL_ADDRESS>You may alter information that's displayed to other users by logging into your BBO account and updating your profile.
We sometimes use your local storage ( typically, your hard drive ) to store your preferences (for example: screen size, screen position ). If you choose to have the Site remember your username and password, the Site will encrypt these fields weakly and save them in local storage.
Your chat logs, including your private chat logs, are recorded to local storage in some versions of the Site. You have the ability to direct that these versions of the Site stop recording chat. You also have the ability to erase previously logged chat. Both can be found in the Preferences section of the Site.
Some versions of the Site grant you the ability to automatically save hands that you have either played or viewed. You have the ability to specify that these versions of the Site stop recording hands. This can be specified in the Preferences section of the Site.
We sometimes use cookies on this Site to ensure the integrity of the login/registration process and to personalize the Site. A cookie is a small text file that is placed on your hard disk by a Web page server. Cookies cannot be used to run programs or deliver viruses to your computer. Cookies are uniquely assigned to you, and can only be read by a Web server in the domain that issued the cookie to you.
One of the primary purposes of cookies is to provide a convenience feature to save you time. For example, if you personalize a web page, or navigate within a site, a cookie helps the site to recall your specific information on subsequent visits. This simplifies the process of delivering relevant content, eases site navigation, and so on. When you return to the web site, the information you previously provided can be retrieved, so you can easily use the site's features that you customized.
You have the ability to accept or decline our cookies. Most web browsers automatically accept cookies, but you can usually modify your browser setting to decline cookies if you prefer. If you choose to decline cookies, you may not be able to use interactive features of this or other web sites that depend on cookies.
We work with third-party advertisers to serve targeted ads. These advertisement partners may also be tracking you via their own third-party cookies. These cookies collect information about your browsing habits in order to provide advertising more relevant to you and your interests. These cookies are placed by the advertising networks who may in turn share information with the advertisers.
There are ways to decline/delete cookies within most browsers. You can update your browser settings to modify your browser privacy. ( For example: if you use Google Chrome browser, you can follow the steps listed here to modify your privacy settings.)
You also have choices about the collection of information by these third party advertisers on our website.
If you would like to read more about your option not to accept advertiser cookies, please click here.
If you would like to opt-out of having interest-based ad targeting, please click here.
Due to differences between apps and websites on mobile devices, you may need to take additional steps to disable tracking technologies in mobile apps. Many mobile devices allow you to opt-out of targeted advertising within the Settings area of the device.
We may occasionally update this privacy statement. When we do, we will also revise the last updated date at the top of the privacy statement. For material changes to this privacy statement, we will notify you either by placing a prominent notice on our site or by directly sending you a notification. We encourage you to periodically review this privacy statement to stay informed about how we are helping to protect the personal information we collect. Your continued use of the service constitutes your agreement to this privacy statement and any updates.
BBO welcomes your comments regarding this privacy statement. If you have questions about this statement or believe that we have not adhered to it, please contact us at via email at<EMAIL_ADDRESS>You may also contact us through postal mail at the address provided below and we will use commercially reasonable efforts to promptly determine and remedy the problem.
Bridge Base Online, Ltd.
2805 High Sail Court
Las Vegas, NV
USA 89117


__head__>
Copyright © 2012-2015 Krzysztof Jusiak | Distributed under the Boost Software License, Version 1.0.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectstyle.cayenne.conf.WebApplicationContextFilter
public class WebApplicationContextFilter
WebApplicationContextFilter
is another helper class to help integrate
Cayenne with web applications. The implementation is similar to
org.objectstyle.cayenne.conf.WebApplicationContextProvider
however it
allows for integration with containers that support version 2.3 of the servlet
specification for example Tomcat 4.x. via the usage of filers.
Whenever this filter is processed it attempts bind a DataContext
to the
thread. It retrieves the DataContext
via the
BasicServletConfiguration.getDefaultDataContext()
and binds it to the
thread using DataContext.bindThreadDataContext()
method. If the session
has not been created this filter will also create a new session.
During initialization (init() method) this filter initializes the
BasicServletConfiguration
with the servlet context via the
initializeConfiguration() method
This filter can be installed in the web container as a "filter" as follows:
<filter> <filter-name>WebApplicationContextFilter</filter-name> <filter-class>org.objectstyle.cayenne.conf.WebApplicationContextFilter</filter-class> </filter>Then the mapping needs to be created to direct all or some requests to be processed by the filter as follows:
<filter-mapping> <filter-name>WebApplicationContextFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>The above example the filter would be applied to all the servlets and static content pages in the Web application, because every request URI matches the '/*' URL pattern. The problem with this mapping however is the fact that this filter will run for every request made, whether for images and/or static content and dynamic content request. This maybe detrimental to performance. Hence the mapping url patter should be set accordingly.
| Constructor Summary | |
|---|---|
WebApplicationContextFilter()
|
| Method Summary | |
|---|---|
void |
destroy()
Does nothing. |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Retrieves the DataContext bound to the HttpSession
via BasicServletConfiguration. |
void |
init(javax.servlet.FilterConfig config)
Initializes the BasicServletConfiguration via the
initializeConfiguration() method. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebApplicationContextFilter()
| Method Detail |
|---|
public void destroy()
destroy
in interface javax.servlet.Filter
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
BasicServletConfiguration
via the
initializeConfiguration() method. Also saves the FilterConfing to a private local
variable for possible later access. This method is part of the Filter
interface and is called by the container when the filter is placed into service.
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException
DataContext
bound to the HttpSession
via BasicServletConfiguration.
getDefaultContext()
, and binds it to
the current thread.
doFilter
in interface javax.servlet.Filter
java.io.IOException
javax.servlet.ServletException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


wcsftime
—convert date and time to a formatted wide-character string#include <time.h> #include <wchar.h> size_t wcsftime(wchar_t *s, size_t maxsize, const wchar_t *format, const struct tm *timp);
Description
wcsftime
is equivalent to strftime
, except that:
(The difference in all of the above being wide characters versus regular
characters.)
See strftime
for the details of the format specifiers.
Returns
0
, and the wide-character string starting at s corresponds to just those
parts of *
format that could be completely filled in within the
maxsize limit.
Portability
wcsftime
, but do not specify the contents of
*
s when the formatted string would require more than
maxsize characters. Unrecognized specifiers and fields of
timp
that are out of range cause undefined results. Since some
formats expand to 0 bytes, it is wise to set *
s to a nonzero
value beforehand to distinguish between failure and an empty string.
This implementation does not support s
being NULL, nor overlapping
s
and format
.
wcsftime
requires no supporting OS subroutines.
See Also
strftime


{{ title }}
{% block content %}Welcome, {{ user }}.
You can view your student records and search for subjects using the menu at the right.
{% endblock content %}{% load staticfiles %}
Welcome, {{ user }}.
You can view your student records and search for subjects using the menu at the right.
{% endblock content %}


Easy to Use Editor
Sauti Studio takes the process of coding a USSD site and makes it into a simple flowchart that anyone can edit.
- Create multiple sites with several screens on each
- Deploy your site so that users can access it with a simple text
- Cloud based tool makes saving, loading, and syncing easy


Code on Github


Japanese man who threatened festival over 'comfort woman' statue found guilty
by Elizabeth ShimNov. 14 (UPI) -- A Japanese man who threatened organizers of the Aichi Triennale 2019 art festival was found guilty of a "malicious act" on Thursday.
A court in Nagoya, Japan, found 59-year-old Shuji Hotta guilty of faxing violent threats to organizers of the Japanese art festival, NHK reported Thursday.
Hotta, a former truck driver from Aichi Prefecture, had said in his messages he would bring harm to festival planners for agreeing to display a "comfort woman" statue.
The statue depicts a young Korean girl, an emblem of the victims of Japanese wartime slavery who were raped and assaulted in military brothels during World War II.
Hotta had warned he would bring an end to the exhibit of the statue with a container of gasoline if the organizers did not cancel the installation.
The Aichi Triennale did eventually remove the statue in August, when the festival opened. The festival returned the statue to the site in October.
On Thursday, the Nagoya court said the defendant had engaged in a malicious act that triggered "strong fear" for the recipients of the fax.
Hotta was sentenced to one year and six months in prison, with three years of probation, because of the defendant's "acknowledgement of his crimes and apologies," according to NHK.
The verdict comes a day after a South Korean court held its first hearing regarding a lawsuit filed by former comfort women, Kyodo News reported.
Tokyo has rejected the legitimacy of the suit, according to Japanese paper Sankei Shimbun.
Japanese Chief Cabinet Secretary Yoshihide Suga said Wednesday the "principle of sovereign state immunity" applies to Japan, and any court verdicts from South Korea do not apply to Japan, according to the report.
Suga also said the comfort women issue was resolved when the two countries signed a treaty in 1965.
(0) Leave a comment
upi.com/6958610
Latest Headlines
World News // 1 hour ago
China, Russia declare strategic alliance for 'new era'
Nov. 14 (UPI) -- Chinese President Xi Jinping and Russia's Vladimir Putin expressed solidarity during the BRICS Summit in Brazil this week.
World News // 7 hours ago
Israel, Palestinian Islamic Jihad reach cease-fire
Nov. 14 (UPI) -- Israel and the Palestinian Islamic Jihad reached a cease-fire agreement early Thursday to end two days of fighting that erupted when Israeli forces conducted a predawn attack.
World News // 2 hours ago
North Korea negotiator willing to meet with U.S. 'any place, any time'
Nov. 14 (UPI) -- North Korea's top nuclear negotiator says he is prepared to meet with Stephen Biegun ahead of a Pyongyang deadline for a U.S.-North Korea summit by the end of 2019.
World News // 2 hours ago
South Korea holds grueling 'make-or-break' college entrance exam
SEOUL, Nov. 14 (UPI) -- On Thursday morning, all of South Korea seemed to be focused on one thing: the Collegiate Scholastic Aptitude Test, the high-stakes college entrance exam.
World News // 2 hours ago
Investigators: Calls show Russia involvement before MH17 crash
Nov. 14 (UPI) -- Investigators examining the crash of Malaysia Airlines Flight 17 on Thursday released audio recordings of phone calls between Ukrainian separatists and top Russian officials.
World News // 3 hours ago
American Islamic State fighter held in limbo at Turkish border
Nov. 14 (UPI) -- A captured American citizen believed to be an Islamic State fighter is being held at the Turkey-Greece border but is expected to return to the United States, Turkish officials said.
World News // 4 hours ago
Australia wildfires: Officials raise death toll to 4
Nov. 14 (UPI) -- Four people have now died as a result of numerous Australian wildfires burning around the country, authorities said Thursday.
World News // 9 hours ago
South Korea calls for peaceful solution to Hong Kong protests
Nov. 14 (UPI) -- South Korea's foreign ministry expressed concern Thursday over the intensifying anti-government protests in Hong Kong, calling for a peaceful resolution of the situation.
World News // 9 hours ago
South Korea watchdog urges law against hate speech
SEOUL, Nov. 14 (UPI) -- The National Human Rights Commission of Korea is urging action to tackle prejudice and hate speech as South Korea's population diversifies.
World News // 9 hours ago
Australia's High Court agrees to hear George Pell's appeal
Nov. 14 (UPI) -- Australia's High Court has agreed to hear an appeal from disgraced Cardinal and former papal advisor George Pell who was convicted last year of sexually abusing minors.


@(title: String)(stylesheets: Html)(content: Html)(javascripts : Html) @import com.feth.play.module.pa.views.html._
Jane Doe - Web Developer Member since Nov. 2012


Sprite URL:
Sprite width:
Sprite height:
Sprite padding:
Number of sprites:
Framerate:
Sorry, your browser doesn't support canvas technology.
update
Play
<
0
>
Sprite Sheet Tester v0.02
Created by is-a-cat for
Project Phoenix.
Use it for whatever.
?


Projects 📋
During my personal time and University career, I have undertaken a number of projects that have honed my skills as a developer. Below follows a breakdown of some of those projects, including the learning outcome I extarcted and the skills and tools I gained experience along the way.


{% extends "main/main_base.html" %} {# main/main_base.html extends layout.html #} {% from "common/form_macros.html" import render_card, render_field, render_submit_field, render_card_given_privacy %} {% block content %}
Search for any kind of project. Currently you can get results based on username, first or last name, project titles, project tags, and project descriptions.
#} {# Below is a list of projects related to your search.#} {#
#} {#


|
Search for countries which are bordered by: (separate countries with a comma)
Find countries that border with ANY of the specified countries.
Find countries that border with ALL of the specified countries.
|
Double-click a country to add it to the search list:
|


Google reveals pricing for first Stadia games, Pro subscribers get discounts
by Corbin DavenportGoogle Stadia's pricing model is better than a lot of people expected. There's no required monthly fee for streaming games you already purchased (up to 1080p/60FPS), but there will also be a Stadia Pro membership with better quality and free/discounted games. Now the last piece of the pricing puzzle has been revealed: how much the games will cost.
Google today announced how much each Stadia launch title will cost, and there's not much in the way of suprises. Stadia games will cost around the same amount as their counterparts on modern consoles — with some exceptions. Here's the full breakdown:
Stadia Launch Games Pricing
- Assassin's Creed Odyssey -
$59.99$30.00 Stadia Pro Deal - Gylt - $29.99
- Just Dance 2020 - $49.99
- Kine - $19.99
- Mortal Kombat 11 -
$59.99$41.99 Stadia Pro Deal - Red Dead Redemption 2 - Launch Edition - $59.99
- Samurai Showdown - $59.99
- Thumper - $19.99
- Shadow of the Tomb Raider - $59.99
- Rise of the Tomb Raider - $29.99
- Tomb Raider 2013 -
$19.99$10.00 Stadia Pro Deal - Final Fantasy XV -
$39.99$29.99 Stadia Pro Deal
Special Editions:
- Assassin's Creed Odyssey Stadia Ultimate Edition -
$119.99- $60.00 Stadia Pro Deal - Mortal Kombat 11 Premium Edition -
$89.99$62.99 Stadia Pro Deal - Red Dead Redemption 2 Special Edition - $79.99
- Red Dead Redemption 2 Ultimate Edition - $99.99
It makes perfect sense for Stadia to charge $60 for newer games like RDR2 and Mortal Kombat 11, since those titles are relatively new, but some of the other full-price games haven't been $60 on other platforms in a long time.
One example is Assassin's Creed Odyssey, which is over a year old at this point, and currently goes for around $30 on consoles. Shadow of the Tomb Raider is even older, and the Definitive Edition currently costs $40 on Xbox and PS4. Steam's regular sales have made the PC versions cheaper on many occasions, like Final Fantasy XV for $25.
That being said, Stadia doesn't require a console/PC or a monthly subscription, so the fact that Stadia titles are still priced similarly to their console equivalents is impressive. There's also nothing stopping Google from running sales in the future — perhaps there might be one to coincide with the widespread Stadia release in 2020.


| S | stats toolbox needed | I | interactive (user input required) |
| B | bioinformatics toolbox needed | M | matlab needed (will not work in octave) |
| O | optimization toolbox needed | W | windows needed (will not work in linux) |
| X | currently broken | * | slow (two stars indicates very slow) |
| File Name | Brief Description | Page Number(s) | Tags |
|---|---|---|---|
| bayesTtestDemo | Bayesian T test demo | 157, 158 | |
| betaCredibleInt | Compute beta credible interval | 152 | |
| betaHPD | Plot CI and HPD for beta posterior | 153 | |
| cancerRatesEb | Empirical Bayes Missouri Cancer Example | 163 | |
| cancerRatesMh | Hierarchical Bayesian Estimation of Some Binomial Proportions | 163, 641, 646 | |
| coinsModelSelDemo | Coins Model Selection Demo | 161 | |
| mixBetaDemo | Plot a Mixture of Beta Distributions | 149 | |
| newcombPlugin | Test to see if Newcomb's speed of light data is Gaussian | 151 | |
| postDensityIntervals | Illustration of central vs high posterior density intervals | 153 | |
| shrinkageDemoBaseball | Baseball Batting Average Shrinkage Estimates | 165 |


Go to the source code of this file.
| #define DLL_EXPORT |
| #define XERCES_HAS_CPP_NAMESPACE 1 |
| #define XERCES_LSTRSUPPORT 1 |
| #define XERCES_NEED_XMEMORY_VIRTUAL_DESTRUCTOR |
| #define XERCES_NEW_IOSTREAMS 1 |
| #define XERCES_NO_MATCHING_DELETE_OPERATOR |
| #define XERCES_PLATFORM_EXPORT __declspec(dllexport) |
| #define XERCES_PLATFORM_IMPORT __declspec(dllimport) |
| #define XERCES_S16BIT_INT signed short |
| #define XERCES_S32BIT_INT INT32 |
| #define XERCES_S64BIT_INT INT64 |
| #define XERCES_SIZE_T SIZE_T |
| #define XERCES_SSIZE_T SSIZE_T |
| #define XERCES_STD_NAMESPACE 1 |
| #define XERCES_U16BIT_INT unsigned short |
| #define XERCES_U32BIT_INT UINT32 |
| #define XERCES_U64BIT_INT UINT64 |
| #define XERCES_XMLCH_T wchar_t |
| #define XERCESC_INCLUDE_GUARD_XERCES_AUTOCONFIG_CONFIG_HPP |
| typedef wchar_t XMLCh |
| typedef XMLUInt64 XMLFileLoc |
| typedef XMLUInt64 XMLFilePos |
| typedef signed short XMLInt16 |
| typedef INT32 XMLInt32 |
| typedef INT64 XMLInt64 |
| typedef SIZE_T XMLSize_t |
| typedef SSIZE_T XMLSSize_t |
| typedef unsigned short XMLUInt16 |
| typedef UINT32 XMLUInt32 |
| typedef UINT64 XMLUInt64 |


>
Three facts about me: I like dogs, I used to produce music professionally, and I enjoy gaming as well as making games. I went into Computer Science with the hopes that I would gain enough knowledge to program games on my own or with a company, but then realized what a wide world computer science is and how much I still need to learn. I learned that I liked full stack development, cyber security, and so many other things.
| # | Name of Project | Technologies Used |
|---|---|---|
| 1 | Tic Tack Toe | HTML,CSS,JS |
| 2 | Marvel Trivia | C++, Data Structures, Graphs |
| 3 | Classic MUD RPG GAME | C++, Object Oriented Programming |
| 4 | Wacky Tanks | HTML,CSS,JS,NodeJS, MangoDB,Ajax,Heroku,Github |
| 5 | Rock,Paper,Scissors App | Android Studio, Java, JVM |


General¶
General is an OCaml (4.02.3+) general purpose library. It adds rich functionality to built-in and basic OCaml types.
It’s licensed under the MIT license. It’s available on OPAM, its documentation and its source code are on GitHub.
Questions? Remarks? Bugs? Want to contribute? Open an issue!
Quick start¶
Install from OPAM:
$ opam install General
Launch utop:
$ utop -require General
Open:
open General.Abbr;;
And use:
["a"; "b"; "c"; "d"] |> StrLi.concat ~sep:", "
-: string = "a, b, c, d"


Copyright © 2009 Corrado Santoro, Vincenzo Nicosia
Version: 1.4.0
Authors: Corrado Santoro (santoro [at] dmi [dot] unict [dot] it), Vincenzo Nicosia (vnicosia [at] diit [dot] unict [dot] it).
AMNESIA is structured by means of a layered architecture.
The amnesia module is at the topmost layer and provides the main high-level functions for database access. Then, on the basis of the DBMS chosen for the specific database implemented, the amnesia module contacts the proper amnesia_driver; the latter acts as a bridge between the amnesia layer and the bottom layer (dbms_layer), which provides the real interface to the specific DBMS selected.
The following document describes how to install and use AMNESIA.
Installing AMNESIA is quite simple: unpack the tarball, reach the amnesia-X.Y.Z directory and type:
$ ./configure $ make $ sudo make install
Let us describe how to use AMNESIA by means of an example and let us suppose that we want to implement a database for our sales office; this database has to manage customers, products and orders.
On this basis, we will include in our database the tables customer, product, orders and order_line structured as follows:
|
|
|
|
To this aim, let us write a module sales.erl where we will define everything we need, that is the DMBS type, the connection information, the tables with their fields, field types and references. This module will contain the following preamble:
-module (sales). -include_lib ("amnesia/include/amnesia_db_def.hrl").
Then the following functions must be present:
These functions are exported in the amnesia.hrl include file, so the presence of the proper -export(...) compiler directive is not necessary.
Since we are using MySQL, the driver_info/0 function will be like the following:
driver_info () -> [{driver, mysql_drv}, {host, "localhost"}, {user, "sales_office"}, {password, "sales"}].
Here we have specified that we are using the mysql driver to connect to the MySQL DBMS present in our "localhost", using the user name "sales_office", with password "sales". Note the user has not to be present in the DBMS: it's up to AMNESIA to perform all operations to create the user name, assign the password and grant access to DB tables.
The next function to be defined, tables/0, has to return a list of atoms, each one expressing the name of one of the tables of our database:
tables () -> [customer, product, orders, order_line].
Then we are ready to define the structure of each table; this can be performed by means of function table/1, which takes as argument an atom specifying the table name and returns the table structure, as the listing below shows:
table (customer) -> [ {customer_code, integer, [unique, not_null]}, {name, varchar, not_null}, {address, varchar, not_null}, {email, varchar, [not_null, {default, ""}]} ]; table (product) -> [ {product_code, varchar, [unique, not_null]}, {description, varchar, not_null}, {price, {decimal, 10, 2}, not_null} ]; table (orders) -> [ {order_number, integer, [unique, not_null]}, {order_date, date, not_null}, refers_to (customer) ]; table (order_line) -> [ refers_to (orders), refers_to (product), {quantity, integer, not_null} ].
As the reader can note, a different function clause is used for each table of our database; the table structure is expressed by means of a list of 3-elements tuples, which represent the fields; each element of the tuple has the following meaning:
In the special case in which a table has a reference (a foreign key) to another table, the expression refers_to(TableName) has to be placed in the field list. This instructs AMNESIA to automatically create a foreign key and thus properly link the tables.
After having written the Erlang module specifying the database as the previous Section reports, the next step is to physically create the database in the DBMS and generate a .hrl file which will contain the proper Erlang record definitions for the data to be handled.
To this aim, after compiling the Erlang module (sales.erl in our case), we perform database and include-file generation as follows:
Erlang (BEAM) emulator version 5.5.5 [source] [async-threads:0] [hipe] [kernel-poll:false] Eshell V5.5.5 (abort with ^G) 1> amnesia:db_tool(sales, [{make_hdr, "."}, make_db, {dba_user, "root"}, {dba_password, "yourpassword"}]).
The db_tool/2 function of the amnesia module takes two arguments: an atom specifying the module defining the database (which will also become the name of the database), and a list of options each one having the following meaning:
If nothing went wrong, AMNESIA should have created the sales database in your MySQL with tables customer, product, orders and order_line, as well as the user sales_office, with password sales. This can be verified by means of the MySQL command line client, as it is shown below:
corrado@csanto:~$ mysql -u sales_office -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 8 Server version: 5.0.38-Ubuntu_0ubuntu1.4-log Ubuntu 7.04 distribution Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> use sales; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> describe customer; +---------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | customer_code | int(11) | NO | UNI | | | | name | varchar(255) | NO | | | | | address | varchar(255) | NO | | | | | email | varchar(255) | NO | | | | +---------------+--------------+------+-----+---------+----------------+ 5 rows in set (0.00 sec) mysql> describe order_line; +------------+---------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+---------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | orders_id | int(11) | YES | | NULL | | | product_id | int(11) | YES | | NULL | | | quantity | int(11) | NO | | | | +------------+---------+------+-----+---------+----------------+ 4 rows in set (0.00 sec)
The work performed by AMNESIA can be derived by comparing the structure of the tables created with the definition provided in the sales.erl file. For each table, AMNESIA automatically adds an id field which acts as primary key and is also used to make connections between tables (for example, the orders_id field of table order_line is a foreign key and is linked to the id field of the orders table). This id field is a treated as a "sequence", with respect to the DBMS, or "auto_increment" in the specific case of MySQL.
Together with the creation of the tables, AMNESIA generated the sales.hrl file, containing an Erlang record definition for each table; the fields of each record are exactly the same as the ones of the database tables, as the listing below reports:
-record (customer, { id = null, customer_code = null, name = null, address = null, email = []}). -record (product, { id = null, product_code = null, description = null, price = null}). -record (orders, { id = null, order_number = null, order_date = null, customer = null}). -record (order_line, { id = null, orders = null, product = null, quantity = null}).
Once the database and the include files are generated we are ready to perform data management. To work with the created database, the first step is to open it through the amnesia:open/1 function; then we can use functions add_new, update, delete and fetch to respectively perform data adding, updating, deleting and querying.
To test these functionalities, let's write a simple Erlang module like the following:
-module (sales_test). -include ("sales.hrl"). -export ([populate/0]). populate() -> {ok, Pid} = amnesia:open(sales), %% adding 3 customers {ok, Cust1} = amnesia:add_new (Pid, #customer {customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}), {ok, Cust2} = amnesia:add_new (Pid, #customer {customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}), {ok, Cust3} = amnesia:add_new (Pid, #customer {customer_code = 102391, name = "Dave", address = "Dave's home", email = "dave@zzz"}), %% adding 3 products {ok, P1} = amnesia:add_new (Pid, #product { product_code = "001", description = "CPU Intel", price = 231.10 }), {ok, P2} = amnesia:add_new (Pid, #product { product_code = "002", description = "Compact Flash 4G", price = 57.90 }), {ok, P3} = amnesia:add_new (Pid, #product { product_code = "003", description = "Hard Disk 500G", price = 190.77 }), %% now let's add an order for customer "Cust2" {ok, Order} = amnesia:add_new (Pid, #orders { order_number = 30, order_date = {2008, 7, 17}, customer = Cust2 }), %% ... and these are the order lines amnesia:add_new (Pid, #order_line { orders = Order, product = P2, quantity = 3 }), amnesia:add_new (Pid, #order_line { orders = Order, product = P1, quantity = 10 }), %% finally, let's add a new product and another order using a single function call amnesia:add_new (Pid, [ #product { product_code = "004", description = "Data Server", price = 5200.00 }, #orders { order_number = 31, order_date = {2008, 7, 20}, customer = Cust1}, #order_line { orders = '$2', product = P3, quantity = 2}, #order_line { orders = '$2', product = '$1', quantity = 11 } ]), ok.
Function populate of the listing below shows the various way in which we can perform data adding by means of function amnesia:add_new/2.
First of all, we open the sales database by using the function call amnesia:open(sales). Following this call, AMNESIA contacts the sales.erl module to know the structure of the database and opens the connection with the DBMS.
Then, to perform data adding, we have to simply invoke the function amnesia:add_new/2 providing two parameters: the pid returned by amnesia:open and representing the process handling the database, and the record defining our data, with its field properly assigned. If the insert operation succeeds, the function returns the tuple {ok, Data}; here Data is the same record provided as second parameter, but with the id field properly set. On the other hand, if the insert operation fails, the tuple {error, Reason} will be returned.
The data returned can be directly used when adding records to other tables which have fields referring to it. In our sales database, for example, the "orders" table has a reference to the "customer" table; as a result, the record #orders has the field customer which should be set equal to the id field (primary key) of the referred #customer record. However, instead of manually assigning the id field (and thus having a specific knowledge of "ids"), the programmer can assign the foreign key directly to the complete record: it's up to AMNESIA to extract the "id" and perform data adding correctly. Such a feature is provided to hide the details of "record-linking-by-id" and let the programmer to handle only high-level data.
This is shown in the example when adding an order to the customer with code "394021" (assigned to variable Cust2); the order will contain two lines, the first specifying 3 items of product with code "002" and 10 items of product with code "001". When we pass the #orders record, we set the customer field directly to variable Cust2, and a similar thing is done in adding order lines as for the belonging order and the product(s) specified.
The last add_new call of the example above shows another feature provided by AMNESIA to add information to the database, that is, passing by means of a list of records, the bunch of data that has to be inserted. This feature can be used, for example, to add an order with its lines using a single function call. In this case, to refer to a record of the list, the programmer can use the special atoms '$1', '$2', '$3', ..., to respectively refer to the first, the second, the third, ..., record of the provided list. In the example, we are adding a new product and a new order which contains two products: order lines (third and fourth elements of the list) are linked to the order (second element) by using the '$2' atom, while the second order line refers to the product (first element of the list) by means of the '$1' atom. It is the task of AMNESIA to resolve such internal references and replace '$n' markers with proper data.
Querying table's data can be easily performed by means of function amnesia:fetch, which, in its basic form, requires two parameters: the pid of the AMNESIA process handling the database and the name of the table to be queried. For example, executing the code:
amnesia:fetch(Pid, customer)
the following data will be returned:
{ok,[{customer,1,102341,"John","XXXXX","john@xxx"}, {customer,2,394021,"Corrado","YYYYYY","corrado@yyy"}, {customer,3,102391,"Dave","Dave's home","dave@zzz"}]}
The reply of the fetch function (when this succeeds) is therefore {ok, Data}, where Data is a list of records of the same type of the table specified.
The second form of the fetch function gets an additional parameter specifying a filtering predicate, as in the "WHERE" clause of an SQL "SELECT" statement. This is provided in a tuple {PredicateSpec,ValueList} where PredicateSpec is a string which expresses the predicate in SQL syntax but containing the placemarks $1, $2, etc., for actual data which are passed in the list ValueList. For example, to get the orders of customer with "id = 2", we can use the following example:
8> {ok, [_, Cust2 | _]} = amnesia:fetch (Pid, customer). {ok, ..., #customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}, ...} 9> amnesia:fetch(Pid, orders, {"customer_id = $1", [Cust2#customer.id]}). {ok,[#orders{id = 1,order_number = 30,order_date = {2008,7,17},customer = 2}]}
The PredicateSpec can contain any valid SQL predicate, which can include any "and", "or", "not", "like" connective. Surely the presence of a "piece of SQL code" is, at first sight, a violation of the basic AMNESIA design principle, which aims at hiding any SQL detail to the programmer; however this violation is a price we have to pay to let the DBMS engine to perform the query: allowing a programmer to specify a predicate in the Erlang form (e.g. a "fun") would have implied to transfer the filtering (and query processing) complexity from the SQL/DBMS level to the Erlang/AMNESIA one; this is not the aim of the authors, since they want only to provide a interface to a DBMS, letting the latter to make the proper work of data filtering, query optimization and so on.
The third form of the fetch function takes four parameters: in addition to the filtering predicate, a fourth parameter is a list of options which can be used to specify the ordering criteria (corresponding to the "ORDER BY" SQL clause) and the maximum number of data records to be returned (corresponding to the "LIMIT" SQL clause). The option for the ordering criteria can be specified using one of the following expressions:
In the following two examples, we fetch all customers' data ordering by customer_code in the first example, and by name (descending) and customer_code in the second example. Please note the use of the empty tuple "{}" in the third parameter of fetch to indicate that, in our example, we don't want any filtering.
10> amnesia:fetch(Pid, customer, {}, [{order_by, customer_code}]). {ok,[#customer{id = 1, customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}, #customer{id = 3, customer_code = 102391, name = "Dave", address = "Dave's home", email = "dave@zzz"}, #customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}]} 11> amnesia:fetch(Pid, customer, {}, [{order_by, [{name, desc}, customer_code]}]). {ok,[#customer{id = 1, customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}, #customer{id = 3, customer_code = 102391, name = "Dave", address = "Dave's home", email = "dave@zzz"}, #customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}]}
Instead, the option {limit, N} or {limit, Start, N} can be used to limit the number of records returned. For example, to get the first two (with respect to the customer_code) customers, we can use the following statement:
12> amnesia:fetch(Pid, customer, {}, [{order_by, customer_code}, {limit, 2}]). {ok,[#customer{id = 1, customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}, #customer{id = 3, customer_code = 102391, name = "Dave", address = "Dave's home", email = "dave@zzz"}]}
It's well known that connections between tables are made through primary keys, which, in the case of AMNESIA, are the "ids" of the records. As a result, for example, the #orders record has a customer field which contains the "id" of the referred record of the customer table. This implies that, when retrieving an order, we don't know the complete informations about the customer, unless we perform an "inner join" or query the customer table.
Even if AMNESIA supports joins (inner and outer), an additional way to retrieve connected records and resolve external references is provided through the load_referenced function: by giving a record containing a foreign key, this function is able to resolve the reference and replace the numeric "id", in the field's record, with the complete information related to the connected record. The following example clarifies the working scheme of this functionality: in line 13, we fetch the order with number = 30, storing it into the variable Order, its customer field contains the number 2; then we pass this variable to function load_referenced/2 (line 14) and we obtain the same #orders record but with the customer field properly filled with customer's information.
13> {ok, [Order]} = amnesia:fetch(Pid, orders, {"order_number = 30", []}). {ok,[#orders{id = 1,order_number = 30,order_date = {2008,7,17},customer = 2}]} 14> amnesia:load_referenced(Pid, Order). {ok,#orders{id = 1, order_number = 30, order_date = {2008,7,17}, customer = #customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}}}
The example has shown how to load data from referring table to referred table, but also navigation in the opposite way is possible through function load_referenced, that is, from a referred record to all records of a given table that refer to the first.
As an example, if we want to retrieve all the lines of the order above, we can use the following statement:
15> {ok, OrderLines} = amnesia:load_referenced(Pid, Order, order_line). {ok,[#order_line{id = 1,orders = 1,product = 2,quantity = 3}, #order_line{id = 2,orders = 1,product = 1,quantity = 10}]}
And finally, we can retrieve all the details about the products of the order by iterating over OrderLines and call once again load_referenced/2:
16> lists:map(fun (X) -> {ok, Data} = amnesia:load_referenced(Pid, X), Data end, OrderLines). [#order_line{id = 1, orders = #orders{id = 1, order_number = 30, order_date = {2008,7,17}, customer = 2}, product = #product{id = 2, product_code = "002", description = "Compact Flash 4G", price = 57.9000}, quantity = 3}, #order_line{id = 2, orders = #orders{id = 1, order_number = 30, order_date = {2008,7,17}, customer = 2}, product = #product{id = 1, product_code = "001", description = "CPU Intel", price = 231.100}, quantity = 10}]
To retrieve connected records, together with the mechanism illustrated above, AMNESIA allows programmers to use the classical join operator of the relational algebra. Theta-, equi- and all outer-joins are fully supported, provided that they are also supported by the interfaced DBMS (by means of the proper SQL operators). The following macros, defined in amnesia.hrl, can be used to include joins in a fetch function call:
A join is executed by calling the fetch function and specifying, as the second parameter, a list such as [table_1, join_operator, table_2]. The result won't be a list of records, as in 4.2, but a list in which each element is, in turn, another list of records such as [#record_of_table_1,#record_of_table_2].
As an example, to perform a join between order_line and product tables, the following expression can be used:
-include("amnesia.hrl"). ... {ok, Data} = amnesia:fetch(Pid, [order_line, ?JOIN, product]), ...
As a result, the Data variable will contain the following value(s):
[[#order_line{id = 2,orders = 1,product = 1,quantity = 10}, #product{id = 1, product_code = "001", description = "CPU Intel", price = 231.100}], [#order_line{id = 1,orders = 1,product = 2,quantity = 3}, #product{id = 2, product_code = "002", description = "Compact Flash 4G", price = 57.9000}], [#order_line{id = 3,orders = 2,product = 3,quantity = 2}, #product{id = 3, product_code = "003", description = "Hard Disk 500G", price = 190.770}], [#order_line{id = 4,orders = 2,product = 4,quantity = 11}, #product{id = 4, product_code = "004", description = "Data Server", price = 5200.00}]]
AMNESIA join operators are associative, meaning that we can write the following expression to perform (for example) a join among all tables:
-include("amnesia.hrl"). ... {ok, Data} = amnesia:fetch(Pid, [customer, ?JOIN, orders, ?JOIN, order_line, ?JOIN, product]), ...
In this case, the Data variable will contain the following value(s):
[[#customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}, #orders{id = 1,order_number = 30,order_date = {2008,7,17},customer = 2}, #order_line{id = 1,orders = 1,product = 2,quantity = 3}, #product{id = 2, product_code = "002", description = "Compact Flash 4G", price = 57.9000}], [#customer{id = 2, customer_code = 394021, name = "Corrado", address = "YYYYYY", email = "corrado@yyy"}, #orders{id = 1,order_number = 30,order_date = {2008,7,17},customer = 2}, #order_line{id = 2,orders = 1,product = 1,quantity = 10}, #product{id = 1, product_code = "001", description = "CPU Intel", price = 231.100}], [#customer{id = 1, customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}, #orders{id = 2,order_number = 31,order_date = {2008,7,20},customer = 1}, #order_line{id = 3,orders = 2,product = 3,quantity = 2}, #product{id = 3, product_code = "003", description = "Hard Disk 500G", price = 190.770}], [#customer{id = 1, customer_code = 102341, name = "John", address = "XXXXX", email = "john@xxx"}, #orders{id = 2,order_number = 31,order_date = {2008,7,20},customer = 1}, #order_line{id = 4,orders = 2,product = 4,quantity = 11}, #product{id = 4, product_code = "004", description = "Data Server", price = 5200.00}]]
To update or delete a data item, AMNESIA offers the functions update/2 and delete/2, both receiving the name of the database and a record representing the data item to update or delete. Their usage is thus quite simple: supposing that you have to update the address of customer with code "102341" and that you want to delete the customer with code "394021", you can use the following code.
... {ok, [C1]} = amnesia:fetch (Pid, customer, {"customer_code = $1", [102341]}), {ok, [C2]} = amnesia:fetch (Pid, customer, {"customer_code = $1", [394021]}), NewC1 = C1#customer { address = "new address" }, amnesia:update (Pid, NewC1), %% update customer 1 amnesia:delete (Pid, C2), %% delete customer 2 ...
Selections and joins are not the sole operations usually performed while working with databases, queries that use aggregated functions, such as count(*), max(...), sum(...), avg(...), etc., are also very often present in database applications. AMNESIA also supports aggregated queries by means of special parameters given in the fourth argument (options) of the fetch function.
Basically, we can distinguish three types of aggregated queries in SQL:
To perform such queries with AMNESIA the aggregate option must be given to a fetch function call with the following meaning:
| Option | Meaning | Examples |
| {aggregate, Function, Type} | Performs a query of type 1:
|
{aggregate, "count(*)", integer} {aggregate, "sum(price)", decimal} |
| {aggregate, Function, Type, Grouping} | Performs a query of type 2:
|
{aggregate, "count(*)", integer, customer_code} {aggregate, "sum(price)", decimal, product_code} |
| {aggregate, Function, Type, Grouping, {PredicateSpec, ValueList}} | Performs a query of type 3:
|
{aggregate, "count(*)", integer, customer_code,
{"__aggregated_data__ > 2", []}} {aggregate, "sum(price)", decimal, product_code, {"__aggregated_data__ < $1", [1000.0]}} |
In the following, some examples of aggregated queries are provided, in order to let the reader to understand the correct usage of this feature.
As a first example, let us suppose we want to obtain the number of products present in the database, a query that, in SQL, we write as: "SELECT COUNT(*) FROM PRODUCT". In AMNESIA, instead, we have to call the fetch function as follows:
10> amnesia:fetch(Pid, product, {}, [{aggregate, "count(*)", integer}]). {ok,[4]} 11>
As the example shows, since the result of such a query is a single scalar value, the return data is a list with a single element containing the data.
The second example illustrates how to execute a query of type 2; to this aim, we want to obtain the total amount of each order stored in the database; this is performed by summing the values of quantity * price present in the order_line records of the same order; obviously, we have to join tables product, orders and order_lines. The resulting query is:
{ok, Data} = amnesia:fetch (Pid, [product, ?JOIN, order_line, ?JOIN, orders], {}, [{aggregate, "sum(quantity * price)", decimal, order_number}]),
The value of Data is a list as in a classical multi-join query. Each element is a list containing, as the first element, the scalar value resulting from the aggregated function, and then the data records relevant to each table specified in the multi-join. The result of the query above is thus the following data:
[[2484.7, #product{id = 2,product_code = "002", description = "Compact Flash 4G",price = 57.9}, #order_line{id = 1,orders = 1,product = 2,quantity = 3}, #orders{id = 1,order_number = 30, order_date = {2008,7,17}, customer = 2}], [57581.54, #product{id = 3,product_code = "003", description = "Hard Disk 500G",price = 190.77}, #order_line{id = 3,orders = 2,product = 3,quantity = 2}, #orders{id = 2,order_number = 31, order_date = {2007,7,12}, customer = 1}]]
Obviously, to obtain data according the desired query specification (the total amount for each order) we have to extract only values relevant to the aggregated function and the #orders record, i.e.:
[ [Total, Order] || [Total, _Product, _OrderLine, Order] <- Data]
The fetch function returns the bunch of data relevant to the specified query altogether. Cursors are instead a way to store query results and pick one record (or some records) at time; this is the case, for example, of applications which display all data not in a single page, but in several pages which can be browsed by the user. Cursors, once created from the results of a query, are stored in the AMNESIA engine and a reference ID is provided which can be then used to navigate the cursor and access the data records. Cursors are deleted explicitly by means of the delete_cursor function call, or automatically garbage collected when they are no more used for 30 seconds.
Cursors are created using the create_cursor/2 function provided by AMNESIA, which takes two parameters: the Pid of the AMNESIA process representing your database, and the result of a amnesia:fetch call; here is an example of creating a cursor for the list of ordered customers:
{ok, CursorID} = amnesia:create_cursor (Pid, amnesia:fetch(Pid, customer, {}, [{order_by, customer_code}])).
On success, the create_cursor function returns the tuple {ok, CursorID}, while, in the case of error, the value returned is {error, Reason. The CursorID must be then used in order to retrieve data from the created cursor, by using the following functions:
| Function | Meaning | Return value |
| next(Pid, CursorID) | Returns the next record in the specified cursor | {ok, Record} | {end_of_data} | {error, no_cursor} |
| prev(Pid, CursorID) | Returns the previous record in the specified cursor | {ok, Record} | {end_of_data} | {error, no_cursor} |
| nth(Pid, CursorID, RecordNumber) | Returns the specified record number in the cursor. First record is referred as "1" (not "0") | {ok, Record} | {end_of_data} | {error, no_cursor} |
| first(Pid, CursorID) | Returns the first record in the cursor. | {ok, Record} | {end_of_data} | {error, no_cursor} |
| last(Pid, CursorID) | Returns the last record in the cursor. | {ok, Record} | {end_of_data} | {error, no_cursor} |
| index(Pid, CursorID) | Returns the number of the current record in the cursor. | {ok, RecordNumber} | {end_of_data} | {error, no_cursor} |
| iterate(Pid, CursorID, Fun) | Applies the functor Fun to each record of the cursor. | ok | {error, no_cursor} |
| delete_cursor(Pid, CursorID) | Deletes the specified cursor | ok | {error, no_cursor} |
The screenshot below of the erlang shell show how to use some cursor related functions. Here we are creating a cursor with customer data; then we scan it until the end; then we seek a specific record, given its number; and then we scan the cursor backwards.
26> {ok, Cursor} = amnesia:create_cursor(Pid, amnesia:fetch(Pid, customer)). {ok,1} 27> amnesia:next(Pid, Cursor). {ok,#customer{id = 1,customer_code = 102341,name = "John", address = "XXXXX",email = []}} 28> amnesia:next(Pid, Cursor). {ok,#customer{id = 2,customer_code = 394021, name = "Corrado",address = "YYYYYY",email = "corrado@yyy"}} 29> amnesia:next(Pid, Cursor). {ok,#customer{id = 3,customer_code = 102391,name = "Dave", address = "Dave's home",email = "dave@zzz"}} 30> amnesia:next(Pid, Cursor). {end_of_data} 31> amnesia:nth(Pid, Cursor, 2). {ok,#customer{id = 2,customer_code = 394021, name = "Corrado",address = "YYYYYY",email = "corrado@yyy"}} 32> amnesia:prev(Pid, Cursor). {ok,#customer{id = 1,customer_code = 102341,name = "John", address = "XXXXX",email = []}} 33> amnesia:prev(Pid, Cursor). {end_of_data}
As reported in the example in Sect. 3.1, in table specification field types and additional constraints (uniqueness, etc.) are expressed using special atoms that are interpreted by AMNESIA and translated into proper SQL types/constraints. Moreover, as for structured types such as SQL DATE, DATETIME or TIME, a proper Erlang representation is provided, which, in the majority of cases, conforms to the one provided by Erlang libraries handling such kind of data.
The following table summarizes the correspondence between AMNESIA types, SQL data types and their relevant Erlang representation:
| AMNESIA Type | SQL Type | Erlang Type |
| char | VARCHAR(1) | string() |
| varchar | VARCHAR(255) | string() |
| {varchar, N} | VARCHAR(N) | string() |
| text | TEXT | string() |
| int | INTEGER | integer() |
| integer | INTEGER | integer() |
| boolean bool |
BIT(1) | boolean atom, with 'true' or 'false' values |
| decimal | DECIMAL | float() |
| {decimal, N, M} | DECIMAL (N, M) | float() |
| date | DATE | {Year, Month, Day} |
| Not yet supported | TIME | |
| datetime | DATETIME | {{Year, Month, Day}, {HH, MM, SS}} |
The following table instead provides the correspondence between AMNESIA constraints and SQL ones:
| AMNESIA | SQL |
| not_null | NOT NULL |
| unique | UNIQUE |
| {default, Value} | DEFAULT Value |


Zombie ipsum brains reversus ab cerebellum viral inferno, brein nam rick mend grimes malum cerveau cerebro. De carne cerebro lumbering animata cervello corpora quaeritis. Summus thalamus brains sit, morbo basal ganglia vel maleficia?
Zombie ipsum brains reversus ab cerebellum viral inferno, brein nam rick mend grimes malum cerveau cerebro. De carne cerebro lumbering animata cervello corpora quaeritis. Summus thalamus brains sit, morbo basal ganglia vel maleficia?
In Kazakhstan, the favorite hobbies are disco dancing, archery, rape, and table tennis.
What's up with it, vanilla face? Me and my homie Azamat just parked our slab outside. We're looking for somewhere to post up our black asses for the night. So, uh, bang bang, skeet skeet, nigga. Just a couple of pimps, no hoes.
I had no car, no money, and no Azamat. The only thing keeping me going was my dream of one day holding Pamela in my arms and then making romantic explosion on her stomach.
America national sport is called baseballs. It very similar to our sport, shurik, where we take dogs, shoot them in a field, and then have a party.
I arrived in America's airport with clothings, US dollars, and a jar of gypsy tears to protect me from AIDS.
Bacon ipsum dolor amet pastrami prosciutto sint cupidatat spare ribs capicola strip steak. Ad corned beef strip steak pork loin ham hock. Leberkas lorem fugiat turducken tenderloin ham. Enim ea in, nisi pig kielbasa dolore filet mignon tri-tip fatback quis capicola eiusmod.


Important information
When you register with NHS Test and Trace, you will be legally required to self-isolate. You must not leave home for any reason other than a genuine emergency – for example, to seek medical care or to escape harm. If you do not comply, you may face a penalty of at least £1,000 or prosecution and a fine.
You are advised:
-
not to have visitors in your home, including friends and family – except for essential care
-
to try to avoid contact with anyone you live with as much as possible
-
to order food or medicine online or by phone, or ask friends and family to drop it off at your home
If you do not have symptoms:
-
people you live with do not need to self-isolate
-
people in your support bubble do not need to self-isolate
The app still cannot be used to track you.
{{ checkboxes({
"idPrefix": "agree-isolate",
"name": "agree-isolate",
"fieldset": {
"legend": {
"text": 'Do you understand you will now be legally required to self-isolate?',
"isPageHeading": false,
"classes": 'nhsuk-u-visually-hidden'
}
},
"items": [
{
"value": "true",
"html": "I understand I will now be legally required to self-isolate",
"checked": checked("agree-isolate", "true")
}
]
}) }}


US  Experience
Some US pictures, enjoy it.
"A picture is worth a thousand words "
I lived in the US for about one year and here are some pictures of my journey through this beatiful and fascinating country.


Section 508 Accessibility Information and
Recommendations
The page provides information on Accessibility
functionality on SGI systems. It includes information
on the following topics:
On August 7, 1998, President Clinton signed into law the Rehabilitation Act
Amendments of 1998 which covers access to federally funded programs and
services. The law strengthens section
508 of the Rehabilitation Act and requires access to electronic and
information technology provided by the Federal government. The law applies
to all Federal agencies when they develop, procure, maintain, or use
electronic and information technology. Federal agencies must ensure that
this technology is accessible to employees and members of the public with
disabilities to the extent it does not pose an "undue burden." Section 508
speaks to various means for disseminating information, including computers,
software, and electronic office equipment. It applies to, but is not solely
focused on, Federal pages on the Internet or the World Wide Web. It does not
apply to web pages of private industry.
The Access-Board is responsible for developing accessibility standards for
such technology for incorporation into regulations that govern Federal
procurement practices. The net result will be that
Federal agencies will have to purchase electronic and information technology
that is accessible except where it would cause an "undue burden." The law
also provides a complaint process under which complaints concerning access
to technology will be investigated by the responsible Federal agency. For
more information about Section 508, visit the following website:
http://www.access-board.gov/508.htm
For information on SGI Accessibility, see
the
SGI Accessibility Statement web page
.
SGI recommends that any SGI workstation system that is intended to have
Accessibility functionality should be setup and powered on by a technician
or system engineer knowledgeable of SGI hardware and software. SGI also
recommends the SGI workstation system software is installed with the
following software components: IRIX 6.5.15 or later, AccessX, and any other
needed applications.
For information on updates that have been implemented
in the current release of IRIX,
see the current release notes for desktop_eoe.


OctreeHelper Class
An octree helper.
Constructor
Methods
createLineSegments
(
private
-
octants
Creates octant geometry.
Parameters:
-
octants
Array- The octants.
dispose
()
Destroys this helper.
update
()
Updates the helper geometry.


About the project
This project is from 2012, when I was studying at the Yoobee School of Design (previously Natcoll). T2 is an Australia brand selling teas and tea-related products. Special product packaging and a series of related products are promoted under a sub-brand of T2 called ‘Poker-Tea’.
Poker-Tea is using the element of poker, and other middle ages concepts, to give the product a distinctive style while people are consuming T2 tea. At this point Poker-Tea in New Zealand is trying to take tea into novel roles as not only beverages, but also enjoyable collectables and gifts.
Items
- 4 ranges of poker soldier tea bags box (13 bags)
- 4 range of Loose leaf boxes. (50g per box)
- 4 styles of Poker soldier teabag hanger


[[getButtonTextFromId_(backwardButtonTextId)]]
[[getButtonTextFromId_(cancelButtonTextId)]]
[[getButtonTextFromId_(forwardButtonTextId)]]


Free mine collection code
if(task === "freemines") {
var closestMine = bot.freeMines[0];
for(i = 0; i < bot.freeMines.length; i++) {
if(bot.findDistance(myPos, closestMine) > bot.findDistance(myPos, bot.freeMines[i])) {
closestMine = bot.freeMines[i];
}
}
console.log("Claiming a Free Mine!");
myDir = bot.findPath(myPos, closestMine);
}
What this code is doing is saying
when the task is set to freemines it cycles between the freemines
and sets the closest one to "i" and then after it is done cycling
between them it says "claiming a free mine:" and sets the direction
that my bot is facing in the closest path to the closest free mine
once the turn is over the bot walks 1 step forward and the code runs
again changing direction if nessesary.
______________________
_______________________________________________________________
_____________
Tavern collection code
if(bot.yourBot.life < 50){
task = "tavern";
---------------------------------------------------------------------
else if(task === "tavern") {
var closestTavern = bot.taverns[0];
for(i = 0; i bot.findDistance(myPos, bot.taverns[i])) {
closestTavern = bot.taverns[i];
}
}
console.log("Getting A Tavern");
myDir = bot.findPath(myPos, closestTavern);
}
This code is saying if my bots health is
less then 50 it will set the task to tavern and if there are no more free mines
the tavern task is cycling through all of the taverns in the map and sets
them to "i" if they are closer than the current closest inorder to figure
out which one is the closest to my bots position. After it finds out
which tavern is the closest it says "Getting A Tavern" and find the
best path to the closest tavern and set my bots direction to the
direction it needs to go in order to get to the tavern quickest.
________________________________________________________________
__________________________________
Steal mine from leader code
function checkMostMines()
{
var mostMines = enemyBots[0];
for(i=0; enemyBots.length > i; i++)
{
if ( mostMines.mineCount < enemyBots[i].mineCount)
{
mostMines = enemyBots[i];
}
}
return mostMines.id;
console.log("This bot has most mines: " + mostMines.length)
}
---------------------------------------------------------------------
function takeNearestMine()
{
for(i = 0; bot["bot" + checkMostMines()].mines.length > i; i++)
{
var closestMine = bot["bot" + checkMostMines()].mines[0];
if(bot.findDistance(myPos, bot["bot" + checkMostMines()].mines[i]) < bot.findDistance(myPos, closestMine))
{
closestMine = bot["bot" + checkMostMines()].mines[i];
}
}
---------------------------------------------------------------------
if(bot.yourBot.mineCount < bot["bot" + checkMostMines()].mineCount)
{
task = "steal";
}
---------------------------------------------------------------------
else if (task === "steal")
{
console.log ("Stealing mine from leader");
myDir = bot.findPath(myPos, takeNearestMine());
}
The first part of this code checks the amount of mines
each bot has and does the same thing as before where it sets the lowest to
the variable "i" and says in the console the id of the bot with the most amount
of mines and also sets that bot to the variable "mostMines". After it does this
it finds the closest mine that is owned by the bot with the most mines and
sets that specific mine to "closestMine". Next my code sets the task to steal if
a bot has more mines than my bot insuring that my bot is gaining the most gold
and I can win. after this in my code where there is the else if (task === steal)
this part of my code is coming after the taverns and free mines so it will
prioritize them first but if my bot has >50 health and there are no more free
mines it will go after the leaders mines it also says in console "stealing mine
from leader" and sets the direction to the closest mine owned by the leader.
__________________________________________________________________________
_________________________


public interface MaterialFinder
RenderMaterial
instances used to communicate
quad rendering characteristics to a RenderContext
.
Must be obtained via Renderer.materialFinder()
.
| Modifier and Type | Method and Description |
|---|---|
MaterialFinder |
blendMode(int spriteIndex,
net.minecraft.block.BlockRenderLayer blendMode)
Defines how sprite pixels will be blended with the scene.
|
MaterialFinder |
clear()
Resets this instance to default values.
|
MaterialFinder |
disableAo(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for ambient occlusion unless disabled.
|
MaterialFinder |
disableColorIndex(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for quad color index unless disabled.
|
MaterialFinder |
disableDiffuse(int spriteIndex,
boolean disable)
Vertex color(s) will be modified for diffuse shading unless disabled.
|
MaterialFinder |
emissive(int spriteIndex,
boolean isEmissive)
When true, sprite texture and color will be rendered at full brightness.
|
RenderMaterial |
find()
Returns the standard material encoding all
of the current settings in this finder.
|
MaterialFinder |
spriteDepth(int depth)
Reserved for future use.
|
RenderMaterial find()
Resulting instances can and should be re-used to prevent
needless memory allocation. Renderer
implementations
may or may not cache standard material instances.
MaterialFinder clear()
Renderer.materialFinder()
.MaterialFinder spriteDepth(int depth)
MaterialFinder blendMode(int spriteIndex, net.minecraft.block.BlockRenderLayer blendMode)
CAN be null and is null by default. A null value means the renderer
will use Block.getRenderLayer()
for the associate block, or
BlockRenderLayer.TRANSLUCENT
for item renders. (Normal Minecraft rendering)
MaterialFinder disableColorIndex(int spriteIndex, boolean disable)
MaterialFinder disableDiffuse(int spriteIndex, boolean disable)
MaterialFinder disableAo(int spriteIndex, boolean disable)
MaterialFinder emissive(int spriteIndex, boolean isEmissive)
QuadView.lightmap(int)
will be ignored.
False by defaultThis is the preferred method for emissive lighting effects. Some renderers with advanced lighting models may not use block lightmaps and this method will allow per-sprite emissive lighting in future extensions that support overlay sprites.
Note that color will still be modified by diffuse shading and ambient occlusion,
unless disabled via disableAo(int, boolean)
and disableDiffuse(int, boolean)
.


Blocks vs. Procs vs. Lambdas
Blocks, Procs, and Lambdas Are Closures
In programming, a closure is a scope created by calling some outer function that remains available to any function created within that scope even after the call to the function has returned. Basically, closures are one way to make a local variable available to a higher level scope.
Blocks, Procs, and Lambdas are all closures, but what what are their differences?
Blocks
Blocks are considered a one time use block of code, nothing more than just syntax. The block in the following code is "element * 2":
array.each do | element |
element * 2
end
Procs, Short for Procedures
Procs are blocks BUT, they are blocks created using the Proc class. In other words, Procs are objects of the Proc class and inherit the Proc class methods when they are created. Blocks, being simply syntax and not objects of anything, don't have methods we can call on them. Furthermore, using Procs means we don't have to repeat blocks throughout our code. When we want to use a Proc, we simply refer to it by name. Here's an example of what procs can do:
a_proc = Proc.new { puts "Hi, I'm a proc." }
a_proc.call # prints 'Hi, I'm a proc.'
a_proc.class # returns 'Proc'
da_proc = a_proc # da_proc is now assigned to a_proc, a Proc instance
da_proc # returns a proc object '<Proc:0x000001018594e8@(irb#1):30>'
Another to thing to keep in mind is that Procs are drop-in code snippets. This becomes important when distinguishing it from Lambdas. More on this in the Lambda section below.
Lambdas
Lambas, Another Name For Anonymous Functions
Remember anonymous functions in Javascript? It's ok if you don't. Anonymous functions, in Javascript and other languages like Ruby, are simply functions that have no identifiers variable names. Thus, anonymous functions are also not saved for multiuse. This makes them different from Procs but this doesn't make Lambdas exactly like simple code blocks either.
Lambas Are Like Methods; They Check For # of Arguments
One difference between Procs and Lambdas is that Lambdas, in Ruby, check for the number of arguments; Procs don't.
Lambdas Are Like Methods; They Don't Override The Calling Method's Returns
Remember Procs are just drop-in code snippets. In this sense, Procs are like part of the calling method. So once the Proc returns someting, it is as if the calling method itself returns something, thus exiting the calling method entirely. For example:
def when_to_exit
Proc.new { return "we just returned from the block" }.call
return "we just returned from the calling method"
end
puts when_to_exit #=> "we just returned from the block"
Conversely, ambdas act more like methods because they do not override the calling methods returns. lamdas will let the calling method run its course even after the lambda has returned something. Lamdbas are therefore useful as callback functions.
def when_to_exit
Proc.new { return "we just returned from the block" }.call
return "we just returned from the calling method"
end
puts when_to_exit #=> "we just returned from the calling method"
Practical Summary
Use blocks when you don't need to use the blocks elsewhere in your code.
Use Procs only if you want a resuable block that acts like it's part of the calling method and therefore exits the calling method.
But in most cases, you want your reusable block to act more like a method and return something the calling method can use (i.e. a callback). For these more general purpose cases, use lambda.


--- start: 2020-01-10 18:30 edition: 58 participate: "https://www.eventbrite.com/e/operationalising-responsible-ai-tickets-86896207897" talk: "https://goo.gl/forms/m9aPSXemMLPBj35k1" subheader: "Operationalising Responsible AI" subnote: "We will share our experience of building responsible AI systems with evolutionary architecture that have responsibility built in their core." agenda: - time: "6:30 pm - 7:30 pm" title: "Operationalising Responsible AI" subtitle: "Recent advancements in the area of artificial intelligence and the exponential growth in the technologies supporting this area has led to a proliferation in the number of use-cases of artificial intelligence in various areas ranging from health, retail, travel to humanitarian assistance, drone for social good and space exploration. It has also resulted in a large discourse around the potential harms, intentional and unintentional, that the algorithms and AI can cause. The public discourse has, however, remained largely policy-oriented. In this talk, we will share our experience of building responsible AI systems with evolutionary architecture that have responsibility built in their core." speaker_profile: " Speakers: