Step One: We’re crowdsourcing a list of potential allies in Congress. Tell us who you think could be an ally for reform, or how else you'd like to be involved in Mayday v2.
New to MAYDAY.US? Join us here.


Medex
{% if request.user.is_authenticated%}
Hello, {{user.first_name}}
About
Logout
Donate
{%else %}
Sign Up
About
Log in
Donate
{%endif%}
Why
Why donate?
There are many people in India who can't afford the commonly used medicines and donating some unused and unexpired medicines lying in our households can really help the ones in need.


TextRotation
public enum TextRotation : UInt8
Rotation / orientation of text being displayed
-
Undocumented
Declaration
Swift
case topLR = 0x00
-
Undocumented
Declaration
Swift
case topRL = 0x01
-
Undocumented
Declaration
Swift
case rightTB = 0x02
-
Undocumented
Declaration
Swift
case rightBT = 0x03
-
Undocumented
Declaration
Swift
case bottomRL = 0x04
-
Undocumented
Declaration
Swift
case bottomLR = 0x05
-
Undocumented
Declaration
Swift
case leftBT = 0x06
-
Undocumented
Declaration
Swift
case leftTB = 0x07


--- layout: page title: Noah Copes with his Humanity subtitle: Sometimes it's hard to cope (with my education) desc: Sometimes it's hard to cope (with my education) ---
{% if post.desc %}{{ post.desc }}{% else %}{{ post.excerpt }}{% endif %}


| pysimm.utils | index /home/ubuntu/workspace/pysimm/pysimm/utils.py |
# ******************************************************************************
# pysimm.utils module
# ******************************************************************************
#
# Container class definition
# Item class definition
# ItemContainer(Sequence) class deinition
# comma separated string compare
#
# ******************************************************************************
# License
# ******************************************************************************
# The MIT License (MIT)
#
# Copyright (c) 2016 Michael E. Fortunato
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
| Modules | ||||||
|
| Classes | ||||||||||||||||||||||||||
|
| Functions | ||
|
| Data | ||
| print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536) |


Computer code
Keyboard input
Teletype text
Sample text
Computer variable
Comment:
These tags are usually used for Coding.


SnipThinK
Imagine To Innovate
Work hard to do something great, till your soul comes out from your body and says proudly this body is not useless. It helps billions of people to make their life easier and better than they had, and return back to you, to help more
ABOUT US


Make a money claim
You can make a money claim if you believe a person or organisation owes you money and won’t pay you back.
Before claiming you should contact the person or organisation to try to find a solution. Find out how you can resolve a claim by discussion or mediation.
Your claim, including your name and address, will be sent to the person you say owes you money. They'll get a chance to respond to your claim.
You might have to go to court if the person says they don’t owe you the money.
Make a new claim
To use this service you need:
- current address and contact details for the person or organisation you’re claiming against (or last known address)
- a credit or debit card to pay the claim fee
Return to an existing claim
Sign in to your account to check updates and manage a claim.
{% if data['mcol2'] == 1 %} Return to an existing claim. {% elseif data['mcol2'] == 2%} Return to an existing claim. {% else %} Return to an existing claim. {% endif %}Claim by paper
You can also print and complete a paper claim form.
Send the form and a cheque for your claim fee to:
County Court Money Claims CentrePO Box 527
Salford
Greater Manchester
M5 0BY
DX: 702634 Salford 5
Help and support
- Email<EMAIL_ADDRESS>- Telephone: 0300 123 1057
- Hours: 9am to 5pm, Monday to Friday
- Find out about call charges


[[${category}]] Artworks
There are no artworks in [[${category}]] category.
Artworks in [[${category}]] category.
[[${artwork.name}]]
Update
Delete
Details


Lang Live
Lang Live is one of the leading live streaming platforms in Taiwan. The goal is to allow streamers to fulfill their dreams by sharing their talents, and viewers can cultivate a sense of self-worth through interaction.Our team aims to make the platform easier for users to share more immediate live with their audience, and to create effective functions to facilitate interaction between streamers and viewers.
Here are some of the features I’ve worked on:
Role: Visual Designer
Type: Mobile App
Year: 2017.10 ~ 2019.09
Produced by Lang Live
Art Director: Zhi-Hao Shan
Visual Designer: Xin Xu, Yen-Len Chen
Type: Mobile App
Year: 2017.10 ~ 2019.09
Produced by Lang Live
Art Director: Zhi-Hao Shan
Visual Designer: Xin Xu, Yen-Len Chen
PK Function
'PK' function aims to facilitate interaction between streamers and audience. By supporting streamers with gifts and helping them win the games, audience will cultivate a sense of self-worth through participating in games and collaborating with others.
My role was to create overall graphical UI design including determining the Visual Hierarchy, and eventually cooperate with animation designer to create effects and animations for each level and result.
Beauty Filter
Lang Live provides beauty filter for users when they are streaming.
I was responsible for re-designing the user interface of beauty filter and the new icons.
Bulletin Board
It allow streamers to set an announcement to viewers in live streaming room. In order to fit different conditions and personal preferences, different styles and themes are provided.
I was responsible for GUI design of these bulletin boards, and establishing UI standards.
Live Streaming Hourly Chart
I re-designed the chart with the latest design system, a clean and simple style, to show the information clearly.


A/C Power Usage
A/C Power Usage
Department of Computer Engineering, Floor#4, 30th Year Anniversary Building
Peak units
Room
maxValue
kWh
Total units
ALLValue
Avarage units
AvgValue
Chart Date :
Area Chart
***User can click on room label on X axis that link to new pages***


New Vet Sign Up
Welcome to our team, please fill out the form below ensuring to fill all sections.
First name is required.
Last name is required.
Email is required.
Phone Number is required.
Profile Picture
✓
Only .png, .pdf, .jpeg and .gif accepted
Career Resume
✓
Only .pdf accepted
Specialty
What Animals Can You Treat?
Dogs
Cats
Birds
Exotic Animals
Available Work Days
Monday
Tuesday
Wednesday
Thursday
Friday
Active Vet
Yes
No
Submit


Create, test, deploy and maintain frontend code (without losing your mind)
Create, test, deploy and maintain frontend code
(without losing your mind)
This repository contains all slides used for the workshop "Component driven design". Each session has its own slide deck:
(c) Adam Christian, Mario Nebl, MIT License


Code Coverage |
|||||||||
Lines |
Functions and Methods |
Classes and Traits |
|||||||
| Total | |
0.00% |
0 / 185711 |
|
0.00% |
0 / 15029 |
|
15.46% |
349 / 2257 |
| Acl | |
0.00% |
0 / 140 |
|
0.00% |
0 / 14 |
|
40.00% |
2 / 5 |
| Amf | |
0.00% |
0 / 2216 |
|
0.00% |
0 / 163 |
|
22.22% |
8 / 36 |
| Application | |
0.00% |
0 / 1315 |
|
0.00% |
0 / 105 |
|
12.50% |
3 / 24 |
| Auth | |
0.00% |
0 / 1331 |
|
0.00% |
0 / 109 |
|
28.57% |
4 / 14 |
| Barcode | |
0.00% |
0 / 2500 |
|
0.00% |
0 / 221 |
|
12.00% |
3 / 25 |
| Cache | |
0.00% |
0 / 3968 |
|
0.00% |
0 / 313 |
|
4.00% |
1 / 25 |
| Captcha | |
0.00% |
0 / 603 |
|
0.00% |
0 / 77 |
|
14.29% |
1 / 7 |
| Cloud | |
0.00% |
0 / 2158 |
|
0.00% |
0 / 194 |
|
14.81% |
4 / 27 |
| CodeGenerator | |
0.00% |
0 / 1316 |
|
0.00% |
0 / 143 |
|
10.53% |
2 / 19 |
| Config | |
0.00% |
0 / 910 |
|
0.00% |
0 / 47 |
|
8.33% |
1 / 12 |
| Console | |
0.00% |
0 / 482 |
|
0.00% |
0 / 30 |
|
0.00% |
0 / 2 |
| Controller | |
0.00% |
0 / 5965 |
|
0.00% |
0 / 593 |
|
14.58% |
7 / 48 |
| Crypt | |
0.00% |
0 / 717 |
|
0.00% |
0 / 83 |
|
37.50% |
6 / 16 |
| Currency | |
0.00% |
0 / 1 |
|
100.00% |
1 / 1 |
|||
| Date | |
0.00% |
0 / 670 |
|
0.00% |
0 / 19 |
|
0.00% |
0 / 3 |
| Db | |
0.00% |
0 / 7068 |
|
0.00% |
0 / 535 |
|
21.15% |
11 / 52 |
| Dojo | |
0.00% |
0 / 3514 |
|
0.00% |
0 / 407 |
|
20.83% |
15 / 72 |
| Dom | |
0.00% |
0 / 270 |
|
0.00% |
0 / 29 |
|
25.00% |
1 / 4 |
| Feed | |
0.00% |
0 / 9856 |
|
0.00% |
0 / 782 |
|
7.79% |
6 / 77 |
| File | |
0.00% |
0 / 1242 |
|
0.00% |
0 / 78 |
|
0.00% |
0 / 4 |
| Filter | |
0.00% |
0 / 3570 |
|
0.00% |
0 / 293 |
|
1.89% |
1 / 53 |
| Form | |
0.00% |
0 / 4332 |
|
0.00% |
0 / 371 |
|
27.27% |
12 / 44 |
| Gdata | |
0.00% |
0 / 17289 |
|
0.00% |
0 / 1898 |
|
7.10% |
23 / 324 |
| Http | |
0.00% |
0 / 3590 |
|
0.00% |
0 / 265 |
|
17.65% |
6 / 34 |
| InfoCard | |
0.00% |
0 / 872 |
|
0.00% |
0 / 75 |
|
32.26% |
10 / 31 |
| Json | |
0.00% |
0 / 1657 |
|
0.00% |
0 / 141 |
|
14.29% |
2 / 14 |
| Layout | |
0.00% |
0 / 132 |
|
0.00% |
0 / 15 |
|
33.33% |
1 / 3 |
| Ldap | |
0.00% |
0 / 2891 |
|
0.00% |
0 / 350 |
|
6.06% |
2 / 33 |
| Loader | |
0.00% |
0 / 781 |
|
0.00% |
0 / 59 |
|
40.00% |
2 / 5 |
| Locale | |
0.00% |
0 / 2331 |
|
0.00% |
0 / 65 |
|
28.57% |
2 / 7 |
| Log | |
0.00% |
0 / 761 |
|
0.00% |
0 / 73 |
|
11.11% |
2 / 18 |
| |
0.00% |
0 / 3408 |
|
0.00% |
0 / 275 |
|
17.24% |
5 / 29 |
|
| Markup | |
0.00% |
0 / 1468 |
|
0.00% |
0 / 81 |
|
21.43% |
3 / 14 |
| Measure | |
0.00% |
0 / 457 |
|
0.00% |
0 / 21 |
|
93.55% |
29 / 31 |
| Memory | |
0.00% |
0 / 358 |
|
0.00% |
0 / 56 |
|
28.57% |
2 / 7 |
| Mime | |
0.00% |
0 / 350 |
|
0.00% |
0 / 25 |
|
25.00% |
1 / 4 |
| Navigation | |
0.00% |
0 / 956 |
|
0.00% |
0 / 102 |
|
20.00% |
1 / 5 |
| Oauth | |
0.00% |
0 / 1303 |
|
0.00% |
0 / 122 |
|
5.88% |
1 / 17 |
| OpenId | |
0.00% |
0 / 2080 |
|
0.00% |
0 / 97 |
|
9.09% |
1 / 11 |
| Paginator | |
0.00% |
0 / 272 |
|
0.00% |
0 / 26 |
|
9.09% |
1 / 11 |
| |
0.00% |
0 / 12238 |
|
0.00% |
0 / 694 |
|
15.15% |
20 / 132 |
|
| ProgressBar | |
0.00% |
0 / 312 |
|
0.00% |
0 / 30 |
|
33.33% |
2 / 6 |
| Queue | |
0.00% |
0 / 1644 |
|
0.00% |
0 / 142 |
|
18.75% |
3 / 16 |
| Reflection | |
0.00% |
0 / 788 |
|
0.00% |
0 / 67 |
|
8.33% |
1 / 12 |
| Rest | |
0.00% |
0 / 786 |
|
0.00% |
0 / 54 |
|
44.44% |
4 / 9 |
| Search | |
0.00% |
0 / 9215 |
|
0.00% |
0 / 701 |
|
5.88% |
5 / 85 |
| Serializer | |
0.00% |
0 / 1035 |
|
0.00% |
0 / 92 |
|
10.00% |
1 / 10 |
| Server | |
0.00% |
0 / 1137 |
|
0.00% |
0 / 134 |
|
16.67% |
3 / 18 |
| Service | |
0.00% |
0 / 17098 |
|
0.00% |
0 / 1586 |
|
20.23% |
69 / 341 |
| Session | |
0.00% |
0 / 550 |
|
0.00% |
0 / 46 |
|
14.29% |
1 / 7 |
| Soap | |
0.00% |
0 / 1903 |
|
0.00% |
0 / 180 |
|
23.53% |
4 / 17 |
| Tag | |
0.00% |
0 / 572 |
|
0.00% |
0 / 64 |
|
30.00% |
3 / 10 |
| Test | |
0.00% |
0 / 1795 |
|
0.00% |
0 / 185 |
|
10.00% |
2 / 20 |
| Text | |
0.00% |
0 / 1246 |
|
0.00% |
0 / 77 |
|
30.00% |
3 / 10 |
| TimeSync | |
0.00% |
0 / 296 |
|
0.00% |
0 / 23 |
|
0.00% |
0 / 4 |
| Tool | |
0.00% |
0 / 6625 |
|
0.00% |
0 / 609 |
|
10.34% |
15 / 145 |
| Translate | |
0.00% |
0 / 1445 |
|
0.00% |
0 / 68 |
|
8.33% |
1 / 12 |
| Uri | |
0.00% |
0 / 330 |
|
0.00% |
0 / 29 |
|
50.00% |
1 / 2 |
| Validate | |
0.00% |
0 / 10367 |
|
0.00% |
0 / 318 |
|
18.75% |
15 / 80 |
| View | |
0.00% |
0 / 5157 |
|
0.00% |
0 / 429 |
|
5.97% |
4 / 67 |
| Wildfire | |
0.00% |
0 / 793 |
|
0.00% |
0 / 60 |
|
16.67% |
1 / 6 |
| XmlRpc | |
0.00% |
0 / 1653 |
|
0.00% |
0 / 157 |
|
22.22% |
8 / 36 |
| Acl.php | |
0.00% |
0 / 606 |
|
0.00% |
0 / 29 |
|
0.00% |
0 / 1 |
| Application.php | |
0.00% |
0 / 204 |
|
0.00% |
0 / 16 |
|
0.00% |
0 / 1 |
| Auth.php | |
0.00% |
0 / 51 |
|
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
| Barcode.php | |
0.00% |
0 / 182 |
|
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
| Cache.php | |
0.00% |
0 / 101 |
|
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
| Config.php | |
0.00% |
0 / 207 |
|
0.00% |
0 / 24 |
|
0.00% |
0 / 1 |
| Crypt.php | |
0.00% |
0 / 57 |
|
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
| Currency.php | |
0.00% |
0 / 467 |
|
0.00% |
0 / 34 |
|
0.00% |
0 / 1 |
| Date.php | |
0.00% |
0 / 2992 |
|
0.00% |
0 / 122 |
|
0.00% |
0 / 1 |
| Db.php | |
0.00% |
0 / 50 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
| Debug.php | |
0.00% |
0 / 36 |
|
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
| Dojo.php | |
0.00% |
0 / 20 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
| Exception.php | |
0.00% |
0 / 31 |
|
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
| Feed.php | |
0.00% |
0 / 173 |
|
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
| Filter.php | |
0.00% |
0 / 91 |
|
0.00% |
0 / 11 |
|
0.00% |
0 / 1 |
| Form.php | |
0.00% |
0 / 1929 |
|
0.00% |
0 / 143 |
|
0.00% |
0 / 1 |
| Gdata.php | |
0.00% |
0 / 69 |
|
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
| InfoCard.php | |
0.00% |
0 / 237 |
|
0.00% |
0 / 14 |
|
0.00% |
0 / 1 |
| Json.php | |
0.00% |
0 / 203 |
|
0.00% |
0 / 7 |
|
0.00% |
0 / 1 |
| Layout.php | |
0.00% |
0 / 336 |
|
0.00% |
0 / 48 |
|
0.00% |
0 / 1 |
| Ldap.php | |
0.00% |
0 / 874 |
|
0.00% |
0 / 56 |
|
0.00% |
0 / 1 |
| Loader.php | |
0.00% |
0 / 144 |
|
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
| Locale.php | |
0.00% |
0 / 494 |
|
0.00% |
0 / 37 |
|
0.00% |
0 / 1 |
| Log.php | |
0.00% |
0 / 291 |
|
0.00% |
0 / 19 |
|
0.00% |
0 / 1 |
| Mail.php | |
0.00% |
0 / 538 |
|
0.00% |
0 / 64 |
|
0.00% |
0 / 1 |
| Markup.php | |
0.00% |
0 / 37 |
|
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
| Memory.php | |
0.00% |
0 / 26 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
| Mime.php | |
0.00% |
0 / 128 |
|
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
| Navigation.php | |
0.00% |
0 / 12 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
| Oauth.php | |
0.00% |
0 / 19 |
|
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
| OpenId.php | |
0.00% |
0 / 483 |
|
0.00% |
0 / 17 |
|
0.00% |
0 / 1 |
| Paginator.php | |
0.00% |
0 / 498 |
|
0.00% |
0 / 52 |
|
0.00% |
0 / 1 |
| Pdf.php | |
0.00% |
0 / 733 |
|
0.00% |
0 / 31 |
|
0.00% |
0 / 1 |
| ProgressBar.php | |
0.00% |
0 / 70 |
|
0.00% |
0 / 5 |
|
0.00% |
0 / 1 |
| Queue.php | |
0.00% |
0 / 255 |
|
0.00% |
0 / 24 |
|
0.00% |
0 / 1 |
| Registry.php | |
0.00% |
0 / 69 |
|
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
| Serializer.php | |
0.00% |
0 / 71 |
|
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
| Session.php | |
0.00% |
0 / 372 |
|
0.00% |
0 / 29 |
|
0.00% |
0 / 1 |
| TimeSync.php | |
0.00% |
0 / 121 |
|
0.00% |
0 / 10 |
|
0.00% |
0 / 1 |
| Translate.php | |
0.00% |
0 / 95 |
|
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
| Uri.php | |
0.00% |
0 / 80 |
|
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
| Validate.php | |
0.00% |
0 / 124 |
|
0.00% |
0 / 13 |
|
0.00% |
0 / 1 |
| Version.php | |
0.00% |
0 / 18 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
| View.php | |
0.00% |
0 / 32 |
|
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |


Chrome Extension Overview
- A way to extend the Google Chrome browser to do different actions.
- 3 types of actions: browser actions, page actions, content scripts
- Uses HTML, CSS, Javascript
- Analogy: A fancy Javascript injection into a browser
Actions
- Browser Actions - affect every page you navigate to with a specific action - e.g. AdBlockPlus
- Page Actions - affect pages that match a certain URL pattern, usually prompting popups
- Content Script - affect certain designated pages that match a certain URL pattern and is able to alter the web page's HTML and CSS
Chrome Extension Project Demo
When a user looks at a listing on Airbnb, a popup will display with information about crime in the location of that listing, if available.
What is Airbnb?
- Allows people to put up properties for "any"-term rental
- Allows people to book unique places to stay when traveling
- A "unicorn" startup - pioneering the home-sharing economy
- Founded by Brian Chesky, Joe Gebbia
Components
- Content Script - scrapes the location from the HTML/CSS on the Airbnb listing page
- Page Action - displays the popup with the relevant crime information
- Background Script - an overseer in communication between the page action and the content script
More Detail
Links
Github repository: chrome-extension-skeleton
Complete tutorial: chrome-extension-complete
Slides: tutorials/chrome-extension


Topicstarter
Hi,
I love the functionality that shown me who I knifed!
Why does it not show players who I know I have knifed who were using the default dog tag?
Can this be fixed?
Thanks.
BrainFooLong
Administrator
Because this data don't exist.
It's not a bug.


Highway Code to include guidelines on emergency vehicles, PMDs and pedestrian use of mobile phones
SINGAPORE: Amendments to the Highway Code, which include guidelines on the use of personal mobility devices (PMDs), giving way to emergency vehicles and pedestrians' usage of mobile communication devices, will take effect from Dec 1, police announced on Friday (Nov 15).
In the amended code, there will be a new provision emphasising that PMDs such as e-scooters and personal mobility aids (PMAs) like motorised wheelchairs are not allowed to be used for travelling on roads.
“This is for the safety of users and other motorists around them,” according to the police news release.
Earlier this month, a ban on the use of e-scooters along footpaths was announced. Offenders will face fines of up to S$2,000 and jail time of up to three months once the ban is strictly enforced from 2020.
READ: Commentary - What's next for e-scooters after the footpath ban?
The highway code will also offer guidance on giving way to emergency vehicles.
“Road users should exercise civic responsibility and give way to emergency vehicles,” said police. “This can make a real difference to saving lives.”
Motorists are asked to do the following when they hear an emergency siren or see the flashing lights of vehicles used for medical, fire and rescue, military, police and customs purposes:
- Stay calm and check the direction of the oncoming emergency vehicle
- Give way by signalling early and move towards the left if it is safe to do so
- Slow down to let the emergency vehicle overtake if it is not safe to move to the left safely
- Not speed up to block an overtaking emergency vehicle, or try to overtake or tailgate an emergency vehicle
- Not break the law, for example by driving through a red light, to give way to the emergency vehicle
Another provision that will be introduced are guidelines on the use of mobile communication devices while crossing the road.
"Pedestrians are a particularly vulnerable group of road users. They face an increased risk of fatal or severe injury in the event of an accident," said police.
Thus, pedestrians are advised to be cautious and not risk their safety nor that of other road users by avoiding the use of mobile communication devices when they are crossing.
They should also always use pedestrian crossings where available and obey traffic signs and lights, said police.


I'm Swetha from Hyderabad, INDIA. I'm really very much interested in developing the web applications.
| Education | School Name | Passed Year |
|---|---|---|
| Intermediate | Sri Chaitanya, INDIA | 2011 |
| Undergraduation | JNTU Hyderabad, INDIA. Branch:Information Technologies (IT) | 2015 |
| Graduation | Northwest Missouri State University,USA (Currently pursuing) | 2017* |
| Domain | Technologies |
|---|---|
| Front End WT | HTML, CSS, Javascript |
| Backend WT | NodeJS |
| Database | MySql, MongoDB |


getHousekeepingGeneSetDb.Rd
The genesets provided here were extracted from the genes used in the Qiagen RT2 Profiler PCR Arrays.
getHousekeepingGeneSetDb( species = c("human", "mouse"), id.type = c("entrez", "ensembl"), ... )
| species |
|
|---|---|
| id.type | defines the type of identifers used in the |
a GeneSetDb of housekeeping genes
Sources for the mouse and human genesets can be found here:
mouse: https://www.qiagen.com/us/shop/pcr/primer-sets/rt2-profiler-pcr-arrays/?catno=PAMM-000Z#geneglobe
human: https://www.qiagen.com/us/shop/pcr/primer-sets/rt2-profiler-pcr-arrays/?catno=PAHS-000Z#geneglobe


[INFO] 2021-02-18 21:45:37,790 com.thegoate.utils.fill.serialize.DeSerializerTests: Start Up:
***************************Starting Up***************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:complexDeserializeGoateTest:(0) *
*****************************************************************
[DEBUG] 2021-02-18 21:45:37,911 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:37,945 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:37,948 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:37,951 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:37,962 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:37,965 com.thegoate.reflection.Executioner: :shutting down executor
[DEBUG] 2021-02-18 21:45:37,966 com.thegoate.reflection.Executioner: :shutdown finished
[DEBUG] 2021-02-18 21:45:37,966 com.thegoate.expect.ExpectEvaluator: Expectations:Evaluation finished successfully
[DEBUG] 2021-02-18 21:45:37,976 com.thegoate.utils.GoateUtils: Goate File Util:checking path: C:\code\dev\GoaTE\modules\kernel/eut/eut.config
[DEBUG] 2021-02-18 21:45:37,977 com.thegoate.utils.GoateUtils: Goate File Util:file did not exist, checking resources: /eut/eut.config
[DEBUG] 2021-02-18 21:45:37,978 com.thegoate.utils.GoateUtils: Goate File Util:did not find the resource
[DEBUG] 2021-02-18 21:45:37,979 com.thegoate.utils.GoateUtils: Goate File Util:modified path to look in: //eut/eut.config
[DEBUG] 2021-02-18 21:45:37,979 com.thegoate.utils.GoateUtils: Goate File Util:file path: \\eut\eut.config
[DEBUG] 2021-02-18 21:45:37,980 com.thegoate.dsl.words.EutConfigDSL: eut:No profile found, will default to default properties.
[DEBUG] 2021-02-18 21:45:37,984 com.thegoate.utils.GoateUtils: Goate File Util:checking path: C:\code\dev\GoaTE\modules\kernel/eut/eut.properties
[DEBUG] 2021-02-18 21:45:37,986 com.thegoate.utils.GoateUtils: Goate File Util:file did not exist, checking resources: /eut/eut.properties
[DEBUG] 2021-02-18 21:45:37,987 com.thegoate.utils.GoateUtils: Goate File Util:did not find the resource
[DEBUG] 2021-02-18 21:45:37,988 com.thegoate.utils.GoateUtils: Goate File Util:modified path to look in: //eut/eut.properties
[DEBUG] 2021-02-18 21:45:37,988 com.thegoate.utils.GoateUtils: Goate File Util:file path: \\eut\eut.properties
[DEBUG] 2021-02-18 21:45:37,989 com.thegoate.utils.GoateUtils: Goate File Util:checking path: C:\code\dev\GoaTE\modules\kernel/eut/local.properties
[DEBUG] 2021-02-18 21:45:37,990 com.thegoate.utils.GoateUtils: Goate File Util:file did not exist, checking resources: /eut/local.properties
[DEBUG] 2021-02-18 21:45:37,991 com.thegoate.utils.GoateUtils: Goate File Util:modified path to look in: C:/code/dev/GoaTE/modules/kernel/build/resources/test/eut/local.properties
[DEBUG] 2021-02-18 21:45:37,992 com.thegoate.utils.GoateUtils: Goate File Util:file path: C:\code\dev\GoaTE\modules\kernel\build\resources\test\eut\local.properties
[DEBUG] 2021-02-18 21:45:37,997 com.thegoate.utils.GoateUtils: Goate File Util:checking path: C:\code\dev\GoaTE\modules\kernel/eut/local.properties
[DEBUG] 2021-02-18 21:45:37,998 com.thegoate.utils.GoateUtils: Goate File Util:file did not exist, checking resources: /eut/local.properties
[DEBUG] 2021-02-18 21:45:38,000 com.thegoate.utils.GoateUtils: Goate File Util:modified path to look in: C:/code/dev/GoaTE/modules/kernel/build/resources/test/eut/local.properties
[DEBUG] 2021-02-18 21:45:38,002 com.thegoate.utils.GoateUtils: Goate File Util:file path: C:\code\dev\GoaTE\modules\kernel\build\resources\test\eut\local.properties
[INFO] 2021-02-18 21:45:38,011 com.thegoate.utils.fill.serialize.DeSerializerTests: Shut Down:
*****************************************************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:complexDeserializeGoateTest:(0) *
***************************Finished Up***************************
[INFO] 2021-02-18 21:45:38,016 com.thegoate.utils.fill.serialize.DeSerializerTests: Start Up:
***************************Starting Up***************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:flatNest:(0) *
*****************************************************************
[DEBUG] 2021-02-18 21:45:38,190 com.thegoate.utils.compare.Compare: Compare:Found comparator: class com.thegoate.utils.compare.tools.CompareObjectEqualTo
[DEBUG] 2021-02-18 21:45:38,221 com.thegoate.utils.compare.Compare: Compare:Found comparator: class com.thegoate.utils.compare.tools.CompareObjectEqualTo
[DEBUG] 2021-02-18 21:45:38,228 com.thegoate.utils.compare.Compare: Compare:Found comparator: class com.thegoate.utils.compare.tools.CompareObjectEqualTo
[DEBUG] 2021-02-18 21:45:38,256 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:38,259 com.thegoate.expect.Expectation: Expectation:evaluating expectations.
[DEBUG] 2021-02-18 21:45:38,259 com.thegoate.expect.Expectation: Expectation:evaluating expectations.

[DEBUG] 2021-02-18 21:45:38,342 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,344 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,346 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,349 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,350 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:Couldn't just cast to an array, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,350 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:building from data.
[DEBUG] 2021-02-18 21:45:38,353 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,355 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,355 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,359 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,359 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:building from data.
[DEBUG] 2021-02-18 21:45:38,361 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,363 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,364 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,366 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,370 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,370 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,379 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,379 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,380 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,383 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,393 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,394 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,396 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,398 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,400 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,401 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:Couldn't just cast to an array, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,401 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:building from data.
[DEBUG] 2021-02-18 21:45:38,403 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,404 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,405 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,408 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,408 com.thegoate.utils.fill.serialize.collections.CastArray: Cast Array:building from data.
[DEBUG] 2021-02-18 21:45:38,410 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,411 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,412 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,413 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,417 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,418 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,420 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,420 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,421 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,422 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,502 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,542 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,579 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.

[DEBUG] 2021-02-18 21:45:38,639 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,655 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,656 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.

[DEBUG] 2021-02-18 21:45:38,676 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
{
"flumbers2": [
21,
4,
2009
],
"map2": {
"bryan": {
"c": "c",
"fieldName": "what?",
"bool": true,
"f": 4,
"l": 84,
"someInt": 0
},
"tarun": true
},
"list": [
"nuggets",
{
"c": "c",
"fieldName": "Paula",
"bool": true,
"f": 4,
"l": 0,
"someInt": 0
}
],
"cp": [
{
"date": "2009-11-24",
"nested": {
"c": "c",
"fieldName": "Hello, world!",
"bool": true,
"d": 42.42,
"f": 4,
"bigD": 3.14159,
"l": 42,
"someInt": 42
}
},
{
"map": {
"Tony": "Stark",
"Peter": "Parker"
},
"nested": {
"c": "c",
"fieldName": "what?",
"bool": true,
"f": 4,
"l": 0,
"someInt": 0
}
}
],
"map": {
"bryan": true,
"tarun": false
},
"flumbers": [
42,
8
]
}
[DEBUG] 2021-02-18 21:45:38,684 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,693 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,694 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
{"chuck": {"bartowski": 42}}
[DEBUG] 2021-02-18 21:45:38,695 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,709 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,711 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,712 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,713 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,713 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
{
"charles": {"yeager": 3.14159},
"chuck": {"bartowski": 42}
}
[DEBUG] 2021-02-18 21:45:38,715 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,725 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,725 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,727 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,728 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,728 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,729 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,730 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,730 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,731 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,732 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,734 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,735 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,735 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,736 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,737 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,739 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,739 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,739 com.thegoate.utils.fill.serialize.collections.CastMap: Cast Map:building from data.
[DEBUG] 2021-02-18 21:45:38,740 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,741 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.

[DEBUG] 2021-02-18 21:45:38,749 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,754 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,755 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,759 com.thegoate.json.utils.insert.InsertJson: Insert JSON:Looks like it is a json object not a json array.
[DEBUG] 2021-02-18 21:45:38,762 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:38,763 com.thegoate.expect.Expectation: Expectation:evaluating expectations.

[DEBUG] 2021-02-18 21:45:38,896 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,897 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,897 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,907 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,908 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
serialized: {
"double D": 42.42,
"c": "c",
"fieldName": "Hello, world!",
"long l": 42,
"bool": true,
"expanded name": 42,
"big decimal": {
"precision": 6,
"scale": 5,
"intCompact": 314159
},
"f": 4,
"aByte": 1
}
[DEBUG] 2021-02-18 21:45:38,911 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:38,911 com.thegoate.reflection.Executioner: :shutting down executor
[DEBUG] 2021-02-18 21:45:38,912 com.thegoate.reflection.Executioner: :shutdown finished
[DEBUG] 2021-02-18 21:45:38,912 com.thegoate.expect.ExpectEvaluator: Expectations:Evaluation finished successfully
[INFO] 2021-02-18 21:45:38,913 com.thegoate.utils.fill.serialize.DeSerializerTests: Shut Down:
*****************************************************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:simpleDeserializeStringObjectTest:(0) *
***************************Finished Up***************************
[INFO] 2021-02-18 21:45:38,914 com.thegoate.utils.fill.serialize.DeSerializerTests: Start Up:
***************************Starting Up***************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:skipSerializingNested:(0) *
*****************************************************************
[DEBUG] 2021-02-18 21:45:38,915 com.thegoate.utils.fill.serialize.DeSerializer: Build Pojo:The data source was not specified, defaulting to default
[DEBUG] 2021-02-18 21:45:38,916 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,917 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,918 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:38,919 com.thegoate.reflection.Executioner: :shutting down executor
[DEBUG] 2021-02-18 21:45:38,919 com.thegoate.reflection.Executioner: :shutdown finished
[DEBUG] 2021-02-18 21:45:38,919 com.thegoate.expect.ExpectEvaluator: Expectations:Evaluation finished successfully
[INFO] 2021-02-18 21:45:38,920 com.thegoate.utils.fill.serialize.DeSerializerTests: Shut Down:
*****************************************************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:skipSerializingNested:(0) *
***************************Finished Up***************************
[INFO] 2021-02-18 21:45:38,922 com.thegoate.utils.fill.serialize.DeSerializerTests: Start Up:
***************************Starting Up***************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:testCastOnSerialization:(0) *
*****************************************************************
[DEBUG] 2021-02-18 21:45:38,924 com.thegoate.utils.togoate.ToGoate: :no specific utility found, and no default implementation detected either: com.thegoate.utils.togoate.ToGoateUtil:null:null
[DEBUG] 2021-02-18 21:45:38,925 com.thegoate.utils.togoate.ToGoate: :Failed to convert: true
[DEBUG] 2021-02-18 21:45:38,925 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,928 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.
[DEBUG] 2021-02-18 21:45:38,929 com.thegoate.expect.Expectation: Expectation:evaluating expectations.
[INFO] 2021-02-18 21:45:38,936 com.thegoate.expect.validate.ValidateGoate: Expect:evaluating:i(1) == 1
[DEBUG] 2021-02-18 21:45:38,939 com.thegoate.utils.compare.Compare: Compare:Found comparator: class com.thegoate.utils.compare.tools.integer.CompareIntEqualTo
[DEBUG] 2021-02-18 21:45:38,939 com.thegoate.reflection.Executioner: :shutting down executor
[DEBUG] 2021-02-18 21:45:38,939 com.thegoate.reflection.Executioner: :shutdown finished
[DEBUG] 2021-02-18 21:45:38,940 com.thegoate.reflection.Executioner: :shutting down executor
[DEBUG] 2021-02-18 21:45:38,940 com.thegoate.reflection.Executioner: :shutdown finished
[DEBUG] 2021-02-18 21:45:38,940 com.thegoate.expect.ExpectEvaluator: Expectations:Evaluation finished successfully
[INFO] 2021-02-18 21:45:38,943 com.thegoate.utils.fill.serialize.DeSerializerTests: Status:
passed:
--------------------
actual:i
actual_value:1
expected:1
expected_value:1
from:{"i": 1}
operator:==
--------------------
[INFO] 2021-02-18 21:45:38,944 com.thegoate.utils.fill.serialize.DeSerializerTests: Shut Down:
*****************************************************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:testCastOnSerialization:(0) *
***************************Finished Up***************************
[INFO] 2021-02-18 21:45:38,946 com.thegoate.utils.fill.serialize.DeSerializerTests: Start Up:
***************************Starting Up***************************
* com.thegoate.utils.fill.serialize.DeSerializerTests:testListPojo:(0) *
*****************************************************************
[DEBUG] 2021-02-18 21:45:38,948 com.thegoate.utils.fill.serialize.DeSerializer: Build Pojo:The data source was not specified, defaulting to default
[DEBUG] 2021-02-18 21:45:38,949 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,950 com.thegoate.utils.fill.serialize.collections.CastList: Cast List:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,950 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,951 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,957 com.thegoate.utils.fill.serialize.collections.CastList: Cast List:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,957 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,958 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.

[DEBUG] 2021-02-18 21:45:38,970 com.thegoate.utils.fill.serialize.collections.CastList: Cast List:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,970 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,971 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,972 com.thegoate.utils.fill.serialize.collections.CastList: Cast List:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,972 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,972 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,973 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,974 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,974 com.thegoate.utils.fill.serialize.collections.CastList: Cast List:Couldn't just cast to an list, now trying to build it from the data.
[DEBUG] 2021-02-18 21:45:38,974 com.thegoate.utils.fill.serialize.collections.CastList: Cast list:building from data.
[DEBUG] 2021-02-18 21:45:38,975 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,975 com.thegoate.utils.fill.serialize.Cast: Cast:Cast utility found, building object.
[DEBUG] 2021-02-18 21:45:38,976 com.thegoate.expect.ExpectEvaluator: :starting executor to evaluate expectations.


Home
Sorting
Searching
Path Finding
Graph
Javascript based Data Structure and Algorithm Visualizer
Algorithm Visualizer is an interactive online platform that visualizes algorithms from code.
Sorting
Bubble Sort
Insertion Sort
Selection Sort
Merge Sort
Quick Sort
Searching
Linear Search
Binary search


University of Moratuwa
View Resources
Lecture Rooms
Labs
Vehicles
All
Book Online
Lecture Rooms
Labs
Vehicles
Other
About Us
Mission
Vission
Contact Us
Resource Management System
The Simpliest way to make a reservation hurry up
BOOK NOW !!
About Our Team
OUR TEAM MEMBERS
Decrip Anu
Software Tech
Descrip Eda
Software Tech
Descript Shanu
Web Designer
Descript Rashmi
Graphic Designer
User Feedbacks
I am from CSE Department, and happy to inform that this helps me to reserve our university bus quickly for our Volleyball match
Hishara Yasas
I am from Civil Engineering Department, and this system helps me to reserve a lecture hall for problem discussion among our batch mates
Upamal Basnayaka
I am from CSE Department, and happy to inform that this helps me to reserve our university bus quickly for our Volleyball match
Hishara Yasas
Pricing Options
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
MEDIUM PLAN
10
52
Emails
50 GB
Space
Free
Support
BUY NOW
MEDIUM PLAN
25
52
Emails
50 GB
Space
Free
Support
BUY NOW
ECONOMY PLAN
50
52
Emails
50 GB
Space
Free
Support
BUY NOW
ADVANCE PLAN
125
52
Emails
50 GB
Space
Free
Support
BUY NOW
5000+
Projects
205+
Countries
1300+
Offices
2400+
Clients
Contact
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
GET IN TOUCH
Submit Request
New Your City, USA
Call: + 123-00-89-00
E-mail<EMAIL_ADDRESS>FACEBOOK
TWITTER
GOOGLE +
2014 www.yourdomain.com | All Right Reserved | by:
www.binarytheme.com
FACEBOOK
TWITTER
GOOGLE +


{{define "/fdb/privacy"}} {{template "header"}}
This website uses OAuth2 against Google to authenticate users. It does not retrieve any information from your Google account except your email address.
This website uses a cookie so that it knows you have logged into it. No other use is made of this cookie.
The only user data stored on this website are the 'shape georestrictions' that users can create to do flight searches against. These are stored by the website, and can only be accessed by the user who created them. In the future, perhaps other data will be stored - e.g. custom waypoint definitions.


EJB are wrapper around any kind of component, if you need data access, directory, resources, services, JMS, RMI, SOA etc. EJB Provides a standard way to wrap these thing under common umbrella which has many features. It can be compared to POJO but with lot of advance feature which you dont need write.
Reusing the code.
Scalability and reliability, Do pooling, limit connection and access easily, deploy on cluster environment.
Concurrency management, Easily configure concurrency using small annotation over methods such @Lock(READ), @Lock(WRITE).
Transaction handling, You don’t need to do any changes transaction is handled easily in EJB just annotate with @TransactionAttribute(modes), it covers JDBC, JPA, JCA and JMS easily.
Smart interaction, Easy transition with JPA, if entity is stateless it will create new transaction and isolate the JPA changes. In case of sharing Make is @Stateful and extend the scope by @PersistentContent(unitName=”AccountsPU, type=EXTENDED). So it caches the value from JPA and serve the same across multiple calls on same transaction.
Lifecycle hooks, it provides lifecycle hooks to inject code for initializing, destroying and cleaning activity.
Security based access, With simple annotation methods and classes can be secured. It provides user and roles access to methods in case they are required RBAC(Role based access control).
Standardization and portability
EJB sounds very nice starting from EJB 3.0, EJB 2.0 Entity bean has moved to separate Java EE specification JPA entities. EJB mainly had 3 type of bean.
Session bean - Contains business logic and have two type Stateful and stateless.
Message Driven Bean - It encapsulate onMessage methods and get invoked whenever there is a message received from queue or topic.
Entity Bean - It was used to persist the state of object but it has moved to JPA now. EJB 3.0 supports JPA it has removed the entity bean concept. It had two type CMP and BMP, CMP container provides many inbuilt function such persist, connect, transaction etc, while BMP programmer has to write that.


MEDIArchive is an application that we want to create to keep track of various media and your progress made through them. For example, a series of movies or books. In today's society, we have a lot of media we can take in. Too much, even. It becomes difficult to remember what exactly you've seen and read or listened to. This application will be a much needed way of ensuring that you don't lose track of all of this.


The 4.4-r2 release is based on the Android 4.4.4_r2 (KitKat-MR2.2) release. We have fixed and added x86 specified code to let the system runs smoothly on x86 platforms, especially for tablets and netbooks. Except the functions of 4.4-r1, the additional features include
We tried to create universal images for most x86 platforms. This release contains two files. One is the traditional ISO file that can be booted on devices with legacy BIOS. The other is the EFI image that can be used on more modern devices with UEFI firmware. You can choose one of them depends on your devices. In doubt, try the ISO file first.
sha1sum: 67867c7990c3c0bbd01cadecf18188701b53315f
sha1sum: b3e4f2a11b77408457825f22360c79d4eabd874b
Both files can be dumped into a usb drive to get a bootable usb stick, like
dd if=android-x86-4.4-r2.iso of=/dev/sdX
where /dev/sdX is the device name of your usb drive.
repo init -u git://gitscm.sf.net/gitroot/android-x86/manifest -b android-x86-4.4-r2
repo sync
Read this page for how to compile source code.


Opposition to Rizwan’s candidature grows within Congress
Many prominent leaders from Shivajinagar skip KPCC meeting called to garner support for Mr Arshad
by Special CorrespondentOpposition from within the Congress to the candidature of Rizwan Arshad, who has been fielded by the party in Shivajinagar, grew on Monday.
While only a handful of supporters along with KPCC president Dinesh Gundu Rao, MLAs Ramalinga Reddy and N.A. Harris, and MLC Ivan D’Souza joined him while he filed nomination, none of the prominent Congress leaders from Shivajinagar, including sitting councillors, attended a meeting called by KPCC to garner support for Mr. Arshad.
Skips meeting
Sources said three of the five sitting Congress councillors M.K. Gunashekar (Jayamahal), Shakeel Ahmed (Bharatinagar), and Netravathi Krishnegowda (Ramaswamypalya), apart from several former and nominated councillors and serious contenders for the bypolls such as B.R. Naidu skipped the meeting.
“We wonder why the party has given several opportunities to Mr. Arshad in such a short span. This despite him losing the Lok Sabha polls from central Bengaluru in 2014 and 2019. Currently a MLC, he was Karnataka Youth Congress president for two terms and KPCC media in charge. Are there no other Muslim leaders in the Congress?” questioned a senior leader.
Pointing out that the party stands a good chance at winning in Shivajinagar if a “good” candidate was fielded, sources said Mr. Arshad has the backing of Congress Legislature Party leader Siddaramaiah.


In modern browsers text to speech feature is built natively in them. This means that you don't need external plugins or APIs to convert text to speech !
Example — Text to Speech
Concepts and Methods Involved
- SpeechSynthesis API — SpeechSynthesis API is the API that performs text to speech service in the browser. This is exposed through window.speechSynthesis
SpeechSynthesis API
SpeechSynthesis API is a part of the Web Speech API, that is responsible for speech service. The global window.speechSynthesis object implements the SpeechSynthesis API.
var synth = window.speechSynthesis;
The important methods defined in it are :
getVoices() : This method will give a list of available voices that can be played. They will come in different languages, and you can set a language of your preference to speak. Each voice has few properties, some of them are name, lang etc.
Important : The list of voices may be loaded asynchronously in the browser — some browsers (like Chrome) make a server request to get the voice list, while some (like Firefox) have the list loaded into them. So in order for the getVoices() method to work, you may need to wait for the list of languages to be loaded (otherwise list of voices may be returned empty). This can be done by listening to the voiceschanged event fired by window.speechSynthesis.
A simple check that can be performed is to get the voice list initially. If empty, then listen to the voiceschanged event.
var available_voices; // list of languages is probably not loaded, wait for it if(window.speechSynthesis.getVoices().length == 0) { window.speechSynthesis.addEventListener('voiceschanged', function() { available_voices = window.speechSynthesis.getVoices(); }); } else { available_voices = window.speechSynthesis.getVoices(); }
- speak() : This method will add a speech (or an utterance) to a queue called utterance queue. This speech will be spoken after all speeches in the queue before it have been spoken.
Here are the complete APIs for the SpeechSynthesis object.
SpeechSynthesisUtterance API
Whenever you want a speech to be spoken, you will need to create a SpeechSynthesisUtterance object.
var utter = new SpeechSynthesisUtterance();
This object contains properties that affect various factors defining a speech :
- lang : Language of the speech
- pitch : Pitch of the speech
- rate : Speed at which speech will be spoken
- text : Text of the speech
- voice : Voice of speech. This will be one of the voices returned by window.speechSynthesis.getVoices() method
- volume : Volume of the speech
In addition there are several events that are fired along the way of a speech, some of them are :
- onstart : Fired when speech has begun to be spoken
- onend : Fired when speech has finished
- onboundary : Fired when speech reaches a word or sentence boundary
Here are the complete APIs for the SpeechSynthesisUtterance object.
Sample Javascript Code
// list of languages is probably not loaded, wait for it
if(window.speechSynthesis.getVoices().length == 0) {
window.speechSynthesis.addEventListener('voiceschanged', function() {
textToSpeech();
});
}
else {
// languages list available, no need to wait
textToSpeech()
}
function textToSpeech() {
// get all voices that browser offers
var available_voices = window.speechSynthesis.getVoices();
// this will hold an english voice
var english_voice = '';
// find voice by language locale "en-US"
// if not then select the first voice
for(var i=0; i<available_voices.length; i++) {
if(available_voices[i].lang === 'en-US') {
english_voice = available_voices[i];
break;
}
}
if(english_voice === '')
english_voice = available_voices[0];
// new SpeechSynthesisUtterance object
var utter = new SpeechSynthesisUtterance();
utter.rate = 1;
utter.pitch = 0.5;
utter.text = 'Hello World';
utter.voice = english_voice;
// event after text has been spoken
utter.onend = function() {
alert('Speech has finished');
}
// speak
window.speechSynthesis.speak(utter);
}
Browser Compatibility
SpeechSynthesis API is availabe in all current versions of Firefox, Chrome, Edge & Safari.
Don't Autoplay a Speech
Some sites start a speech upon the page being loaded. To prevent such autoplay behaviour, it is now required to have some user interaction before speech synthesis API will work. Otherwise it will throw an error.
Find more about autoplay policies on the web.
Comments


Logic: Logic in Coq
Like its built-in programming language, Coq's built-in logic
is extremely small: universal quantification (forall) and
implication (->) are primitive, but all the other familiar
logical connectives -- conjunction, disjunction, negation,
existential quantification, even equality -- can be defined using
just these together with the Inductive definition facility.
In fact, -> and forall are the same primitive!
Coq's -> notation is actually just a shorthand for forall.
The forall notation is more general, because it allows us to
name the hypothesis. For example, consider this proposition:
Quantification and Implication
If we had a proof term inhabiting this proposition, it would be a
function with two arguments: a number n and some evidence that
n is even. But the name E for this evidence is not used in
the rest of the statement of funny_prop1, so it's a bit silly to
bother making up a name. We could write it like this instead:
Or we can write it in more familiar notation:
This illustrates that "P -> Q" is just syntactic sugar for
"forall (_:P), Q".
The logical conjunction of propositions P and Q is
represented by the following inductively defined
proposition.
Conjunction
Note that, like the definition of ev in the previous
chapter, this definition is parameterized; however, in this case,
the parameters are themselves propositions.
The intuition behind this definition is simple: to
construct evidence for and P Q, we must provide evidence
for P and evidence for Q. More precisely:
Since we'll be using conjunction a lot, let's introduce a more
familiar-looking infix notation for it.
- conj p q can be taken as evidence for and P Q if p
is evidence for P and q is evidence for Q; and
- this is the only way to give evidence for and P Q -- that is, if someone gives us evidence for and P Q, we know it must have the form conj p q, where p is evidence for P and q is evidence for Q.
(The type_scope annotation tells Coq that this notation
will be appearing in propositions, not values.)
Consider the "type" of the constructor conj:
Notice that it takes 4 inputs, namely the propositions P,Q and
evidence of P, Q, and returns as output the evidence of P /\ Q.
Besides the elegance of building everything up from a tiny
foundation, what's nice about defining conjunction this way is
that we can prove statements involving conjunction using the
tactics that we already know. For example, if the goal statement
is a conjuction, we can prove it by applying the single
constructor conj, which (as can be seen from the type of conj)
solves the current goal and leaves the two parts of the
conjunction as subgoals to be proved separately.
Theorem and_example :
(ev 0) /\ (ev 4).
Proof.
apply conj.
(* Case "left". *) apply ev_0.
(* Case "right". *) apply ev_SS. apply ev_SS. apply ev_0. Qed.
Let's take a look at the proof object for the above theorem.
Print and_example.
(* ====> conj (ev 0) (ev 4) ev_0 (ev_SS 2 (ev_SS 0 ev_0))
: ev 0 /\ ev 4 *)
Note that the proof is of the form
Just for convenience, we can also use split as a shorthand for
apply conj.
conj (ev 0) (ev 4) (...pf of ev 0...) (...pf of ev 4...)
which is what you'd expect, given the type of conj.
Exercise: 1 star, optional
The Case tactics were commented out in the proof of and_example to avoid cluttering the proof object. What would you guess the proof object will look like if we uncomment them? Try it and see. ☐Theorem and_example' :
(ev 0) /\ (ev 4).
Proof.
split.
Case "left". apply ev_0.
Case "right". apply ev_SS. apply ev_SS. apply ev_0. Qed.
Conversely, the inversion tactic can be used to take a
conjunction hypothesis in the context, calculate what evidence
must have been used to build it, and put this evidence into the
proof context.

(* WORKED IN CLASS *)
intros P Q H.
inversion H as [HP HQ].
split.
(* Case "left". *) apply HQ.
(* Case "right".*) apply HP. Qed.
Once again, we have commented out the Case tactics to make the proof object
for this theorem easy to understand. Examining it shows that all that is
really happening taking apart a record containing evidence for P and Q
and rebuilding it in the opposite order:
(* Print and_commut. *)
(* ==>
and_commut =
fun (P Q : Prop) (H : P /\ Q) =>
let H0 := match H with
| conj HP HQ => conj Q P HQ HP
end in H0
: forall P Q : Prop, P /\ Q -> Q /\ P *)
Exercise: 2 stars
In the following proof, notice how the nested pattern in the inversion breaks H : P /\ (Q /\ R) down into HP: P, HQ : Q and HR : R. Finish the proof from there:Theorem and_assoc : forall P Q R : Prop,
P /\ (Q /\ R) -> (P /\ Q) /\ R.
Proof.
intros P Q R H.
inversion H as [HP [HQ HR]].
(* FILL IN HERE *) Admitted.
☐
Exercise: 2 stars
Now we can prove the other direction of the equivalence of even and ev, which we left hanging in the last chapter. Notice that the left-hand conjunct here is the statement we are actually interested in; the right-hand conjunct is needed in order to make the induction hypothesis strong enough that we can carry out the reasoning in the inductive step. (To see why this is needed, try proving the left conjunct by itself and observe where things get stuck.)Theorem even_ev : forall n : nat,
(even n -> ev n) /\ (even (S n) -> ev (S n)).
Proof.
(* Hint: Use induction on n. *)
(* FILL IN HERE *) Admitted.
Definition iff (P Q : Prop) := (P -> Q) /\ (Q -> P).
Notation "P <-> Q" := (iff P Q) (at level 95, no associativity) : type_scope.
Theorem iff_implies : forall P Q : Prop,
(P <-> Q) -> P -> Q.
Proof.
intros P Q H.
inversion H as [HAB HBA]. apply HAB. Qed.
Theorem iff_sym : forall P Q : Prop,
(P <-> Q) -> (Q <-> P).
Proof.
(* WORKED IN CLASS *)
intros P Q H.
inversion H as [HAB HBA].
split.
Case "->". apply HBA.
Case "<-". apply HAB. Qed.
Exercise: 1 star (iff_properties)
Using the above proof that <-> is symmetric (iff_sym) as a guide, prove that it is also reflexive and transitive.
Hint: If you have an iff hypothesis in the context, you
can use inversion to break it into two separate
implications. (Think about why this works.)
Theorem iff_trans : forall P Q R : Prop,
(P <-> Q) -> (Q <-> R) -> (P <-> R).
Proof.
(* FILL IN HERE *) Admitted.
☐
Exercise: 2 stars
We have seen that the families of propositions MyProp and ev actually characterize the same set of numbers (the even ones). Prove that MyProp n <-> ev n for all n. Just for fun, write your proof as an explicit proof object, rather than using tactics. (Hint: if you make use of previously defined thoerems, you should only need a single line!)
☐
In traditional Coq, propositions phrased with <-> were a
bit inconvenient to use as hypotheses or lemmas, because they had
to be deconstructed into their two directed components in order to
be applied. Starting in Coq 8.2, using apply with an iff
proposition appears to do an implicit inversion first, so does
the right thing if either direction is relevant. Unfortunately,
this feature still seems to be a bit fragile, and it isn't
properly documented. In the rest of the book, we'll just avoid
using iff very much.
Disjunction ("logical or") can also be defined as an
inductive proposition.
Disjunction
Inductive or (P Q : Prop) : Prop :=
| or_introl : P -> or P Q
| or_intror : Q -> or P Q.
Notation "P \/ Q" := (or P Q) : type_scope.
Consider the "type" of the constructor or_introl:
It takes 3 inputs, namely the propositions P,Q and
evidence of P, and returns as output, the evidence of P /\ Q.
Next, look at the type of or_intror:
It is like or_introl but it requires evidence of Q
instead of evidence of P.
Intuitively, there are two ways of giving evidence for P \/ Q:
- give evidence for P (and say that it is P you are giving
evidence for! -- this is the function of the or_introl
constructor), or
- give evidence for Q, tagged with the or_intror constructor.
Theorem or_commut : forall P Q : Prop,
P \/ Q -> Q \/ P.
Proof.
intros P Q H.
inversion H as [HP | HQ].
Case "right". apply or_intror. apply HP.
Case "left". apply or_introl. apply HQ. Qed.
From here on, we'll use the shorthand tactics left and right
in place of apply or_introl and apply or_intror.
Theorem or_commut' : forall P Q : Prop,
P \/ Q -> Q \/ P.
Proof.
intros P Q H.
inversion H as [HP | HQ].
Case "right". right. apply HP.
Case "left". left. apply HQ. Qed.
(* Try to write down an explicit proof object for or_commut (without
using Print to look at the existing definitions). *)
(* FILL IN HERE *)
Theorem or_distributes_over_and_1 : forall P Q R : Prop,
P \/ (Q /\ R) -> (P \/ Q) /\ (P \/ R).
Proof.
intros P Q R. intros H. inversion H as [HP | [HQ HR]].
Case "left". split.
SCase "left". left. apply HP.
SCase "right". left. apply HP.
Case "right". split.
SCase "left". right. apply HQ.
SCase "right". right. apply HR. Qed.
using Print to look at the existing definitions). *)
(* FILL IN HERE *)
Theorem or_distributes_over_and_1 : forall P Q R : Prop,
P \/ (Q /\ R) -> (P \/ Q) /\ (P \/ R).
Proof.
intros P Q R. intros H. inversion H as [HP | [HQ HR]].
Case "left". split.
SCase "left". left. apply HP.
SCase "right". left. apply HP.
Case "right". split.
SCase "left". right. apply HQ.
SCase "right". right. apply HR. Qed.
Theorem or_distributes_over_and_2 : forall P Q R : Prop,
(P \/ Q) /\ (P \/ R) -> P \/ (Q /\ R).
Proof.
(* FILL IN HERE *) Admitted.
(P \/ Q) /\ (P \/ R) -> P \/ (Q /\ R).
Proof.
(* FILL IN HERE *) Admitted.
Theorem or_distributes_over_and : forall P Q R : Prop,
P \/ (Q /\ R) <-> (P \/ Q) /\ (P \/ R).
Proof.
(* FILL IN HERE *) Admitted.
P \/ (Q /\ R) <-> (P \/ Q) /\ (P \/ R).
Proof.
(* FILL IN HERE *) Admitted.
☐
The induction principles for conjunction and disjunction are a
good illustration of Coq's way of generating simplified induction
principles for Inductively defined propositions, which we
discussed in the last chapter. You try first:
Digression: Induction Principles for /\ and \/
Exercise: 1 star (and_ind_principle)
See if you can predict the induction principle for conjunction.
(* Check and_ind. *)
☐
Exercise: 1 star (or_ind_principle)
See if you can predict the induction principle for disjunction.
(* Check or_ind. *)
☐
From the inductive definition of the proposition and P Q
We've already seen several places where analogous structures
can be found in Coq's computational (Type) and logical (Prop)
worlds. Here is one more: the boolean operators andb and orb
are obviously analogs, in some sense, of the logical connectives
/\ and \/. This analogy can be made more precise by the
following theorems, which show how to translate knowledge about
andb and orb's behaviors on certain inputs into propositional
facts about those inputs.
Inductive and (P Q : Prop) : Prop :=
conj : P -> Q -> (and P Q).
we might expect Coq to generate this induction principle
conj : P -> Q -> (and P Q).
and_ind_max :
forall (P Q : Prop) (P0 : P /\ Q -> Prop),
(forall (a : P) (b : Q), P0 (conj P Q a b)) ->
forall a : P /\ Q, P0 a
but actually it generates this simpler and more useful one:
forall (P Q : Prop) (P0 : P /\ Q -> Prop),
(forall (a : P) (b : Q), P0 (conj P Q a b)) ->
forall a : P /\ Q, P0 a
and_ind :
forall P Q P0 : Prop,
(P -> Q -> P0) ->
P /\ Q -> P0
In the same way, when given the inductive definition of or P Q
forall P Q P0 : Prop,
(P -> Q -> P0) ->
P /\ Q -> P0
Inductive or (P Q : Prop) : Prop :=
| or_introl : P -> or P Q
| or_intror : Q -> or P Q.
instead of the "maximal induction principle"
| or_introl : P -> or P Q
| or_intror : Q -> or P Q.
or_ind_max :
forall (P Q : Prop) (P0 : P \/ Q -> Prop),
(forall a : P, P0 (or_introl P Q a)) ->
(forall b : Q, P0 (or_intror P Q b)) ->
forall o : P \/ Q, P0 o
what Coq actually generates is this:
forall (P Q : Prop) (P0 : P \/ Q -> Prop),
(forall a : P, P0 (or_introl P Q a)) ->
(forall b : Q, P0 (or_intror P Q b)) ->
forall o : P \/ Q, P0 o
or_ind :
forall P Q P0 : Prop,
(P -> P0) ->
(Q -> P0) ->
P \/ Q -> P0
forall P Q P0 : Prop,
(P -> P0) ->
(Q -> P0) ->
P \/ Q -> P0
Relating /\ and \/ with andb and orb
Theorem andb_true__and : forall b c,
andb b c = true -> b = true /\ c = true.
Proof.
(* WORKED IN CLASS *)
intros b c H.
destruct b.
Case "b = true". destruct c.
SCase "c = true". apply conj. reflexivity. reflexivity.
SCase "c = false". inversion H.
Case "b = false". inversion H. Qed.
Theorem and__andb_true : forall b c,
b = true /\ c = true -> andb b c = true.
Proof.
(* WORKED IN CLASS *)
intros b c H.
inversion H.
rewrite H0. rewrite H1. reflexivity. Qed.
Theorem andb_false : forall b c,
andb b c = false -> b = false \/ c = false.
Proof.
(* FILL IN HERE *) Admitted.
Theorem orb_true : forall b c,
orb b c = true -> b = true \/ c = true.
Proof.
(* FILL IN HERE *) Admitted.
Theorem orb_false : forall b c,
orb b c = false -> b = false /\ c = false.
Proof.
(* FILL IN HERE *) Admitted.
andb b c = false -> b = false \/ c = false.
Proof.
(* FILL IN HERE *) Admitted.
Theorem orb_true : forall b c,
orb b c = true -> b = true \/ c = true.
Proof.
(* FILL IN HERE *) Admitted.
Theorem orb_false : forall b c,
orb b c = false -> b = false /\ c = false.
Proof.
(* FILL IN HERE *) Admitted.
☐
Logical falsehood can be represented in Coq as an inductively
defined proposition with no constructors.
Falsehood
Intuition: False is a proposition for which there is no way
to give evidence.
Exercise: 1 star (False_ind_principle)
Can you predict the induction principle for falsehood?
(* Check False_ind. *)
☐
Since False has no constructors, inverting an assumption
of type False always yields zero subgoals, allowing us to
immediately prove any goal.
How does this work? The inversion tactic breaks contra into
each of its possible cases, and yields a subgoal for each case.
As contra is evidence for False, it has no possible cases,
hence, there are no possible subgoals and the proof is done.
Conversely, the only way to prove False is if there is already
something nonsensical or contradictory in the context:
Actually, since the proof of False_implies_nonsense
doesn't actually have anything to do with the specific nonsensical
thing being proved; it can easily be generalized to work for an
arbitrary P:
Theorem ex_falso_quodlibet : forall (P:Prop),
False -> P.
Proof.
intros P contra.
inversion contra. Qed.
The Latin ex falso quodlibet means, literally, "from
falsehood follows whatever you please." This theorem is also
known as the principle of explosion.
Since we have defined falsehood in Coq, we might wonder whether it
is possible to define truth in the same way. Naturally, the
answer is yes.
Truth
Exercise: 2 stars
Define True as another inductively defined proposition. What induction principle will Coq generate for your definition? (The intution is that True should be a proposition for which it is trivial to give evidence. Alternatively, you may find it easiest to start with the induction principle and work backwards to the inductive definition.)(* FILL IN HERE *)
☐
However, unlike False, which we'll use extensively, True is
just a theoretical curiosity: it is trivial (and therefore
uninteresting) to prove as a goal, and it carries no useful
information as a hypothesis.
The logical complement of a proposition P is written not
P or, for shorthand, ~P:
Negation
Definition not (P:Prop) := P -> False.
Notation "~ x" := (not x) : type_scope.
Check not.
(* ====> Prop -> Prop *)
The intuition is that, if P is not true, then anything at
all (even False) should follow from assuming P.
It takes a little practice to get used to working with
negation in Coq. Even though you can see perfectly well why
something is true, it can be a little hard at first to get things
into the right configuration so that Coq can see it! Here are
proofs of a few familiar facts about negation to get you warmed
up.
Theorem not_False :
~ False.
Proof.
unfold not. intros H. inversion H. Qed.
Theorem contradiction_implies_anything : forall P Q : Prop,
(P /\ ~P) -> Q.
Proof.
(* WORKED IN CLASS *)
intros P Q H. inversion H as [HP HNA]. unfold not in HNA.
apply HNA in HP. inversion HP. Qed.
Theorem double_neg : forall P : Prop,
P -> ~~P.
Proof.
(* WORKED IN CLASS *)
intros P H. unfold not. intros G. apply G. apply H. Qed.
Exercise: 2 stars (double_neg_inf)
Write an informal proof of double_neg:☐
Exercise: 2 stars
Theorem contrapositive : forall P Q : Prop,
(P -> Q) -> (~Q -> ~P).
Proof.
(* FILL IN HERE *) Admitted.
(P -> Q) -> (~Q -> ~P).
Proof.
(* FILL IN HERE *) Admitted.
☐
Theorem five_not_even :
~ ev 5.
Proof.
(* WORKED IN CLASS *)
unfold not. intros Hev5. inversion Hev5 as [|n Hev3 Heqn].
inversion Hev3 as [|n' Hev1 Heqn']. inversion Hev1. Qed.
Exercise: 1 star
Theorem five_not_even confirms the unsurprising fact that five is not an even number. Prove this more interesting fact:Theorem ev_not_ev_S : forall n,
ev n -> ~ ev (S n).
Proof.
unfold not. intros n H. induction H. (* not n! *)
(* FILL IN HERE *) Admitted.
☐
Exercise: 1 star, optional (informal_not_PNP)
Write an informal proof (in English) of the proposition forall P : Prop, ~(P /\ ~P).(* FILL IN HERE *)
☐
Note that some theorems that are true in classical
logic are not provable in Coq's "built in" constructive logic...
Theorem classic_double_neg : forall P : Prop,
~~P -> P.
Proof.
(* WORKED IN CLASS *)
intros P H. unfold not in H.
(* But now what? There is no way to "invent" evidence for P. *)
Admitted.
Exercise: 5 stars, optional (classical_axioms)
For those who like a challenge, here is an exercise taken from the Coq'Art book (p. 123). The following five statements are often considered as characterizations of classical logic (as opposed to constructive logic, which is what is "built in" to Coq). We can't prove them in Coq, but we can consistently add any one of them as an unproven axiom if we wish to work in classical logic. Prove that these five propositions are equivalent.Definition peirce := forall P Q: Prop,
((P->Q)->P)->P.
Definition classic := forall P:Prop,
~~P -> P.
Definition excluded_middle := forall P:Prop,
P \/ ~P.
Definition de_morgan_not_and_not := forall P Q:Prop,
~(~P/\~Q) -> P\/Q.
Definition implies_to_or := forall P Q:Prop,
(P->Q) -> (~P\/Q).
(* FILL IN HERE *)
Notation "x <> y" := (~ (x = y)) : type_scope.
Since inequality involves a negation, it again requires
a little practice to be able to work with it fluently. Here
is one very useful trick. If you are trying to prove a goal
that is nonsensical (e.g., the goal state is false = true),
apply the lemma ex_falso_quodlibet to change the goal to
False. This makes it easier to use assumptions of the form
~P that are available in the context -- in particular,
assumptions of the form x<>y.
Theorem not_false_then_true : forall b : bool,
b <> false -> b = true.
Proof.
intros b H. destruct b.
Case "b = true". reflexivity.
Case "b = false".
unfold not in H.
apply ex_falso_quodlibet.
apply H. reflexivity. Qed.
Theorem not_eq_beq_false : forall n n' : nat,
n <> n' ->
beq_nat n n' = false.
Proof.
(* FILL IN HERE *) Admitted.
n <> n' ->
beq_nat n n' = false.
Proof.
(* FILL IN HERE *) Admitted.
Theorem beq_false_not_eq : forall n m,
false = beq_nat n m -> n <> m.
Proof.
(* FILL IN HERE *) Admitted.
false = beq_nat n m -> n <> m.
Proof.
(* FILL IN HERE *) Admitted.
☐
Another critical logical connective is existential
quantification. We can capture what this means with
the following definition:
Existential Quantification
That is, ex is a family of propositions indexed by a type X
and a property P over X. In order to give evidence for the
assertion "there exists an x for which the property P holds"
we must actually name a witness -- a specific value x -- and
then give evidence for P x, i.e., evidence that x has the
property P.
For example, consider this existentially quantified proposition:
To prove this proposition, we need to choose a particular number
as witness -- say, 4 -- and give some evidence that that number is
even.
Here's the induction principle that Coq generates:
Check ex_ind.
(* ===> forall (X:Type) (P: X->Prop) (Q: Prop),
(forall witness:X, P witness -> Q) ->
ex X P ->
Q *)
This induction principle can be understood as follows: If we have a
function f that can construct evidence for Q given any
witness of type X together with evidence that this witness has
property P, then from a proof of ex X P we can extract the
witness and evidence that must have been supplied to the
constructor, give these to f, and thus obtain a proof of
Q.
Next, Coq's notation definition facility can be used to
introduce more familiar notation for writing existentially
quantified propositions, exactly parallel to the built-in syntax
for universally quantified propositions. Instead of writing ex
nat ev to express the proposition that there exists some number
that is even, for example, we can write exists x:nat, ev x. (It
is not necessary to understand the details of how the Notation
definition works!)
Notation "'exists' x , p" := (ex _ (fun x => p))
(at level 200, x ident, right associativity) : type_scope.
Notation "'exists' x : X , p" := (ex _ (fun x:X => p))
(at level 200, x ident, right associativity) : type_scope.
We can use the same set of tactics as always for
manipulating existentials. For example, if to prove an
existential, we apply the constructor ex_intro. Since the
premise of ex_intro involves a variable (witness) that does
not appear in its conclusion, we need to explicitly give its value
when we use apply.
Example exists_example_1 : exists n, n + (n * n) = 6.
Proof.
apply ex_intro with (witness:=2).
reflexivity. Qed.
Note, again, that we have to explicitly give the witness.
Or, instead of writing apply ex_intro with (witness:=e) all the
time, we can use the convenient shorthand exists e, which means
the same thing.
Conversely, if we have an existential hypothesis in the
context, we can eliminate it with inversion. Note the use
of the as... pattern to name the variable that Coq
introduces to name the witness value and get evidence that
the hypothesis holds for the witness. (If we don't
explicitly choose one, Coq will just call it witness, which
makes proofs confusing.)
Theorem exists_example_2 : forall n,
(exists m, n = 4 + m) ->
(exists o, n = 2 + o).
Proof.
intros n H.
inversion H as [m Hm].
exists (2 + m).
apply Hm. Qed.
(* FILL IN HERE *)
Complete the definition of the following proof object:
☐
Exercise: 1 star
Prove that "P holds for all x" and "there is no x for which P does not hold" are equivalent assertions.Theorem dist_not_exists : forall (X:Type) (P : X -> Prop),
(forall x, P x) -> ~ (exists x, ~ P x).
Proof.
(* FILL IN HERE *) Admitted.
☐
Exercise: 3 stars, optional
The other direction requires the classical "law of the excluded middle":
Theorem not_exists_dist :
excluded_middle ->
forall (X:Type) (P : X -> Prop),
~ (exists x, ~ P x) -> (forall x, P x).
Proof.
(* FILL IN HERE *) Admitted.
excluded_middle ->
forall (X:Type) (P : X -> Prop),
~ (exists x, ~ P x) -> (forall x, P x).
Proof.
(* FILL IN HERE *) Admitted.
Theorem dist_exists_or : forall (X:Type) (P Q : X -> Prop),
(exists x, P x \/ Q x) <-> (exists x, P x) \/ (exists x, Q x).
Proof.
(* FILL IN HERE *) Admitted.
☐
Even Coq's equality relation is not built in. It has the
following inductive definition. (We enclose the definition in a
module to avoid confusion with the standard library equality,
which we have used extensively already).
Equality
Module MyEquality.
Inductive eq (X:Type) : X -> X -> Prop :=
refl_equal : forall x, eq X x x.
Notation "x = y" := (eq _ x y) (at level 70, no associativity) : type_scope.
This is a bit subtle. The way to think about it is that,
given a set X, it defines a family of propositions "x is
equal to y," indexed by pairs of values (x and y) from X.
There is just one way of constructing evidence for members of this
family: with the constructor refl_equal. Now we are down to the bedrock: The primitive feature of Coq that
makes this definition work is the ability to make an Inductive
declaration with a constructor whose type only permits it to be
applied to three arguments where the second and third are the
same. (Strictly speaking, "the same modulo simplification.")
Here is an alternate definition -- the one that actually appears
in the Coq standard library.
Inductive eq' (X:Type) (x:X) : X -> Prop :=
refl_equal' : eq' X x x.
Notation "x =' y" := (eq' _ x y) (at level 70, no associativity) : type_scope.
Theorem two_defs_of_eq_coincide : forall (X:Type) x y,
eq X x y <-> eq' X x y.
Proof.
(* FILL IN HERE *) Admitted.
☐
The advantage of the second definition is that the induction
principle that Coq derives for it is precisely the familiar
principle of Leibniz equality: what we mean when we say "x and
y are equal" is that every property on P that is true of x
is also true of y.
Check eq'_ind.
(* ====> forall (X : Type) (x : X) (P : X -> Prop),
P x -> forall y : X, x =' y -> P y *)
One important consideration remains: what does it actually mean to
say that the arguments to refl_equal must be "the same" ?
Certainly, it is sufficient if they are syntactically identical.
But in fact, Coq is much more liberal: it treats as "the same" any
two terms that are convertible according to a simple set of
computation rules. These rules, which are very similar to those
used by Eval simpl, include evaluation of function application,
inlining of definitions, and simplification of matches.
In tactic-based proofs of equality, the conversion rules are
normally hidden in uses of simpl (either explicit or implicit in
reflexivity). But you can see them directly at work in the
following explicit proof objects:
Definition four : 2 + 2 = 1 + 3 :=
refl_equal nat 4.
Definition singleton : forall (X:Set) (x:X), []++[x] = x::[] :=
fun (X:Set) (x:X) => refl_equal (list X) [x].
End MyEquality.
Inversion, Again
- takes a hypothesis H whose type is some inductively
defined proposition P
- for each constructor C in P's definition
- generates a new subgoal in which we assume H was
built with C
- adds the arguments (premises) of C to the context of
the subgoal as extra hypotheses
- matches the conclusion (result type) of C against the
current goal and calculates a set of equalities that must
hold in order for C to be applicable
- adds these equalities to the context of the subgoal
- if the equalities are not satisfiable (e.g., they involve things like S n = O, immediately solves the subgoal.
- generates a new subgoal in which we assume H was
built with C
Relations as Propositions
We've already seen an inductive definition of one
fundamental relation: equality. Another useful one is the "less
than or equal to" relation on numbers:
This definition should be fairly intuitive. It says that
there are two ways to give evidence that one number is less than
or equal to another: either observe that they are the same number,
or give evidence that the first is less than or equal to the
predecessor of the second.
Inductive le : nat -> nat -> Prop :=
| le_n : forall n, le n n
| le_S : forall n m, (le n m) -> (le n (S m)).
Check le_ind.
(* ===> forall P : nat -> nat -> Prop,
(forall n : nat, P n n) ->
(forall n m : nat, le n m -> P n m -> P n (S m)) ->
forall n n0 : nat, le n n0 -> P n n0 *)
End LeFirstTry.
This is a fine definition of the <= relation, but we can
streamline it a little by observing that the left-hand argument n
is the same everywhere in the definition, so we can actually make
it a "general parameter" to the whole definition, rather than an
argument to each constructor. (This is similar to what we did
in our second definition of the eq relation, above.)
Inductive le (n:nat) : nat -> Prop :=
| le_n : le n n
| le_S : forall m, (le n m) -> (le n (S m)).
Notation "m <= n" := (le m n).
The second one is better, even though it looks less symmetric.
Why? Because it gives us a simpler induction principle.
(The same was true of our second version of eq.)
Check le_ind.
(* ====> forall (n : nat) (P : nat -> Prop),
P n ->
(forall m : nat, n <= m -> P m -> P (S m)) ->
forall n0 : nat, n <= n0 -> P n0 *)
By contrast, the induction principle that Coq calculates for the
first definition has a lot of extra quantifiers, which makes it
messier to work with when proving things by induction. Here is
the induction principle for the first le:
(* Check le_ind. (the first one above) *)
(* ===> le_ind
: forall P : nat -> nat -> Prop,
(forall n : nat, P n n) ->
(forall n m : nat, LeFirstTry.le n m -> P n m -> P n (S m)) ->
forall n n0 : nat, LeFirstTry.le n n0 -> P n n0 *)
Proofs of facts about <= using the constructors le_n and
le_S follow the same patterns as proofs about properties, like
ev in the previous chapter. We can apply the constructors to
prove <= goals (e.g., to show that 3<=3 or 3<=6), and we can
use tactics like inversion to extract information from <=
hypotheses in the context (e.g., to prove that ~(2 <= 1).)
Here are some sanity checks on the definition. (Notice that,
although these are the same kind of simple "unit tests" as we gave
for the testing functions we wrote in the first few lectures, we
must construct their proofs explicitly -- simpl and
reflexivity don't do the job, because the proofs aren't just a
matter of simplifying computations.
Theorem test_le1 :
3 <= 3.
Proof.
(* WORKED IN CLASS *)
apply le_n. Qed.
Theorem test_le2 :
3 <= 6.
Proof.
(* WORKED IN CLASS *)
apply le_S. apply le_S. apply le_S. apply le_n. Qed.
Theorem test_le3 :
~ (2 <= 1).
Proof.
(* WORKED IN CLASS *)
intros H. inversion H. inversion H1. Qed.
The "strictly less than" relation n < m can now be defined
in terms of le.
A few more simple relations on numbers
Inductive square_of : nat -> nat -> Prop :=
sq : forall n:nat, square_of n (n * n).
Inductive next_nat (n:nat) : nat -> Prop :=
| nn : next_nat n (S n).
Inductive next_even (n:nat) : nat -> Prop :=
| ne_1 : ev (S n) -> next_even n (S n)
| ne_2 : ev (S (S n)) -> next_even n (S (S n)).
Exercise: 2 stars
Define an inductive relation total_relation that holds between every pair of natural numbers.(* FILL IN HERE *)
(* FILL IN HERE *)
We can define three-place relations, four-place relations,
etc., in just the same way as binary relations.
- Which of the following propositions are provable?
- R 1 1 2
- R 2 2 6
- If we dropped constructor c5 from the definition of R,
would the set of provable propositions change? Briefly (1
sentence) explain your answer.
- If we dropped constructor c4 from the definition of R, would the set of provable propositions change? Briefly (1 sentence) explain your answer.
☐
Exercise: 3 stars, optional (R_fact)
State and prove an equivalent characterization of the relation R. That is, if R m n o is true, what can we say about m, n, and o, and vice versa?
(* FILL IN HERE *)
☐
Exercise: 4 stars (filter_challenge)
One of the main purposes of Coq is to prove that programs match their specifications. To this end, let's prove that our definition of filter matches a specification. Here is the specification, written out informally in English.
[1,4,6,2,3]
is an in-order merge of
[1,6,2]
and
[4,3].
(* FILL IN HERE *)
Inductive appears_in {X:Type} (a:X) : list X -> Prop :=
| ai_here : forall l, appears_in a (a::l)
| ai_later : forall b l, appears_in a l -> appears_in a (b::l).
...gives us a precise way of saying that a value a appears at
least once as a member of a list l.
Here's a pair of warm-ups about appears_in.
Lemma appears_in_app : forall {X:Type} (xs ys : list X) (x:X),
appears_in x (xs ++ ys) -> appears_in x xs \/ appears_in x ys.
Proof.
(* FILL IN HERE *) Admitted.
☐
Lemma app_appears_in : forall {X:Type} (xs ys : list X) (x:X),
appears_in x xs \/ appears_in x ys -> appears_in x (xs ++ ys).
Proof.
(* FILL IN HERE *) Admitted.
☐
Now use appears_in to define a proposition disjoint X l1 l2, which
should be provable exactly when l1 and l2 are lists (with elements of type X) that
have no elements in common.
(* FILL IN HERE *)
☐
Next, use appears_in to define an inductive proposition
no_repeats X l, which should be provable exactly when l is a
list (with elements of type X) where every member is different
from every other. For example, no_repeats nat [1,2,3,4] and
no_repeats bool [] should be provable, while no_repeats nat
[1,2,1] and no_repeats bool [true,true] should not be.
(* FILL IN HERE *)
☐
Finally, state and prove one or more interesting theorems relating disjoint,
no_repeats and ++ (list append).
(* FILL IN HERE *)
Exercise: 3 stars (all_forallb)
Inductively define a property all of lists, parameterized by a type X and a property P : X -> Prop, such that all X P l asserts that P is true for every element of the list l.
Recall the function forallb, from the exercise
forall_exists_challenge in Poly.v:
Fixpoint forallb {X : Type} (test : X -> bool) (l : list X) : bool :=
match l with
| [] => true
| x :: l' => andb (test x) (forallb test l')
end.
Using the property all, write down a specification for forallb,
and prove that it satisfies the specification. Try to make your
specification as precise as possible.
Are there any important properties of the function forallb which
are not captured by your specification?
(* FILL IN HERE *)
☐
Let's pause briefly to record several facts about the <=
and < relations that we are going to need later in the
course. The proofs make good practice exercises.
Digression: More Facts about <= and <
Exercise: 2 stars, optional (le_exercises)
Theorem O_le_n : forall n,
0 <= n.
Proof.
(* FILL IN HERE *) Admitted.
Theorem n_le_m__Sn_le_Sm : forall n m,
n <= m -> S n <= S m.
Proof.
(* FILL IN HERE *) Admitted.
Theorem Sn_le_Sm__n_le_m : forall n m,
S n <= S m -> n <= m.
Proof.
intros n m. generalize dependent n. induction m.
(* FILL IN HERE *) Admitted.
Theorem le_plus_l : forall a b,
a <= a + b.
Proof.
(* FILL IN HERE *) Admitted.
Theorem plus_lt : forall n1 n2 m,
n1 + n2 < m ->
n1 < m /\ n2 < m.
Proof.
(* FILL IN HERE *) Admitted.
Theorem lt_S : forall n m,
n < m ->
n < S m.
Proof.
(* FILL IN HERE *) Admitted.
Theorem ble_nat_true : forall n m,
ble_nat n m = true -> n <= m.
Proof.
(* FILL IN HERE *) Admitted.
Theorem ble_nat_n_Sn_false : forall n m,
ble_nat n (S m) = false ->
ble_nat n m = false.
Proof.
(* FILL IN HERE *) Admitted.
Theorem ble_nat_false : forall n m,
ble_nat n m = false -> ~(n <= m).
Proof.
(* Hint: Do the right induction! *)
(* FILL IN HERE *) Admitted.
(* Formulating inductive definitions of predicates is an important skill
you'll need in this course.
Try to solve this exercise without any help at all. If you do receive
assistance from anyone, please say so specifically in a comment.
We say that a list of numbers "stutters" if it repeats the same number
consecutively. The predicate "nostutter(mylist)" means that mylist
does not stutter. Formulate an inductive definition for nostutter.
This is different from no_repeats; the sequence 1,4,1 repeats but
does not stutter.
*)
Inductive nostutter: list nat -> Prop :=
(* FILL IN HERE *)
.
(* Make sure each of these tests succeeds, but you are free
to change the proof if the given one doesn't work for you.
Your definition might be different from mine and still correct,
in which case the examples might need a different proof.
Also, the proofs use tactics you haven't seen yet; if you are uncomfortable
using them, you can prove each example with more basic tactics. *)
Example test_nostutter_1: nostutter [3,1,4,1,5,6].
(* Proof. repeat constructor; apply beq_false_not_eq; auto. Qed. *)
(* FILL IN HERE *) Admitted.
Example test_nostutter_2: nostutter [].
(* Proof. repeat constructor; apply beq_false_not_eq; auto. Qed. *)
(* FILL IN HERE *) Admitted.
Example test_nostutter_3: nostutter [5].
(* Proof. repeat constructor; apply beq_false_not_eq; auto. Qed. *)
(* FILL IN HERE *) Admitted.
Example test_nostutter_4: not (nostutter [3,1,1,4]).
(* Proof. intro.
repeat match goal with h: nostutter _ |- _ => inversion h; clear h; subst end.
contradiction H1; auto.
Qed.
*)
(* FILL IN HERE *) Admitted.
(* *)
Exercise: 4 stars, optional (pigeonhole principle)
The "pigeonhole principle" states a basic fact about counting: if you distribute more than n items into n pigeonholes, some pigeonhole must contain at least two items. As is often the case, this apparently trivial fact about numbers requires non-trivial machinery to prove, but we now have enough...
Lemma app_length : forall {X:Type} (l1 l2 : list X),
length (l1 ++ l2) = length l1 + length l2.
Proof.
(* FILL IN HERE *) Admitted.
Lemma appears_in_app_split : forall {X:Type} (x:X) (l:list X),
appears_in x l ->
exists l1, exists l2, l = l1 ++ (x::l2).
Proof.
(* FILL IN HERE *) Admitted.
length (l1 ++ l2) = length l1 + length l2.
Proof.
(* FILL IN HERE *) Admitted.
Lemma appears_in_app_split : forall {X:Type} (x:X) (l:list X),
appears_in x l ->
exists l1, exists l2, l = l1 ++ (x::l2).
Proof.
(* FILL IN HERE *) Admitted.
Now define a predicate repeats, analogous to the no_repeats,
such that repeats X l asserts that l contains at least one
repeated element (of type X).
Now here's a way to formalize the pigeonhole principle. List l2
represents a list of pigeonhole labels, and list l1 represents an
assignment of items to labels: if there are more items than labels,
at least two items must have the same label. You will almost
certainly need to use the excluded_middle hypothesis.
Theorem pigeonhole_principle: forall {X:Type} (l1 l2:list X),
excluded_middle ->
(forall x, appears_in x l1 -> appears_in x l2) ->
length l2 < length l1 ->
repeats l1.
Proof. intros X l1. induction l1.
(* FILL IN HERE *) Admitted.
excluded_middle ->
(forall x, appears_in x l1 -> appears_in x l2) ->
length l2 < length l1 ->
repeats l1.
Proof. intros X l1. induction l1.
(* FILL IN HERE *) Admitted.
Informal Proofs, Again
Explicit Proof Objects for Induction.
(* Check nat_ind. *)
(* ===>
nat_ind : forall P : nat -> Prop,
P 0%nat ->
(forall n : nat, P n -> P (S n)) ->
forall n : nat, P n *)
There's nothing magic about this induction lemma: it's just
another Coq lemma that requires a proof. Coq generates the proof
automatically too...
(* Print nat_ind. Print nat_rect. *)
(* ===> (after some manual inlining)
nat_ind =
fun (P : nat -> Type)
(f : P 0%nat)
(f0 : forall n : nat, P n -> P (S n)) =>
fix F (n : nat) : P n :=
match n as n0 return (P n0) with
| 0%nat => f
| S n0 => f0 n0 (F n0)
end.
*)
We can read this as follows:
Suppose we have evidence f that P holds on 0, and
evidence f0 that forall n:nat, P n -> P (S n).
Then we can prove that P holds of an arbitrary nat n via
a recursive function F (here defined using the expression
form Fix rather than by a top-level Fixpoint
declaration). F pattern matches on n:
Aside to those interested in functional programming: You may
notice that the match in F requires an annotation as n0
return (P n0) to help Coq's typechecker realize that the two arms
of the match actually return the same type (namely P n). This
is essentially like matching over a GADT in Haskell. In fact, F
has a dependent type: its result type depends on its argument;
GADT's can be used to describe simple dependent types like this.
We can adapt this approach to proving nat_ind to help prove
non-standard induction principles too. Recall our desire to
prove that
forall n : nat, even n -> ev n.
Attempts to do this by standard induction on n fail, because the
induction principle only lets us proceed when we can prove that
even n -> even (S n) -- which is of course never provable. What
we did earlier in this chapter was a bit of a hack:
Theorem even_ev : forall n : nat,
(even n -> ev n) /\ (even (S n) -> ev (S n)).
We can make a much better proof by defining and proving a
non-standard induction principle that goes "by twos":
- If it finds 0, F uses f to show that P n holds.
- If it finds S n0, F applies itself recursively on n0 to obtain evidence that P n0 holds; then it applies f0 on that evidence to show that P (S n) holds.
Definition nat_ind2 :
forall (P : nat -> Prop),
P 0 ->
P 1 ->
(forall n : nat, P n -> P (S(S n))) ->
forall n : nat , P n :=
fun P => fun P0 => fun P1 => fun PSS =>
fix f (n:nat) := match n return P n with
0 => P0
| 1 => P1
| S (S n') => PSS n' (f n')
end.
Once you get the hang of it, it is entirely straightforward to
give an explicit proof term for induction principles like this.
Proving this as a lemma using tactics is much less intuitive --
try it!
The induction ... using tactic gives a convenient way to
specify a non-standard induction principle like this.
Lemma even_ev' : forall n, even n -> ev n.
Proof.
intros.
induction n as [ | |n'] using nat_ind2.
Case "even 0".
apply ev_0.
Case "even 1".
inversion H.
Case "even (S(S n'))".
apply ev_SS.
apply IHn'. unfold even. unfold even in H. simpl in H. apply H.
Qed.
The Coq Trusted Computing Base.
- The checker must make sure that match expressions are exhaustive. That is, there must be an arm for every possible constructor. To see why, consider the following alleged proof object:
(* Definition or_bogus : forall P Q, P \/ Q -> P :=
fun (P Q : Prop) (A : P \/ Q) =>
match A with
| or_introl H => H
end.
*)
- The checker must make sure that each fix expression terminates. It does this using a syntactic check to make sure that each recursive call is on a subexpression of the original argument. To see why this is essential, consider the alleged proof:
(*
Definition nat_false : forall (n:nat), False :=
fix f (n:nat) : False := f n.
*)
Again, this is perfectly well-typed, but (fortunately) Coq will
reject it.
- Since Coq types can themselves be expressions, the checker must
normalize these (by using the conversion rules) before comparing them.
Note that the soundness of Coq depends only on the correctness of this typechecking engine, not on the tactic machinery. If there is a bug in a tactic implementation (and this certainly does happen!), that tactic might construct an invalid proof term. But when you type Qed, Coq checks the term for validity from scratch. Only lemmas whose proofs pass the type-checker can be used in further proof developments.


Before Change
def save_tensors(collected_tensors, experiment_dir_name):
for tensor_name, tensor_values in collected_tensors.items():
np_filename = os.path.join(
experiment_dir_name,
make_safe_filename(tensor_name) + ".npy"
After Change
def save_tensors(collected_tensors, experiment_dir_name):
filenames = []
for tensor_name, tensor_value in collected_tensors:
np_filename = os.path.join(
experiment_dir_name,
make_safe_filename(tensor_name) + ".npy"
)
np.save(np_filename, tensor_value.numpy())
filenames.append(np_filename)
return filenames
def print_weight_names(