[gecode-users] Memory problem using Gecode for local search
Guido Tack
tack at gecode.org
Sun Nov 6 19:50:44 CET 2011
On 6 Nov 2011, at 17:46, TeXitoi wrote:
> Guido Tack <tack at gecode.org> writes:
>
>> Hi,
>> have you verified (e.g. using Gist) that your search tree actually
>> has that shape?
>
> I cannot make gecode with gist compile here (OpenBSD). But writing a
> minimal example, I think I understood why the tree do not have the
> shape I was thinking.
>
> So, the question is: How can I branch to values different from sol_l
> (sol_l can be any solution, of course)? Ideally, a random value not
> the one of sol_l[i].
Ah, that makes sense. With the second branch enabled (and using 10000 as the size), memory increases only very little over time.
You'll have to implement a brancher, see the relevant sections in the documentation. The brancher will have to store the sol_I array and use it to determine the value to branch on.
Cheers,
Guido
>
> Here is the example:
>
> ====8<========8<========8<========8<========8<========8<========8<====
> #include <gecode/int.hh>
> #include <gecode/search.hh>
>
> using namespace Gecode;
>
> class MySpace: public Space
> {
> public:
> MySpace(int size_p, int nb_p):
> machine_m(*this, size_p, 0, nb_p - 1)
> {
> IntArgs sol_l(machine_m.size());
> for (int i_l = 0; i_l < machine_m.size(); ++i_l)
> sol_l[i_l] = 0;
> count(*this, machine_m, sol_l, IRT_EQ, machine_m.size() - 1);
> // if using that, we will affect first according to sol_l, so
> // we will need to go deep to find a solution
> branch(*this, machine_m, INT_VAR_NONE, INT_VAL_MIN);
> // using that, we will directly choose a value different from
> // sol_l, and so we will have a right balanced tree
> //branch(*this, machine_m, INT_VAR_NONE, INT_VAL_MAX);
> }
>
> MySpace(bool share_p, MySpace &that): Space(share_p, that)
> { machine_m.update(*this, share_p, that.machine_m); }
>
> virtual Gecode::Space *copy(bool share_p)
> { return new MySpace(share_p, *this); }
>
> void print()
> { std::cout << machine_m << std::endl; }
>
> protected:
> Gecode::IntVarArray machine_m;
> };
>
> int main(void)
> {
> MySpace *pSpace_l = new MySpace(10, 2);
> Search::Options options_l;
> options_l.c_d = 1;
> options_l.clone = false;
> DFS<MySpace> search_l(pSpace_l, options_l);
> MySpace *pSol_l = 0;
> while ((pSol_l = search_l.next()) != 0) {
> pSol_l->print();
> delete pSol_l;
> }
>
> return 0;
> }
> ====8<========8<========8<========8<========8<========8<========8<====
>
> --
> Guillaume Pinot http://www.texitoi.eu
>
> « Il semble que la perfection soit atteinte non quand il n'y a plus
> rien à ajouter, mais quand il n'y a plus rien à retrancher. »
> -- Antoine de Saint-Exupéry, Terre des hommes
>
> () ASCII ribbon campaign -- Against HTML e-mail
> /\ http://www.asciiribbon.org -- Against proprietary attachments
>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
More information about the users
mailing list


Cold Storage - Transfer to air-gapped hot storage
Signed Bundle:
The following qr code contains the signed bundle in compressed form
Scan these qr codes with a device that is connected to the internet and attach the bundle to the tangle.
Note that these qr codes do not contain any secret information like the seed or private keys,
only the bundle which is signed with the private key.
When attached to tangle this will be public information.


All Packages Class Hierarchy This Package Previous Next Index
Class javax.servlet.http.HttpUtils
java.lang.Object
|
+----javax.servlet.http.HttpUtils
- public class HttpUtils
- extends Object
A collection of static utility methods useful to HTTP servlets.
-
HttpUtils()
-
-
getRequestURL(HttpServletRequest)
- Reconstructs the URL used by the client used to make the
request.
-
parsePostData(int, ServletInputStream)
-
Parses FORM data that is posted to the server using the HTTP
POST method and the application/x-www-form-urlencoded mime
type.
-
parseQueryString(String)
- Parses a query string and builds a hashtable of key-value
pairs, where the values are arrays of strings.
HttpUtils
public HttpUtils()
parseQueryString
public static Hashtable parseQueryString(String s)
- Parses a query string and builds a hashtable of key-value
pairs, where the values are arrays of strings. The query string
should have the form of a string packaged by the GET or POST
method. (For example, it should have its key-value pairs
delimited by ampersands (&) and its keys separated from its
values by equal signs (=).)
A key can appear one or more times in the query string.
Each time a key appears, its corresponding value is inserted
into its string array in the hash table. (So keys that appear
once in the query string have, in the hash table, a string array
of length one as their value, keys that appear twice have a
string array of length two, etc.)
When the keys and values are moved into the hashtable, any
plus signs (+) are returned to spaces and characters sent in
hexadecimal notation (%xx) are converted back to characters.
- Parameters:
- s - query string to be parsed
- Returns:
- a hashtable built from the parsed key-value pairs; the
.hashtable's values are arrays of strings
- Throws: IllegalArgumentException
- if the query string is
invalid.
parsePostData
public static Hashtable parsePostData(int len,
ServletInputStream in)
- Parses FORM data that is posted to the server using the HTTP
POST method and the application/x-www-form-urlencoded mime
type.
- Parameters:
- len - the length of the data in the input stream.
- in - the input stream
- Returns:
- a hashtable of the parsed key, value pairs. Keys
with multiple values have their values stored as an array of strings
- Throws: IllegalArgumentException
- if the POST data is invalid.
getRequestURL
public static StringBuffer getRequestURL(HttpServletRequest req)
- Reconstructs the URL used by the client used to make the
request. This accounts for differences such as addressing
scheme (http, https) and default ports, but does not attempt to
include query parameters. Since it returns a StringBuffer, not
a String, the URL can be modified efficiently (for example, by
appending query parameters).
This method is useful for creating redirect messages and for
reporting errors.
All Packages Class Hierarchy This Package Previous Next Index


Holiday Central
#shopcomholidays
Our
Ultimate
Shopping
Guide
Will Put
A
Smile
On His Face
Holiday Central
Beauty
Health & Nutrition
Get the Look
Top Gifts
Gifts for
Her
Chunky Sweaters
Fitbit
Cozy Robes
iPhone 6 Cases
Michael Kors Handbags
Plush Blankets
Gifts for
Him
Cable Knit Sweaters
Peacoats
Wireless Headphones
Scarves
Watches
Bluetooth Speakers
Gifts for
Kids
Let's Imagine Elmo
Disney INFINITY 2.0: Marvel Super Heroes Starter Pack
FurReal Friends Get Up and Go Go My Walkin' Pup Pet
Fisher-Price Little People Musical Preschool
NERF Mega ThunderBow Blaster
Disney Junior Doc McStuffins Get Better Talking Mobile Cart
View More
Top Electronics
Playstation 4
Beats by Dre
Samsung Curved TV
Apple iPad Air 2
Xbox One
Google Chromecast
View More
Top Entertainment
Destiny
Mario Kart 8
Watch Dogs
Hyrule Warriors
Disney Infinity: Marvel Super Heroes
Halo: The Master Chief Collection
View More


Field
s by reflection.FieldUtils
instances should NOT be constructed in standard programming.
NaN
;
otherwise throwing an exception.
NaN
;
otherwise throwing an exception with the specified message.
null
.


DeviceInformation
2.0.0
Ethernet network
Memory
Display
Storage
Build
Logs:
Info
This application demonstrates the use of APIs to get information about device.
System Info
Product Info
TV Info
Reset
Show/hide info


Just construct the jQuery object with the images that you want and, after these images are loaded, invoke the .pinit() method on it with
a btnImgUrl
parameter to specify the Url of the button graphics.
The root of a relative url is the directory of the HTML
page that include the jQuery Pinit script.
For example, to automagically assign the 'Pin It' Button to the above images the following code was used:

    });
If the pinned image has a title
or an alt
attribute they are used
for a default pin description(The title
has precedence over the alt
).
This software is released under the MIT License.
The latest stable release is on the GitHub repository.
Report any issues, bugs, suggestions and feedback on the GitHub Issue Tracker.
On GitHub, of course.
If you have done your 'PinIt!' button and you'd love to share it, just make a pull request or contact me.
If the window is resized the buttons loose their alignment with respective images. I'll work on this issue later...maybe.
Thanks to MyGimpTutorial for its Create a Quick and Simple Web Ribbon tutorial.


Multi-modal Video Understanding in a Noisy Environment
ACM Multimedia Asia 2021 Grand Challenge, August 2021
{{ content }}


Who's Anderson Cooper?
Family
Facts
How I feel about him?
The Rainbow Comes and Goes is "a touching and intimate correspondence between Anderson Cooper and his mother, Gloria Vanderbilt, offering timeless wisdom and a revealing glimpse into their lives". I'm personally enjoying the book because it's honest and they are both very open with each other. They touch upon tough subjects like the suicide of Anderson's brother and the death of his father and his mother's sickness.
Other photos of Anderson Cooper
Go follow his instagram!


Beat your opponent(s) by being the first to score 100 points!
Move your paddle to deflect an incoming pong ball. You can change how the paddle is controlled by going to the controls menu.


Generate syntax for use with the sparklines package for LaTeX.
| Version: | 0.1 |
| Depends: | R (≥ 3.0.0) |
| Published: | 2013-06-10 |
| Author: | Thomas Leeper [aut, cre], Andy Barbour [ctb] |
| Maintainer: | Thomas Leeper <thosjleeper at gmail.com> |
| License: | GPL-2 |
| URL: | http://thomasleeper.com/software.html |
| NeedsCompilation: | no |
| Citation: | sparktex citation info |
| Materials: | NEWS |
| In views: | ReproducibleResearch |
| CRAN checks: | sparktex results |
| Reference manual: | sparktex.pdf |
| Package source: | sparktex_0.1.tar.gz |
| Windows binaries: | r-devel: sparktex_0.1.zip, r-release: sparktex_0.1.zip, r-oldrel: sparktex_0.1.zip |
| OS X binaries: | r-release: sparktex_0.1.tgz, r-oldrel: sparktex_0.1.tgz |
Please use the canonical form https://CRAN.R-project.org/package=sparktex to link to this page.


In our website we are showing the details & other informations of employees of our organisation.This website is very easily accessible and we are here to provide the different services to different our employees.Every employee of our organisation is working on different projects.There are different departments in our organisation


Jekyll supports the use of Markdown with inline HTML tags which makes it easier to quickly write posts with Jekyll, without having to worry too much about text formatting. A sample of the formatting follows.
Title
Sub title
Tables have also been extended from Markdown:
| First Header | Second Header |
|---|---|
| Content Cell | Content Cell |
| Content Cell | Content Cell |
Here’s an example of an image, which is included using Markdown:
This is another example of list:
- list of things
- Sub list
- of Other things
- with numbers
- And many more
- Sub sub list
- can go on …
- and on …
- and on !
- and on …
- can go on …
- That’s it.
- Sub sub list
Other subtitle
Highlighting for code in Jekyll is done using Base16 or Rouge. This theme makes use of Rouge by default.
Math
Type on Strap uses KaTeX to display maths. Equations such as \(S_n = a \times \frac{1-r^n}{1-r}\) can be displayed inline.
Alternatively, they can be shown on a new line:
\[f(x) = \int \frac{2x^2+4x+6}{x-2}\]


The engine core class.
More...
#include <VEEngine.h>
|
|
ThreadPool * | m_threadPool |
| | A threadpool for parallel processing.
|
| |
The engine core class.
VEEngine is the core of the whole engine. It is responsible for creating instances of the other management classes VEWindow, VERenderer, and VESceneManager, and running the render loop. In the render loop, it also handles events and sends them to the registered event listeners.
◆ VEEngine()
| ve::VEEngine::VEEngine |
( |
bool |
debug = false | ) |
|
Constructor of my VEEngine.
- Parameters
-
| [in] | debug | Switch debuggin on or off |
◆ addEvent()
| void ve::VEEngine::addEvent |
( |
veEvent |
event | ) |
|
Add an event to the event list.
This adds a new event that should be processed in the next iteration.
- Parameters
-
| [in] | event | The event that should be processed. |
◆ callListeners() [1/2]
| void ve::VEEngine::callListeners |
( |
double |
dt, |
|
|
veEvent |
event |
|
) |
| |
|
protected |
Call all event listeners.
This function calls all event listeners and gives them a specific event. The listeners can react to the event or not. If one listener retursn true, then event is "consumed" by this listener, and the function stops. Otherwise it continues and goes on calling listeners.
- Parameters
-
| [in] | dt | Delta time that passed by since the last loop. |
| [in] | event | The event that should be passed to all listeners. |
◆ callListeners() [2/2]
| void ve::VEEngine::callListeners |
( |
double |
dt, |
|
|
veEvent |
event, |
|
|
uint32_t |
startIdx, |
|
|
uint32_t |
endIdx |
|
) |
| |
|
protected |
Call a subset of the listeners, which can be done in parallel.
- Parameters
-
| [in] | dt | Delta time that passed by since the last loop. |
| [in] | event | The event that should be processed. |
| [in] | startIdx | Index of the first listener to call |
| [in] | endIdx | Index of the last listener to call |
◆ createRenderer()
| void ve::VEEngine::createRenderer |
( |
| ) |
|
|
protectedvirtual |
Create the only VERenderer instance and store a pointer to it.
VERenderer is a base class only and should not be created itself. Instead, a derived class should be instanciated, being tailored to one specific windowing system.
◆ createWindow()
| void ve::VEEngine::createWindow |
( |
| ) |
|
|
protectedvirtual |
Create the only VEWindow instance and store a pointer to it.
VEWindow is a base class only and should not be created itself. Instead, a derived class should be instanciated, being tailored to one specific windowing system.
◆ deleteEvent()
| void ve::VEEngine::deleteEvent |
( |
veEvent |
event | ) |
|
Delete an event from the event list.
This removes an event from the event list. Mainly this is used to remove continuous events like a key is pressed or a mouse button is clicked.
- Parameters
-
| [in] | event | The event that should be removed. |
◆ deleteEventListener()
| void ve::VEEngine::deleteEventListener |
( |
std::string |
name | ) |
|
Delete an event listener.
The event listener will be removed from the list and destroyed.
◆ end()
| void ve::VEEngine::end |
( |
| ) |
|
|
virtual |
End the main render loop.
This sets a flag to tell the main render loop to stop.
◆ fatalError()
| void ve::VEEngine::fatalError |
( |
std::string |
message | ) |
|
|
virtual |
Show a fatal error using the Nuklear GUI.
This function deletes all registered event listeners, and registers one new one, showing an error message.
◆ getAvgFrameTime()
| float ve::VEEngine::getAvgFrameTime |
( |
| ) |
|
|
inline |
- Returns
- the average frame time (s)
◆ getAvgUpdateTime()
| float ve::VEEngine::getAvgUpdateTime |
( |
| ) |
|
|
inline |
- Returns
- the average update time (s)
◆ getInstance()
| VkInstance ve::VEEngine::getInstance |
( |
| ) |
|
- Returns
- the Vulkan instance.
◆ getLoopCount()
| uint32_t ve::VEEngine::getLoopCount |
( |
| ) |
|
◆ getRenderer()
◆ getRequiredInstanceExtensions()
| std::vector< const char * > ve::VEEngine::getRequiredInstanceExtensions |
( |
| ) |
|
|
protectedvirtual |
- Returns
- a list of Vulkan API instance extensions that are required.
◆ getSceneManager()
◆ getValidationLayers()
| std::vector< const char * > ve::VEEngine::getValidationLayers |
( |
| ) |
|
|
protectedvirtual |
- Returns
- a list of Vulkan API validation layers that should be activated.
◆ getWindow()
◆ initEngine()
| void ve::VEEngine::initEngine |
( |
| ) |
|
|
virtual |
◆ processEvents()
| void ve::VEEngine::processEvents |
( |
double |
dt | ) |
|
|
protected |
Go through the event list, and call all listeners for it.
Go through all events in the event list and pass them to the event listeners. Continuous events are kept, all other events are deleted from the list at the end.
- Parameters
-
| [in] | dt | The delta time that has passed since the last loop. |
◆ registerEventListener()
Register an event listener.
The event listener will be sent events to in the render loop.
- Parameters
-
| [in] | pListener | Pointer to the event listener to be registered. |
◆ registerEventListeners()
| void ve::VEEngine::registerEventListeners |
( |
| ) |
|
|
protectedvirtual |
Register default event listener for steering the standard camera overload if you do not want this event listener to be registered.
Reimplemented in ve::MyVulkanEngine.
◆ removeEventListener()
| void ve::VEEngine::removeEventListener |
( |
std::string |
name | ) |
|
Remove an event listener.
The event listener will be removed fróm the list but not destroyed.
- Parameters
-
| [in] | name | The name of the event listener to be removed. |
◆ run()
| void ve::VEEngine::run |
( |
| ) |
|
|
virtual |
The main render loop.
This is the main render loop. It performs time measurements, runs the event processing, checks whether the window size has changed (if so, informs the VEREnderer), and asks the VERenderer to draw and present one frame.
◆ windowSizeChanged()
| void ve::VEEngine::windowSizeChanged |
( |
| ) |
|
|
protected |
Inform the engine that the window size has been changed.
If the window size has been changed, then the renderer has to change many resources like the swap chain size, framebuffers etc.
The documentation for this class was generated from the following files:


Hi {{ user.firstname }}
your request "{{ filename }}" for {{ submission_type }} analysis has been received.
Please transfer your data over FTP to
ftp: {{ PUREFTPD_MYSQL_SERVER }}
user: {{ ftp_user }}
pass: {{ ftp_pass }}
drop all your files on the main folder, do not create subdirectories.
Example with ncftp:
```
# navigate to your raw data folder
cd ~/myrawdata
# login with ncftp
ncftp -u {{ ftp_user }} -p {{ ftp_pass }} {{ PUREFTPD_MYSQL_SERVER }}
# upload your raw files
mput *.fastq.gz
# upload your md5sums file
put md5sums.txt
```
Instructions on how to use cyberduck for transfering your data can be found here: https://github.com/mpg-age-bioinformatics/flaski/blob/main/ftp_info/README.md
Please realise that this FTP account will be inactivated in 2 weeks.
Once you've transfered all your files click on the following link to start the analysis:
{{ token_link }}
If you only have SRA data you do not need to download/upload it yourself, just go ahead and click the link above.
Cheers!
Flaski
Submission: {{ submission_tag }}


--- layout: default title: Home ---
Find out about the group.
Archive of our past events.
See what's coming up next.
Questions? Comments? Want us to be at your next event?
We accept used LEGO!
Have questions about the group? Check our FAQ!
Connect with us online! Facebook Twitter Instagram


Sorry, your browser is not supported. Please try again using a different browser (
Safari
,
Chrome
,
Firefox
).


{% extends "base.html" %} {% block title %}
Medieval catalogues > UNIVERSITY AND COLLEGE LIBRARIES OF CAMBRIDGE > University > Register, 1473
{% endif %}230 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


17 April 2009 - The Ministry of Health of Egypt has reported a new confirmed human case of avian influenza . The case is a 33 year old female from Kellin district, Kfr El Sheikh Governorate. Her symptoms began on 7 April and she was hospitalized at Kfr El Sheikh Fever Hospital on 15 April where she was started on oseltamivir the same day (15 April). She is in a critical condition.
Infection with H5N1 avian influenza was confirmed by the Egyptian Central Public Health Laboratory on 15 April.
Investigations into the source of her infection indicate a history of close contact with dead and sick poultry prior to becoming ill.
Of the 64 cases confirmed to date in Egypt, 23 have been fatal.


ATM Banking System
My Account
Funds Transfer
Transaction History
Settings
My Profile
Logout
Settings
Change Password
Old Password
New Password
Confirm New Password
Information
Mobile Number
123456789
Email Address
<EMAIL_ADDRESS>Alternate Email Address
samplealternateemail@gmail.com


Chat instantly across the globe. Keep in touch through audio and video calls. The only people who see your conversations are the people you're talking with.


{% extends 'vesper/base.html' %} {% block head %}
Adds start indices to clips in this archive that were created by the original Old Bird Tseep and Thrush detectors.
The clips to add start indices for are specified as a set of stations and a range of dates.
This command inspects all clips created by the original Old Bird detectors for recordings from the specified stations and dates. For each clip that does not have a start index, the command finds the start index by searching for the clip's samples (obtained from the appropriate clip audio file) in the clip's recording, and adds the start index to the clip.The command logs warning messages for any problems it finds, for example if the recording file that should contain a clip is missing, or if the recording file does not contain the clip's samples.
If you check the Dry run
check box, the command
will do everything it normally does, including writing all of
its normal log messages, but it will not actually modify the
archive database.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/error.3A.20interrupted.html ---
Does anyone know why this often happens when using jump-to-definition? (I'm in emacs if it matters.)
I get the same error.
I thought it might be a problem with company-mode
but I wasn't able to find anything. Are you also on a Mac?
Linux here
@Sebastian Ullrich also I think and I remember he didn't have the same error so I thought it might be because of mac. It must be something else
Are you well versed in Emacs Lisp?
Not especially, but I would try to debug it if the issue is not already understood.
It's quite irritating
it is indeed. I just added print statements in lean-find-definition
in lean-mode
but I can't get it to fail now ... :/
Do you have:
(global-set-key (kbd "S-SPC") #'company-complete)
in your init file? I found a thread on the github repo (https://github.com/company-mode/company-mode/issues/69) that suggests replacing it with:
(define-key company-mode-map (kbd "S-SPC") #'company-complete)
It seems to help but the bug has been showing up inconsistently. Can you try it and tell me if it helps?
I got Symbol's value as variable is void: company-mode-map
Is that the right issue?
okay, a (require 'company)
fixed that
That's the one that helped me. Do you have (require 'company)
before that line?
Well, it's working at the moment, but it usually does after restarting emacs :)
Oh, it already stopped working
Darn! I was hoping!
In lean-input.el
, in lean-find-definition
, can you try adding print statements inside the lambda expression? Like this:
(defun lean-find-definition () "Jump to definition of thing at point" (interactive) (lean-get-info-record-at-point (lambda (info-record) (print "begin") (-if-let (source-record (plist-get info-record :source)) (apply #'lean-find-definition-cont source-record) (-if-let (id (plist-get info-record :full-id)) (message "no source location available for %s" id) (message "unknown thing at point"))) (print "end"))))
Well... I tried adding those and it's working again.
Did editing the .el
file cause emacs to reload the mode automatically?
I don't know. I wonder if the printing introduces a delay. Let's try removing the print statements
Unfortunately I finished proving the thing I was trying to prove
I guess we'll never know
This is a known issue (to me :) ) where go-to-definition doesn't work while the goal display is open
That's very good to know! Is this on the emacs side or on the Lean side?
That requests are interrupted by unrelated requests is an issue with the Lean server. But lean-mode could try to work around that by not sending a goal request directly after a find definition request.
Do you think if we set a timer for masking requests for half a second after find definition that might be good enough?
It should be sufficient to suppress the next execution of lean-show-goal--handler
after lean-find-definition
has run, probably?
That seems to be enough. Do you want a PR for it?
Sure, thanks
Done
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


{{products.product_name}}
| Owner: {{products.owner}} |
| Time: {{products.time}} |
| Price: {{products.price}} |
| Telephone: {{products.phone}} |
| Description: {{products.description}} |
| Owner: {{products.owner}} |
| Time: {{products.time}} |
| Price: {{products.price}} |
| Telephone: {{products.phone}} |
| Description: {{products.description}} |
{{review.review}}


 This corpus contains synchronised imaging data of extraoral (lips) and intraoral (tongue) articulators from 82 native speakers of English.
For more information, please read the TaL corpus paper here!
Datasets
The TaL corpus consists of two datasets:
- TaL1 is a single-speaker dataset containing data of one professional voice talent, a male native speaker of English, over six recording sessions.
- TaL80 is a multi-speaker dataset contains recording sessions of 81 native speakers of English without voice talent experience. Each speaker was recording over a single recording session.
Speaker and session identifiers
In the TaL80 dataset, speaker identifiers denote speaker number, gender (m/f), and country of origin. Country identifiers are: (e)ngland, (s)cotland, (i)reland, (n)orthern-ireland, (o)ther. Examples: 01fi, 02fe, 03mn, 04me, ...
The TaL1 dataset only has 1 speaker, so there are no speaker identifiers. Instead, we have recording sessions, which are simply called day1, day2, day3, ...
File identifiers
For each speaker (TaL80) or session (TaL1), utterances are indexed according to their recording times. See the prompt text file for recording date/time. Each file ID also includes a tag indicating the prompt type.
| Prompt Tag | Description |
|---|---|
| swa | swallow |
| cal | calibration |
| aud | audible read speech |
| sil | silent speech |
| whi | whispered speech (TaL1 only) |
| spo | spontaneous speech utterance (unprompted speech) |
| xaud | shared audible read speech utterances |
| xsil | shared silent speech utterances |
| xwhi | shared whispered speech utterance (TaL1 only) |
Calibration prompts (cal) and swallows (swa) were read at the beginning and end of each recording session and before and after a short break.
The tag x denotes prompts that were shared across speakers (TaL80) or recording sessions (TaL1).
Examples: 001_swa, 002_cal, 004_xaud, 028_spo, 029_xsil, 038_sil, ...
Data types
Each utterance consists of five core data types, which can be identified by their file extension.
Core data types
| Data type | Extension | Description |
|---|---|---|
| prompt | .txt | text file with prompt and datetime of recording |
| waveform | .wav | speech waveform |
| synchronisation | .sync | audio synchronisation signal (waveform) |
| ultrasound | .ult, .param | raw ultrasound data (.ult) and ultrasound parameters (.param) |
| video | .mp4 | video images of the lips (synchronised to waveform) |
Example. The second utterance recorded by speaker 01fi is a calibration utterance with the identifier 002_cal. The five core data types for this utterance are the files: 002_cal.txt, 002_cal.wav, 002_cal.sync, 002_cal.ult, 002_cal.param, 002_cal.mp3.
Additional data
Because spontaneous speech utterances can be long in duration (up to 60 seconds), we manually annotated the boundaries of shorter time segments (typically 5-10 seconds). This annotation is available as a CSV file with start and end time in seconds of the short segments nd their respective transcription. This file is identified by the extension .lab.
Structure
TaL1 and TaL80 follow a similar structure, but they are independent datasets. For this reason, shared prompts are only marked within datasets (across speakers for TaL80 and sessions for TaL1). There is an overlap in the recorded prompts in the two datasets. Most prompts read in TaL1 were recorded by the first speakers in TaL80, but a small subset was read by all speakers. Users should be aware of this if using both datasets, particularly when designing training and test splits.
Directory structure for TaL1:
/TaL1
/samples
/core
/video
/core
/day2
/day3
...
/doc
Directory structure for TaL80:
/TaL80
/samples
/core
/video
/core
/01fi
/02fe
/03mn
...
/doc
The samples
directory contains a subset of the larger dataset (2 samples per speaker/session). If you wish to have a quick look at the TaL corpus, you can download this directory first and browse some examples. The directory samples/core
provides a subset of the core data types and the directory samples/video
provides video samples generated with the tal-tools visualiser.
The doc
directory contains the documentation for the data, as well as some additional documents, such as version number and anonymised participant information.
The core
directory contains the core data for the dataset.
Video samples
In samples/video
, there are a few video examples generated with the tal-tools visualiser. These sample videos are also available online:
Download
The datasets are quite large, so please make sure that you have enough disk space before attempting to download.
| Dataset | Size |
|---|---|
| /TaL1/core | 49GB |
| /TaL80/core | 498GB |
If you prefer to browse some samples before downloading the full data, you can download the samples
directories.
| Dataset | Size |
|---|---|
| /TaL1/samples | 2.1GB |
| /TaL80/samples | 8.2GB |
To download the TaL corpus, please check the download instructions for the Ultrasuite repository. The instrutions are applicable to the TaL corpus, in case you prefer to download part of the data (an utterance, a specific data type, etc). However, note that we replace ultrasuite-rsync.inf.ed.ac.uk::ultrasuite
with ultrasuite-rsync.inf.ed.ac.uk::tal-corpus
.
Warning: the commands below will download 49GB and 498GB of data, respectively! Please make sure you have enough disk space. Check the download instructions for the Ultrasuite repository to download subsets of the data.
To download the TaL1 dataset, you can run:
rsync -av ultrasuite-rsync.inf.ed.ac.uk::tal-corpus/TaL1 .
Similarly, to download the TaL80 dataset, you can run:
rsync -av ultrasuite-rsync.inf.ed.ac.uk::tal-corpus/TaL80 .
Using the data
The video data released with the TaL corpus does not embed the audio. If you wish to see the video with the corresponding waveform, you can use ffmpeg with a command such as:
ffmpeg -i input.mp4 -i input.wav -c:v copy -map 0:v:0 -map 1:a:0 -c:a ac3 -b:a 192k output.mp4
If you wish to visualise the ultrasound, with or without audio, you can use Ultrasuite tools.
For more complex visualisations including video, ultrasound, and spectrogram/waveform, please have a tool at the TaL corpus visualiser.
If you're just interested in general input/output, one or more of these functions should provide some useful examples.
Synchronisation of data streams
The hardware synchronisation signal used during data collection is available in the TaL corpus. This is a waveform with the file extension .sync
. Please check the page linked below for further details. This page might also be useful to understand the overall content of the data.
Regarding TaL1: The video synchronisation failed during the first recording session of the TaL1 data. The problem can be seen in the synchronisation signal, which merged the video and ultrasound signals. We chose to release this session, as it might still be useful for some applications that do not depend on video and audio synchronisation. This session is named day1_no_vid_sync
. Check the link above for further details.
Additional Notes
TaL80 Notes
Please see the participant notes in TaL80/doc
for anonymised detailed notes on all participants. We describe here two cases where image quality was not as good as we hoped.
- Speaker
17ms
has a large amount of facial hair, which hides a large portion of the lips in the video. The ultrasound images of the tongue appear reasonable. - Speaker
60ms
has a large amount of facial hair under the chin, which created some problems for the ultrasound probe. The video, however, appears reasonable.
Acknowledgements
Supported by the Carnegie Trust for the Universities of Scotland (Research Incentive Grant number 008585) and the EPSRC Healthcare Partnerships grant number EP/P02338X/1 (Ultrax2020). We thank the participants of this corpus for providing the consent that allows this data to be freely available to the research community.
References
If using data or code from the TaL corpus, please provide appropriate web links and cite the following paper:
- Ribeiro, M. S., Sanger, J., Zhang, J.-X., Eshky, A., Wrench, A., Richmond, K.,& Renals, S. (2021). TaL: a synchronised multi-speaker corpus of ultrasound tongue imaging, audio, and lip videos. Proceedings of the IEEE Workshop on Spoken Language Technology (SLT). Shenzhen, China. [paper]


Password Generator
Password Length
Include uppercase letters
Include lowercase letters
Include numbers
Include symbols
Generator Password


1. Be aware of your area's flood risk before the expected rain is going to hit.
This information can usually be found online on your local news or weather station's website, or they may show it on TV
2. Check to see if you have insurance that covers flooding. If not, find out how to get flood insurance.
Any damage that is done by water, no matter where you live, is covered by flood insurance, so it is good to have it to be on the safe side.
3. Keep insurance policies, documents, and other valuables in a safe-deposit box, that is located up high and out of harm's way.
4. Assemble a Disaster Supplies Kit
5. Identify where you could go if told to evacuate
Choose several places in case one is unavailable, such as a friend's home in another town, a motel, or a shelter. Make sure that everyone in the family knows exactly where each place is located and how to get there.
6. Reduce any potential flood damage
7. When a flood WARNING is issued, listen to local radio and TV stations for information and advice.
If told to evacuate, do so as soon as possible. Always listen to the instructions authorities give you.
1. Evacuate immediately
You may have only a short time to escape. Act quickly, utilizing your planning route.
2. Move to higher ground away from rivers, streams, creeks, and storm drains.
Do not drive around barricades. They are there for your safety.
3. If evacuating in your car, drive through as little water as possible, although sometimes this may be unavoidable, and take the shortest route possible to your meeting place
Make sure that you have your emergency kit with you.
4. Know that you should never walk through moving water
The currents in even 6 inches (15 cm) of water can be dangerous. In still water, use a stick or another long object to test the area and make sure it is safe.
5. If your car stalls in rapidly rising waters, abandon it immediately and climb to higher ground.
You may have only a short time to escape. Act quickly, utilizing your planning route.
6. Be aware that flash flooding can occur. If there is any possibility of a flash flood, move immediately to higher ground. Do not wait for instructions to move.
The following are guidelines for the period following a flood:
Floods are a dangerous hazard throughout the world. On average in the United States, about 165 people are killed and about $2 billion of damage occurs each year. Most people underestimate the power and destructiveness of flood waters.
Most currently available flood maps are used to assist planners in identifying and preparing for flooding scenarios. These maps portray statistics based on long-term historical records to estimate and forecast an approaching weather system. For more information on the techniques of flood statistics reports see: http://pubs.usgs.gov/twri/. The U.S. Geological Survey (USGS) and the National Weather Service (NWS) have developed a way to bring flood forecasting and flood mapping together, using available technologies, to produce maps which can be served on the Internet in time to allow communities to prepare for potential flooding. More information on this project can be obtained by downloading the USGS fact sheet at: http://pubs.water.usgs.gov/fs2004-3060/; or checking out the informational page at: http://wa.water.usgs.gov/projects/pugethazards/urbanhaz/MappingNWS.htm. For a demonstration of the system go to: http://wa.water.usgs.gov/cgi/flood_snoqualmie.cgi. WaterWatch, the USGS information on current water resources conditions, is found at: http://water.usgs.gov/waterwatch/. FEMA Flood Maps are available free at: http://msc.fema.gov. These maps are often used in regard to property damage and for local planners defining escape routes.
Several types of data can be collected to assist hydrologists predict when and where floods might occur: Monitoring the amount of rainfall occurring on a realtime basis Monitoring the rate of change in river stage on a realtime basis, which can help indicate the severity and immediacy of the threat Knowledge about the type of storm producing the moisture, such as duration, intensity and areal extent, which can be valuable for determining possible severity of the flooding Knowledge about the characteristics of a river's drainage basin, such as soil-moisture conditions, ground temperature, snowpack, topography, vegetation cover, and impermeable land area, which can help to predict how extensive and damaging a flood might become The National Weather Service collects and interprets rainfall data throughout the United States and issues flood watches and warnings as appropriate. The National Weather Service uses statistical models and flood histories to try to predict the results of expected storms. The USGS maintains a network of streamflow-gaging stations throughout the country for which the discharge and stage are monitored. Flood estimation maps are generally produced by estimating a flood with a certain recurrence interval or probability and simulating the inundation levels based on flood plain and channel characteristics.
There are two basic kinds of floods, flash floods and the more widespread river flooding. Flash floods generally cause greater loss of life and river floods generally cause greater loss of property. A flash flood occurs when runoff from excessive rainfall causes a rapid rise in the stage of a stream or normally dry channel. Flash floods are more common in areas with a dry climate and rocky terrain because lack of soil or vegetation allows torrential rains to flow overland rather than infiltrate into the ground. River flooding is generally more common for larger rivers in areas with a wetter climate, when excessive runoff from longer-lasting rainstorms and sometimes from melting snow causes a slower water-level rise, but over a larger area. Floods also can be caused by ice jams on a river, or high tides. However, most floods can be linked to a storm of some kind.
Several kinds of flood maps are available from USGS and other sources. Online USGS map showing real-time flood conditions USGS Web site to track flooding in your area Online USGS current and past flood maps National Oceanic and Atmospheric Administration online River Flooding Forecast map Federal Emergency Management Agency "How to find your flood map" Web page Federal Emergency Management Agency Map Service Center Web site


Edmonds-Woodway junior excels in academics and activism
EDMONDS — Audrey Wilkinson, 16, is a junior at Edmonds-Woodway High School in the academically challenging International Baccalaureate (IB) program. She is active in theater and started a feminism club. Her dad, Eric Wilkinson, is a longtime television news reporter at KING 5 TV. Her mom, Katie Brown Wilkinson, owns a public relations company. She has a sister Olivia, 19.
Audrey has a 3.98 GPA.
Question: How’d that happen?
Answer: I got one A-minus in pre-calc last semester. I’m not ashamed to say I cried over it. It’s OK. I learned from it. I grew from it.
Q: Why IB instead of Running Start?
A: I pondered it a lot. I live out of the district and had to test in and make that choice for my future in eighth grade. You get prepared for a high level education at top performing colleges. Duke University is my dream school.
Q: Is it hard?
A: It’s definitely tough. They challenge you. That’s something I haven’t always gotten in school. I’m very much a voracious learner. I want a fast-paced classroom setting and open discussion … I’m very vocal, always raising my hand.
Q: Favorite class?
A: Definitely biology. It is the class I am most passionate about because I want to go into medicine to be able to help people and nurture them and heal them. I want to work with women and children, either in pediatrics or obstetrics and gynecology.
I work with Planned Parenthood now. It’s called Teen Council. I’m a peer educator. I teach health classes to homeless youth and high school and middle school students. It’s peer education, rather than being taught by someone older than you … it’s weird to think about your teachers talking about that. It’s more relatable and absorbable and comfortable.
I’m very involved with activism.
I lobbied for more comprehensive inclusive sex education in January to meet my legislators and look them in the eye and tell them why this work was important to me.
Q: Why is it important to you?
A: I went to a private school from kindergarten through eighth grade and we never really got any semblance of sex education. I did see firsthand what misinformation can cause because some members of the school were uncomfortable with having those like, you know, obviously somewhat awkward conversations.
Q: You can talk about sex without turning red?
A: I can. I can talk about it with my parents, very much so.
Q: Tell me about the feminism club.
A: I started it freshman year. We meet weekly. It’s a safe place for people to talk about things they don’t know who else to tell. You don’t always want to tell things like that to teachers or counselors or parents. It’s kind of like a support group in that way.
We did a menstrual hygiene drive that we gave to women’s shelters, to destigmatize things that people with uteruses go through.
Q: Do you try to explain these things to your dad?
A: I do. Sometimes he rolls his eyes.
Q: Do you like seeing your dad on TV?
A: I don’t really watch my dad. It’s so normal, an oh, my dad’s going to work type thing. He’s been working there as long as I’ve been alive. We watch his stories if he’s very moved by them or if it’s a live shot.
Q: Favorite newscast he did?
A: I thought this was the coolest thing in the world. It’s called Walrus Love and he won an award for it. It was about two walruses at the Point Defiance Zoo that mated for life. They would hold hands. Those walruses just had an affinity for each other.
Q: Do you want to find love like that someday?
A: I do. That’s what I aspire to. That’s the level. Yes. Absolutely.
Q: Who inspires you?
A: My parents have always been so supportive of everything I wanted to do, even in small ways like giving me rides or whatever, but also in more instrumental ways encouraging me that the sky is the limit. I’ve been doing theater since I was 5 or 6. My sister did it before me. We’re a very loud, passionate, energetic musical family.
Q: If you could be on stage with anyone dead or alive who would it be?
A: I want to say Audrey Hepburn because she’s my namesake. It’s always been someone I’ve grown up with as an icon. She’s obviously a very talented actress and there’s so many stories of her kindness offstage, making dinner for the cast and crew, things like like that I aim to emulate.
Q: What are three things in your fridge?
A: Smart Balance butter. I’m vegan, so I don’t eat dairy. It tastes exactly like butter, it’s so good. Orange juice, I drink it every morning. I also have Justin’s Peanut Butter Cups, dark chocolate, because I like them cold.
Q: What’s your pet peeve?
 I’ll be trying to get to my class and people just move at a sluggish pace. Some can’t move faster, and that’s completely OK. But people who station themselves in the hallways, I’ll never understand it.
Q: What do you like to do in your free time?
A: Crafty things like tie-dyeing and making bracelets.
Spending time with my dogs. Sugar is my baby, she’s a Maltese, we have our kinship. My other dog Ruby is a dachshund.
Q: Anything else I should have asked?
A: You covered the main bullet points.
Andrea Brown<EMAIL_ADDRESS>;<PHONE_NUMBER>. Twitter @reporterbrown .


Offline mode
EasyAnt cames with offline mode support. This feature is designed to bring all resources of your build offline. It includes :
project dependencies (including transitive ones)
buildtype used by the project
plugins used by the project
Before going offline you'll need to tell easyant to fetch everything by invoking "offline:go-offline" target. All your resources will be fetched in "offline" directory. You'll need to invoke it again if you add new plugins / dependencies. Once your resources are ready to be used offline you can tell easyant you're offline by using --offline switch (or -o in shorter form).
> easyant --offline
Or
> easyant -o
This can also be done by setting "easyant.offline" property to true either on the command line or in your module.ivy. Example using property on the command line :
> easyant -Deasyant.offline=true
Example using property in your module.ivy file :


Home
News
Contact
About
Sign Out
Payment History and Balance
Make A Payment
How have we used your donations?
Have a look below to find out!
In the past few months we have been able to use your donations to help start up company A! This was only possible because of those who have donated! Thank you for your donations!


org.codehaus.groovy.binding
Interfaces
BindingUpdatable
FullBinding
SourceBinding
TargetBinding
TriggerBinding
Classes
AbstractFullBinding
AggregateBinding
BindingProxy
BindPath
ClosureSourceBinding
ClosureTriggerBinding
EventTriggerBinding
MutualPropertyBinding
PropertyBinding
PropertyChangeProxyTargetBinding
PropertyPathFullBinding
SwingTimerTriggerBinding
Enums
PropertyBinding.UpdateStrategy


Min 1, Max 100 characters
Min 3, Max 100 characters
Min 6, Max 100 characters. Must contain @.
Min 8, Max 100 characters.


Card, Deck and Shoe Classes¶
This chapter introduces a number of simple classes for modeling card games. In Card, Deck and Shoe Analysis we’ll look at a number of issues related to cards. This includes points, ordering, suits, and identity. We’ll also look at Card Subclass Factory, Unicode Images, Deck, and Shoe.
We’ll follow this with Card-Deck-Shoe Questions and Answers to address any lingering doubts or minor issues.
In Card Superclass we’ll present the overall design for Card
.
This is followed by face cards in FaceCard Class, and the special
cases for aces in AceCard Class.
We’ll look at the need for a factory function in Card Factory Function.
We’ll also design containers for cards including Deck class and Shoe class.
We’ll enumerate the deliverables in Card-Deck-Shoe Deliverables.
This chapter will review the structure of the unit tests in Testing Examples.
Card, Deck and Shoe Analysis¶
The standard playing card has two attributes: a rank (Ace, 2 through 10, Jack, Queen, or King) and a suit (♣, ♢, ♡, or ♠). The set of all 52 combinations comprises a full deck.
The basic set of responsibilities of the Card
class include keeping the rank and suit of a single
standard playing card.
It turns out, however, that these objects are fairly complex.
We’ll look at several topics:
Points. A card has a point value, which is a number from 1 to 11, and is based on the rank. In the case of an Ace, it is also based on the hand in which the card is evaluated. This collaboration with a hand complicates the responsibilities for a single card.
Ordering. An Ace has a complex life. What order do we put the cards in?
Suits. Suit doesn’t matter, right? What about the name of the game, “black jack”?
Identity. How do we compare cards?
Card Subclass Factory. How do we create card objects that are in their correct subclass?
Unicode Images. Since Unicode offers us images of cards, we can use these.
Deck. Cards come in a standard deck of 52 cards.
Shoe. Blackjack dealers often use a shoe with up to eight decks.
We’ll start by looking at points.
Points¶
We have three different rules for establishing the point value of a card. This is a big hint that we have three subclasses.
One subclass includes the Aces, which are either 1 or 11 points.
Another subclass includes the number cards from 2 to 10, where the rank is the point value.
Finally, the third subclass includes the face cards, where the point value is fixed at 10.
These three subclasses implement slightly different versions of a method to return the point value of the card. For more discussion on this, see Card-Deck-Shoe Questions and Answers FAQ for more discussion.
The problem of determining the value of aces is something we will have
to defer until after we create the Hand
class. First, we’ll implement
the basic Card
class, then we’ll develop the Hand
class, and decide how the Hand
class
computes its number of points from the Card
instances.
The terminology used gives us some hint as to how to structure our design. Players refer to a soft total and a hard total. An A-6 hand is called a soft 17, and a hard 7. A soft hand has some flexibility in how it is played.
For now, we’ll consider two methods: softValue()
and hardValue()
to
return the various values of each card. For ordinary cards, the values are both the rank.
For face cards, the values are both 10. For aces, however, the hard value is 1 and
the soft value is 11.
While this design does have some potential problems in dealing with multiple aces in a single hand, we’ll let it stand until we have more design in place.
Ordering¶
Another exasperating detail of standard playing cards is the ordering of the various ranks.
In many games the ordering of cards is 2-10, J, Q, K, A. The Ace (rank of 1) is placed after the King.
In Blackjack, Ace is both 1 and 11, leading to a variable ranking, depending on other cards in the hand.
For games like Poker and Bridge, we need to distinguish the ordering and the rank because the ordering of the cards doesn’t depend on the simplistic rank value.
In Blackjack, this doesn’t matter, and we can ignore it.
Suits¶
The issue of suit requires some care. In the game of Blackjack, suits don’t matter. Indeed, for the purposes of simulation, we could discard the notion of suit entirely. However, for the purposes of making a reasonably complete model of real-world objects, it makes sense to implement the suit of a card, even if we do nothing with it.
Also, suits have two colors: red and black. Even though the name of the game includes a color and rank (“black”, “jack”) these are both irrelevant to the modern game. Historically, an ace of spades and either of the black jacks had a special payout. Since this is no longer the case, color and suit no longer matter.
We’d like to provide symbolic variable names for the suits. In Python we have a number of choices.
We can create an
enum.Enum
class for the suits.We can use class-level variables to define four named constants.
We would also like to provide named constants for the face cards: Jack, Queen, and King,
as well as the Ace. This does not appear to be a perfectly sensible use of the enum.Enum
class
definitions, since these labels are co-mingled with integer ranks.
For this reason, we’ll suggest class-level variables for all of these symbolic
constants. We can then say Card.Spades
to reference the
unicode character u'\N{BLACK SPADE SUIT}'
.
There’s a compelling case to be made for defining an enum.Enum
for the suits. While the examples will assume class level variables,
the student may want to pursue the enum
solution.
Identity¶
Cards need to be compared. We need a rich set of comparisons for cards.
All of these are build automatically by typing.NamedTuple`
and the @dataclass
decorator.
Hash Value. We must implement a proper hash function,
__hash__()
that includes both rank and suit.The definition for
__hash__()
in section 3.3.1 of the Language Reference Manual tells us to do the calculation using a modulus value. The modulus is based onsys.hash_info.width
, which is the number of bits. The actual value we want to use issys.hash_info.modulus
.The hash for a card, , is equal to the sum of the hash for the card’s rank, plus the hash for the card’s suit . The sum is taken modulus
sys.hash_info.modulus
. The value shown, is typical, but not the only value used. This is based onsys.hash_info.width
.Equality. We must implement
__eq__()
and__ne__()
so that we can compare cards to each other. This is a subtle issue because – in Blackjack – suits don’t matter. A 10 of Clubs is essentially equal to a 10 of Spades.Rank. We might want to implement
__gt__()
,__lt__()
,__ge__()
,__le__()
so that cards can be properly ordered.
These features are best provided through a @dataclass(frozen=True, order=True)
decorator.
Card Subclass Factory¶
We need to be able to create a Card
instance without being deeply concerned about
which specific subclass it belongs to. This is where a Factory
or Builder design pattern is essential.
Ideally, we’ll have a card_factory()
function that emits
an object of the appropriate subclass of the Card
class.
We can then do things like this:
Creating Cards
for suit in Card.Spades, Card:Hearts, Card.Diamonds, Card.Clubs:
for rank in range(1,14):
c = card_factory(rank, card)
This kind of nested loop will properly create all 52 distinct cards.
We have an interesting implementation question around this factory. There are two common ways to implement this in Python:
Stand-Alone Function.
Static Method of the Card class.
The stand-alone function is widely used because it’s simple.
A card instance is created with card_factory(Card.Ace, Card.Spades)
.
The static method of the Card
class involves pushing the function
into the definition of the class.
class Card:
@staticmethod
def card_factory(rank: int, suit: str) -> 'Card':
...
A card instance is created with Card.card_factory(Card.Ace, Card.Spades)
.
Some developers like the static method because it’s bound into the Card
class hierarchy. It doesn’t offer any other advantages. It can promote
readability.
Unicode Images¶
The Unicode character set has individual card images available as characters. There are a number of images available for each suit.
The mapping works like this:
- spades
0x1F0A0
to0x1F0AE
- hearts
0x1F0B0
to0x1F0BE
- diamonds
0x1F0C0
to0x1F0CE
- clubs
0x1F0D0
to0x1F0DE
The Ace of Spades numeric value is 0x1F0A0
. In Python, the string Unicode escape needs leading zeroes to make
it a full eight hexadecimal digits. It looks like this: `"\u0001f0a0"
.
The built-in chr()
function doesn’t need all the leading digits.
>>> "\U0001f0a0"
'🂠'
>>> chr(0x1f0a0)
'🂠'
There’s an interesting wrinkle in this mapping. Unicode includes a fourteenth “knight” rank. We need to skip this rank to map the thirteen conventional ranks and four suits to a Unicode character.
Ranks 1 to 11 (Ace to Jack) are simple additions to the base value for the suit.
5 Diamonds = 0x1F0C0 + 5 = 🃅
Ranks 12 and 13 (Queen and King) are after the knight and therefore off by one: we add 13 and 14 (0xD and 0xE)
Queen Spades = 0x1F0A0 + 13 = 🂭
The images are only legible if we use a fairly large font.
Deck¶
A deck of cards has responsibility for shuffling and dealing the various cards. Additionally, it should constuct the complete set of 52 cards. We note that shuffling uses a random number generator, but a deck isn’t the same kind of random event factory that a Wheel or pair of Dice is. In the case of Wheel and Dice, the random events were based on random selection with replacement: an individual event can be regenerated any number of times. In the case of a deck, however, once a card has been dealt, it will not show up until the deck is shuffled.
In Roulette and Craps, the payout odds depended on the RandomEvent
class:
either the the Bin
or Throw
subclass. In Blackjack, the
ante’s win amount depends on the player’s entire hand. This means that
being dealt an individual card isn’t the same kind of thing that a throw
of the dice is. It suggests that the dealer’s shoe is the random
event factory, and the entire hand is a complex random event created by
dealing cards. Continuing this line of thought, an Outcome
instance’s
win amount could depend on a RandomEvent
instance, if we
consider the entire hand to be a single, complex random event.
Considering an entire hand to be a single random event is skating on
pretty thin ice, so we won’t force-fit the Deck
class into the
random event factory of our framework. Instead, we will let the Deck
class
stand alone. We’ll design a simple initialization for a deck that
constructs the 52 cards. Beyond that, the notions of shuffling and
dealing can be assigned to the shoe.
There’s a Wrap v. Extend question regarding the Deck
class implementation.
We could consider it a wrapper around a Python collection
or we could extend an existing collection.
In this case, the initialization of a Deck
instance is distict
from the way any of the built-in collections work. For that reason,
it seems best for this collection to wrap an existing collection.
Since the Deck
class is a container, we have to examine the
available collection classes to determine which concrete class we need.
Interestingly, we only need two features of Collection
:
the add()
method and the __iter__()
method. These
methods are implemented for all of the variations of Set
and List
.
Shoe¶
The dealer’s shoe is where Card
instances are shuffled and
dealt to create individual hands. A shoe will be built from some number of
Deck
instances. More properly, the shoe will contain the Card
instances
from those Deck
instances. The Deck
objects aren’t
really used for much more than constructing batches of individual Card
objects. The Shoe
class responsibilities include proper
initialization using a given number of decks, periodic shuffling and
proper dealing.
In a casino, the shuffling involves a ritual of spreading the cards on the table and stirring them around thoroughly, then stacking them back into the shoe. The top-most card is extracted, shown to the players, discarded, and a marker card is cut into the shoe at least two decks from the end, leaving about 100 cards unplayable after the marker. While most of the ritual does not require careful modeling, the presence of undealt cards at the end of the shoe is important as a way to defeat card-counting strategies.
Since a Shoe
instance is a container, we have to examine the
available collection classes to determine which concrete class we need.
Interestingly, we only need two features of list
:
the extend()
method to put another deck into the shoe and the
__iter__()
.
A simple shuffling algorithm iterates through all of the positions
in the Shoe
collection, exchanging the Card
instance in that position
with a Card
instance in a randomly-selection position.
The random
module has a function to shuffle, which may be a better
choice than creating yet another shuffling algorithm.
See Card-Deck-Shoe Questions and Answers for more discussion on shuffling.
Card-Deck-Shoe Questions and Answers¶
Why are there three subclasses of Card? Isn’t it simpler to have one class and use an if-statement to sort out the point values?
Primarily, there are three classes because they have different behaviors. Merging them into a single class and sorting out the behaviors with an if-statement is often a problem.
First, and most important, if-statements add complexity. The question “wouldn’t it be simpler to use an if-statement” is a kind of oxymoron.
Second, and almost as important, if-statements dilute responsibility assignments. Combining all three subclasses into one puts three slightly different responsibilities into one place, making it more difficult to debug problems. Further, we could wind up repeating or other reusing the if-statement in inappropriate ways. If we create separate subclasses, the clear separation of responsibility becomes a matter of definition, not a matter of following a complex thread of programming logic.
Third, if-statements limit growth, adaptation and change. If we have a modification to the rules, for example, making 1-eyed Jacks wild, we would prefer to simply introduce another subclass. We find that chasing down one or more related if-statements to assure ourselves that we are correctly handling the new subtlety rapidly gets out of hand.
What about getter methods for rank and suit of the Card
class?
Below, we’ll excplicitly avoid writing getter methods for these attributes.
Generally, getters and setters are atypical Python programming. In the event of a design change, we can replace an attribute with a property to preserve the syntax but add features.
The notion of encapsulation does not require all attributes be wrapped with method functions. The use of getter and setter methods is an implementation choice used in Java to permit ready introspection of classes.
A narrow definition of responsibilities is all that’s required to have a properly encapsulated design. Collaborators can allowed to examine attributes. In Python, we know that attributes are part of the public interface of a class.
Is that the best shuffling algorithm? Won’t it move each card twice? Won’t it sometimes put a card back into the original spot?
Yes, it may move some cards twice and it may leave a card in position. This is part of random behavior. This algorithm touches every card, swapping it with a randomly selected card. We are assured that every card was put into a random position. Sometimes a card will have been moved more than once, but the minimum criteria is that every card has been moved.
While a shuffling algorithm that models the real world is tempting, this adds complexity for no actual improvement in the randomization. A popular technique in the real world is to cut the deck in half and then riffle the cards into a single pile. If done with the kind of perfection that software provides (cutting the deck exactly in half and exactly alternating the cards) this shuffle leads to a perfectly predictable cycle of orders. What makes this shuffle work in the real world is the random inaccuracies in cutting and riffling. We don’t see any value in modeling these physical phenomenon.
A similar analysis holds for the kind of shuffle done in the casino. In essence, they do a shallow copy if the original
List
object, and then rebuild the shoe’sList
by picking cards at random from the copy. This produces a result that is statistically indistinguishable from our algorithm, which uses an element-by-element swap.An apparently interesting alternative is to generate a random index value for each
Card
and then sort by this index. We note that sorting is , where our algorithm is , running much faster than any sort.
Card Superclass¶
-
class
Card
¶ The
Card
class defines a basic playing card. It has a rank, a suit, a hard point value and a soft point value. The point value methods are defined for the number cards from 2 to 10. Two subclasses handle face cards, where the point values are both 10, and aces, where the soft point value is 1, and the hard point value is 11.This class also defines symbolic names for the suits (Clubs, Diamonds, Hearts and Spades) and face cards (Jack, Queen and King).
This is best done with either a
typing.NamedTuple
or a@dataclass(frozen=True)
. Note that the order of the attributes matter a great deal for these two built-in class definitions – the rank must be listed first to provide the right kind of behavior.It’s helpful for these objects to be immutable. In the rare case of a programming problem, it can help to have an exception raised a faulty attempt to set an attribute of an other-immutable
Card
object.
Here are Unicode characters for the suits.
Unicode |
Number |
Name |
Symbol |
U+02660 |
|
|
♠ |
U+02661 |
|
|
♡ |
U+02662 |
|
|
♢ |
U+02663 |
|
|
♣ |
Note that Unicode officially includes “RED HEART SUIT” and “RED DIAMOND SUIT”. Python, however, may not recognize these. It seems necessary to use Unicode names shown above.
Python makes a small distinction between "\uxxxx"
with four digits,
and "\Uxxxxxxxx"
with eight digits. The card images are 8-digits,
with \U
. The suits are four digits with \u
.
Fields¶
In Python, symbolic names are often declared within the class, not within the initialization method function.
Class-Level Names
class Card:
Clubs, Diamonds, Hearts, Spades = u'\u2663', u'\u2662', u'\u2661', u'\u2660'
Ace, Jack, Queen, King = 1, 11, 12, 13
...
oneEyedJack= Card(Card.Jack, Card.Hearts)
-
Card.
rank
¶ The rank of the card. This is a number from 1 (Ace) to 13 (King). When using
@dataclass(frozen=True)
this must be defined first.
-
Card.
suit
¶ The suit of the card. This is a character code for Clubs, Diamonds, Hearts or Spades.
Constructors¶
-
Card.
__init___
(self, rank: int, suit: str) → None¶ - Parameters
rank (int) – rank of this card.
suit (str from the set
{u'\u2663', u'\u2662', u'\u2661', u'\u2660'}
Ideally based on a class-level variable.) – string for this card.
Initializes the attributes of this
Card
instance.If a
@dataclass(frozen=True)
is used, this is provided automatically.
Methods¶
Note that “getters” are something we don’t bother with in Python.
In other languages, e.g., Java, this class would need to have
getRank()
and getSuit()
methods. This is atypical for
Python.
-
Card.
softValue
(self) → int¶ Returns the soft value of this card. The superclass simply returns the rank. Subclasses can override this. Face cards will return 10, Aces will return 11.
-
Card.
hardValue
(self) → int¶ Returns the hard value of this card. The superclass simply returns the rank. Subclasses can override this. Face cards will return 10, Aces will return 1.
-
Card.
__str__
(self) → str¶ Return the rank and suit of this card.
FaceCard Class¶
-
class
FaceCard
¶ The
FaceCard
subclass extends theCard
class with a point value of 10. This defines jack, queens and kings.
Methods¶
-
Card.
softValue
(self) → int Returns the soft value of this card, 10.
-
Card.
hardValue
(self) → int Returns the hard value of this card, 10.
-
Card.
__str__
(self) → str Returns a short String displaying the rank and suit of this card. The ranks should be translated to single letters: 11 to
'J'
, 12 to'Q'
and 13 to'K'
.
AceCard Class¶
-
class
AceCard
¶ The
AceCard
class extends theCard
class with a soft point value of 11 and a hard point value of 1. This definces Aces.
Methods¶
-
Card.
softValue
(self) → int Returns the soft value of this card, 11.
-
Card.
hardValue
(self) → int Returns the hard value of this card, 1.
-
Card.
__str__
(self) → str Returns a short String displaying the rank and suit of this card. The rank is always
'A'
.
Card Factory Function¶
-
card_factory
()¶ - Parameters
rank (int) – Numeric rank
suit (str) – Symbolic suit string from the set
{u'\u2663', u'\u2662', u'\u2661', u'\u2660'}
.
This function creates the proper subclass of card based on the rank.
In some cases
Deck class¶
-
class
Deck
¶ The
Deck
class defines the standard deck of 52 cards. It both constructs the deck and acts as a container for one instance of a deck.
Fields¶
-
cards
¶ The collection of individual cards. The internal collection needs to be shuffled, so a
list
makes the most sense.
-
rng
¶ The random number generator used when shuffling.
Constructors¶
-
Deck.
__init__
(self) → None¶ Creates the Collection,
cards
, and then creates the 52 cards. Thecard_factory()
helps a lot with this.
Methods¶
-
Deck.
__iter__
(self) → Iterator[Card]¶ Returns the an iterator over the collection of cards in
cards
. A client can deal cards like this:deck = Deck() dealer = iter(deck) card1, card2 = next(dealer), next(dealer)
-
Deck.
shuffle
(self) → None¶ Shuffles the deck by swapping every element in the
Shoe.cards
List
with a random element.This invalidates any iterator that had been in use.
Shoe class¶
-
class
Shoe
¶ The
Shoe
class defines the dealer’s shoe, which contains from 1 to 8 decks of cards. For one deck shoes, one card is reserved as undealable. For multiple deck shoes from 1 to 3 decks can be left undealt. The exact number is selected at random within 6 cards of the expected number of decks.This can be considered a subclass of
Deck
. This allows it to inherit the shuffling algorithm.
Fields¶
-
rng
The random number generator used when shuffling.
-
Shoe.
stopDeal
¶ The number of decks to be left undealt in the shoe. When dealing starts, and small random offset will adjust this value.
Constructors¶
-
Shoe.
__init__
(self, decks: int, stopDeal: int=1) → None¶ - Parameters
decks (int) – A number of decks to create
stopDeal (int) – An approximate number of decks left undealt in the shoe. The default is to leave approximately one full deck undealt.
This creates a random number generator from
random.Random
.It initializes the Shoe by creating the required number of decks and building the
cards
list
instance.
Methods¶
-
Shoe.
shuffle
(self) → None¶ Shuffles all of the cards in the shoe. This will invalidate any previously-used iterators.
-
Shoe.
__iter__
(self) → Iterator[Card]¶ Picks a random adjustment value in the range -6 to +6. This offsets the number of decks,
stopDeal
value, to create a beginning value, , for the iterator. Given a number of decks, , and an adjustment, , such that :math:-6 leq a leq 6`, .Returns the an iterator over a slice the collection of cards in
cards
,cards[s:]
. A client can deal cards like this:deck = Shoe(decks=5) dealer = iter(deck) card1, card2 = next(dealer), next(dealer)
Card-Deck-Shoe Deliverables¶
There are many deliverables for this exercise.
The three classes of the
Card
class hierarchy, includingFaceCard
andAceCard
.A class which performs a unit tests of the
Card
class hierarchy. The unit test should create several instances ofCard
,FaceCard
andAceCard
.The
Deck
class.A class which performs a unit test of the
Deck
class. This simply creates aDeck
object and confirms the total number of cards. A thorough test would also check some individualCard
objects in the cards collection.The
Shoe
class.A class which performs a unit test of the
Shoe
class. This simply creates aShoe
object and confirms that it deals cards. In order to test theshuffle()
method, you will need to construct theShoe
with a random number generator that has a fixed seed and produces cards in a known sequence.
Testing Examples¶
Unit tests can become fairly complex for some of these classes. This section includes some concrete examples of unit tests for cards adn decks.
Example Class Definition¶
Here is a potential Card
class definition.
This is done “the hard way” without relying on dataclasses
or typing.NamedTuple
. This is quite complex and
requires a number of unit tests to be sure it works.
blackjack.py
Since we use 13 ranks, we'll skip the knight.
"""
from typing import Any, cast
import sys
class Card:
Clubs = u"\N{BLACK CLUB SUIT}"
Diamonds = u"\N{WHITE DIAMOND SUIT}"
Hearts = u"\N{WHITE HEART SUIT}"
Spades = u"\N{BLACK SPADE SUIT}"
Jack = 11
Queen = 12
King = 13
Ace = 1
def __init__(self, rank: int, suit: str) -> None:
assert suit in (Card.Clubs, Card.Diamonds, Card.Hearts, Card.Spades)
assert 1 <= rank < 14
self.rank = rank
self.suit = suit
self.order = rank
@property
def hardValue(self) -> int:
return self.rank
@property
def softValue(self) -> int:
return self.rank
def __repr__(self) -> str:
return f"{self.__class__.__name__}(rank={self.rank!r}, suit={self.suit!r})"
def __str__(self) -> str:
return f"{self.rank:2d}{self.suit}"
@property
def image(self) -> str:
s = {
Card.Spades: 0x1F0A0,
Card.Hearts: 0x1F0B0,
Card.Diamonds: 0x1F0C0,
Card.Clubs: 0x1F0D0,
}[self.suit]
r = self.rank if self.rank < 12 else self.rank + 1
return chr(s + r)
def __le__(self, other: Any) -> bool:
return self.order <= cast(Card, other).order
def __lt__(self, other: Any) -> bool:
return self.order < cast(Card, other).order
def __ge__(self, other: Any) -> bool:
return self.order >= cast(Card, other).order
def __gt__(self, other: Any) -> bool:
return self.order > cast(Card, other).order
def __eq__(self, other: Any) -> bool:
return self.order == cast(Card, other).order
def __ne__(self, other: Any) -> bool:
return self.order != cast(Card, other).order
def __hash__(self) -> int:
return (hash(self.rank) + hash(self.suit)) % sys.hash_info.width
This class defines the initialization of a Card
instance.
It includes the hardValue()
and softValue()
methods
as well as the detailed representationa and summary string values.
The image()
method computes the Unicode character with an
image of the card. All of the comparisons operators, plus the __hash__()
method are provided.
Example TestCase class¶
Often, our tests parallel the structure of our application. We might have a directory with a structure like the following example:
src
__main__.py
common.py
roulette.py
craps.py
blackjack.py
tests
test_common.py
test_roulette.py
test_craps.py
test_blackjack.py
The tests are in a tests
folder, and the module names also
begin with test_
. This pattern makes the tests easy to discover
with tools like pytest.
Here’s an example of unittest.TestCase
class definition
to tetst the Card
class, shown above in the Example Class Definition section.
test_card.py
# coding: utf-8
"""
Building Skills in Object-Oriented Design V4
test_card with :class:`unittest.TestCase`.
"""
import unittest
from blackjack import Card, AceCard, FaceCard
class TestCard(unittest.TestCase):
def setUp(self):
self.aceClubs = AceCard(Card.Ace, Card.Clubs)
self.twoClubs = Card(2, Card.Clubs)
self.tenClubs = Card(10, Card.Clubs)
self.kingClubs = FaceCard(Card.King, Card.Clubs)
self.aceDiamonds = AceCard(Card.Ace, Card.Diamonds)
def testString(self):
self.assertEqual(" A♣", str(self.aceClubs))
self.assertEqual(" 2♣", str(self.twoClubs))
self.assertEqual("10♣", str(self.tenClubs))
self.assertEqual(" K♣", str(self.kingClubs))
self.assertEqual(" A♢", str(self.aceDiamonds))
def testOrder(self):
self.assertTrue(self.tenClubs < self.kingClubs)
self.assertFalse(self.tenClubs >= self.kingClubs)
self.assertTrue(self.kingClubs < self.aceClubs)
self.assertTrue(self.aceClubs == self.aceDiamonds)
def testImage(self):
self.assertEqual("🃑", self.aceClubs.image)
self.assertEqual("🃒", self.twoClubs.image)
self.assertEqual("🃚", self.tenClubs.image)
self.assertEqual("🃞", self.kingClubs.image)
self.assertEqual("🃁", self.aceDiamonds.image)
We create a number of object instances in the
setUp()
method of the case. In this example, we created five distinctCard
instances. These object constructors imply several things in ourCard
class.There will be a set of manifest constants for the suits:
Clubs
,Diamonds
,Hearts
andSpades
.The constructor (
Card.__init__()
) will accept a rank and a suit constant.
Note that we didn’t write tests to create all suits or all ranks. This example only created valid cards. A more complex test will include edge cases like invalid ranks or invalid suits.
In
testString()
, we exercise the__str__()
method of theCard
class to be sure that it formats cards correctly. These tests tell us what the formatting algorithm will look like.In
testOrder()
, we exercise some comparison methods of theCard
class to be sure that it compares card ranks correctly. Note that we have explicitly claimed that the equality test only checks the rank and ignores the suit; this is typical for Blackjack, but won’t work well for Bridge or Solitaire.Note that we didn’t exhaustively test all possible comparisons among the four cards we defined. We tested enough to be sure we had an implementation that worked.
In
testImage()
, the test exercises theimage()
method of the cards created. This confirms that proper Unicode images are found. There should be interesting edge cases on either side of the rank that’s skipped in the mapping from thirteen ranks to the fourteen images in each suit.
Example Test Function¶
Here’s an example of a pytest function definition to test
the Card
class, shown above in the Example Class Definition section.
test_card.py
# coding: utf-8
"""
Building Skills in Object-Oriented Design V4
test_card with :mod:`pytest`.
"""
from blackjack import Card, AceCard, FaceCard
def test_card():
aceClubs = AceCard(Card.Ace, Card.Clubs)
twoClubs = Card(2, Card.Clubs)
tenClubs = Card(10, Card.Clubs)
kingClubs = FaceCard(Card.King, Card.Clubs)
aceDiamonds = AceCard(Card.Ace, Card.Diamonds)
assert " A♣" == str(aceClubs)
assert " 2♣" == str(twoClubs)
assert "10♣" == str(tenClubs)
assert " K♣" == str(kingClubs)
assert " A♢" == str(aceDiamonds)
assert tenClubs < kingClubs
assert not (tenClubs >= kingClubs)
assert kingClubs < aceClubs
assert aceClubs == aceDiamonds
assert "🃑" == aceClubs.image
assert "🃒" == twoClubs.image
assert "🃚" == tenClubs.image
assert "🃞" == kingClubs.image
assert "🃁" == aceDiamonds.image
The essential ingredients of the test are the same as the unittest.TestCase
definition.
We created five distinct
Card
instances. These object constructors require several things in ourCard
class.There will be a set of manifest constants for the suits:
Clubs
,Diamonds
,Hearts
andSpades
.The constructor (
Card.__init__()
) will accept a rank and a suit constant.
Note that we didn’t write tests to create all suits or all ranks. This example only created valid cards. A more complex test will include edge cases like invalid ranks or invalid suits.
The
pytest.raises
context manager makes it particularly easy to also test invalid cases.The test exercises the
__str__()
method of theCard
class to be sure that it formats cards correctly. These tests tell us what the formatting algorithm will look like.The test also exercise some comparison methods of the
Card
class to be sure that it compares card ranks correctly. Note that we have explicitly claimed that the equality test only checks the rank and ignores the suit; this is typical for Blackjack, but won’t work well for Bridge or Solitaire.Additionally, the test exercises the
image()
method of the cards created.


---
layout: nil
---
Basic
$35/Month
- 1 User
- 25 GB HD
- Unlimited upload
- Unlimited download
- 24hrs support
- Coming Soon
Pro
$150/Month
- 5 Users
- 125 GB HD
- Unlimited upload
- Unlimited download
- 24hrs support
- Coming Soon
Platinum
$300/Month
- 15 Users
- 250 GB HD
- Unlimited upload
- Unlimited download
- 24hrs support
- Coming Soon
Extreme
$500/Month
- 20 Users
- 500 GB HD
- Unlimited upload
- Unlimited download
- 24hrs support
- Coming Soon


ctext - Ctext a text widget with highlighting support
The ctext package provides the ctext widget which is an enhanced text widget with support for configurable syntax highlighting and some extra commands.
Ctext overloads the text widget and provides new commands, named highlight, copy, paste,cut, append, and edit. It also provides several commands that allow you to define classes. Each class corresponds to a tag in the widget.
Creates and configures a ctext widget.
Highlighting is controlled with text widget tags, that are called highlight classes. The class is a tag name and can be configured like any text widget tag. Four types of highlight classes are supported. All highlight classes are automatically used by the highlight method of the widget.
Add a highlighting class class to the ctext widget pathName. The highlighting will be done with the color color. All words in the keywordlist will be highlighted.
# highlight some tcl keywords ::ctext::addHighlightClass .t tclkeywords red [list set info interp uplevel upvar]
Add a highlighting class class to the ctext widget pathName. The highlighting will be done with the color color. All words starting with char will be highlighted.
::ctext::addHighlightClassWithOnlyCharStart .t vars blue \$
Add a highlighting class class to the ctext widget pathName. The highlighting will be done with the color color. All chars in charstring will be highlighted.
Add a highlighting class class to the ctext widget pathName. The highlighting will be done with the color color. All text parts matching the regexp pattern will be highlighted.
Remove all highlight classes from the widget pathName.
List all highlight classes for the widget pathName.
Delete the highlight class class from the widget pathName
Enable C comment highlighting. The class for c-style comments is _cComment. The C comment highlighting is disabled by default.
Disable C comment highlighting.
Each ctext widget created with the above command supports the following commands and options in addition to the standard text widget commands and options.
Highlight the text between startIndex and endIndex.
Delete text range without updating the highlighting. Arguments are identical to the pathName delete command inherited from the standard text widget.
Insert text without updating the highlighting. Arguments are identical to the pathName insert command inherited from the standard text widget.
Call tk_textCopy for the ctext instance.
Call tk_textCut for the ctext instance.
Call tk_textPaste for the ctext instance.
Append the current selection to the clipboard.
Set the options for the ctext widget. Each option name must be followed the new value.
package require Tk package require ctext proc main {} { pack [frame .f] -fill both -expand 1 pack [scrollbar .f.s -command {.f.t yview}] -side right -fill y pack [ctext .f.t -bg black -fg white -insertbackground yellow -yscrollcommand {.f.s set}] -fill both -expand 1 ctext::addHighlightClass .f.t widgets purple [list ctext button label text frame toplevel scrollbar checkbutton canvas listbox menu menubar menubutton radiobutton scale entry message tk_chooseDir tk_getSaveFile tk_getOpenFile tk_chooseColor tk_optionMenu] ctext::addHighlightClass .f.t flags orange [list -text -command -yscrollcommand -xscrollcommand -background -foreground -fg -bg -highlightbackground -y -x -highlightcolor -relief -width -height -wrap -font -fill -side -outline -style -insertwidth -textvariable -activebackground -activeforeground -insertbackground -anchor -orient -troughcolor -nonewline -expand -type -message -title -offset -in -after -yscroll -xscroll -forward -regexp -count -exact -padx -ipadx -filetypes -all -from -to -label -value -variable -regexp -backwards -forwards -bd -pady -ipady -state -row -column -cursor -highlightcolors -linemap -menu -tearoff -displayof -cursor -underline -tags -tag] ctext::addHighlightClass .f.t stackControl red {proc uplevel namespace while for foreach if else} ctext::addHighlightClassWithOnlyCharStart .f.t vars mediumspringgreen "\$" ctext::addHighlightClass .f.t variable_funcs gold {set global variable unset} ctext::addHighlightClassForSpecialChars .f.t brackets green {[]{}} ctext::addHighlightClassForRegexp .f.t paths lightblue {\.[a-zA-Z0-9\_\-]+} ctext::addHighlightClassForRegexp .f.t comments khaki {#[^\n\r]*} .f.t fastinsert end [info body main] pack [frame .f1] -fill x .f.t highlight 1.0 end pack [button .f1.exit -text Exit -command exit] -side left pack [entry .e] -side bottom -fill x .e insert end "ctext::deleteHighlightClass .f.t " bind .e <Return> {eval [.e get]} } main
Further examples are in the source package for ctext.
Kevin Kenny, Neil Madden, Jeffrey Hobbs, Richard Suchenwirth, Johan Bengtsson, Mac Cody, Günther, Andreas Sievers, and Michael Schlenker.
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category ctext of the Tklib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
Copyright © George Peter Staplin <GeorgePS@XMission.com>


Agent.agent
The package name is "bin.collaboration". The following external code is referenced:The class "Agent" is defined with visibility "public" . This is an agent.Components from java.io.* Components from java.math.* Components from java.util.* Components from javax.measure.unit.* Components from org.jscience.mathematics.number.* Components from org.jscience.mathematics.vector.* Components from org.jscience.physics.amount.* Components from repast.simphony.adaptation.neural.* Components from repast.simphony.adaptation.regression.* Components from repast.simphony.context.* Components from repast.simphony.context.space.continuous.* Components from repast.simphony.context.space.gis.* Components from repast.simphony.context.space.graph.* Components from repast.simphony.context.space.grid.* Components from repast.simphony.engine.environment.* Components from repast.simphony.engine.schedule.* Components from repast.simphony.engine.watcher.* Components from repast.simphony.groovy.math.* Components from repast.simphony.integration.* Components from repast.simphony.matlab.link.* Components from repast.simphony.query.* Components from repast.simphony.query.space.continuous.* Components from repast.simphony.query.space.gis.* Components from repast.simphony.query.space.graph.* Components from repast.simphony.query.space.grid.* Components from repast.simphony.query.space.projection.* Components from repast.simphony.parameter.* Components from repast.simphony.random.* Components from repast.simphony.space.continuous.* Components from repast.simphony.space.gis.* Components from repast.simphony.space.graph.* Components from repast.simphony.space.grid.* Components from repast.simphony.space.projection.* Components from repast.simphony.ui.probe.* Components from repast.simphony.util.* Components from simphony.util.messages.* Components from static java.lang.Math.* Components from static repast.simphony.essentials.RepastEssentials.*