Dennis Ritchie
Published on June 25, 2017
Dennis Ritchie and Ken Thompson
This is a re-publish of an article I wrote back in October 2011 after Steve and Dennis’ deaths. Small disclosure: it was written in a time when I was just starting out with programming and I did not knew Rasmus, Andi or Zeev yet.
It’s safe to say that with the death of Steve Jobs the world has lost an icon, a visionary and a beloved human being. I don’t think I’ve ever saw such a wave of response on the death of a famous person. It’s all normal though. I mean, he lived an amazing life, inspiring lots of people and developing products which changed the world we live in today. For some, Steve was more than just the CEO of Apple.
Still, it strikes me that while one visionary dies, others are hardly mentioned. People who did evenly great things but behind the scenes. People like Dennis Ritchie. Doesn’t ring a bell? No worries, I did not knew him either.
I’m a programmer. I mostly code in PHP at work. If you’d ask me who invented PHP I would not know the answer. That’s the way things go. We use products but we don’t know anything about the people behind them. The inventors. The creators.
Dennis Ritchie was a creator. He created the programming language C for the Unix System. A language from which many other derivatives have been made. It’s not just a milestone in programming. I think it was thé milestone in programming. I think the impact of it will surprise you.
Look around you. I bet there are at least 5 devices in the room you’re in which use some sort of derivative from C. The TV in your living room. The device you’re reading this on. The microwave in the kitchen. The digital watch on your wrist.
You would not believe how many devices use some sort of programming language today. There’s hardly any business in the modern world that doesn’t uses a device with some sort of programming language. It made our world easier to live in. It made our world like it is today.
And it’s all thanks to Dennis Ritchie.
While I personally think that inventing C was a little more historic then building the first iMac, it are two different things. I can understand that Steve got the most attention from the crowd but I would like to let everyone know about someone who did equally or perhaps even greater things.
Dennis' death was hardly mentioned in the press. I can’t blame them, he was hardly known. Still, we shouldn’t just ignore it.
I’ll remember both of them as two persons who brought us ways that made life possible as we live it today. And that’s something I won’t forget soon.
If you’d like to read something more thorough and professional I’d suggest you read this article by Geoff Duncan. I’m still a beginning blogger after all.
← Previous post
One Club PlayerNext post →
The New Laravel.ioAbout Me
I'm a software engineer from Antwerp, Belgium. I work as one of the core team members of Laravel, the popular PHP framework.
My passions are open-source, building communities, managing software teams, and creating quality and maintainable products.
I'm currently building Eventy, an app for user group leaders, conference organisers, speakers, attendees, sponsors and venue owners.
I organize meetups for Full Stack Belgium in the cities of Antwerp and Ghent. I'm also the co-organizer of Full Stack Europe, a conference for every kind of developer.
Follow me on Twitter at @driesvints where I also share some Dev Tips from time to time. You can contact me by email.


Join us any evening for refreshing elixirs, conversation and maybe a game or two of Dance
Dance Revolution Wireless access is always provided; BYOWs (Bring your own Web server).
Directions
You'll find us right in the center of downtown Webville. Come join us!


{% extends "mxv/base.html" %} {% load static %} {% block title %}Password reset{% endblock %} {% block content %}
If you're a member of Momentum and you've already activated your account but forgotten your password then use this form to reset your password.
If you’re a member of Momentum but haven't activated your account yet, just check your email for your activation link from<EMAIL_ADDRESS>or request a new account activation email.
Not a member of Momentum yet? Sign up today and join the discussion.


Psalm 3
A psalm of David, when he fled from Absalom his son.
1 Yahweh, how many are my enemies!
Many have turned away and attacked me.
2 Many say about me,
"There is no help for him from God."

Selah
5 I lay down and slept;
I awoke, for Yahweh protected me.
6 I will not be afraid of the multitudes of people
who have set themselves against me on every side.
7 Rise up, Yahweh! Save me, my God!
For you will hit all my enemies on the jaw;
you will break the teeth of the wicked.
8 Salvation comes from Yahweh.
May your blessings be on your people.
Selah


Jammit is an industrial strength asset packaging library for Rails, providing both the CSS and JavaScript concatenation and compression that you'd expect, as well as ahead-of-time gzipping, built-in JavaScript template support, and optional Data-URI / MHTML image embedding.
Jammit is an open-source component of DocumentCloud.
Installation |
Configuration |
Usage |
Precaching Assets
Embedding Images |
JavaScript Templates |
Change Log
Source Code | Internal Docs | Image Embedding Example
ActionController::Routing::Routes.draw do |map| ... Jammit::Routes.draw(map) ... end
Jammit uses the config/assets.yml YAML configuration file to define packages and to set extra options. A package is an ordered set of directory glob rules that will be expanded into a unique list of files. An example of a complete assets.yml follows:
embed_images: on javascripts: workspace: - public/javascripts/vendor/jquery.js - public/javascripts/lib/*.js - public/javascripts/views/**/*.js stylesheets: common: - public/stylesheets/reset.css - public/stylesheets/widgets/*.css workspace: - public/stylesheets/pages/workspace.css empty: - public/stylesheets/pages/empty.css templates: everything: - app/views/jst/**/*.jst
There are a number of extra configuration options that you may add to the assets.yml configuration file to customize the way Jammit behaves:
| package_assets | on | off | always | Defaults to on, packaging and caching assets in every environment but development. Never packages when off, always packages when always. |
| embed_images | on | off | datauri | Defaults to off. When on, packages and caches Data-URI and MTHML variants of your stylesheets, with whitelisted images embedded inline. Using datauri serves embedded images only to browsers that support Data-URIs, and serves unmodified stylesheets to Internet Explorer 7 or lower. |
| template_function | on | off | ... | The JavaScript function that compiles your JavaScript templates (JST). Defaults to on, which uses a bundled variant of Micro-Templating. Set it to _.template if you use Underscore.js, or new Template for Prototype. Turn it off to pass through the template strings unaltered. |
| package_path | The URL at which packaged assets are cached and made available. Defaults to assets, but if you already have an existing AssetsController with a different purpose, you could change it to, say, packages. |
To access your packages in views, use the corresponding helper. The helper methods can include multiple packages at once:
<%= include_stylesheets :common, :workspace %> <%= include_javascripts :workspace %> <%= include_templates :everything %>
In development, no packaging is performed, so you'll see a list of individual references to all of the JavaScript and CSS files. The assets.yml configuration file is reloaded on every development request, so you can change the contents of your packages without needing to restart Rails.
In all other environments, or if package_assets is set to "always", you'll get tags for the merged packages. Both CSS and JavaScript are run through the excellent YUI Compressor.
Installing the Jammit gem provides the optional but handy jammit command-line utility, which can be hooked into your deployment process. The jammit command reads in your configuration file, generates all of the defined packages, and gzips them at the highest compression setting. In order to serve these static gzipped versions, configure your Nginx http_gzip_static_module, or your Apache Content Negotiation MultiViews. It's also a good idea to have gzip compression turned on for the remainder of your static assets, including any asset packages that aren't gzipped-in-advance. Adding Nginx's http_gzip_module or Apache's mod_deflate will do the trick.
The jammit command can be passed options to configure the path to assets.yml, and the output directory in which all packages are compiled. Run jammit --help to see all of the options.
After you've finished concatenating and compressing your JavaScript and CSS files into streamlined downloads, the slowest part of your page load is probably the images.  Unfortunately, image sprites can be complicated to position (especially with horizontal and vertical tiling), and a real pain to create and maintain. With a little elbow grease from Jammit, your spriting woes can be a thing of the past.
With embed_images turned on, Jammit will inline image files directly into your compiled CSS, using Data-URIs in supported browsers, and MHTML in Internet Explorer 7 and below. Instead of ten CSS files referencing 30 images, you can have a single, packaged, minified, gzipped CSS file, with the images coming in all at once instead of piecemeal, making just a single HTTP request.
Take a look at this example (especially on a slow connection or wifi):
Normal Image Loading vs.
Jammit Image Embedding
Embedded images can be a little tricky, which is why using them is strictly on an opt-in basis. After enabling embed_images in the configuration file, you'll need to whitelist the images that you'd like to make embeddable. When processing CSS, Jammit will only embed images that have .../embed/... somewhere in their path — the other images will be left untouched. You can make a single public/images/embed folder for your embedded images, or organize them into directories however you prefer. It's not recommended to embed all of your site's images, just the ones that conform to the following three rules:
A final cautionary note. Internet Explorer's implementation of MHTML requires the use of absolute paths in image references. This means that the timestamp that Rails appends to the stylesheet URL (to allow far-future expires headers) needs to also be in the contents of the stylesheet. If a process on your webserver changes the modification time of the cached MHTML stylesheet, it will break the image references. To fix it, use the jammit command (with --base-url) to rebuild your assets, or simply delete the cached file, and let Jammit automatically rebuild the file on the next request.
If the MHTML stylesheets sound too fragile, or if you encounter any problems with them in Internet Explorer, you can set embed_images to "datauri". Using "datauri" will cause Internet Explorer 7 and below to receive plain versions of the packaged stylesheets, while all other browsers get the Data-URI flavor.
If you're using enough JavaScript to want it compressed and concatenated, you're probably using it to generate at least a little of your HTML. Traditionally, this has been accomplished by joining together strings and inserting them into the DOM. A far more agreeable way to generate HTML on the client is to use JavaScript templates (JST). Think Rails views and ERB, but with interpolated JavaScript instead.
Jammit helps you keep your JavaScript views organized alongside your Rails views, bundling them together into packages, and providing them as functions for your client-side code to evaluate. By default, Jammit uses a variant of John Resig's Micro Templating to compile the templates, but you can use a JavaScript templating function of your choosing by specifying a template_function in assets.yml. Jammit will run all of your JST through the template function, and assign it by filename to a top-level JST object. For example, the following template, app/views/jst/license.jst:

Name: <%= name %>
 Hometown: <%= birthplace %>
 <%= bio %>

Including the asset package makes this template available to your JavaScript as the JST.license function.
JST.license({name : "Moe", birthplace : "Brooklyn", bio : "Moe was always..."});
To use Underscore.js
templates, set template_function to "_.template".
To use Prototype templates, set
it to "new Template".
To use
Mustache.js templates,
you'll need
a little extra setup.
0.1.1
Added support for embedding images with stylesheet-relative paths.
Shortened the MHTML identifiers.
0.1.0
Initial Jammit release.


WITNESS LIST
Appropriations Committee
February 14, 2011 - 7:00 AM
(Subcommittee on Article III)
House Budget Recommendations
For:
Ray, Jason (Big Brothers Big Sisters/Amachi Texas)
Schiller, Pam (Self)
Against:
Benmoshe, Dvorah (Self)
Benson, Scott (Self; Perfection Learning, Inc.)
Brown, Lilliana (Communities in Schools)
Budak, Patricia (Self)
Caldwell, Robbie (Self)
Cerda, Raymond (Communities in Schools)
Crawford, Stephen (Self)
Davis, Bridgett (Self)
Davis-Riedel, Laura (Self)
Fernandez, Rogelio (Alumni of TSD)
Giuntoli, Robert (Self)
Horn, Andrew (Self)
Kress, Sandy (Texas Coalition for a Competitive Workforce)
Lane, Cruz (Self)
Moak, Lynn (Self; Texas School Alliance; Moak, Casey & Associates)
Mora, Brandon (Self)
Reed, Barbara (Self; Teachers at Sherrod Elementary, Arlington I.S.D.)
Rocha, Cesar (Self)
Rogers, Tom (Legislative Committee of the Austin Retired Teachers Association)
Sargent, Sheila (Self)
Steinhauser, Suki (Communities in Schools of Central Texas)
Sutton, Marvin (Self)
On:
Anderson, David (Texas Education Agency)
Arnold, Ellen (Texas Alliance of Boys & Girls Clubs)
Beto, Barbara (Texas PTA)
Bosse, Portia (Texas State Teachers Assn.)
Brown, Kevin (Alamo Heights ISD and the Texas School Coalition)
Buchanan, Cindy (Texas Association School Librarians)
Bugen, Claire (TX School for the Deaf)
Chavez, Jesus (Texas School Alliance)
Cloudt, Criss (Texas Education Agency)
Daugherty, William (Texas School f/t Blind & Visually Impaired)
Dawn-Fisher, Lisa (Texas Education Agency)
Dunn, David (Texas Charter Schools Association)
Gray, Carlyn (Self)
1
WITNESS LIST
On:
Grusendorf, Bill (Texas Association of Rural Schools)
Guthrie, Brian (Teacher Retirement System of Texas)
Hildebrand, Chad (Self)
Johnson, Kara (Texas Early Childhood Education Coalition (TECEC), Coalition on Pre-K
Quality and Accountability)
Jung, Ronnie (Teacher Retirement System)
Lee, Tim (Texas Retired Teachers Assn.)
McCraw, Ken (Texas Assn. of Community Schools)
Melina Raab, Ted (Texas AFT (American Federation of Teachers))
Pierce, Wayne (Equity Center)
Salinas, Nelson (Texas Assoc. of Business)
Sanderson, Josh (Association of Tx Professional Educators)
Schulz, Barney (Texas School for the Blind & Visually Impaired)
Scott, Robert (TEA)
Soroka, Melody (Self; #1 Students, Teachers of Arlington ISD and specific teaching
individuals of Grand Prairie and Kennedale ISD)
Taylor, Jackie (Texas Association for the Education of Young Children)
Williams, Paige (Texas Classroom Teachers Association)
2


tangier_api.api package¶
Submodules¶
tangier_api.api.location module¶
-
class
tangier_api.api.location.
LocationConnection
(xml_string='', endpoint='https://tangierweb.com/webservices/LocationMaintenance/LocationMaintenance.asmx?WSDL', show_xml_request=False, show_xml_response=False)[source]¶ Bases:
object
-
MaintainLocations
(xml_string)[source]¶ WSDL GetLocation method
Parameters: xml_string – (xml str) fully formed xml string for GetLocation request Returns:
-
add_location
(site_id=None, xml_string=None, name=None, short_name=None, **kwargs)[source]¶ Parameters: - site_id – (str) id of site to be added
- xml_string – (xml string) overrides the default credential and/or location injection into base_xml
- kwargs – additional named properties to be provided in the creation request.
Returns: xml response string with an error message or info about a location.
-
delete_location
(site_id=None, xml_string=None)[source]¶ Parameters: - site_id – (str) id of site to be deleted
- xml_string – (xml string) overrides the default credential and/or location injection into base_xml
Returns: xml response string with an error message or info about a location.
-
get_locations_info
(site_ids=None, xml_string=None)[source]¶ Parameters: xml_string – (xml string) overrides the default credential and/or location injection into base_xml Returns: xml response string with an error message or info about a location.
-
location_info_values_list
(site_ids=None)[source]¶ Returns a Searchable List object (subclass of list) of all locations returned by get_locations_info :param provider_ids: (list) of all emp_ids corresponding to desired locations info :return: (SearchableList) of all locations returned by get_locations_info
-
update_location
(site_id=None, new_site_id=None, xml_string=None, name=None, short_name=None, **kwargs)[source]¶ Parameters: - site_id – (str) id of site to be added
- new_site_id – (str) id of site to be renamed, if desired
- xml_string – (xml string) overrides the default credential and/or location injection into base_xml
- kwargs – additional named properties to be provided in the creation request.
Returns: xml response string with an error message or info about a location.
-
tangier_api.api.provider module¶
-
class
tangier_api.api.provider.
ProviderConnection
(xml_string='', endpoint='https://tangierweb.com/webservices/ProviderMaintenance/ProviderMaintenance.asmx?WSDL')[source]¶ Bases:
object
-
get_provider_info
(provider_ids=None, use_primary_keys=True, all_providers=True, xml_string='', **tags)[source]¶ Method to retrieve info on all providers corresponding to the list “provider_ids”
Parameters: - provider_ids – (list) of all emp_ids corresponding to desired provider info
- use_primary_keys – (bool) indicates whether provider_ids should be treated as emp_id or provider_primary_key
- all_providers – (bool) indicates whether to return data on all existing providers
- xml_string – (xml string) overrides default xml string provided by the instantiation of the class object
- tags – (kwargs) things to be injected into the request. ex: start_date=”2017-05-01”, end_date=”2017-05-02”
Returns:
-
tangier_api.api.schedule module¶
-
class
tangier_api.api.schedule.
ScheduleConnection
(xml_string='', site_file=None, site_id_column_header='site_id', testing=False, endpoint='https://tangierweb.com/webservices/schedulerequest/schedulerequest.asmx?WSDL', debug=False)[source]¶ Bases:
object
-
GetSchedule
(xml_string='')[source]¶ WSDL GetSchedule method
Parameters: xml_string – (xml str) fully formed xml string for GetSchedule request Returns:
-
date_format
= '%Y-%m-%d'¶
-
datetime_format
= '%Y-%m-%dT%H:%M:%S'¶
-
get_schedule
(start_date=None, end_date=None, site_id=None, emp_id=None, xml_string='', **tags)[source]¶ Wrapper for the GetSchedule method which facilitates adding necessary tags to the default xml string. Pulls schedule for one site for a given date range.
Parameters: - start_date – (str) %Y-%m-%d date string indicating the beginning of the range from which to pull the schedule
- end_date – (str) %Y-%m-%d date string indicating the ending of the range from which to pull the schedule
- site_id – (str or int) id corresponding to the site that the schedule will be pulled from
- xml_string – (xml string)overrides the default credential and/or schedule injection into base_xml
- tags – (kwargs) things to be injected into the request.
Returns: xml response string with an error message or a schedule.
-
get_schedule_values_list
(start_date=None, end_date=None, site_ids=None, emp_ids=None, xml_string='', **tags)[source]¶ Wrapper for the get_schedules function that returns the retrieved schedules as a list of dicts. This can easily be converted into a DataFrame
Parameters: - start_date – (str) %Y-%m-%d date string indicating the beginning of the range from which to pull the schedule
- end_date – (str) %Y-%m-%d date string indicating the ending of the range from which to pull the schedule
- site_ids – (list or None) list of ids corresponding to the site(s) that the schedule will be pulled from, defaults to the list pulled from site_file in the __init__ function
- emp_ids – (list or None) list of emp_ids corresponding to the employee(s) that the schedule will be pulled for
- xml_string – (xml string) overrides the default credential and/or schedule injection into base_xml
- tags – (kwargs) things to be injected into the request.
Returns: (OrderedDict) filled with schedules.
-
get_schedules
(start_date=None, end_date=None, site_ids=None, xml_string='', **tags)[source]¶ Wrapper for the GetSchedule method which facilitates adding necessary tags to the default xml string. Pulls schedule for multiple sites for a given date range. Makes multiple API calls to get schedules from multiple facilities.
Parameters: - start_date – (str) %Y-%m-%d date string indicating the beginning of the range from which to pull the schedule
- end_date – (str) %Y-%m-%d date string indicating the ending of the range from which to pull the schedule
- site_ids – (list or None) list of ids corresponding to the site(s) that the schedule will be pulled from, defaults to the list pulled from site_file in the __init__ function
- xml_string – (xml string) overrides the default credential and/or schedule injection into base_xml
- tags – (kwargs) things to be injected into the request.
Returns: xml response string with an error message or a schedule.
-
in_date_format
= '%m/%d/%Y'¶
-
time_format
= '%I:%M %p'¶
-
tangier_api.api.specialty module¶
-
class
tangier_api.api.specialty.
ProviderLocations
(pconn, lconn)[source]¶ Bases:
object
-
all_location_provider_values
¶ we want to go get them if an access is attempted and we haven’t gotten them already
-
-
class
tangier_api.api.specialty.
ProviderReport
(file, *args, **kwargs)[source]¶ Bases:
tangier_api.api.provider.ProviderConnection
-
add_to_report
(*args, key_column='provider_id')[source]¶ Adds the specified provider information to an excel or csv report according to NPI (emp_id)
Parameters: - args – (list) of provider fields to be retrieved from tangier and added to the report
- key_column – (str) indicates the header name of the column that contains npis or emp_ids on the report
Returns: None
-
-
class
tangier_api.api.specialty.
ScheduleManipulation
(xml_string='', site_file=None, site_id_column_header='site_id', testing=False, endpoint='https://tangierweb.com/webservices/schedulerequest/schedulerequest.asmx?WSDL', debug=False)[source]¶ Bases:
tangier_api.api.schedule.ScheduleConnection
-
get_schedule_conflicts
(info=False)[source]¶ Gets DataFrame of all entries where an employee worked a double-booked shift in the saved_schedule
Parameters: info – (bool) whether or not to print out progress Returns: (DataFrame) of all entries where an employee worked a double-booked shift
-
get_schedule_duplicates
(info=False)[source]¶ Gets DataFrame of all duplicate entries in the saved_schedule
Parameters: info – (bool) whether or not to print out progress Returns: (DataFrame) of all duplicate entries
-
get_schedule_empties
(info=False)[source]¶ Gets DataFrame of all entries from schedule which were not worked (reportedminutes == 0) in the saved_schedule
Parameters: info – (bool) whether or not to print out progress Returns: (DataFrame) of all entries from schedule which were not worked (reportedminutes == 0)
-
get_schedule_open
(info=False)[source]¶ Gets DataFrame of all entries from schedule where providername == “open” in the saved_schedule
Parameters: info – (bool) whether or not to print out progress Returns: (DataFrame) of all entries from schedule which were not worked (reportedminutes == 0)
-
remove_schedule_empties
()[source]¶ Removes all entries from schedule which were not worked (reportedminutes == 0) in the saved_schedule
Returns:
-
remove_schedule_open
()[source]¶ Removes all entries from schedule which are just open shifts (providername == ‘open’) in the saved_schedule
Returns:
-
save_schedule_from_range
(start_date=None, end_date=None, site_ids=None, xml_string='', **tags)[source]¶ Saves schedule for indicated date range and facilities to ScheduleConnection object
Parameters: - start_date – (str) %Y-%m-%d date string indicating the beginning of the range from which to pull the schedule
- end_date – (str) %Y-%m-%d date string indicating the ending of the range from which to pull the schedule
- site_ids – (list or None) list of ids corresponding to the site(s) that the schedule will be pulled from, defaults to the list pulled from site_file in the __init__ function
- xml_string – (xml string) overrides the default credential and/or schedule injection into base_xml
- tags – (kwargs) things to be injected into the request.
Returns:
-


Home
Activities
Gallery
Reservations
Getting Here
Contact Us
Follow this map for easy directions, or you can find us at our address on the
contact page
.


Sets up the
government, defines the government, protects basic rights of Americans
When was the Constitution written?
1787
What happened at the
Constitutional Convention?
The Constitution was
written, the founding fathers wrote the constitution
The Federalist Papers supported
the passage of the U.S. Constitution. Name one of the writers.
James Madison,
Alexander Hamilton, John Jay, Publius
The idea of self-government is in
the first three words of the Constitution. What are these words?
We the People
What is an amendment?
A change to the Constitution, an
addition to the Constitution
What do we call the first ten
amendments to the Constitution?
The Bill of Rights
What is one right or freedom
from the First Amendment?
Speech, religion, assembly, press,
petition the government
How many amendments does the
Constitution have?
27
What is freedom of religion?
You can practice any religion, or
not practice a religion.
What is the economic system in
the United States?
Capitalist economy, market economy
What is the “rule of law”?
Everyone must
follow the law; Leaders must obey the law; Government must obey the law;
No one is above the law.
There are four
amendments to the Constitution about who can vote. Describe one of them.
1. Citizens
eighteen (18) and older (can vote). 2. You don’t have to pay to vote. 3.
Any citizen can vote. (Women and men can vote.) 4. A male citizen of any
race (can vote).


This is some text for testing purposes. Need to write some content in small font so here you go. In order to pass the font size test your 60% of webpage's text must be greater than 12px.I'ts currently 4:15 pm here in Spain. Check back later! Let's see if we can make this website fail with this content.


| Event ID | Name | Description | Event Data | Notes | |
| Keyboard Events | $101 | Key Down | Generated when the user presses a key. | EventData contains the raw scancode of the key. | |
| $102 | Key Up | Generated when the user releases a key. | EventData contains the raw scancode of the key. | ||
| $103 | Key Stroke | Generated when the user presses a key or when a keystroke is automatically generated due to keyboard repeat. | EventData contains the ASCII code of the key. | As this event is generated purely by the Operating System, the ASCII code returned by EventData is different to the raw scancode returned by the Key Down and Key Up events. | |
| Mouse Events | $201 | Mouse Down | Generated when the user presses a mouse button while the mouse is positioned over a gadget. | EventData contains the button being pressed: 1 for the left
button, 2 for the right button or 3 for the middle button. EventSource contains the gadget handle. |
You will not get a Mouse Down event for buttons, just a
gadget action event ($401). This event only applies to canvas and window gadgets. |
| $202 | Mouse Up | Generated when the user releases a mouse button while the mouse is positioned over a gadget. | EventData contains the button being released: 1 for the
left button, 2 for the right button or 3 for the middle
button. EventSource contains the gadget handle. |
You will not get a Mouse Up event for buttons, just a
gadget action event ($401). This event only applies to canvas and window gadgets. | |
| $203 | Mouse Move | Generated when the user moves the mouse while it is positioned over a canvas gadget. | EventX and EventY contain the new mouse
coordinates. EventSource contains the canvas gadget handle. |
Only applies to canvas gadgets. | |
| $204 | Mouse Wheel | Generated when the user spins the mouse wheel. | EventData contains the number of 'clicks' the wheel has been spun. | ||
| $205 | Mouse Enter | Generated when the mouse pointer enters a canvas gadget. | EventSource contains the canvas gadget handle. | Only applies to canvas gadgets. | |
| $206 | Mouse Leave | Generated when the mouse pointer leaves a canvas gadget. | EventSource contains the canvas gadget handle. | Only applies to canvas gadgets. | |
| Gadget Events | $401 | Gadget Action | Generated when the user changes the state of a gadget. | EventSource contains the handle of the gadget that caused the event. | This can include such actions as pressing a button, or typing into a textfield. |
| Window Events | $801 | Window Move | Generated when the user moves a window. | EventSource contains the handle of the window gadget that
has moved. EventX and EventY contain the new location of the window. |
|
| $802 | Window Size | Generated when the user sizes a window. | EventSource contains the handle of the window gadget that
has sized. EventX and EventY contain the new size of the window. |
||
| $803 | Window Close | Generated when the user clicks a window's 'close' box. | EventSource contains the handle of the window gadget being closed. | It is up to the program to actually close the window (see FreeGadget). | |
| $804 | Window Activate | Generated when the user activates a window. | EventSource contains the handle of the window gadget that was activated. | ||
| Menu Events | $1001 | Menu Action | Generated when the user selects a menu. | EventData contains the integer identifier of the menu selected. | The identifier returnedis is that specified when creating the menu (see CreateMenu). |
| Application Events | $2001 | Application Suspend | Generated when the user switches to another application. | ||
| $2002 | Application Resume | Generated when the user switches back to your application. | |||
| $2003 | Display Change | Generated when the display mode changes. | THIS DOESN'T APPEAR TO WORK! | ||
| $2004 | Begin Modal | Generated when the application goes into a modal event loop. | This is typically caused by resizing a window or dragging a slider. You shouldn't generally have to worry about modal event loops. | ||
| $2005 | End Modal | Generated when the application ends a modal event loop. | |||
| Timer Events | $4001 | Timer Tick | Generated when a custom timer ticks over (see Timers). | EventSource contains the handle of the timer. EventData contains the total number of timer ticks that have occurred. |


The Game of Hangman
Greg Challenges You to a Game of Hangman
Home
About Greg
Play a Game
Greg's Tales
Sign In
Contact Us


Default switch with variations
Set the [fdCompact] directive to true to render switch in compact mode. An optional text for the active and inactive
states of the switch can be set by providing values for the [inactiveText] and [activeText] input properties.
Disabled State
Switch can be in the disabled state, which prevents the user from interacting with it.
Two-Way Binding
It is possible to two-way bind to the checked property of the fd-switch.
Semantic and Compact Mode
It is possible to add semantic mode by passing [semantic]="true"
and compact mode by passing
fdCompact
to switch component.
Switch used within Reactive Form
It is possible to use the fd-switch component within Angular Reactive Forms
Playground Area
Example Switch


+++ type = "article" title = "Coding Guidelines" date = "2009-09-11T06:48:52.000Z" tags = [] +++
The document below outlines our code style guidelines. If you have suggestions for things that should be clarified better, etc. please let us know. Please don't send us suggestions of the kind "I like this indenting style better, could we switch?".
Some code doesn't match our guidelines in some places, this is mostly due to it being written before the guidelines were defined. Assistance with cleaning up incorrect code is very welcome as long as you notate in the commit that there are "no functional changes" in this patch (don't bury code changes in style fixes).
With a continuous stream of external contributions and patches we would like the Haiku code base to remain clean, uniform, and easy to read and maintain.
Make your code not stick out — make it consistent with the rest of the code you are contributing to. You will see this rule stressed over and over throughout the guidelines and when submitting patches.
First, let's use some examples to illustrate the main formatting conventions:
class Foo : public Bar { public: Foo(int32); virtual ~Foo(); virtual void SomeFunction(SomeType* argument); // indent long argument lists by a tab: virtual const char* FunctionLotsOfArguments(const char* name, const char* path, const char* user); private: int32 _PrivateMethod(); static int32 _SomeStaticPrivateMethod(); volatile int32 fMember; const char* fPointerMember; }; // The ':' always comes on its own line, initializers following Foo::Foo(int32 param) : Bar(int32* param), fMember(param), fPointerMember(NULL) { ... } /*! Function descriptions are using doxygen style. Please note, this is not a place for end-user documentation, but for documentation that helps understanding the code, and using the functions correctly. */ templateconst T* Foo ::Bar(const char* bar1, T bar2) { ... }
static int32 my_static_function() { return 42; }
if (someCondition) { DoSomething(); // Comments that only affect a single line are usually // written after it, and are indented by a single tab DoSomethingElse(); } else if (someOtherCondition) { DoSomethingElse(); DoSomething(); } if (someVeryVeryLongConditionThatBarelyFitsOnALine && someOtherCondition) { // && operator on the beginning of the next line, // indented by a tab ... } if (someVeryVeryLongConditionThatBarelyFitsOnALine && (someVeryLongNestedConditionPart1 || someVeryLongNestedConditionPart2) && lastPartOfSomeVeryVeryLongCondition != 0) { // Indent one tab per expression level ... } if (fMemberPointer->VeryLongFunctionCall(uint32 argument1, uint32 argument2, uint32 argument3) != NULL && someOtherCondition) { // Function call parenthesis count as an expression // level thus the additional tab on the second line. ... localVariable = AnotherLongFunction(uint32 argument1, uint32 argument2, uint32 argument3); // For this simple assignment though // an additional tab wouldn't help readability. anotherVariable = fSomeUselessRGBColor.alpha * (fSomeUselessRGBColor.red + fSomeUselessRGBColor.green + fSomeUselessRGBColor.green + fOffset.blue) / 3 + fBrightness; // This one spans more than two lines, we add // a tab to distinguish the expression level // in parenthesis. } for (int32 index = 0; index < count; index++) { DoSomething(index); DoSomethingElse(index); } // Omit braces for single line statements, place statement on a new line // (but always use braces around multi-line statements) if (condition) DoOneThingOnly(index); for (int32 index = 0; index < count; index++) DoOneThingOnly(index); // switch statement formatting switch (condition) { case label1: DoSomething(); break; case label2: { // need extra curly brackets here because of count // declaration int32 count; ... DoSomething(); break; } } ... CallingSomeFunction(firstArgument * 2 + someMoreStuff, secondArgument, thirdArgument); // Indent long argument lists by a tab ... const rgb_color kNeonBlue = {10, 10, 50, 255};
r
(hard to search for), aMessage
, theView
, MyDraw
(who's draw?). Avoid identifier pairs such as ProcessMessage
and DoProcessMessage
, AddTasks
and AddTasks1
. Use names such as rect
, message
, invokeMessage
, view
, targetView
, DrawBorder
, ProcessMessage
, and ProcessMessageInternals
or ProcessMessageDetails
, etc.f
like so:int32 fMemberVariable;
const uint32 kOpenFile = 'open';
g
, static variables with an s
using the same scheme as above.message
over abbreviations such as msg
. Use rect
, frame
, bounds
over r
, menuItem
over mi
.... index++; // increment the index ... ... /* InitProgress * */ void InitProgress(int param1) { ...
// the trash window needs to display a union of all the // trash folders from all the mounted volumes // (comment about a block of code) BVolumeRoster volumeRoster; volumeRoster.Rewind(); BVolume volume; while (volumeRoster.GetNextVolume(&volume) == B_OK) { if (!volume.IsPersistent()) continue; ... }
... BPoseView::WatchNewNode(&itemNode,watchMask, lock.Target()); // have to node monitor ahead of time because // Model will cache up the file type and preferred // app (comment about the above line)
... if (this < is && a < very && long != condition) { // ...
... if (this < is && a < very && long != condition) { // this comment is about the long condition // above and is much easier to read! ...
// this is a hack!
// the following code is fragile because it doesn't // handle overflows properly
/* * Copyright 2004-2007 Haiku, Inc. All rights reserved. * Distributed under the terms of the MIT License. * * Authors: * Jonathan Smith, optional@email * Developer Name, optional@email */
/* * Copyright 2007 Jane Doe, optional@email * Copyright 2003-2005 Some Developer, optional@email * All rights reserved. Distributed under the terms of the MIT License. */
#if 0
'ed code behind just because you are not sure about your contribution. Your change should be top quality to begin with, improving the code you are replacing. Should there be a reason to back your change out or used for a reference, this can be done using the source control tools.ASSERT
s for debugging purposes. Include debugging code in #if DEBUG
blocks. Make sure debugging code compiles (make sure your change doesn't break existing debugging code, if it does, fix the debugging code as a part of the change) without warnings and stays correct. Use all the other tools from Debug.h
to your advantage.dynamic_cast
, static_cast
, const_cast
, reinterpret_cast
) over C casts.const
properly.AutoLock
, etc. for all locking and other resource acquisition, don't use Lock()
and Unlock()
on a BLocker
directly. Don't use BAutolock
, use the AutoLock
template instead.if
and while
statements:// wrong if ((err = entry.GetRef(&ref)) == B_OK) ...
while
loops:// wrong BMenuItem* item; int32 index = 0; while ((item = ItemAt(index++)) != NULL) { ...
for
:for (int32 index = 0; ; index++) { BMenuItem* item = ItemAt(index); if (item == NULL) break; ...
NULL
before delete
and free
:// wrong if (fIcon != NULL) delete fIcon; // wrong if (fIconBuffer != NULL) free(fIconBuffer);
// wrong return (fList.ItemAt(index));
if
statements:// wrong if ((a == 3) && (b != 4)) ...
if ((a & 3) != 0 && (b & 4) == 0) ... // wrong - C/C++ operator precedence works differently if (a & 3 && xyz) ...
// This is how it should look like: if (pointer != NULL || anotherPointer == NULL || intValue != 0) ... int32 value; bool doThings = (value != 0); // wrong - don't use the following style if (pointer || !anotherPointer || intValue) ... int32 value; bool doThings = value;
if
-block, don't use else
— it's superfluous, and reduces the clarity of the code:// This is how it should look like -- notice, no 'else': if (something) { ... return true; } if (somethingElse) { ... return true; } return false; // Wrong - don't use code like below: if (something) { ... return true; } else if (somethingElse) { ... return true; } else return false;
false
/true
instead of the FALSE
/TRUE
#defines
.#include
statements, group "includes"
and {{< html-escape >}}{{< /html-escape >}}
separately.{{< html-escape >}} #include "ThisClass.h" // POSIX API headers #include#include // Haiku API headers #include #include #include #include "OtherLocalHeaders.h" {{< /html-escape >}}
{{< html-escape >}}{{< /html-escape >}}
if they aren't necessary; (like for {{< html-escape >}}{{< /html-escape >}}
).NULL
instead of 0
for pointers.NULL
like this:// wrong BView* view(NULL);
BView* view = NULL;
if (B_OK == file.InitCheck()) // don't use this style ...
While the following tools still miss some issues and sometimes report false positives, they are most of the time correct and help to spot the most common issues. Those are still in development and improvements are of course welcomed.
checkstyle.py is a stand-alone python program (found in the Haiku source tree in src/tools/checkstyle/). It reports style problems on the standard output and also generates an easy to read highlighted html report. Example:
python src/tools/checkstyle/checkstyle.py src/apps/deskcalc
(supposing you're at the root of the haiku tree) this will check the src/apps/deskcalc directory recursively. Try the --help option to see the usage.


MUTT LYNCH
$ 28
View Offers
Best Seller
See all
HAIL A CAB
CABERNET SAUVIGNON AW
4 WINES POSSIBILITIES
RETAIL: $28-$92 / BTL
OFFER EXPIRES IN EXPIRED
$28 OFFER PRICE
Recommended for you
See all
AZARI VINEYARDS
RICH CALIFORNIA COAST
4 WINES POSSIBILITIES
RETAIL: $28-$92 / BTL
OFFER EXPIRES IN EXPIRED
$28 OFFER PRICE


HUSH A film review by Matt Williams
RATING: * 1/2* out of * * * *
One of the 90s' most unwelcome thriller trends returns from the grave: it's the "___ from Hell" movie! Starting in the early nineties, we were subjected to nearly every conceivable combination of relationships-from-Hell! There were Boyfriends from Hell, Friendly Neighborhood Cops from Hell, Nannies from Hell, and even Secretaries from Hell. But Hush has found an old standby that somehow was forgotten in the rush: The Mother-In-Law from Hell!!!!!
The mother-in-law in question is Martha, played by Jessica Lange. She has been single-handedly running the family horse farm, Kilronan. Her son, Jackson (Johnathon Schaech) and his girlfriend, Helen (Gwyneth Paltrow), live in New York, and have no intention to move back down south to the rural Kilronan. But those intentions are about to change.
You see, Martha lives by manipulation. She has used it in years past to breed many championship horses. Now, she believes she can use it to breed herself a grandson. Though at first, Helen finds Martha charming, soon she is caught in the domineering Martha's web of deception.
It's hard to understand why nobody ever wises up to Martha' schemes. As written, most of the characters in the film must be very slow witted.  It tries to get away with things (like leaving a critical piece of evidence in a rather unlikely place) without even batting an eye. Then again an audience which accepts characters as shallow as these isn't one that's likely to question details.
Jessica Lange's Martha is the only semi-developed character in the film, and she applies her talents to redeem it as much as she can. A character that could have been simply awful is merely groan-worthy. Gwyneth Paltrow doesn't have much to build upon, as Helen's only character trait seems to be "daughter-in-law". Still, she fares better than Johnathon Schaech, whose character is so nonexistent, he's inexplicably missing for much of the film.
Still, there have been much worse "____ from Hell" films. Even with its paper-thin characters and ludicrous setups, Hush manages to create a few thrills in a color-by-numbers fashion. You know what's coming, but occasionally the film will deliver a shock or two. The old formulas are around for a reason, but that doesn't mean they taste fresh.
Copyright 1998 Matt Williams
- Matt Williams<EMAIL_ADDRESS>Reviewer for Shreck's Cinema: http://www.shreck.com Home of over 500 reviews, and information on over 600 upcoming releases
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


We guarantee our savory and well-flavored dishes will satisfy at your event—yes, even meat lovers! Our custom menus are inspired by the seasons and a variety of world cuisines. VGreen offers the diversity of vegan cuisine with an array of colorful, bright, and full-flavored choices. Our friendly staff promptly delivers our delicious food to your location for any occasion for up to 500 people.
Contact Us for Catering Info.


Profile
I am currently a Ramón y Cajal Fellow in the GaiaUB group at the Institute for Space Science at the University of Barcelona (ICCUB), applying data analysis techniques within the realm of Galactic astrophysics. Something in between an observer and a theorist.
My scientific interests range from nucleosynthesis over stellar models, large astronomical surveys, star clusters, Milky Way modeling, and cosmology to high-energy astrophysics. My main research focusses on spectroscopic stellar surveys, and how to combine them with astrometric and asteroseismic data to study the formation history of the Milky Way.
I believe in collaborative science and am an active member in various large astronomical projects, such as the Gaia mission, the WEAVE Project, and the 4-Meter Multi-Object Survey Telescope (4MOST).
I am curious about Austrian 20th century literature, destructive progressive music, the philosophy of science, politics, South America, and absurd vinyl records. Currently learning Czech, Català, and trumpet:)
Mapping the Milky Way with the StarHorse code
Stellar distances and ages for millions of stars are needed to understand the chemo-dynamical history of Galaxy. The StarHorse code is a flexible python tool that I am co-developing since my PhD, and that enables us to determine precise stellar parameters for millions of field stars with good Gaia parallaxes.
The Gaia data, combined with ground- and space-based photometric surceys, also allowed us to study the three-dimensional distribution of stars beyond the parallax horizon, clearly revealing structures like the Galactic bar in stellar density maps ( ESA Press Release").
Queiroz, A. B. A.; Anders, F.; Chiappini, C.; et al. (2023), StarHorse results for spectroscopic surveys + Gaia DR3: Ages for MSTO and subgiants and chemical substructures in the solar vicinity, A&A, 673, A155
Anders, F.; Khalatyan, A.; Queiroz, A. B. A.; et al. (2021), Photo-astrometric distances, extinctions, and astrophysical parameters for Gaia EDR3 stars brighter than G = 18.5, A&A, 658, A91
Queiroz, A. B. A.; Anders, F.; Chiappini, C.; et al. (2020), From the bulge to the outer disc: StarHorse stellar parameters, distances, and extinctions for stars in APOGEE DR16 and other spectroscopic surveys, A&A, 638, A76
Anders, F.; Khalatyan, A.; Chiappini, C.; et al. (2019), Photo-astrometric distances, extinctions, and astrophysical parameters for Gaia DR2 stars brighter than G = 18, A&A, 628, A94
Queiroz, A. B. A.; Anders, F., Santiago, B. X.; et al. (2018), StarHorse: a Bayesian tool for determining stellar masses, ages, distances, and extinctions for field stars, MNRAS, 476, 2, 2556
Galactic archaeology
The main challenge of Galactic archaeology today is to unravel the Milky Way’s assembly and evolution history by determining ages, chemical compositions, and kinematics of millions of stars covering all parts of the Milky Way. Major observing campaigns of the last decade, and the success of the Gaia mission, have assured that this is in principle possible: precise radial velocities as well as basic chemical information for millions of stars have already been obtained by surveys such as RAVE, SEGUE, APOGEE, LAMOST or GALAH. Gaia, on the other hand, allows us to measure parallaxes and transverse kinematics for billions of stars for the first time with unprecedented precision; the second Gaia data release from 2018 provides a new testbench for the next-generation Milky-Way models. The mere existence of these large datasets, however, is not enough to ensure a major knowledge gain about our Galaxy. Many datasets are subject to non-trivial selection effects, systematic uncertainties (especially for ages of field stars), and correlated errors that impede straightforward conclusions and affect simplistic model comparisons (see e.g. this press release). Here is the first systematic use of combined asteroseismic and spectroscopic data to measure the radial abundance gradient in the Galaxy, together with a comparison to a cosmological Milky-Way simulation:
Ratcliffe, B.; Minchev, I.; Anders, F., et al. (2023), Unveiling the time evolution of chemical abundances across the Milky Way disk with APOGEE, MNRAS, in press
Anders, F., Gispert, P.; Ratcliffe, B.; et al. (2023), Spectroscopic age estimates for APOGEE red-giant stars: Precise spatial and kinematic trends with age in the Galactic disc , A&A, submitted
Minchev, I.; Anders, F., Recio-Blanco, A.; et al. (2018), Estimating stellar birth radii and the time evolution of Milky Way's ISM metallicity gradient, MNRAS, 481, 1, 645
Anders, F., Chiappini, C.; Minchev, I.; et al. (2017), Red giants observed by CoRoT and APOGEE: The evolution of the Milky Way's radial metallicity gradient, A&A, 600, A70
Anders, F., Chiappini, C.; Santiago, B. X.; et al. (2014), Chemodynamics of the Milky Way. I. The first year of APOGEE data , A&A, 564, A115
Discovering and characterising open clusters with Gaia
Open clusters are groups of a dozen to several thousands of stars that were born together from the same parent molecular cloud, and remained bound by gravity. Their distances and ages can be estimated more easily than for individual stars, and they can be used to trace the structure of our Galaxy. ESA's Gaia mission provides us with precise measurements of parallaxes and proper motions that can be used to identify compact groups of stars traveling together through the Galaxy. Most of these newly discovered clusters cannot be seen in static images of the sky, but can easily be spotted using the Gaia measurements of distance and velocity (see e.g. this Gaia image of the week).
Donada, J., Anders, F., Jordi, C., Masana, E., et al. (2023), The multiplicity fraction in 202 open clusters from Gaia , A&A, 675, A89
Anders, F., Castro-Ginard, A., Casado, J., Jordi, C., Balaguer-Núñez, L. (2022), NGC 1605 is not a binary cluster , AAS Research Notes, 6, 58
Castro-Ginard, A.; Jordi, C.; Luri, X.; Cantat-Gaudin, T. ; Carrasco, J. M.; Casamiquela, L.; Anders, F.; Balaguer-Núñez, L.; Badia, R. M. (2022), Hunting for open clusters in Gaia EDR3: 664 new open clusters found with OCfinder, A&A, 661, A118
Anders, F., Cantat-Gaudin, T., Quadrino-Lodoso, I., Gieles, M., Jordi, C., Castro-Ginard, A., Balaguer-Núñez, L. (2021), The star cluster age function in the Galactic disc with Gaia DR2: Fewer old clusters and a low cluster formation efficiency , A&A Letters, 645, L2
Cantat-Gaudin, T., Anders, F., Castro-Ginard, A., Jordi, C., Romero-Gómez, M., et al. (2020), Painting a portrait of the Galactic disc with its stellar clusters, A&A, 640, A1
Cantat-Gaudin, T., Anders, F. (2020), Clusters and mirages: cataloguing stellar aggregates in the Milky Way , A&A, 633, A99
Data mining and machine learning
The sample sizes and the number of available stellar chemical abundances have reached dimensions in which it has become difficult to process all the available information in an effective manner. Dimensionality reduction and unsupervised learning techniques can be used to analyse the stellar abundance-space distribution. As an example, here is a t-SNE view of the solar vicinity's stellar abundance space (from Anders et al. 2018):
Anders, F., Gispert, P.; Ratcliffe, B.; et al. (2023), Spectroscopic age estimates for APOGEE red-giant stars: Precise spatial and kinematic trends with age in the Galactic disc , A&A, submitted
Casamiquela, L.; Castro-Ginard, A., Anders, F., Soubiran, C. (2021), The (im)possibility of strong chemical tagging, A&A, 654, A151
Perottoni, H. D.; Amarante, J. A. S.; Limberg, G.; Rocha-Pinto, H. J.; Rossi, S., Anders, F., Borbolato, L. (2021), Searching for Extragalactic Exoplanetary Systems: the Curious Case of BD+20 2457, ApJL, 913, L3
Ramos, P., Antoja, T., Mateu, C., Anders, F., Laporte, C. F. P., Carballo-Bello, J. A., Famaey, B., Ibata, R. (2020), The outer disc in shambles: Blind detection of Monoceros and the ACS with Gaia's astrometric sample, A&A, 646, A99
Anders, F., Chiappini, C., Santiago, B. X., et al. (2018), Dissecting stellar chemical abundance space with t-SNE , A&A, 619, A125
Contribution to ongoing and future stellar surveys
The StarHorse catalogues and my expertise in isochrone fitting, survey data analysis, and open clusters have allowed me to contribute to some ambitious projects of the Galactic astronomy community. I have been involved in the final science analysis of the RAVE survey, the production of value-added catalogues for the SDSS-IV/APOGEE survey, the analysis of the OCCASO survey, and the preparation for the 4MOST Disc & Bulge Survey surveys (4MIDABLE). Currently I am spending some time on validating the upcoming Gaia data release 3, as part of the Gaia DPAC team.
Gaia Collaboration, Vallenari, A., Brown, A. G. A., ...; Anders, F., et al. (2023), Gaia Data Release 3: Summary of the content and survey properties , A\&A, in press
Babusiaux, C., Fabricius, C., Khanna, S., ...; Anders, F., et al. (2023), Gaia Data Release 3: Catalogue Validation , A\&A, in press
Abdurro'uf, Accetta, K. Aerts, C., ..., Anders, F., et al. (2022), The 17th Data Release of the Sloan Digital Sky Surveys: Complete Release of MaNGA, MaStar and APOGEE-2 Data, ApJS, 259, 35
Chiappini, C.; Minchev, I.; Starkenburg, E.; Anders, F.; et al. (2019), 4MOST Consortium Survey 3: Milky Way Disc and Bulge Low-Resolution Survey (4MIDABLE-LR), The ESO Messenger, 175, 30
de Jong, R. S.; Agertz, O.; Berbel, A. A.; Aird, J.; Alexander, D. A.; Amarsi, A.; Anders, F.; et al. (2019), 4MOST: Project overview and information for the First Call for Proposals, The ESO Messenger, 175, 3


Main View¶
This is the main view module which manages main tornado connections. This module provides request handlers for managing simple HTTP requests as well as Websocket requests.
Although the websocket requests are actually sockJs requests which follows the sockjs protcol, thus it provide interface to sockjs connection handlers behind the scene.
IndexHandler¶
-
class
mosquittoChat.apps.main.views.
IndexHandler
(application, request, **kwargs)¶ This handler is a basic regular HTTP handler to serve the chatroom page.
-
get
()¶ This method is called when a client does a simple GET request, all other HTTP requests like POST, PUT, DELETE, etc are ignored.
Returns: Returns the rendered main requested page, in this case its the chat page, index.html
-
__module__
= 'mosquittoChat.apps.main.views'¶
-
ChatWebsocketHandler¶
-
class
mosquittoChat.apps.main.views.
ChatWebsocketHandler
(session)¶ Websocket Handler implementing the sockjs Connection Class which will handle the websocket/sockjs connections.
-
on_open
(info)¶ This method is called when a websocket/sockjs connection is opened for the first time.
Parameters: - self – The object
- info – The information
Returns: It returns the websocket object
-
on_message
(message)¶ This method is called when a message is received via the websocket/sockjs connection created initially.
Parameters: - self – The object
- message (json string) – The message received via the connection.
-
on_close
()¶ This method is called when a websocket/sockjs connection is closed.
Parameters: self – The object Returns: Doesn’t return anything, except a confirmation of closed connection back to web app.
-
__module__
= 'mosquittoChat.apps.main.views'¶
-


--- title: Canon Bootstrap - Get Started description: Getting Started Guide template: documentation.html --- Summary Fluid Grid Header & Navigation Content Area Footer
Coming Soon


|
|
Toon-up gags let you fill other Toonís Laff meters in battle. These gags are especially important when you are working with other Toons and the Cogs are coming in waves!
Some Toon-up gags only affect one Toon (the battle menu will let you choose which Toon you want to help); other gags affect all Toons.
|
|
| |
|
Secret Tip: Laff points for Toon-up gags that affect all Toons are divided up among the Toons in the battle that need Laff points.
|
| |
|
|
| These are the only gags guaranteed to hit Ė as long as you can lure a Cog into them. You canít carry as many trap gags as you can other types of gags.
|
| |
|
| |
| You canít set a trap on a Cog that has already been lured, so make sure the trap has been set first!
|
| |


"That's a worry" | Brendan Maher reacts to CPA's fixture committee withdrawal
by Raf DialloBrendan Maher says he was surprised rather than angry after the Club Players Association withdrew from the GAA fixture review committee.
The Tipperary All-Ireland winner joined Joe Molloy on Off The Ball after a memorable year when they beat Kilkenny in August's final.
But the Borris-Ileigh club-man also shared his thoughts on the CPA's decision to withdraw.
"I won't say I'm angry. But I was a bit surprised when I heard the news this morning," he said on Tuesday.
"It is worrying obviously that they've decided to pull out because it tells you that the negotiations were obviously not going any way right in terms of the CPA's point of view. That's a worry.
"People refer to us and people like me as inter-county players. But we're club players first and foremost. That's where it starts and where it finishes.
"For me, from a club point of view, it is very frustrating currently the way the structures are. In Tipperary alone, you play two games maybe in April. Then you don't know when your next game is."
Clarity
With that in mind, Maher is keen for clarity to be at the heart of fixture reform.
"It's not structured enough and there's no clarity there for the club player," he continued.
"So you're training, thinking, 'Oh, we might be playing this time or we might be playing this weekend. So it's quite difficult to keep lads motivated and keep the morale up in clubs.
"I'd love a bit of structure and clarity. Give the inter-county season their time. But give the club their set time and don't interfere with it. And if that's possible, that's what everyone wants. They just want clarity. I want to know when I'm playing my games and when I train for and when I need to peak."


25
1 If there is a dispute between men and they go to court, and the judges judge them, then they will acquit the righteous and condemn the wicked.
2 If the guilty man deserves to be beaten, then the judge will make him lie down and be beaten in his presence with the ordered number of blows, as was his crime.
3 The judge may give him forty blows, but he may not exceed that number; for if he should exceed that number and beat him with many more blows, then your fellow Israelite would be humiliated in your view.
4 You must not muzzle the ox when he treads out the grain.
5 If brothers live together and one of them die, not having any son, then the wife of the dead man must not be married off to someone else outside the family. Instead, her husband's brother must sleep with her and take her to himself as a wife, and do the duty of a husband's brother to her.
6 This is so that the firstborn that she bears will succeed in the name of that man's dead brother, so that his name will not perish from Israel.
7 But if the man does not wish to take his brother's wife for himself, then his brother's wife must go up to the gate to the elders and say, 'My husband's brother refuses to raise up for his brother a name in Israel; he will not perform the duty of a husband's brother to me.'
8 Then the elders of his city must call him and speak to him. But suppose that he insists and says, 'I do not wish to take her.'
9 Then his brother's wife must come up to him in the presence of the elders, take off his sandal from his foot, and spit in his face. She must answer him and say, 'This is what is done to the man who does not build up his brother's house.'
10 His name will be called in Israel, 'The house of him whose sandal has been taken off.'
11 If men fight with each other, and the wife of one draws near to rescue her husband out of the hand of him who struck him, and if she stretches out her hand and takes him by the private parts,
12 then you must cut off her hand; your eye must have no pity.
13 You must not have in your bag different weights, a large and a small.
14 You must not have in your house different measures, a large and a small.
15 A perfect and just weight you must have; a perfect and just measure you must have, so that your days may be long in the land that Yahweh your God is giving you.
16 For all who do such things, all that act unrighteously, are a disgusting thing to Yahweh your God.
17 Call to mind what Amalek did to you on the road as you came out of Egypt,
18 how he met you on the road and attacked those of you at the rear, all who were feeble in your rear, when you were faint and weary; he did not honor God.
19 Therefore, when Yahweh your God has given you rest from all your enemies round about, in the land that Yahweh your God is giving you to possess as an inheritance, you must not forget that you must blot out the remembrance of Amalek from under heaven.


<IP_ADDRESS>.1 Testing for an Instance¶
This function returns the symbol TRUE if the evaluation of its argument is an instance-address or an instance-name. Otherwise, it returns the symbol FALSE.
Syntax
(instancep <expression>)
<IP_ADDRESS>.2 Testing for an Instance-Address¶
This function returns the symbol TRUE if the evaluation of its argument is an instance-address. Otherwise, it returns the symbol FALSE.
Syntax
(instance-addressp <expression>)
<IP_ADDRESS>.3 Testing for an Instance-Name¶
This function returns the symbol TRUE if the evaluation of its argument is an instance-name. Otherwise, it returns the symbol FALSE.
Syntax
(instance-namep <expression>)
<IP_ADDRESS>.4 Testing for the Existence an Instance¶
This function returns the symbol TRUE if the specified instance exists. Otherwise, it returns the symbol FALSE. If the argument is an instance-name, the function determines if an instance of the specified name exists. If the argument is an instance-address, the function determines if the specified address is still valid.
Syntax
(instance-existp <instance-expression>)
<IP_ADDRESS> Reading a Slot Value¶
This function returns the value of the specified slot of the active instance (see section <IP_ADDRESS>). If the slot does not exist, the slot does not have a value or this function is called from outside a message-handler, this function will return the symbol FALSE and an error will be generated. This function differs from the ?self:<slot-name> syntax in that the slot is not looked up until the function is actually called. Thus it is possible to access different slots every time the function is executed (see section 9.4.2 for more detail). This function bypasses message-passing.
Syntax
(dynamic-get <slot-name-expression>)
<IP_ADDRESS> Setting a Slot Value¶
This function sets the value of the specified slot of the active instance (see section <IP_ADDRESS>). If the slot does not exist, there is an error in evaluating the arguments to be placed or this function is called from outside a message-handler, this function will return the symbol FALSE and an error will be generated. Otherwise, the new slot value is returned. This function differs from the (bind ?self:<slot-name> <value>*) syntax in that the slot is not looked up until the function is actually called. Thus it is possible to access different slots every time the function is executed (see section 9.4.2 for more detail). This function bypasses message-passing.
Syntax
(dynamic-put <slot-name-expression> <expression>*)
<IP_ADDRESS> Multifield Slot Functions¶
The following functions allow convenient manipulation of multifield slots. There are three types of functions: replacing a range of fields with one or more new values, inserting one or more new values at an arbitrary point, and deleting a range of fields. For each type, there are two forms of functions: an external interface which sets the new value for the multifield slot with a put- message (see section <IP_ADDRESS>), and an internal interface that can only be called from message-handlers which sets the slot for the active instance (see section <IP_ADDRESS>) directly. Both forms read the original value of the slot directly without the use of a get- message. All of these functions return the new slot value on success and the symbol FALSE on errors.
<IP_ADDRESS>.1 Replacing Fields¶
Allows the replacement of a range of fields in a multifield slot value with one or more new values. The range indices must be from 1..n, where n is the number of fields in the multifield slot?s original value and n > 0.
External Interface Syntax
(slot-replace$ <instance-expression> <mv-slot-name>
<range-begin> <range-end> <expression>+)
Internal Interface Syntax
(slot-direct-replace$ <mv-slot-name>
<range-begin> <range-end> <expression>+)
Example
CLIPS>
(defclass A (is-a USER)
(multislot mfs (default a b c d e)))
CLIPS> (make-instance a of A)
[a]
CLIPS> (slot-replace$ a mfs 2 4 2 3 4)
(a 2 3 4 e)
CLIPS>
<IP_ADDRESS>.2 Inserting Fields¶
Allows the insertion of one or more new values in a multifield slot value before a specified field index. The index must greater than or equal to 1. A value of 1 inserts the new value(s) at the beginning of the slot?s value. Any value greater than the length of the slot?s value appends the new values to the end of the slot?s value.
External Interface Syntax
(slot-insert$ <instance-expression> <mv-slot-name>
<index> <expression>+)
Internal Interface Syntax
(slot-direct-insert$ <mv-slot-name> <index> <expression>+)
Example
CLIPS> (initialize-instance a)
[a]
CLIPS> (slot-insert$ a mfs 2 4 2 3 4)
(a 4 2 3 4 b c d e)
CLIPS>
<IP_ADDRESS>.3 Deleting Fields¶
Allows the deletion of a range of fields in a multifield slot value. The range indices must be from 1..n, where n is the number of fields in the multifield slot?s original value and n > 0.
External Interface Syntax
(slot-delete$ <instance-expression> <mv-slot-name>
<range-begin> <range-end>)
Internal Interface Syntax
(slot-direct-delete$ <mv-slot-name> <range-begin> <range-end>)
Example
CLIPS> (initialize-instance a)
[a]
CLIPS> (slot-delete$ a mfs 2 4)
(a e)
CLIPS>
12.17 Defmodule Functions¶
The following functions provide ancillary capabilities for the defmodule construct.
12.17.1 Getting the List of Defmodules¶
The function get-defmodule-list returns a multifield value containing the names of all defmodules that are currently defined.
Syntax
(get-defmodule-list)
Example
CLIPS> (clear)
CLIPS> (get-defmodule-list)
(MAIN)
CLIPS> (defmodule A)
CLIPS> (defmodule B)
CLIPS> (get-defmodule-list)
(MAIN A B)
CLIPS>
12.17.2 Setting the Current Module¶
This function sets the current module. It returns the name of the previous current module. If an invalid module name is given, then the current module is not changed and the name of the current module is returned.
Syntax
(set-current-module <defmodule-name>)
12.17.3 Getting the Current Module¶
This function returns the name of the current module.
Syntax
(get-current-module)
12.18 Sequence Expansion¶
By default, there is no distinction between single-field and multifield variable references within function calls (as opposed to declaring variables for function parameters or variables used for pattern-matching). For example:
CLIPS> (clear)
CLIPS>
(defrule expansion
(foo $?b)
=>
(printout t ?b crlf)
(printout t $?b crlf))
CLIPS> (assert (foo a b c))
<Fact-1>
CLIPS> (run)
(a b c)
(a b c)
CLIPS>
Note that both printout statements in the rule produce identical output when the rule executes. The use of ?b and $?b within the function call behave identically.
Multifield variable references within function calls, however, can optionally be expanded into multiple single field arguments. The $ acts as a ?sequence expansion? operator and has special meaning when applied to a global or local variable reference within the argument list of a function call. The $ means to take the fields of the multifield value referenced by the variable and treat them as separate arguments to the function as opposed to passing a single multifield value argument.
For example, using sequence expansion with the expansion rule would give the following output:
CLIPS> (clear)
CLIPS> (set-sequence-operator-recognition TRUE)
TRUE
CLIPS>
(defrule expansion
(foo $?b)
=>
(printout t ?b crlf)
(printout t $?b crlf))
CLIPS> (assert (foo a b c))
<Fact-1>
CLIPS> (run)
(a b c)
abc
CLIPS> (set-sequence-operator-recognition FALSE)
TRUE
CLIPS>
Using sequence expansion, the two printout statements on the RHS of the expansion rule are equivalent to:
(printout t (create$ a b c) crlf)
(printout t a b c crlf)
The $ operator also works with global variables. For example:
CLIPS> (clear)
CLIPS> (set-sequence-operator-recognition TRUE)
FALSE
CLIPS> (defglobal ?*x* = (create$ 3 4 5))
CLIPS> (+ ?*x*)
[ARGACCES4] Function + expected at least 2 argument(s)
CLIPS> (+ $?*x*)
12
CLIPS> (set-sequence-operator-recognition FALSE)
TRUE
CLIPS>
The sequence expansion operator is particularly useful for generic function methods. Consider the ease now of defining a general addition function for strings.
(defmethod + (($?any STRING))
(str-cat $?any))
By default, sequence expansion is disabled. This allows previously existing CLIPS programs to work correctly with version 6.0 of CLIPS. The behavior can be enabled using the set-sequence-operator-recognition function described in section 12.18.3. Old CLIPS code should be changed so that it works properly with sequence expansion enabled.
12.18.1 Sequence Expansion and Rules¶
Sequence expansion is allowed on the LHS of rules, but only within function calls. If a variable is specified in a pattern as a single or multifield variable, then all other references to that variable that are not within function calls must also be the same. For example, the following rule is not allowed
(defrule bad-rule-1
(pattern $?x ?x $?x)
=>)
The following rules illustrate appropriate use of sequence expansion on the LHS of rules.
(defrule good-rule-1
(pattern $?x&:(> (length$ ?x) 1))
(another-pattern $?y&:(> (length$ ?y) 1))
(test (> (+ $?x) (+ $?y)))
=>)
The first and second patterns use the length$ function to determine that the multifields bound to ?x and ?y are greater than 1. Sequence expansion is not used to pass ?x and ?y to the length$ function since the length$ function expects a single argument of type multifield. The test CE calls the + function to determine the sum of the values bound to ?x and ?y. Sequence expansion is used for these function calls since the + function expects two or more arguments with numeric data values.
Sequence expansion has no affect within an assert, modify, or duplicate; however, it can be used with other functions on the RHS of a rule.
12.18.2 Multifield Expansion Function¶
The $ operator is merely a shorthand notation for the expand$ function call. For example, the function calls
(printout t $?b crlf)
and
(printout t (expand$ ?b) crlf)
are identical.
Syntax
(expand$ <multifield-expression>)
The expand$ function is valid only within the argument list of a function call. The expand$ function (and hence sequence expansion) cannot be used as an argument to the following functions: expand$, return, progn, while, if, progn$, foreach, switch, loop-for-count, assert, modify, duplicate and object-pattern-match-delay.
12.18.3 Setting The Sequence Operator Recognition Behavior¶
This function sets the sequence operator recognition behavior. When this behavior is disabled (FALSE by default), multifield variables found in function calls are treated as a single argument. When this behaviour is enabled, multifield variables are expanded and passed as separate arguments in the function call. This behavior should be set before an expression references a multifield variable is encountered (i.e. changing the behavior does not retroactively change the behavior for previously encountered expressions). The return value for this function is the old value for the behavior.
Syntax
(set-sequence-operator-recognition <boolean-expression>)
12.18.4 Getting The Sequence Operator Recognition Behavior¶
This function returns the current value of the sequence operator recognition behavior (TRUE or FALSE).
Syntax
(get-sequence-operator-recognition)
12.18.5 Sequence Operator Caveat¶
CLIPS normally tries to detect as many constraint errors as possible for a function call at parse time, such as bad number of arguments or types. However, if the sequence expansion operator is used in the function call, all such checking is delayed until run-time (because the number and types of arguments can change for each execution of the call.) For example:
CLIPS> (clear)
CLIPS> (set-sequence-operator-recognition TRUE)
FALSE
CLIPS> (deffunction foo (?a ?b))
CLIPS> (deffunction bar ($?a) (foo ?a))
[ARGACCES4] Function foo expected exactly 2 argument(s)
ERROR:
(deffunction MAIN::bar
($?a)
(foo ?a)
CLIPS> (deffunction bar ($?a) (foo $?a))
CLIPS> (bar 1)
[ARGACCES4] Function foo expected exactly 2 argument(s)
[PRCCODE4] Execution halted during the actions of deffunction bar.
FALSE
CLIPS> (bar 1 2)
FALSE
CLIPS> (set-sequence-operator-recognition FALSE)
TRUE
CLIPS>
Section 13: Commands ===========
This section describes commands primarily intended for use from the top-level command prompt. These commands may also be used from constructs and other places where functions can be used.


6.1 Magnitude Earthquake Hits off Indonesian Coast - USGS
In September, at least 30 people were killed, while 156 more were injured due to a powerful earthquake that hit off the coast of Indonesia's eastern Seram Island.
A 6.1 magnitude earthquake has been registered off the coast of the Indonesian part of the island of New Guinea, the US Geological Survey (USGS) reported.
The quake was registered at 12:11 GMT on Saturday about 311 kilometres (193 miles) southeast of the Indonesian province West Papua’s capital of Manokwari at a depth of 10 kilometres (6 miles).
There are no immediate reports of casualties or damages caused by the quake.
Prior to this, a 7.4 magnitude quake hit off the coast of Ternate Island, western Indonesia, according to the US Geological Survey (USGS).
Indonesia is part of the "Pacific Ring of Fire", a major area in the basin of the Pacific Ocean, which is a seismic zone, known for its powerful earthquakes.