--- layout: page title: ACF Packet Submission Guidelines date: type: page parent_id: '16' published: false password: '' status: draft categories: [] tags: [] meta: _edit_last: '16309375' _wp_page_template: default geo_public: '0' author: login: acfquizbowl email<EMAIL_ADDRESS>display_name: acfquizbowl first_name: '' last_name: '' permalink: "/" ---
Any team with at least one person on it who played a regular, collegiate, academic quizbowl tournament (either as a college student or as a high school student) prior to September 1, 2013 is required to submit a packet in order to participate in an ACF tournament in 2014-2015.
FAQ: What counts as a “Regular, Collegiate, Academic quizbowl tournament”?
All ACF tournaments, NAQT Division I or Division II SCT, NAQT ICT, and typical academic invitationals and summer opens count as regular collegiate academic tournaments.
Trash or “hybrid” tournaments, College Bowl/HCASC, and tournaments played on NAQT “Invitational Series” questions do not.
This test is applied to individual team, not to your school’s contingent as a whole. If you are unsure about whether you are required to write a packet, then please contact the ACF editor for the tournament.
Consult individual tournament announcements for difficulty guidelines.
A simple, two-line description of good tossup writing:
Write your tossups on easier topics. Use challenging clues for the leadin, and use progressively easier clues. End your tossups with a giveaway that most in the field would know.
Do NOT write tossups which are:
Nearly all bonuses should have 3 parts worth 10 points each. Bonuses should have:
If you are unsure about the difficulty of a bonus you are writing, then you should err on the side of easier or write on something else entirely.
You may, very occasionally, write a bonus with four parts, two worth 5 and two worth 10.
We prohibit specific types of bonuses and levy penalties on teams that submit packets with prohibited formats. For more information, click here.
Please follow the ACF Formatting Guidelines when formatting your packet.
Several ACF editors have provided tips on how to write good questions. Please consult the following guides:
Jerry Vinokurov's Guide to Writing Questions is intended for newcomers and has guides on basic principles of good writing.
Subash Maddipotti’s Tips on Question Writing provide excellent advice on what to avoid when writing questions.
Andrew Hart’s Primer on Regular Difficulty is an excellent resource for teams writing questions for ACF Regionals (or a “Regular Difficulty” tournament.)
In addition to the above question-writing guides, we encourage you to consult old ACF events as writing models.
We recommend:
For ACF Fall-level difficulty - ACF Fall 2008, ACF Fall 2009, and ACF Fall 2012;
For ACF Regionals-level difficulty – ACF Regionals 2008 and ACF Regionals 2010;
For ACF Nationals-level difficulty – ACF Nationals 2009, ACF Nationals 2010, and ACF Nationals 2014.
All Full Packet submissions should have 24 tossups and 24 bonuses according to the distribution outlined below.
For information on half-packet submissions for ACF Fall 2014, please reference the announcement here.
Note: The X/Y notation used throughout this section refers to X tossups and Y bonuses. Eg. If you see Fine Arts 3/3, it means 3 tossups and 3 bonuses.
Vary questions across time periods. Do not write more than 1 question on very recent (post-1990) literature. Please make sure your questions span a variety of answers such as authors, novels, poems, criticism, essays, etc.
You may write up to 4 questions on military history (battles, wars, or people known primarily for their military accomplishments.)
You may write up to 1 question on the history of science. Questions on famous experiments which focus on the scientific principles at work are considered science rather than science history.
Write least 1 and no more than 2 questions in this category on non-Western topics. You may write about events which straddle the line between history and religion for either history or religion, but don’t write about religious history for both categories.
Write on a visual category and an auditory art Other Fine Arts. E.g. pick jazz and photography, or opera and architecture, but not opera and jazz.
Possible topics for this category include economics, psychology, sociology, linguistics, anthropology, political science, social criticism, and law. (Questions on Supreme Court cases go under history; other law questions may go here.)
Do not write more than 1 question from a particular field of study.
Possible topics for this category include physical features, countries, cities, regions, etc. Ethnic groups can be geography; languages are more likely social science.
Do not write both questions on the same kind of political or physical feature, such as rivers, bodies of water, mountains, cities etc. Do not write both questions on the same area of the world.
You can write anything you wish here except for topics included in the other broad categories above. You can write questions which mix categories here.
Do not write more than one trash question from the same general category. E.g. Don’t write two questions on sports.
Please use .doc, .docx, or .rtf formats to submit packets.
PDFs, .odt, .html, .txt or any other formats are not acceptable.
If editors cannot open your packet on the first try, they will return your packet to you and have you re-send a fixed version before it is considered submitted for fee purposes.
Please follow the following file-naming scheme when submitting packets:
<Tournament Name> <Year> - <School Name> <Team Name or Letter>
For instance, if UC Irvine’s A team is submitting a packet for 2015 ACF Regionals, it should be named:
ACF Regionals 2015 – UC Irvine A
Penalties for late submission of packets: Click here for the packet-submission penalty schedules.
Gross deviation from packet-formatting guidelines: $50 penalty
Submission of prohibited types of questions*: $25 penalty per question
* Prohibited types of questions include:
We do not tolerate plagiarism, and there will be consequences for any instances of plagiarism. Please refer to ACF’s policy on plagiarism.


{% load static %}
Dashboard
Face Recognation
Sign out
Profile Upload
(current)
Camera View
(current)
View History
(current)
Profile Upload
{% csrf_token %}
Name
Email Id
DOB
Department
User Image
Submit


14/02/1994
75011 ParisI am a French web developer experienced in apps and websites. After doing Litteraire Studies at La Sorbonne University in Paris, I decided to change my horizon, and started to code.
I joined Le Wagon in 2018 in order to gain more coding experience. During this 9-week coding bootcamp I improved my skills on Ruby on Rails and developed numerous projects including There There and 139bpm.
In order to simplify the school attendance, two colleagues and I are currently developing an app that digitalizes this process.
My main responsibilities are:
Tools used:
139bpm is the first app I made. For months, I was using general renting websites as part of my role in Phono, a company for the rental of Hi-fi material. However I thought that creating a unique platform would make the process more efficient as a direct access would be provided to prospective clients.
It started as a marketplace for my material but will now become a similar marketplace to AirBnB where anyone could rent their speakers, mixing tables, etc. I am in charge of the back-end and front-end.Tools used:
A year ago, my cousing and I have started to buy a lot of Hi-fis, soundsystems, and mixing tables in order to rent them. Since the demand has continued to increased since the creation, I'm currently developing an application to book these sound systems online, called 139bpm.
I was at Le Wagon Nantes, a bootcamp for Ruby on rails.
English and Spanish, Economy, Law and History of Civilisations linked to these languages.
French Baccalauréat with honorific mention "ASSEZ BIEN"
I like spending my free time outdoors, often riding my bike and discovering new places with it (2500km/3500km a year). I also enjoy playing soccer and travelling around the world. I have visited over 70 countries.
When I am not outside, I spend time working on my recent project "139bpm", a website for renting Hifi material. I am also learning JavaScript and like to play video games. Moreover, I am a fan of old French movies and enjoy reading Political Litterature.


Greetings! We are Nook's Cranny, we provide goods such as Furniture, Wall Papers, Hats, and much much more. Established in the early 1900s, our founder Tom Nook started this business with the intent to serve his community the finest home goods in America. Nook started his business in his parents garage at the humble age of thirty-two, as the years went on Nook's Cranny became a household name and hopes to be for the years to come.
© Nook's Cranny Limited


Draggable Boxes
Draggable Boxes is JavaScript plugin for creation and manipulation of draggable boxes
Technologies and Plugins
Draggable Boxes uses a number of open source Node modules for development:
- Gulp - Development task automation tool. Gulp plugins used gulp-autoprefixer, gulp-babel, gulp-clean-css, gulp-concat, gulp-rename, gulp-sass, gulp-sourcemaps, gulp-uglify.
- Babel-core - Babel compiler core
- Babel Preset ES2015 - Babel preset for all es2015 plugins
- Browser Sync - Time-saving synchronised browser testing
- Del - Delete files and folders using globs
- JSDoc 3 - An API documentation generator for JavaScript
- Docdash - Lodash inspired JSDoc 3 template/theme
Example page
Draggable Boxes example page here.
Documentation
Draggable Boxes documentation here.
Installation
Draggable Boxes in development requires Node.js v4+ to run.
Clone and install the dependencies and devDependencies from Draggable Boxes repo.
$ git clone https://github.com/smoockpp/draggable-boxes.git
$ cd draggable-boxes
$ npm install
Draggable Boxes uses Gulp for fast developing. Make a change in your file and instantanously see your updates!
Open your favorite Terminal and run this command within the project directory to start watching for file changes.
$ gulp serve
Now you can see the server running at http://localhost:3000. Will be listening for changes in files
To generate documentation run this command within the project directory
$ jsdoc src/js/babel/Boxes.js ./README.md -t node_modules/docdash/
Todos
- Implement Tests
License
MIT


Let’s consider some examples of data with categorical variables
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
sns.set_context('talk')
sns.set_style('darkgrid')
First, the passenger list of the Titanic
titanic = sns.load_dataset("titanic")
titanic.head(n=10)
| survived | pclass | sex | age | sibsp | parch | fare | embarked | class | who | adult_male | deck | embark_town | alive | alone | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 3 | male | 22 | 1 | 0 | 7.2500 | S | Third | man | True | NaN | Southampton | no | False |
| 1 | 1 | 1 | female | 38 | 1 | 0 | 71.2833 | C | First | woman | False | C | Cherbourg | yes | False |
| 2 | 1 | 3 | female | 26 | 0 | 0 | 7.9250 | S | Third | woman | False | NaN | Southampton | yes | True |
| 3 | 1 | 1 | female | 35 | 1 | 0 | 53.1000 | S | First | woman | False | C | Southampton | yes | False |
| 4 | 0 | 3 | male | 35 | 0 | 0 | 8.0500 | S | Third | man | True | NaN | Southampton | no | True |
| 5 | 0 | 3 | male | NaN | 0 | 0 | 8.4583 | Q | Third | man | True | NaN | Queenstown | no | True |
| 6 | 0 | 1 | male | 54 | 0 | 0 | 51.8625 | S | First | man | True | E | Southampton | no | True |
| 7 | 0 | 3 | male | 2 | 3 | 1 | 21.0750 | S | Third | child | False | NaN | Southampton | no | False |
| 8 | 1 | 3 | female | 27 | 0 | 2 | 11.1333 | S | Third | woman | False | NaN | Southampton | yes | False |
| 9 | 1 | 2 | female | 14 | 1 | 0 | 30.0708 | C | Second | child | False | NaN | Cherbourg | yes | False |
One of the categorical variables in this dataset is embark_town
Let’s plot the number of passengers departing from each town
ax = titanic.groupby(['embark_town'])['age'].count().plot(kind='bar')
plt.xticks(rotation=0)
plt.xlabel('Departure Town')
plt.ylabel('Passengers')
plt.title('Number of Passengers by Town of Departure')
<matplotlib.text.Text at 0x1029b9a10>
Let’s look at another example: the cars93 dataset
cars = pd.read_csv('https://vincentarelbundock.github.io/Rdatasets/csv/MASS/Cars93.csv', index_col=0)
cars.head()
| Manufacturer | Model | Type | Min.Price | Price | Max.Price | MPG.city | MPG.highway | AirBags | DriveTrain | ... | Passengers | Length | Wheelbase | Width | Turn.circle | Rear.seat.room | Luggage.room | Weight | Origin | Make | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Acura | Integra | Small | 12.9 | 15.9 | 18.8 | 25 | 31 | None | Front | ... | 5 | 177 | 102 | 68 | 37 | 26.5 | 11 | 2705 | non-USA | Acura Integra |
| 2 | Acura | Legend | Midsize | 29.2 | 33.9 | 38.7 | 18 | 25 | Driver & Passenger | Front | ... | 5 | 195 | 115 | 71 | 38 | 30.0 | 15 | 3560 | non-USA | Acura Legend |
| 3 | Audi | 90 | Compact | 25.9 | 29.1 | 32.3 | 20 | 26 | Driver only | Front | ... | 5 | 180 | 102 | 67 | 37 | 28.0 | 14 | 3375 | non-USA | Audi 90 |
| 4 | Audi | 100 | Midsize | 30.8 | 37.7 | 44.6 | 19 | 26 | Driver & Passenger | Front | ... | 6 | 193 | 106 | 70 | 37 | 31.0 | 17 | 3405 | non-USA | Audi 100 |
| 5 | BMW | 535i | Midsize | 23.7 | 30.0 | 36.2 | 22 | 30 | Driver only | Rear | ... | 4 | 186 | 109 | 69 | 39 | 27.0 | 13 | 3640 | non-USA | BMW 535i |
5 rows × 27 columns
cars.ix[1]
Manufacturer Acura
Model Integra
Type Small
Min.Price 12.9
Price 15.9
Max.Price 18.8
MPG.city 25
MPG.highway 31
AirBags None
DriveTrain Front
Cylinders 4
EngineSize 1.8
Horsepower 140
RPM 6300
Rev.per.mile 2890
Man.trans.avail Yes
Fuel.tank.capacity 13.2
Passengers 5
Length 177
Wheelbase 102
Width 68
Turn.circle 37
Rear.seat.room 26.5
Luggage.room 11
Weight 2705
Origin non-USA
Make Acura Integra
Name: 1, dtype: object
This dataset has multiple categorical variables
Based on the description of the cars93 datatset, we’ll consider
Manufacturer
, and DriveTrain
to be categorical variables
Let’s plot Manufacturer
and DriveTrain
cars.groupby('Manufacturer')['Model'].count().plot(kind='bar')
plt.ylabel('Cars')
plt.title('Number of Cars by Manufacturer')
<matplotlib.text.Text at 0x114d9e6d0>
cars.groupby('DriveTrain')['Model'].count().plot(kind='bar')
plt.ylabel('Cars')
plt.title('Number of Cars by Drive Train')
<matplotlib.text.Text at 0x117554e50>
If our categorical data has labels, we need to convert them to integer id’s
def col_2_ids(df, col):
ids = df[col].drop_duplicates().sort(inplace=False).reset_index(drop=True)
ids.index.name = '%s_ids' % col
ids = ids.reset_index()
df = pd.merge(df, ids, how='left')
del df[col]
return df
cat_columns = ['Manufacturer', 'DriveTrain']
for c in cat_columns:
print c
cars = col_2_ids(cars, c)
Manufacturer
DriveTrain
cars[['%s_ids' % c for c in cat_columns]].head()
| Manufacturer_ids | DriveTrain_ids | |
|---|---|---|
| 0 | 0 | 1 |
| 1 | 0 | 1 |
| 2 | 1 | 1 |
| 3 | 1 | 1 |
| 4 | 2 | 2 |
Just as we model binary data with the beta Bernoulli distribution, we can model categorical data with the Dirichlet discrete distribution
The beta Bernoulli distribution allows us to learn the underlying probability, \(\theta\), of the binary random variable, \(x\)
The Dirichlet discrete distribution extends the beta Bernoulli distribution to the case in which \(x\) can assume more than two states
Again, the Dirichlet distribution takes advantage of the fact that the Dirichlet distribution and the discrete distribution are conjugate. Note that the discrete distriution is sometimes called the categorical distribution or the multinomial distribution.
To import the Dirichlet discrete distribution call
from microscopes.models import dd as dirichlet_discrete
Then given the specific model we’d want we’d import
from microscopes.model_name.definition import model_definition
from microscopes.irm.definition import model_definition as irm_definition
from microscopes.mixture.definition import model_definition as mm_definition
See Defining Your Model
to learn more about model definitions


Timeline
Arjun Amgain
Web/Front-end Designer
My Tasks
February 8,2015
Make New Icon
5pm
Web App
Catch up with Brian
3pm
Mobile Project
Design Explorations
2pm
Company Web site
Team Meeting
2pm
Hangouts
New Projects
2pm
Starting
Lunch with Mary
2pm
Grill House
Team Meeting
2pm
Hangouts


Module: PassStation::Output
- Defined in:
- lib/pass_station/output.rb
Overview
Output handling module containing all formatter engines Meant to be used by the CLI binary but could be re-used in many other ways
Defined Under Namespace
Classes: Csv, Json, PrettyTable, Table, Yaml


PVRESIZE
Section: Maintenance Commands (8)Updated: LVM TOOLS 2.02.95(2)-RHEL6 (2012-10-16)
Index Return to Main Contents
NAME
pvresize - resize a disk or partition in use by LVM2SYNOPSIS
pvresize [-d|--debug] [-h|--help] [-t|--test] [-v|--verbose] [--version] [--setphysicalvolumesize size] PhysicalVolume [PhysicalVolume...]DESCRIPTION
pvresize resizes PhysicalVolume which may already be in a volume group and have active logical volumes allocated on it.OPTIONS
See lvm(8) for common options.- --setphysicalvolumesize size
- Overrides the automatically-detected size of the PV. Use with care, or prior to reducing the physical size of the device.
EXAMPLES
Expand the PV on /dev/sda1 after enlarging the partition with fdisk:pvresize /dev/sda1
Shrink the PV on /dev/sda1 prior to shrinking the partition with fdisk (ensure that the PV size is appropriate for your intended new partition size):
pvresize --setphysicalvolumesize 40G /dev/sda1
RESTRICTIONS
pvresize will refuse to shrink PhysicalVolume if it has allocated extents after where its new end would be. In the future, it should relocate these elsewhere in the volume group if there is sufficient free space, like pvmove does.pvresize won't currently work correctly on LVM1 volumes or PVs with extra metadata areas.
SEE ALSO
lvm(8), pvmove(8), lvresize(8), fdisk(8)
Index
This document was created by man2html, using the manual pages.
Time: 05:34:29 GMT, December 24, 2015


Donna Seay
2 minutes agoA wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring.
Samantha Francis
3 hours agoMy entire soul, like these sweet mornings of spring.
Robert Walker
5 hours agoI should be incapable of drawing a single stroke at the present moment...
Larry Smith
Yesterday, 8:34pmWhen, while the lovely valley teems with vapour around me, and the meridian sun strikes...
Donna Seay
Jan 23, 2:32amA wonderful serenity has taken possession of my entire soul, like these sweet mornings of spring.
Suzzeth Bungaos tagged you and 18 others in a post.
October 03, 2017 8:45amMellisa Brown appreciated your work The Social Network
October 02, 2017 12:44am20+ new items added are for sale in your Sale Group
October 01, 2017 10:20pmJulius Erving wants to connect with you on your conversation with Ronnie Mara
October 01, 2017 6:08pmSuzzeth Bungaos tagged you and 12 others in a post.
September 27, 2017 6:45am10+ new items added are for sale in your Sale Group
September 28, 2017 11:30pmMellisa Brown appreciated your work The Great Pyramid
September 26, 2017 11:01amJulius Erving wants to connect with you on your conversation with Ronnie Mara
September 23, 2017 9:19pmA font icons is a small symbol on a gui that represents an object.
One font, 675 Icons. In a single collection, Font Awesome is a pictographic language of web-related actions.
One font, 675 Icons. In a single collection, Font Awesome is a pictographic language of web-related actions.


{{game.name}}
"{{saved.question}}"
{{saved.maxPoints | numberEx}}
Players may place a wager for this question.
Created: {{saved.created | formatMySQLDate}} by {{saved.createdBy}}
Updated: {{saved.lastUpdated | formatMySQLDate}} by {{saved.updatedBy}}


 But nothing compared to the time I took 4 prozacs (80mg) and got high.
It all started when my my uncle came to Chicago to visit my grandma and me. My uncle is big on sight-seeing everywhere he goes. So, being the loving grandmother she is, she agreed to take him around town. I was sitting at home, alone and bored (dangerous for a curious teenager). I was thinking about how bored I was and how cool it would be if I could get high. But I was out of luck, and out of weed. So I thought, 'maybe I could 'robo'. 'Nah', I thought, 'been there, and done that.' So I decided to search through my uncle's medication that he left in his luggage. Through my search I found his prozac (he's manic depressive) and thought 'What the hell, it would be pretty cool to be all 'shits and giggles.'
Well I took 4 of his pills at one time (even though the bottle noted: Take 3 pills daily. I thought by taking 4 at once would enhance my fun time. Was I wrong. I had to go to work that evening (used to work at a fast food restuarant), and it had already been about 3 hours since I had taken the pills, and still I had no feeling of the effect. I came to the conclusion that they didn't work so I just put the experience out of my mind.
That night me and a few co-workers went to smoke his Dub sack he bought earlier. We went to his house and circled around his table and sparked the first joint. I had been feeling a little tired and light headed just after a hit or two, but I knew it wasn't the weed because it didn't work that fast for me. So after a few more hits I was feeling really hot and anxious, but knew I was getting high at this point.
But this high was very different, I felt real uncomfortable and bothered. I decided it was time to take my friend home and I would retire myself. Not wanting to duck out on free bud, we smoked one more joint. I looked at my watch and said, 'Josh.....its.. time ....to.....g......... I passed out landing face first on the table.
Everybody got a real laugh out of this, just thinking I was joking around (I was known for being pretty goofy when I was stoned). It seemed like enternity had passed when I woke up. I was scared shitless, I didn't know where I was, or who was with me. Josh was talking to me and all I could hear was mumbles and everything sounded like it was underwater.
Finally I mustard up enough movement from my paralized legs to make it outside for some fresh air. I started slowly regaining remembrance of where I was and what just happened. Anyway to make a long story short.
Kids don't do prozac and smoke at the same time.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Climate Record Detail
ID
Station Name
Province
Date
meanTemp
Highest Monthly Max Temp
lowest Monthly MinTemp
Back


TTY_IOCTL
Section: Linux Programmer's Manual (4)
Updated: 2013-11-12
Index
Return to Main Contents
NAME
tty_ioctl - ioctls for terminals and serial lines
SYNOPSIS
#include <termios.h>
int ioctl(int fd, int cmd, ...);
DESCRIPTION
The
ioctl(2)
call for terminals and serial ports accepts many possible command arguments.
Most require a third argument, of varying type, here called
argp
or
arg.
Use of
ioctl
makes for nonportable programs.
Use the POSIX interface described in
termios(3)
whenever possible.
Get and set terminal attributes
- TCGETS struct termios *argp
-
Equivalent to
tcgetattr(fd, argp).
Get the current serial port settings.
- TCSETS const struct termios *argp
-
Equivalent to
tcsetattr(fd, TCSANOW, argp).
Set the current serial port settings.
- TCSETSW const struct termios *argp
-
Equivalent to
tcsetattr(fd, TCSADRAIN, argp).
Allow the output buffer to drain, and
set the current serial port settings.
- TCSETSF const struct termios *argp
-
Equivalent to
tcsetattr(fd, TCSAFLUSH, argp).
Allow the output buffer to drain, discard pending input, and
set the current serial port settings.
The following four ioctls are just like
TCGETS,
TCSETS,
TCSETSW,
TCSETSF,
except that they take a
struct termio *
instead of a
struct termios *.
-
TCGETA struct termio *argp
-
TCSETA const struct termio *argp
-
TCSETAW const struct termio *argp
-
TCSETAF const struct termio *argp
Locking the termios structure
The
termios
structure of a terminal can be locked.
The lock is itself a
termios
structure, with nonzero bits or fields indicating a
locked value.
- TIOCGLCKTRMIOS struct termios *argp
-
Gets the locking status of the
termios
structure of the terminal.
- TIOCSLCKTRMIOS const struct termios *argp
-
Sets the locking status of the
termios
structure of the terminal.
Only a process with the
CAP_SYS_ADMIN
capability can do this.
Get and set window size
Window sizes are kept in the kernel, but not used by the kernel
(except in the case of virtual consoles, where the kernel will
update the window size when the size of the virtual console changes,
for example, by loading a new font).
The following constants and structure are defined in
<sys/ioctl.h>.
- TIOCGWINSZ struct winsize *argp
-
Get window size.
- TIOCSWINSZ const struct winsize *argp
-
Set window size.
The struct used by these ioctls is defined as
struct winsize {
unsigned short ws_row;
unsigned short ws_col;
unsigned short ws_xpixel; /* unused */
unsigned short ws_ypixel; /* unused */
};
When the window size changes, a
SIGWINCH
signal is sent to the
foreground process group.
Sending a break
- TCSBRK int arg
-
Equivalent to
tcsendbreak(fd, arg).
If the terminal is using asynchronous serial data transmission, and
arg
is zero, then send a break (a stream of zero bits) for between
0.25 and 0.5 seconds.
If the terminal is not using asynchronous
serial data transmission, then either a break is sent, or the function
returns without doing anything.
When
arg
is nonzero, nobody knows what will happen.
(SVr4, UnixWare, Solaris, Linux treat
tcsendbreak(fd,arg)
with nonzero
arg
like
tcdrain(fd).
SunOS treats
arg
as a multiplier, and sends a stream of bits
arg
times as long as done for zero
arg.
DG/UX and AIX treat
arg
(when nonzero) as a time interval measured in milliseconds.
HP-UX ignores
arg.)
- TCSBRKP int arg
-
So-called "POSIX version" of
TCSBRK.
It treats nonzero
arg
as a timeinterval measured in deciseconds, and does nothing
when the driver does not support breaks.
- TIOCSBRK void
-
Turn break on, that is, start sending zero bits.
- TIOCCBRK void
-
Turn break off, that is, stop sending zero bits.
Software flow control
- TCXONC int arg
-
Equivalent to
tcflow(fd, arg).
See
tcflow(3)
for the argument values
TCOOFF,
TCOON,
TCIOFF,
TCION.
Buffer count and flushing
- FIONREAD int *argp
-
Get the number of bytes in the input buffer.
- TIOCINQ int *argp
-
Same as
FIONREAD.
- TIOCOUTQ int *argp
-
Get the number of bytes in the output buffer.
- TCFLSH int arg
-
Equivalent to
tcflush(fd, arg).
See
tcflush(3)
for the argument values
TCIFLUSH,
TCOFLUSH,
TCIOFLUSH.
Faking input
- TIOCSTI const char *argp
-
Insert the given byte in the input queue.
Redirecting console output
- TIOCCONS void
-
Redirect output that would have gone to
/dev/console
or
/dev/tty0
to the given terminal.
If that was a pseudoterminal master, send it to the slave.
In Linux before version 2.6.10,
anybody can do this as long as the output was not redirected yet;
since version 2.6.10, only a process with the
CAP_SYS_ADMIN
capability may do this.
If output was redirected already
EBUSY
is returned,
but redirection can be stopped by using this ioctl with
fd
pointing at
/dev/console
or
/dev/tty0.
Controlling terminal
- TIOCSCTTY int arg
-
Make the given terminal the controlling terminal of the calling process.
The calling process must be a session leader and not have a
controlling terminal already.
For this case,
arg
should be specified as zero.
If this terminal is already the controlling terminal
of a different session group, then the ioctl fails with
EPERM,
unless the caller has the
CAP_SYS_ADMIN
capability and
arg
equals 1, in which case the terminal is stolen, and all processes that had
it as controlling terminal lose it.
- TIOCNOTTY void
-
If the given terminal was the controlling terminal of the calling process,
give up this controlling terminal.
If the process was session leader,
then send
SIGHUP
and
SIGCONT
to the foreground process group
and all processes in the current session lose their controlling terminal.
Process group and session ID
- TIOCGPGRP pid_t *argp
-
When successful, equivalent to
*argp = tcgetpgrp(fd).
Get the process group ID of the foreground process group on this terminal.
- TIOCSPGRP const pid_t *argp
-
Equivalent to
tcsetpgrp(fd, *argp).
Set the foreground process group ID of this terminal.
- TIOCGSID pid_t *argp
-
Get the session ID of the given terminal.
This will fail with
ENOTTY
in case the terminal is not a master pseudoterminal
and not our controlling terminal.
Strange.
Exclusive mode
- TIOCEXCL void
-
Put the terminal into exclusive mode.
No further
open(2)
operations on the terminal are permitted.
(They will fail with
EBUSY,
except for a process with the
CAP_SYS_ADMIN
capability.)
- TIOCNXCL void
-
Disable exclusive mode.
Line discipline
- TIOCGETD int *argp
-
Get the line discipline of the terminal.
- TIOCSETD const int *argp
-
Set the line discipline of the terminal.
Pseudoterminal ioctls
- TIOCPKT const int *argp
-
Enable (when
*argp
is nonzero) or disable packet mode.
Can be applied to the master side of a pseudoterminal only (and will return
ENOTTY
otherwise).
In packet mode, each subsequent
read(2)
will return a packet that either contains a single nonzero control byte,
or has a single byte containing zero (' ') followed by data
written on the slave side of the pseudoterminal.
If the first byte is not
TIOCPKT_DATA
(0), it is an OR of one
or more of the following bits:
TIOCPKT_FLUSHREAD The read queue for the terminal is flushed.
TIOCPKT_FLUSHWRITE The write queue for the terminal is flushed.
TIOCPKT_STOP Output to the terminal is stopped.
TIOCPKT_START Output to the terminal is restarted.
TIOCPKT_DOSTOP The start and stop characters are ^S/^Q.
TIOCPKT_NOSTOP The start and stop characters are not ^S/^Q.
While this mode is in use, the presence
of control status information to be read
from the master side may be detected by a
select(2)
for exceptional conditions.
This mode is used by
rlogin(1)
and
rlogind(8)
to implement a remote-echoed,
locally ^S/^Q flow-controlled remote login.
The BSD ioctls
TIOCSTOP,
TIOCSTART,
TIOCUCNTL,
TIOCREMOTE
have not been implemented under Linux.
Modem control
- TIOCMGET int *argp
-
get the status of modem bits.
- TIOCMSET const int *argp
-
set the status of modem bits.
- TIOCMBIC const int *argp
-
clear the indicated modem bits.
- TIOCMBIS const int *argp
-
set the indicated modem bits.
Bits used by these four ioctls:
TIOCM_LE DSR (data set ready/line enable)
TIOCM_DTR DTR (data terminal ready)
TIOCM_RTS RTS (request to send)
TIOCM_ST Secondary TXD (transmit)
TIOCM_SR Secondary RXD (receive)
TIOCM_CTS CTS (clear to send)
TIOCM_CAR DCD (data carrier detect)
TIOCM_CD see TIOCM_CAR
TIOCM_RNG RNG (ring)
TIOCM_RI see TIOCM_RNG
TIOCM_DSR DSR (data set ready)
Marking a line as local
- TIOCGSOFTCAR int *argp
-
("Get software carrier flag")
Get the status of the CLOCAL flag in the c_cflag field of the
termios
structure.
- TIOCSSOFTCAR const int *argp
-
("Set software carrier flag")
Set the CLOCAL flag in the
termios
structure when
*argp
is nonzero, and clear it otherwise.
If the
CLOCAL
flag for a line is off, the hardware carrier detect (DCD)
signal is significant, and an
open(2)
of the corresponding terminal will block until DCD is asserted,
unless the
O_NONBLOCK
flag is given.
If
CLOCAL
is set, the line behaves as if DCD is always asserted.
The software carrier flag is usually turned on for local devices,
and is off for lines with modems.
Linux-specific
For the
TIOCLINUX
ioctl, see
console_ioctl(4).
Kernel debugging
#include <linux/tty.h>
- TIOCTTYGSTRUCT struct tty_struct *argp
-
Get the
tty_struct
corresponding to
fd.
RETURN VALUE
The
ioctl(2)
system call returns 0 on success.
On error, it returns -1 and sets
errno
appropriately.
ERRORS
- EINVAL
-
Invalid command parameter.
- ENOIOCTLCMD
-
Unknown command.
- ENOTTY
-
Inappropriate
fd.
- EPERM
-
Insufficient permission.

Time: 02:55:19 GMT, September 18, 2014


This module provides Animators (or anims for short) for Rabbyt.
Anims are little objects that can implement a movement function, primarily meant to animate sprites. The movement functions are all implemented in C, so your sprites can be animated without any python call overhead.
For example, to linearly interpolate a sprite from x=0 to x=100 over the next second, you can do this:
sprite.x = rabbyt.lerp(0, 100, dt=1)
Looks like magic?
It is! Sorta...
The Sprite class's x attribute is really a property. If you assign an anim to it, that anim will be called for it's value every time the sprite needs it's x position. Nearly all of Sprite's properties work like this.
Anims support various arithmatic opperations. If you add two together, or add one with a constant number, a new anim will be returned. Here is a rather contrived example of doing that:
sprite.x = rabbyt.lerp(0, 100, dt=1) + 20
(In this case, you would be better off interpolating from 20 to 120, but whatever.)
Here is a more useful example:
sprite2.x = sprite1.attrgetter('x') + 20
That will cause sprite2's x position to always be 20 more than sprite1's x position. (Sprite.attrgetter() returns an anim that gets an attribute.) This all happens in compiled C code, without any python call overhead. (That means you can have thousands of sprites doing this and it will still be fast.)
But sometimes you don't really need that much speed. You can use any python function as an anim as well. This example does the same as the last one:
sprite2.x = lambda: sprite1.x + 20
(Sprite.x will automatically wrap the function in an AnimPyFunc instance behind the scenes.)
You can use anims in your own class by subclassing from Animable and using the anim_slot descriptor. For example, a simple sprite class could start like this:
class MySprite(rabbyt.Animable): x = rabbyt.anim_slot() y = rabbyt.anim_slot() xy = rabbyt.swizzle('x', 'y')
The x, y, and xy attributes will behave the just like they do in rabbyt's Sprite class.
set_time(t)
Sets the time that get_time() should return.
If you are using any time based animations, (such as lerp(),) you should call this function every frame.
For example, if you are using pygame you can do this:
rabbyt.set_time(pygame.time.get_ticks())
Using this function should make it easier to implement a pause feature.
Note that rabbyt makes no assumption about the unit that the time is in. You can use milliseconds or seconds or even something else. It's up to you.
get_time()
Gets the time that was last set by set_time()
add_time(t)
Adds t to the ... time ... (Is it just me or does that sound dorky?)
This is really just a short cut that does this:
set_time(get_time() + t)
The new time is returned.
lerp(start, end, [startt,] [endt,] [dt,] [t,] [extend])
Linearly interpolates between start and end as time moves from startt to endt.
startt is the time to start.
To specify the ending time, use either endt, which is the absolute time, or dt, which is relative from startt.
For example, the following are equivalent:
lerp(0, 1, rabbyt.get_time(), endt=rabbyt.get_time()+1) lerp(0, 1, rabbyt.get_time(), dt=1)
extend is a string defining what to do before startt and after endt. Possible values are:
- "constant"
- The value will be locked between start and end. This is the default.
- "extrapolate"
- After the value hits end it just keeps going!
- "repeat"
- After the value hits end it will start over again at start.
- "reverse"
- After the value hits end it will reverse, moving back to start.
Check out the extend_modes.py example to see all four side by side.
If any required values are omitted, lerp will return an IncompleteInterpolateAnim instance, which will have the missing values filled in when assigned to an anim slot. So instead of doing this:
# long way: sprite.x = lerp(start=sprite.x, end=10, startt=get_time(), dt=1)
... you could do this:
# shortcut with same result: sprite.x = lerp(end=10, dt=1)
Both start and startt are missing, so lerp returns an incomplete anim. When it is assigned to sprite.x, start is filled in with the previous value of sprite.x and startt is filled in with the current time.
start and end can either be numbers, or tuples of numbers. If they are tuples, a tuple of anims will be returned. For example, this line:
sprite.rgba = lerp((0,1,0,.5), (1,0,1,1), dt=1)
is equivalent to this:
sprite.red = lerp(0, 1, dt=1) sprite.green = lerp(1, 0, dt=1) sprite.blue = lerp(0, 1, dt=1) sprite.alpha = lerp(.5,1, dt=1)
TODO document t [startt and endt (mostly) ignored when used]
ease(start, end, [startt,] [endt,] [dt,] [t,] [extend,] [method,])
Interpolates between start and end, easing in and out of the transition.
method is the easing method to use. It defaults to "sine". See the "interpolation.py" example in the rabbyt source distribution for more.
TODO List the valid interpolation methods here (perhaps with descriptions.)
All other argments are identical to lerp.
ease_in(start, end, [startt,] [endt,] [dt,] [t,] [extend,] [method,])
Interpolates between start and end, easing into the transition. (So the movement starts out slow.)
See the docs for ease for more information.
ease_out(start, end, [startt,] [endt,] [dt,] [t,] [extend,] [method,])
Interpolates between start and end, easing out of the transition. (The movement starts fast and ends slow.)
See the docs for ease for more information.
chain(...)
chain provides a way to automatically run anims in a sequence. For example, you can move a sprite in a square like this:
now = get_time() sprite.xy = chain( lerp(( 0, 0), (10, 0), now, now+10), lerp((10, 0), (10,10), now+10, now+20), lerp((10,10), ( 0,10), now+20, now+30), lerp(( 0,10), ( 0, 0), now+30, now+40))
If you ommit the start and startt arguments of lerp, they will be filled in from end and endt of the the previous lerp. So this is a less verbose way to do the same thing as above:
sprite.xy = chain( lerp((0,0), (10, 0), dt=10), lerp(end=(10,10), dt=10), lerp(end=( 0,10), dt=10), lerp(end=( 0, 0), dt=10))
Currently, lerp, ease, ease_in, and ease_out are the only anims that can be used with chain.
wrap(bounds, parent, static=True) -> AnimWrap or tuple of AnimWraps
Wraps a parent Anim to fit within bounds. bounds should be an object that supports item access for at least bounds[0] and bounds[1]. (A list or tuple with a length of 2 would work great.)
If static is True, bounds is only read once and stored in C variables for fast access. This is much faster, but doesn't work if bounds is an object you wish to mutate.
If parent is a iterable, a tuple of anims will be returned instead of a single one. (This is similar to lerp().)


This site is a test by Dallin Spencer in learning to use TensorFlow.js for image recognition. I have an interest in using Machine Learning to solve some problems in astronomy, and this project should help me learn how to use Tensorflow in image recognition in better ways, and also make it public domain.


Enter for a chance to win a MASSIVE $500 shopping spree at Metropolis in Metro Vancouver!
SPONSORED
by V.I.A. Custom ContentBC’s largest shopping centre will award one lucky winner a $500 Metropolis at Metrotown gift card, just in time for all those awesome Black Friday deals…
Something for Mom?
Something for a friend?
Something for you?
No matter who you have on your holiday shopping list, there’s no better time to shop and no better place to do it than next weekend at Metropolis at Metrotown.
From November 29 – December 1, the beloved retail destination will host their annual Black Friday event, complete with huge savings and extended hours all weekend long. With 375 stores and several retailers offering early bird door crasher specials, bargain hunters won’t need to go far to find the best deals of the holiday season.
To celebrate the true beginning of holiday shopping, we’ve partnered with Metropolis at Metrotown to award one lucky shopper a $500 gift card. You can enter via the contest form below:
The $500 gift card can be used at most of Metropolis’ stores, including stores such as H&M, Hudson’s Bay, Indigo, Old Navy, Sport Chek, Toys “R” Us, Uniqlo, Urban Behavior, Tommy Hilfiger, Michael Kors, Coach, RYU, Aritzia, Walmart, Winners HomeSense, and more!
Want to line up early for your favourite deals? Early morning Black Friday mall access will be available through the entrance closest to Customer Service Ground Level, near NYX Professional Makeup, which will open at 6:00 am on November 29th. All other mall entrances will open at 6:30 am.
Select retailers are opening early for Black Friday! For more information on Black Friday Weekend and for a complete list of all participating retailers, hours and deals please visit metropolisatmetrotown.com.
Black Friday Weekend at Metropolis at Metrotown
When: November 29th – December 1st (Friday: 8:00am to 10:00pm, Saturday: 10:00am to 9:00pm, Sunday: 10:00am to 7:00pm)
Where: Metropolis at Metrotown, 4700 Kingsway, Burnaby
Don’t forget to follow @metropolisatmet on Instagram and Facebook for all the latest in-mall promotions and updates as well. Need assistance finding a store? Contact Guest Services during mall hours by texting<PHONE_NUMBER>.


PhoneGap is a free open source framework that allows developers to create cross-platform mobile applications using html, javascript and css
- Content is displayed on a webview
- Use javascript to native bridge to access native features
- PhoneGap API is based on web standards
- Apps are Hybrid (part native/part web)
- Great plugin support for extending the platform
- Reuse code accross platforms
Supported Platforms
- iOS & OSX
- Android (All devices)
- Blackberry 10
- Windows Phone & Windows 8
- Firefox OS (upcoming)
Apache Cordova
PhoneGap is a distribution of Apache Cordova
Has contributors from Google, IBM, RIM, Microsoft, Intel, Mozilla and more
PhoneGap 3.0
With PhoneGap 3.0, all of our APIs have been ripped into plugins and we have introduced the new workflow for managing your PhoneGap/Cordova apps.
Plugins
- All of our APIs are now plugins
- Create new plugins to extend capabilities of PhoneGap
- Lots of community plugins to choose from
- Soon releasing an online registry of plugins (plugins.cordova.io)
PhoneGap Build
Package mobile apps in the cloud
PhoneGap Build
- Upload your PG app to create binary for distribution
- QR code to download app right onto device
- Supports pre-approved plugins
- Apart of the Adobe Creative Cloud
The PhoneGap CLI
(Command-Line Interface)
Our new command-line tool to develop apps for multiple platforms.
Installation
phonegap
corodva
corodova-cli vs phonegap-cli
phonegap-cli :
Plugins
Easy right?
THE END
Questions?
By Steve Gill


Assistan Teacher Air University, PAK2016 Conducted,crafted and checked Computer Labs for course work of C++
Volunteer worker in Lions International Club Islamabad, PAK2016 ran awareness campaigns on different social issues and community development.


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.FontMetrics
public abstract class FontMetrics
The FontMetrics
class defines a font metrics object, which
encapsulates information about the rendering of a particular font on a
particular screen.
Note to subclassers: Since many of these methods form closed, mutually recursive loops, you must take care that you implement at least one of the methods in each such loop to prevent infinite recursion when your subclass is used. In particular, the following is the minimal suggested set of methods to override in order to ensure correctness and prevent infinite recursion (though other subsets are equally feasible):
Note that the implementations of these methods are inefficient, so they are usually overridden with more efficient toolkit-specific implementations.
When an application asks AWT to place a character at the position (x, y), the character is placed so that its reference point (shown as the dot in the accompanying image) is put at that position. The reference point specifies a horizontal line called the baseline of the character. In normal printing, the baselines of characters should align.
In addition, every character in a font has an ascent, a descent, and an advance width. The ascent is the amount by which the character ascends above the baseline. The descent is the amount by which the character descends below the baseline. The advance width indicates the position at which AWT should place the next character.
An array of characters or a string can also have an ascent, a
descent, and an advance width. The ascent of the array is the
maximum ascent of any character in the array. The descent is the
maximum descent of any character in the array. The advance width
is the sum of the advance widths of each of the characters in the
character array. The advance of a String
is the
distance along the baseline of the String
. This
distance is the width that should be used for centering or
right-aligning the String
.
Note that the advance of a String
is not necessarily
the sum of the advances of its characters measured in isolation
because the width of a character can vary depending on its context.
For example, in Arabic text, the shape of a character can change
in order to connect to other characters. Also, in some scripts,
certain character sequences can be represented by a single shape,
called a ligature. Measuring characters individually does
not account for these transformations.
Font
,
Serialized Form| Field Summary | |
|---|---|
protected Font |
font
The actual Font from which the font metrics are
created. |
| Constructor Summary | |
|---|---|
protected |
FontMetrics(Font font)
Creates a new FontMetrics object for finding out
height and width information about the specified Font
and specific character glyphs in that Font . |
| Method Summary | |
|---|---|
int |
bytesWidth(byte[] data,
int off,
int len)
Returns the total advance width for showing the specified array of bytes in this Font . |
int |
charsWidth(char[] data,
int off,
int len)
Returns the total advance width for showing the specified array of characters in this Font . |
int |
charWidth(char ch)
Returns the advance width of the specified character in this Font . |
int |
charWidth(int codePoint)
Returns the advance width of the specified character in this Font . |
int |
getAscent()
Determines the font ascent of the Font
described by this FontMetrics object. |
int |
getDescent()
Determines the font descent of the Font
described by this
FontMetrics object. |
Font |
getFont()
Gets the Font described by this
FontMetrics object. |
int |
getHeight()
Gets the standard height of a line of text in this font. |
int |
getLeading()
Determines the standard leading of the Font described by this FontMetrics
object. |
LineMetrics |
getLineMetrics(char[] chars,
int beginIndex,
int limit,
Graphics context)
Returns the LineMetrics object for the specified
character array in the specified Graphics context. |
LineMetrics |
getLineMetrics(CharacterIterator ci,
int beginIndex,
int limit,
Graphics context)
Returns the LineMetrics object for the specified
CharacterIterator in the specified Graphics
context. |
LineMetrics |
getLineMetrics(String str,
Graphics context)
Returns the LineMetrics object for the specified
String in the specified Graphics context. |
LineMetrics |
getLineMetrics(String str,
int beginIndex,
int limit,
Graphics context)
Returns the LineMetrics object for the specified
String in the specified Graphics context. |
int |
getMaxAdvance()
Gets the maximum advance width of any character in this Font . |
int |
getMaxAscent()
Determines the maximum ascent of the Font
described by this FontMetrics object. |
Rectangle2D |
getMaxCharBounds(Graphics context)
Returns the bounds for the character with the maximum bounds in the specified Graphics context. |
int |
getMaxDecent()
Deprecated. As of JDK version 1.1.1, replaced by getMaxDescent() . |
int |
getMaxDescent()
Determines the maximum descent of the Font
described by this FontMetrics object. |
Rectangle2D |
getStringBounds(char[] chars,
int beginIndex,
int limit,
Graphics context)
Returns the bounds of the specified array of characters in the specified Graphics context. |
Rectangle2D |
getStringBounds(CharacterIterator ci,
int beginIndex,
int limit,
Graphics context)
Returns the bounds of the characters indexed in the specified CharacterIterator in the
specified Graphics context. |
Rectangle2D |
getStringBounds(String str,
Graphics context)
Returns the bounds of the specified String in the
specified Graphics context. |
Rectangle2D |
getStringBounds(String str,
int beginIndex,
int limit,
Graphics context)
Returns the bounds of the specified String in the
specified Graphics context. |
int[] |
getWidths()
Gets the advance widths of the first 256 characters in the Font . |
boolean |
hasUniformLineMetrics()
Checks to see if the Font has uniform line metrics. |
int |
stringWidth(String str)
Returns the total advance width for showing the specified String in this Font . |
String |
toString()
Returns a representation of this FontMetrics
object's values as a String . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Font font
Font
from which the font metrics are
created.
This cannot be null.
getFont()
| Constructor Detail |
|---|
protected FontMetrics(Font font)
FontMetrics
object for finding out
height and width information about the specified Font
and specific character glyphs in that Font
.
font
- the Font
Font
| Method Detail |
|---|
public Font getFont()
Font
described by this
FontMetrics
object.
Font
described by this
FontMetrics
object.public int getLeading()
Font
described by this FontMetrics
object. The standard leading, or
interline spacing, is the logical amount of space to be reserved
between the descent of one line of text and the ascent of the next
line. The height metric is calculated to include this extra space.
Font
.getHeight()
,
getAscent()
,
getDescent()
public int getAscent()
Font
described by this FontMetrics
object. The font ascent
is the distance from the font's baseline to the top of most
alphanumeric characters. Some characters in the Font
might extend above the font ascent line.
Font
.getMaxAscent()
public int getDescent()
Font
described by this
FontMetrics
object. The font descent is the distance
from the font's baseline to the bottom of most alphanumeric
characters with descenders. Some characters in the
Font
might extend
below the font descent line.
Font
.getMaxDescent()
public int getHeight()
getLeading()
,
getAscent()
,
getDescent()
public int getMaxAscent()
Font
described by this FontMetrics
object. No character
extends further above the font's baseline than this height.
Font
.getAscent()
public int getMaxDescent()
Font
described by this FontMetrics
object. No character
extends further below the font's baseline than this height.
Font
.getDescent()
@Deprecated public int getMaxDecent()
getMaxDescent()
.
Font
.getMaxDescent()
public int getMaxAdvance()
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
string's baseline. The advance of a String
is
not necessarily the sum of the advances of its characters.
Font
, or -1
if the
maximum advance width is not known.public int charWidth(int codePoint)
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
character's baseline. Note that the advance of a
String
is not necessarily the sum of the advances
of its characters.
This method doesn't validate the specified character to be a
valid Unicode code point. The caller must validate the
character value using Character.isValidCodePoint
if necessary.
codePoint
- the character (Unicode code point) to be measured
Font
described by this
FontMetrics
object.charsWidth(char[], int, int)
,
stringWidth(String)
public int charWidth(char ch)
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
character's baseline. Note that the advance of a
String
is not necessarily the sum of the advances
of its characters.
Note: This method cannot handle supplementary
characters. To support all Unicode characters, including
supplementary characters, use the charWidth(int)
method.
ch
- the character to be measured
Font
described by this
FontMetrics
object.charsWidth(char[], int, int)
,
stringWidth(String)
public int stringWidth(String str)
String
in this Font
. The advance
is the distance from the leftmost point to the rightmost point
on the string's baseline.
Note that the total advance width returned from this method
does not take into account the rendering context. Therefore,
the anti-aliasing and fractional metrics hints can affect the
value of the advance. When enabling the anti-aliasing and
fractional metrics hints, use
getStringBounds(String, Graphics)
instead of this method. The advance of a String
is
not necessarily the sum of the advances of its characters.
str
- the String
to be measured
String
in the Font
described by this
FontMetrics
.bytesWidth(byte[], int, int)
,
charsWidth(char[], int, int)
,
getStringBounds(String, Graphics)
public int charsWidth(char[] data, int off, int len)
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
string's baseline. The advance of a String
is not necessarily the sum of the advances of its characters.
This is equivalent to measuring a String
of the
characters in the specified range.
data
- the array of characters to be measuredoff
- the start offset of the characters in the arraylen
- the number of characters to be measured from the array
char
array in the font described by
this FontMetrics
object.charWidth(int)
,
charWidth(char)
,
bytesWidth(byte[], int, int)
,
stringWidth(String)
public int bytesWidth(byte[] data, int off, int len)
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
string's baseline. The advance of a String
is not necessarily the sum of the advances of its characters.
This is equivalent to measuring a String
of the
characters in the specified range.
data
- the array of bytes to be measuredoff
- the start offset of the bytes in the arraylen
- the number of bytes to be measured from the array
byte
array in the Font
described by
this FontMetrics
object.charsWidth(char[], int, int)
,
stringWidth(String)
public int[] getWidths()
Font
. The advance is the
distance from the leftmost point to the rightmost point on the
character's baseline. Note that the advance of a
String
is not necessarily the sum of the advances
of its characters.
Font
described by this FontMetrics
object.public boolean hasUniformLineMetrics()
Font
has uniform line metrics. A
composite font may consist of several different fonts to cover
various character sets. In such cases, the
FontLineMetrics
objects are not uniform.
Different fonts may have a different ascent, descent, metrics and
so on. This information is sometimes necessary for line
measuring and line breaking.
true
if the font has uniform line metrics;
false
otherwise.Font.hasUniformLineMetrics()
public LineMetrics getLineMetrics(String str, Graphics context)
LineMetrics
object for the specified
String
in the specified Graphics
context.
str
- the specified String
context
- the specified Graphics
context
LineMetrics
object created with the
specified String
and Graphics
context.Font.getLineMetrics(String, FontRenderContext)
public LineMetrics getLineMetrics(String str, int beginIndex, int limit, Graphics context)
LineMetrics
object for the specified
String
in the specified Graphics
context.
str
- the specified String
beginIndex
- the initial offset of str
limit
- the length of str
context
- the specified Graphics
context
LineMetrics
object created with the
specified String
and Graphics
context.Font.getLineMetrics(String, int, int, FontRenderContext)
public LineMetrics getLineMetrics(char[] chars, int beginIndex, int limit, Graphics context)
LineMetrics
object for the specified
character array in the specified Graphics
context.
chars
- the specified character arraybeginIndex
- the initial offset of chars
limit
- the length of chars
context
- the specified Graphics
context
LineMetrics
object created with the
specified character array and Graphics
context.Font.getLineMetrics(char[], int, int, FontRenderContext)
public LineMetrics getLineMetrics(CharacterIterator ci, int beginIndex, int limit, Graphics context)
LineMetrics
object for the specified
CharacterIterator
in the specified Graphics
context.
ci
- the specified CharacterIterator
beginIndex
- the initial offset in ci
limit
- the end index of ci
context
- the specified Graphics
context
LineMetrics
object created with the
specified arguments.Font.getLineMetrics(CharacterIterator, int, int, FontRenderContext)
public Rectangle2D getStringBounds(String str, Graphics context)
String
in the
specified Graphics
context. The bounds is used
to layout the String
.
str
- the specified String
context
- the specified Graphics
context
Rectangle2D
that is the bounding box of the
specified String
in the specified
Graphics
context.Font.getStringBounds(String, FontRenderContext)
public Rectangle2D getStringBounds(String str, int beginIndex, int limit, Graphics context)
String
in the
specified Graphics
context. The bounds is used
to layout the String
.
str
- the specified String
beginIndex
- the offset of the beginning of str
limit
- the length of str
context
- the specified Graphics
context
Rectangle2D
that is the bounding box of the
specified String
in the specified
Graphics
context.Font.getStringBounds(String, int, int, FontRenderContext)
public Rectangle2D getStringBounds(char[] chars, int beginIndex, int limit, Graphics context)
Graphics
context.
The bounds is used to layout the String
created with the specified array of characters,
beginIndex
and limit
.
chars
- an array of charactersbeginIndex
- the initial offset of the array of
characterslimit
- the length of the array of characterscontext
- the specified Graphics
context
Rectangle2D
that is the bounding box of the
specified character array in the specified
Graphics
context.Font.getStringBounds(char[], int, int, FontRenderContext)
public Rectangle2D getStringBounds(CharacterIterator ci, int beginIndex, int limit, Graphics context)
CharacterIterator
in the
specified Graphics
context.
ci
- the specified CharacterIterator
beginIndex
- the initial offset in ci
limit
- the end index of ci
context
- the specified Graphics
context
Rectangle2D
that is the bounding box of the
characters indexed in the specified CharacterIterator
in the specified Graphics
context.Font.getStringBounds(CharacterIterator, int, int, FontRenderContext)
public Rectangle2D getMaxCharBounds(Graphics context)
Graphics
context.
context
- the specified Graphics
context
Rectangle2D
that is the
bounding box for the character with the maximum bounds.Font.getMaxCharBounds(FontRenderContext)
public String toString()
FontMetrics
object's values as a String
.
toString
in class Object
String
representation of this
FontMetrics
object.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


[gecode-users] exact behaviour of different IntValBranch
Kish Shen
kisshen at cisco.com
Fri Jul 30 23:06:03 CEST 2010
Hi Guido,
Guido Tack wrote:
> That's not quite correct, INT_VAL_MED creates (x==n) v (x != n) just like INT_VAL_{MIN,MAX}. And the median is computed again for each new node.
>
Yes, that make sense, and is what I assumed it did (as I wrote in my
original message).
So as I thought, you need to compute the median again. Does it make
sense to provide something like what ECLiPSe does, to avoid the expense
of computing the median? In terms of value selected, it probably does
not make a huge difference -- the important thing is just which part of
the domain you want to start selecting values from. You just need to
remember in the x != n case, you want to select a value as close to n as
possible.
> The splitting cases are INT_SPLIT_MIN, which does (x <= n) v (x > n) for n = (x.min()+x.max())/2, or INT_SPLIT_MAX where the two choices are swapped. That's why the documentation talks about values (plural) here: The branching does not assign a single value to the variable, but splits the domain (of course, when the domain had size 2, the result of the split is a single value).
>
> A good way to find out what the branchings do exactly is to have a look at the search tree in Gist.
>
Ah, I think I understand this now. It means instead of always labelling
a variable to a value, its domain is simply reduced, and the variable
can be selected again and again until it is reduced to 1.
Thanks and cheers,
Kish
--
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
More information about the users
mailing list


{%- include snippets/prepend-baseurl.html path='/assets/favicon-512x512.png' -%}
{%- include snippets/prepend-baseurl.html path='/assets/favicon-32x32.png' -%}
{%- include snippets/prepend-baseurl.html path='/assets/favicon-16x16.png' -%}
{%- include snippets/prepend-baseurl.html path='/assets/favicon.ico' -%}


|
appendTo
|
any
|
null
|
Specifies the container where new openned toast items will be displayed. The value can be an HTMLElement or element's id. This property is in relation with modal(lower priority than modal) and position(higher priority than position) properties.
Code examples
Set the appendTo property.
<smart-toast append-to='container'></smart-toast> Set the appendTo property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.appendTo = newContainer;
Get the appendTo property.
const toast = document.querySelector('smart-toast');
let appendTo = toast.appendTo;
|
|
autoClose
|
boolean
|
false
|
Sets or gets whether the toast will automatically close after duration equal to the autoCloseDelay property.
Code examples
Set the autoClose property.
<smart-toast auto-close></smart-toast> Set the autoClose property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.autoClose = false;
Get the autoClose property.
const toast = document.querySelector('smart-toast');
let autoClose = toast.autoClose;
|
|
autoCloseDelay
|
number
|
3000
|
Sets or gets the duration after which the toast automatically closes (works only if the autoClose property is set to true).
Code examples
Set the autoCloseDelay property.
<smart-toast auto-close-delay='4000'></smart-toast> Set the autoCloseDelay property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.autoCloseDelay = 5000;
Get the autoCloseDelay property.
const toast = document.querySelector('smart-toast');
let autoCloseDelay = toast.autoCloseDelay;
|
|
autoOpen
|
boolean
|
false
|
Sets whether the toast will open automatically immediately after widget's initialization.
Code examples
Set the autoOpen property.
<smart-toast auto-open></smart-toast> Set the autoOpen property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.autoOpen = false;
Get the autoOpen property.
const toast = document.querySelector('smart-toast');
let autoOpen = toast.autoOpen;
|
|
disabled
|
boolean
|
false
|
The user will not be able to interact with toast items when disabled is set to true.
Code examples
Set the disabled property.
<smart-toast disabled></smart-toast> Set the disabled property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.disabled = false;
Get the disabled property.
const toast = document.querySelector('smart-toast');
let disabled = toast.disabled;
|
|
itemTemplate
|
string
|
null
|
Sets custom item template.
Code examples
Set the itemTemplate property.
<smart-toast item-template='templateId1'></smart-toast> Set the itemTemplate property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.itemTemplate = 'templateId2';
Get the itemTemplate property.
const toast = document.querySelector('smart-toast');
let itemTemplate = toast.itemTemplate;
|
|
modal
|
boolean
|
false
|
In modal mode the toast item is positioned in the center of the screen. This property is with higher priority than position and appendTo. If modal is set to true these properties are disregarded.
Code examples
Set the modal property.
<smart-toast modal></smart-toast> Set the modal property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.modal = false;
Get the modal property.
const toast = document.querySelector('smart-toast');
let modal = toast.modal;
|
|
position
|
string
|
top-right
|
Sets the part of the browser window where the toast will be positioned. The position property is disregarded if appendTo or modal are set. Possible values: 'top-left', 'top-right', 'bottom-left', 'bottom-right'.
Code examples
Set the position property.
<smart-toast position='bottom-left'></smart-toast> Set the position property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.position = 'bottom-right';
Get the position property.
const toast = document.querySelector('smart-toast');
let position = toast.position;
|
|
showCloseButton
|
boolean
|
false
|
Sets or gets whether to show the toast item's close button.
Code examples
Set the showCloseButton property.
<smart-toast show-close-button></smart-toast> Set the showCloseButton property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.showCloseButton = false;
Get the showCloseButton property.
const toast = document.querySelector('smart-toast');
let showCloseButton = toast.showCloseButton;
|
|
type
|
string
|
info
|
Sets speciffic CSS settings and icon to the toast items. Possible values: 'info', 'warning', 'success', 'error', 'mail', 'time'.
Code examples
Set the type property.
<smart-toast type='warning'></smart-toast> Set the type property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.type = 'success';
Get the type property.
const toast = document.querySelector('smart-toast');
let type = toast.type;
|
|
value
|
any
|
|
Sets a text value to an toast item.
Code examples
Set the value property.
<smart-toast value='Toast !'></smart-toast> Set the value property by using the HTML Element's instance.
const toast = document.querySelector('smart-toast');
toast.value = Toast !!!;
Get the value property.
const toast = document.querySelector('smart-toast');
let value = toast.value;
|
|
|
|
click
|
Event
|
|
This event is triggered when the toast item is clicked.
Code examples
Bind to the click event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('click', function (event) {
// event handling code goes here.
}
|
|
close
|
Event
|
|
This event is triggered when the toast item is closed.
Code examples
Bind to the close event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('close', function (event) {
// event handling code goes here.
}
|
|
open
|
Event
|
|
This event is triggered when the toast item is opened.
Code examples
Bind to the open event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('open', function (event) {
// event handling code goes here.
}
|
|
swipebottom
|
Event
|
|
This event is triggered on swipebottom over an toast item.
Code examples
Bind to the swipebottom event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('swipebottom', function (event) {
// event handling code goes here.
}
|
|
swipeleft
|
Event
|
|
This event is triggered on swipeleft over an toast item.
Code examples
Bind to the swipeleft event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('swipeleft', function (event) {
// event handling code goes here.
}
|
|
swiperight
|
Event
|
|
This event is triggered on swiperight over an toast item.
Code examples
Bind to the swiperight event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('swiperight', function (event) {
// event handling code goes here.
}
|
|
swipetop
|
Event
|
|
This event is triggered on swipetop over an toast item.
Code examples
Bind to the swipetop event by type: smartToast
const toast = document.querySelector('smart-toast');
toast.addEventListener('swipetop', function (event) {
// event handling code goes here.
}
|
|
|
|
closeAll
|
Method
|
|
Closes all opened toast items.
| Parameter |
Type |
Description |
| None |
|
|
Return Value
None
Code examples
Invoke the closeAll method.
const toast = document.querySelector('smart-toast');
toast.closeAll();
|
|
closeItem
|
Method
|
|
Closes particular toast item.
| Parameter |
Type |
Description |
| item |
HTMLElement/String |
The toast item (or its id) to remove. |
Return Value
None
Code examples
Invoke the closeItem method.
const toast = document.querySelector('smart-toast');
toast.closeItem(item5);
|
|
closeLast
|
Method
|
|
Closes the last opened toast item.
| Parameter |
Type |
Description |
| None |
|
|
Return Value
None
Code examples
Invoke the closeLast method.
const toast = document.querySelector('smart-toast');
toast.closeLast();
|
|
open
|
Method
|
|
Opens a new toast item.
| Parameter |
Type |
Description |
| None |
|
|
Return Value
None
Code examples
Invoke the open method.
const toast = document.querySelector('smart-toast');
toast.open();
|


{% extends 'zinnia/skeleton.html' %} {% block content %}
Hi, my name is Leonardo.
I live at the intersection of business and technology.
I'm a software engineer with a background in operations. I can work with the full stack of an application, and can quickly adapt to unfamiliar environments and tools.
I have applied computer science to my work through the automation of day to day tasks and I’m eager to transition to a full time developer position. I’m always striving to improve everyday as a developer and I’d love to work with a team of people that feel the same way.
I'm a frecuent speaker about programming, technology and entrepreneurship in my community.
Also I'm a member of multiple organizations advancing software development in my country.


Tasks for evaluation
Task 1
-
1) please explore our visualisation here You can add friends and tags to the visualisation and explore relations between recommendations, songs of friends and tags. Explore the visualisation in detail and listen to and like the songs in the right side panel that you find interesting. Try to listen to and find at least 10 songs that you find interesting by interacting with different rows in the visualisation.
-
2) After you have interacted with at least 5 rows and have found from these different rows 10 songs that you really like, a link to the final questionnaire will appear.
-
3) Please fill out the questionnaire which will be shown above the visualization after finishing step 2) .


In 2016, I moved from my hometown of Guiyang, China, to North Carolina for college.
For someone who grew up in another country, adjusting to life in America was difficult at first. There are many differences between our two cultures – from how Americans don’t drink hot water to their reliance on cars to get around – that I had no idea about until I experienced them for myself.
But my love of travel has pushed me to explore as much of America as possible during my time in this country. Since I started college, I’ve traveled at every opportunity. On one vacation I witnessed the raging beauty of Niagara Falls, and on another, I strolled for miles along Miami’s South Beach in beautiful January weather. I went stargazing at LA’s Griffith Observatory and I spent two days on the National Mall in Washington, DC.
Still, there are countless things in the US I’ve yet to experience for myself. It would be nearly impossible to see the entire country in a lifetime, let alone a few years, so I decided to make a bucket list of the top things on my list.
The US is a fascinating place in many ways. The country is big enough to have a myriad of landscapes and climates in different regions, and the unique history of each state makes it even more interesting to travel.
The items on my bucket list are a reflection of my interest in learning about various cultures, as well as my admiration and awe of the natural wonders the US has to offer.
Go leaf peeping in autumn in Vermont
Take a helicopter ride over Manhattan
See a show on Broadway
Do a New Year’s countdown in New York City
Go on a seafood crawl in Annapolis, Maryland
See a show at the Grand Ole Opry in Nashville, Tennessee
Hike through the Great Smoky Mountains — and see a bear in person
Check out a NASCAR race in Charlotte, North Carolina
See the famous Pineapple Fountain in Charleston, South Carolina
Taste all the different flavors of Coke at Atlanta’s World of Coca-Cola museum
Attend the Ultra Music Festival in Miami
Visit Ernest Hemingway’s house in Key West, Florida
Celebrate Mardi Gras in New Orleans
See the famous Cloud Gate sculpture in Chicago’s Millennium Park
Visit Mount Rushmore in South Dakota
See the Gateway Arch in St. Louis
Gamble at a Las Vegas casino
Drive across the Golden Gate Bridge in San Francisco
Explore Yellowstone National Park
Go skiing at Breckenridge in Colorado
Attend Coachella music festival in Indio, California
Go swimming in a natural pool in Laguna Beach
Make it inside a Hollywood party
Visit the colorful Salvation Mountain in the California desert