mkdir, mkdirat - create a directory
#include <sys/stat.h>
#include <sys/types.h>
int mkdir(const char *pathname, mode_t mode);
#include <fcntl.h> /* Definition of AT_* constants */
#include <sys/stat.h>
int mkdirat(int dirfd, const char *pathname, mode_t mode);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
mkdirat():
- Since glibc 2.10:
- _POSIX_C_SOURCE >= 200809L
- Before glibc 2.10:
- _ATFILE_SOURCE
mkdir() attempts to create a directory named pathname.
The argument mode specifies the mode for the new directory
(see inode(7)). It is modified by the process's umask in the
usual way: in the absence of a default ACL, the mode of the created
directory is (mode & ~umask & 0777). Whether other
mode bits are honored for the created directory depends on the
operating system. For Linux, see NOTES below.
The newly created directory will be owned by the effective user ID
of the process. If the directory containing the file has the set-group-ID
bit set, or if the filesystem is mounted with BSD group semantics (mount
-o bsdgroups or, synonymously mount -o grpid), the new directory
will inherit the group ownership from its parent; otherwise it will be owned
by the effective group ID of the process.
If the parent directory has the set-group-ID bit set, then so will
the newly created directory.
The mkdirat() system call operates in exactly the same way as
mkdir(), except for the differences described here.
If the pathname given in pathname is relative, then it is
interpreted relative to the directory referred to by the file descriptor
dirfd (rather than relative to the current working directory of the
calling process, as is done by mkdir() for a relative pathname).
If pathname is relative and dirfd is the special
value AT_FDCWD, then pathname is interpreted relative to the
current working directory of the calling process (like mkdir()).
If pathname is absolute, then dirfd is ignored.
See openat(2) for an explanation of the need for
mkdirat().
mkdir() and mkdirat() return zero on success, or -1 if an error
occurred (in which case, errno is set appropriately).
- EACCES
- The parent directory does not allow write permission to the process, or
one of the directories in pathname did not allow search permission.
(See also path_resolution(7).)
- EDQUOT
- The user's quota of disk blocks or inodes on the filesystem has been
exhausted.
- EEXIST
- pathname already exists (not necessarily as a directory). This
includes the case where pathname is a symbolic link, dangling or
not.
- EFAULT
- pathname points outside your accessible address space.
- EINVAL
- The final component ("basename") of the new directory's
pathname is invalid (e.g., it contains characters not permitted by
the underlying filesystem).
- ELOOP
- Too many symbolic links were encountered in resolving
pathname.
- EMLINK
- The number of links to the parent directory would exceed
LINK_MAX.
- ENAMETOOLONG
- pathname was too long.
- ENOENT
- A directory component in pathname does not exist or is a dangling
symbolic link.
- ENOMEM
- Insufficient kernel memory was available.
- ENOSPC
- The device containing pathname has no room for the new
directory.
- ENOSPC
- The new directory cannot be created because the user's disk quota is
exhausted.
- ENOTDIR
- A component used as a directory in pathname is not, in fact, a
directory.
- EPERM
- The filesystem containing pathname does not support the creation of
directories.
- EROFS
- pathname refers to a file on a read-only filesystem.
The following additional errors can occur for
mkdirat():
- EBADF
- dirfd is not a valid file descriptor.
- ENOTDIR
- pathname is relative and dirfd is a file descriptor
referring to a file other than a directory.
mkdirat() was added to Linux in kernel 2.6.16; library support was added
to glibc in version 2.4.
mkdir(): SVr4, BSD, POSIX.1-2001, POSIX.1-2008.
mkdirat(): POSIX.1-2008.
Under Linux, apart from the permission bits, the S_ISVTX mode bit
is also honored.
There are many infelicities in the protocol underlying NFS. Some
of these affect mkdir().
On older kernels where mkdirat() is unavailable, the glibc wrapper
function falls back to the use of mkdir(). When pathname is a
relative pathname, glibc constructs a pathname based on the symbolic link in
/proc/self/fd that corresponds to the dirfd argument.
mkdir(1), chmod(2), chown(2), mknod(2),
mount(2), rmdir(2), stat(2), umask(2),
unlink(2), acl(5) path_resolution(7)
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


NodeService will bring you cascade node data in a tree structural form.
The functions in this service are most suited for the ctrlTree control.
(function () { angular.module("jsnbt") .controller('AppController', function ($scope, NodeService) { $scope.data = []; var options = { // identifier: a cache key if to remember the last state of the tree. // if so, when the same tree loads again, opened tree nodes will open again identifier: 'cacheIdentifier', // the target domain of the node domain: $scope.domain, // the single parent to retrieve nodes for parentId: '', // multiple parents to retrieve nodes for parentIds: [], // selected entities to filter the result nodes entities: [], // selected node ids to be excluded from the result nodes restricted: [] }; NodeService.getNodes(options).then(function (response) { $scope.data = response; }, function (error) { throw error; }); }); })();


Books that you have reserved. When the reservation is ready, you will have 3 days to accept it. You can cancel reservations at any time.
| Signature | {{reservation.book.signature}} | Title | {{reservation.book.bookDetails.title}} | Reservation date | {{reservation.reservationDate | date:'dd.MM.yy'}} | Available date | {{reservation.availableDate | date:'dd.MM.yy'}} | Actions |
|
|---|


Have you seen this essay on churchofjesuschrist.org?
https://www.churchofjesuschrist.org/study/manual/gospel-topics-essays/book-of-mormon-and-dna-studies
Genetic studies done on ancient Americans show that they are not direct ancestors of middle eastern people probably come from Asia.
That can't be right can it?


Brad Myers, Sun Young Park, Yoko Nakano, Greg Mueller, Andrew Ko
Sketches, Storyboards, wireframes, formal design documents
"In our survey of 259 designers, 86% reported that the behavior is more
difficult to prototype than the appearance. Often (78% of
the time), designing the behavior requires collaborating with developers,
but 76% of designers reported that communicating the behavior to
developers was more difficult than the appearance. Other results include
that annotations such as arrows and paragraphs of text are used on top of
sketches and storyboards to explain behaviors, and designers want to
explore multiple versions of behaviors, but today’s tools make this
difficult."
"There have been many previous studies of the processes, techniques and
tools that are used by designers, but none have focused on how the
interactive behavior of the interface is created and communicated.
Creating the behaviors inherently deals with programming concepts, such
as conditionality (e.g., behaviors that only happen if the user interface
is in a certain mode), and abstrac-
tion (e.g., a behavior should happen when users click on any object of a
particular type)."
"Designers can be classified as end-user programmers (EUP), since they do
not write programs as a primary goal, but rather in
support of designing a web page or an animation"
"For example, tools for early design focused on use by designers who are
not programmers include SILK [11], Electronic Cocktail
Napkin [8], DENIM [14], SketchWizard [7], DEMAIS [2], Designer’s Outpost
[10], and many others."
"Designing the behaviors was reported to be an ongoing process while designing appearance is a simpler process of creating a single static image. Behaviors were said to often remain ill-defined until the application is actually implemented"
"[Verbatims where designers express issues with defining interactions]
"55% of the participants said that they had had an interactive behavior they wanted to explore on paper but could not, and therefore had to explore by implementing it."
"participants also agreed that sketches and storyboards were not sufficient for exploring interactive behaviors, consistent with previous studies (e.g., [2, 4])."
"people can imagine the final detailed appearance even from a vague sketch; however, it is very hard to communicate behavior and to get a sense of the final version from a prototype"
"designers frequently wanted to have multiple designs side-by-side, either in their sketchbooks, on big displays, or on the wall. However, this is difficult to achieve for behaviors – there is no built-in way in today’s implementation tools to have two versions of a behavior operating side-by-side."
"Our results suggest that there is definitely a need among designers for
quickly and easily prototyping interactive behaviors. Many do not
program, and have difficulty prototyping behaviors. Consequently, they
resort to heavy use of annotations and other means for communicating
their intentions to people who do program. Specifying behaviors textually
is often inadequate, time-consuming and sometimes leads to
miscommunication and confusion between designers and developers. Since
designers strive to be creative and
explore new and complex behaviors, this is a significant pain point for
them both today and in the future."


The multiverse has been tapped into at the wrong time, and grid battleforce must up the act made from the autobot/decepticon war that entered the power rangers universe. Unexpectedly joining them are stranded heroes from different worlds, including a spartan soldier, a masked vigilante, a cyborg, a jedi master, and a sailor scout; while they help their new allies, they will question if they are responsible for the battle as the power rangers and transfomers are. During the chaos, a small ragtag team tries to survive in this unfamililair world while searching for an unchained rouge demon. See your favorite characters from many different series join forces in this fan made series. Unit-E is a stopmotion series with popular characters from video games, movies, and shows as they interact and fight together to stop evil from rising.


- Picture - Class in ca.ualberta.cs.corgFu
-
This is an abstract class that performs all the needed
methods required for handling pictures which includes
determining whether or not the image meets the size requirements
and finally associating the image to either the Answer/Question
objects.
- Picture() - Constructor for class ca.ualberta.cs.corgFu.Picture
-
- populateAnswerView() - Method in class ca.ualberta.cs.corgFuViews.ViewQuestionAndAnswers
-
Populates the ReplyView of questions with questions in the order
specified by the user (Sorted by date on default)
- populateListView() - Method in class ca.ualberta.cs.corgFuViews.BrowseItems
-
Populates the ListView of questions with questions in the order
specified by the user (Sorted by date on default)
- populateListView(String) - Method in class ca.ualberta.cs.corgFuViews.OfflineDataView
-
The population of a list view depending on the choice of file that we are choosing
to display
- populateReplyView() - Method in class ca.ualberta.cs.corgFuViews.ViewAnswerAndReplies
-
Populates the ReplyView of questions with questions in the order
specified by the user (Sorted by date on default)
- populateReplyView() - Method in class ca.ualberta.cs.corgFuViews.ViewQuestionAndReplies
-
Populates the ReplyView of questions with questions in the order
specified by the user (Sorted by date on default)
- pushOfflineContent() - Method in class ca.ualberta.cs.corgFuControllers.DataController
-
when called, pushes all of the offline data that is in the unpushed file type
online and then clears the unpushed save file


{% extends '_base.html' %} {% block content %}
Something has gone terribly wrong. We are on the fast track to fixing it.
Go Back Home.


Location
Visits
- United States2298
- China13244
- Turkey234
- Australia2345
- India756
- Brazil65570
- Bangladesh675
- Nigeria677
Statistics Chart
distance stats...Your last activity is posted 4 hours ago
Server 1 Server 2
$340 +125.00%
MONDAY
- Market
$12,234,000
- Referrel
$50,335.000
Statistics Chart
distance stats...FRI August/Sep/2013
Desktop 7,234
Mobile 12,092
5,9,3,6,10,10,6,10,5,9,3,6,10,6,5,7,9,10,6,5,7,9,5,9,10,6,10,5,9,3,6,10,3,6,10,6,5,5,9,3,6,10,7,9,5,7,9,10,6,5,7,9,5,9,3,6,10,6,5,9,3,5,10,6,10,5,9,3,6,10,3,6,10,6,5,9,3,6,10,6,10,5,7,9
Data Bases (23/100)
Memory Usage 50%
Email Accounts (56/100)
CPU Usage (34.05-23 cpus)
Data Bases (23/100)
Memory Usage 50%
Email Accounts (56/100)
CPU Usage (34.05-23 cpus)
TODAY VISIT
2,980
- VISIT (ALL)
- VISIT (MOBILE)
Location
Visits
- United States2298
- China13244
- Turkey234
- Australia2345
- India756
- Brazil65570
Pie Chart
Doughnut Chart
1,5,2,7,9,6,7,11,9,13,12,15,14,18
3,403
Visits
6,4,7,2,9,8,2,5,4
67,456
Page Views
7,3,5,7,8,9,3,5,6
67.9
Page / Visits
7,5,2,6,7,8,5,8,7
00:02:03
Average Time
4,6,7,8,3,5,8,6,5
25%
Returning Visits
2,7,7,11,9,13,12,5,7
66.1%
Bounce Rate
1,1,2
Our Balance
THIS MONTH EARNING$9,34,145.0
Today$2,230
2,2,2
Our Income
THIS MONTH EARNING$9,34,145.0
Today$2,230
1,1,2,3,2
Our Earning
THIS MONTH EARNING$9,34,145.0
Today$2,230


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use Version | |
|---|---|
| com.fasterxml.jackson.core | Main public API classes of the core streaming JSON
processor: most importantly JsonFactory
used for constructing
JSON parser (JsonParser )
and generator
(JsonParser )
instances. |
| com.fasterxml.jackson.core.base | Base classes used by concrete Parser and Generator implementations; contain functionality that is not specific to JSON or input abstraction (byte vs char). |
| com.fasterxml.jackson.core.json | JSON-specific parser and generator implementation classes that Jackson defines and uses. |
| com.fasterxml.jackson.core.util | Utility classes used by Jackson Core functionality. |
| Uses of Version in com.fasterxml.jackson.core |
|---|
| Methods in com.fasterxml.jackson.core that return Version | |
|---|---|
static Version |
Version.unknownVersion()
Method returns canonical "not known" version, which is used as version in cases where actual version information is not known (instead of null). |
Version |
Versioned.version()
Method called to detect version of the component that implements this interface; returned version should never be null, but may return specific "not available" instance (see Version for details). |
abstract Version |
JsonParser.version()
Accessor for getting version of the core package, given a parser instance. |
abstract Version |
JsonGenerator.version()
Accessor for finding out version of the bundle that provided this generator instance. |
Version |
JsonFactory.version()
|
| Methods in com.fasterxml.jackson.core with parameters of type Version | |
|---|---|
int |
Version.compareTo(Version other)
|
| Uses of Version in com.fasterxml.jackson.core.base |
|---|
| Methods in com.fasterxml.jackson.core.base that return Version | |
|---|---|
Version |
ParserMinimalBase.version()
|
Version |
GeneratorBase.version()
Implemented with detection that tries to find "VERSION.txt" in same package as the implementation class. |
| Uses of Version in com.fasterxml.jackson.core.json |
|---|
| Methods in com.fasterxml.jackson.core.json that return Version | |
|---|---|
Version |
WriterBasedJsonGenerator.version()
|
Version |
UTF8StreamJsonParser.version()
|
Version |
UTF8JsonGenerator.version()
|
Version |
ReaderBasedJsonParser.version()
|
| Uses of Version in com.fasterxml.jackson.core.util |
|---|
| Methods in com.fasterxml.jackson.core.util that return Version | |
|---|---|
static Version |
VersionUtil.mavenVersionFor(ClassLoader classLoader,
String groupId,
String artifactId)
Will attempt to load the maven version for the given groupId and artifactId. |
static Version |
VersionUtil.parseVersion(String versionStr)
Deprecated. |
static Version |
VersionUtil.parseVersion(String versionStr,
String groupId,
String artifactId)
|
Version |
VersionUtil.version()
|
Version |
JsonParserDelegate.version()
|
Version |
JsonGeneratorDelegate.version()
|
static Version |
VersionUtil.versionFor(Class<?> cls)
Helper method that will try to load version information for specified class. |
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Class Output
public
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
string
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
boolean
|
|
public
|
|
public
|
|
public
null|mixed
|
#
getViewData( string $key = null )
returns the value for the key of the view data or null if it's not exists. If no key is provided the whole view data stor will be returned. |
public
string
|
|
public
|
private
string
|
$layout | 'Layout' |
#
the layout file name |
private
string
|
$header | null |
#
the header file name |
private
string
|
$view | 'Index' |
#
the view file name |
private
string
|
$footer | null |
#
the footer file name |
private
|
$request | null |
#
the request object |
private
stdClass
|
$viewData | null |
#
the data passed to the view |
private
boolean
|
$ajax | false |
#
is this an ajax file |
protected
|
$config | null |
#
the loaded and parsed configuration |
protected
string
|
$doctype |
|
#
the doctype of the site |


This page is a demonstration of the elements that can be formatted using Simple.css. Each section includes a code block on how to include it in your site’s design.
This may be a little basic for some people, but I wanted to barrier for entry to be as low as possible for this project.
Basic Typography
All the typography of Simple.css uses rem
for sizing. This means that accessibility is maintained for those who change their browser font size. The body
element has a size of 1.15rem
which makes all the standard font sizes slightly larger. This equates to 18.4px
for paragraph text, instead of the standard 16px
.
The heading elements also have an increased top margin in order to break blocks of text up better.
Heading 1 2.8rem
Heading 2 2.25rem
Heading 3 1.8rem
Heading 4 1.44rem
Heading 5 1.15rem
Heading 6 .92rem

This is a H2 header

This is some paragraph text.

Links & Buttons
Links are formatted very simply on Simple.css (shock horror). They use the accent
CSS variable and are underlined. There is a :hover
effect that removes the underline. Here is an example link.
Buttons use the same accent
CSS variable for their colour. When hovering, there is an opacity effect.
This is a hyperlink
<button>I'm a button</button>
Other typography elements
There are a number of other typography elements that you can use with Simple.css. Some of the common ones are:
- All the standard stuff, like bold, italic and underlined text.
- Highlighting text using the
mark
element. - Adding
inline code
using thecode
element. - Displaying keyboard commands like ALT+F4 using the
kbd
element.
Bold text
Italic text
Underlined text
Highlighted text
Inline code
Alt+F4
Lists
We all love a good list, right? I know my wife does!
- Item 1
- Item 2
- Item 3
- Do this thing
- Do that thing
- Do the other thing
# Bulleted list

Item 1

Item 2

Item 3

# Numbered list

Do this thing

Do that thing

Do the other thing

Blockquotes
Sometimes you may want to quote someone else in your HTML. For this we use the blockquote
element. Here’s what a quote looks like with Simple.css:
Friends don’t spy; true friendship is about privacy, too.
– Stephen King

Friends don’t spy; true friendship is about privacy, too.

– Stephen King

Code blocks
Code blocks are different from the inline code
element. Code blocks are used when you want to display a block of code, like this:
body {
color: var(--text);
background: var(--bg);
font-size: 1.15rem;
line-height: 1.5;
margin: 0;
}

body {
color: var(--text);
background: var(--bg);
font-size: 1.15rem;
line-height: 1.5;
margin: 0;
}

Navigation
The nav
menu is deliberately designed to be extremely simple so that you can improve on it as you see fit. Or, just leave it as is to have a good looking, functional navigation menu.
There’s no JavaScript of checkbox CSS hacks here. It’s just a collection of simple “buttons” that wrap to the given width of the page:
To add a nav
menu, just add the following to the
section of your site:

Home
About
Blog
Notes
Guestbook
Contact

Images
In Simple.css, images within the main
element are always full width and have rounded edges to them. The figcaption
element is also formatted in Simple.css. Here are examples of images with and without a caption:
Accordions
Accordions are cool to play with. They’re especially useful when it comes to things like FAQ pages. Many people invoke JavaScript, or div
for life when they use accordions. I don’t really understand why that is what it’s available in plain old HTML:
Spoiler alert!
You smell. 🙂

Spoiler alert!

You smell. 🙂

Tables
Like lists, sometimes you may need to add a table to your webpage. In Simple.css tables automatically highlight every other row to make reading easier. Table header text is also bold. Here’s what they look like:
| Name | Number |
|---|---|
| Jackie | 012345 |
| Lucy | 112346 |
| David | 493029 |
| Kerry | 395499 |
| Steve | 002458 |

Name
Number

Jackie
012345

Lucy
112346

David
493029

Kerry
395499

Steve
002458

Forms
Forms are useful for all kinds of things on webpages. Contact forms, newsletter sign ups etc. Forms also look pretty good on Simple.css:


Hailey Baldwin slays on solo Berlin trip after slamming Selena Gomez drama
Hailey Baldwin slayed in Berlin as she headed to a swish Calvin Klein party without husband Justin Bieber.
Despite the Sorry singer also appearing in a campaign for the brand alongside his wife, he was notably absent at the bash, held in the German capital.
Not that the model seemed too fussed, as she rocked up solo at Musikbrauerei in an off-the-shoulder, black and white top, paired with fitted dark skinny jeans.
The 22-year-old completed the look with a pair of the highest, deep red heels.
Hailey’s appearance comes after she was forced to hit back at claims she had shaded Justin’s ex, Selena Gomez, on Instagram.
Because we’re back in 2015, apparently.
It all kicked off when Selena released her new song, Lose You To Love Me, last month – with fans suggesting the bop was about her ex.
She can be heard singing about being ‘replaced’ in two months ‘like it was easy’, which some took as a dig at Justin, who got engaged to Kendall Jenner’s best friend last July, shortly after he broke things off with Selena.
Advertisement Advertisement
Soon after the song dropped, Stephen Baldwin’s daughter shared a screenshot to her Instagram page of the song I’ll Kill You, by Summer Walker.
Side note: A total banger.
But her Instagram antics put her directly in the firing line, with fans adamant she was throwing shade at Selena, threatening to ‘kill her’.
Yes, seriously.
Hailey soon hit back at all the drama and denied the accusations in a now-deleted comment, insisting: ‘Please stop with this nonsense… there is no “response”, this is complete BS.’
Discussing the emotional song, the Wolves singer told Radio Disney she never wants to be inauthentic.
‘I wrote this song over a year ago and it’s obviously a very emotional song for me but it’s interesting to see how far I’ve come from that point to now,’ she explained.

‘It’s one of those songs where I feel it’s out, it’s released, and I hope that girls and guys all over the world can feel supported. Because that’s a feeling everyone has felt.
Advertisement Advertisement
‘That was something that I needed to do for myself, regardless of what was going to come after.’
So, that’s that then.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Government Help
问题描述 :
As a logical consequence of their troubles, government comes to rescue them, preparing a set of financial "packages" that will be distributed between these two banks. However, there is one important condition: the packages will be given to the banks one by one and we need to minimize the difference between the amount given to both banks in any particular moment.Otherwise, one of the banks would gain a big advantage over the other.
For example, imagine that we have four packages with the values of 100 000, 110 000, 120 000, and 150 000. If we give the first package to the Bank A, then the second one to the Bank B, the third one to the Bank B, and the fourth package to the Bank A, the difference between the help provided to the banks will be +100 000 after the first package, -10 000 after the second one, -130 000 after the third one, and +20 000 after the last package. The maximal difference is therefore 130 000.
There is a better solution, with the maximal difference of 100 000 only: first, give 100 000 to the Bank A, then 120 000 to the Bank B, then 110 000 to the Bank A, and then 150 000 to the Bank B.
输入:
The last set will be followed by a line containing single zero.
输出:
The last set will be followed by a line containing single zero.
样例输入:
4<PHONE_NUMBER>00<PHONE_NUMBER>00 3<PHONE_NUMBER>00 100000 0
样例输出:
100000-A 120000-B 110000-A 150000-B 100000-B 100000-A 100000-A
先从简单的做起，归并排序，二叉树相关的遍历等
还是有些难度的！
第一句可以忽略不计了吧。从第二句开始分析，说明这个花色下的所有牌都会在其它里面出现，那么还剩下♠和♦。第三句，可以排除2和7，因为在两种花色里有。现在是第四句，因为♠还剩下多个，只有是♦B才能知道答案。
红绯鱼：
这模板神了
原来的主机不行，目前更换到了国内主机
为什么暴力求解方法循环到sqrt(n) 就可以了呢
不错，现在就缺少新的资料
第15行代码，/n/n，应该改为\n\n
程序是对的。有些地方用了C++的写法
97行缺一个分号
加了星号 (*) 表示跳过此数据不读入. 因为scanf是不读取本行回车的
全是智力分析的题
这是什么编译器啊，不通过
scanner改用StreamTokenizer就不超时了


Be aware of potential complications following tongue-tie surgery in babies
| Source: | University of Otago |
| Summary: | Complications following a procedure to treat tongue-tie in babies are occurring that can result in admission to hospital, something a paediatrician says needs to be better understood by both health practitioners and parents. |
Complications following a procedure to treat tongue-tie in babies are occurring that can result in admission to hospital, something a University of Otago paediatrician says needs to be better understood by both health practitioners and parents.
Paediatrician, Associate Professor Ben Wheeler, and his team of researchers from the New Zealand Paediatric Surveillance Unit recently undertook a survey which shows complications including breathing problems, pain, bleeding, weight loss and poor feeding occurred in babies following minor surgery for tongue-tie (ankyloglossia).
Tongue-tie is a condition in infants which can often interfere with successful breastfeeding. A simple procedure called frenotomy is used to treat the condition and is performed by a range of health practitioners including midwives, doctors and dentists. While traditionally it has been performed with scissors, there is a trend for the use of a laser.
"Many people think this is a simple and completely safe procedure, but we think families and healthcare providers considering this procedure should be fully informed that it can carry potential downsides as well as benefits," Associate Professor Wheeler explains.
"All surgery, even when minor, is not risk-free."
He is also concerned more infants are undergoing the procedure than necessary. "Potentially 10 to 20 per cent of all infants in New Zealand are having it done where, in fact, more like 3 per cent would actually benefit from it."
This is the first study internationally to report complications relating to tongue-tie procedures in babies and has just been published in the Australasian scientific journal, Journal of Paediatrics and Child Health.
Over a two year period up until July 2018, there were 23 notifications of complications relating to frenotomy in infants aged under one, from 17 paediatricians in New Zealand. Most related to poor feeding (44 per cent), respiratory events (25 per cent), bleeding and weight loss (both 19 per cent). While frenotomy rates in New Zealand are unknown, rates of up to 20 per cent of all babies born in some provinces have been reported. The researchers estimate about 20 out of every 100,000 babies born will suffer a complication related to the procedure.
Associate Professor Wheeler says the research showed complications following frenotomy are occurring that require assessment and admission by hospital-based paediatricians in New Zealand, with a significant geographical variation.
For example, one healthcare provider in Dunedin treated 414 babies (12 per cent of all babies born) in the Otago/Southland regions over one year, while in Canterbury where there are local evidence-based guidelines for referral, assessment and treatment of tongue-tie, frenotomy rates declined from 11.5 per to 3.6 per cent over a two-year period.
There is also an undue focus on a potential tongue-tie as a cause for poor feeding, which may cause undue delay in diagnosis and management of other potential causes of poor feeding, such as an underlying medical condition, Associate Professor Wheeler says.
"Respiratory complications such as apnoea (cessation of breathing) are also occurring following frenotomy in community settings that may not be equipped to deal with these."
The researchers concluded that practitioners conducting frenotomy need to be aware of the broad spectrum of potential complications that were encountered in this study, while parents and families need to be advised accordingly and steps taken to actively minise the risk of these complications occurring.
Centralised guidelines relating to referral, assessment and treatment such as those developed in Canterbury, together with specialist second opinions should be considered as the ideal model, Associate Professor Wheeler says.
make a difference: sponsored opportunity
Story Source:
Materials provided by University of Otago.
Note: Content may be edited for style and length.
Journal Reference:
- Matthew Hale, Nikki Mills, Liza Edmonds, Patrick Dawes, Nigel Dickson, David Barker, Benjamin J Wheeler. Complications following frenotomy for ankyloglossia: A 24‐month prospective New Zealand Paediatric Surveillance Unit study. Journal of Paediatrics and Child Health, 2019; DOI: 10.1111/jpc.14682
Cite This Page:
| MLA | University of Otago. "Be aware of potential complications following tongue-tie surgery in babies." ScienceDaily. ScienceDaily, 20 November 2019. <www.sciencedaily.com/releases/2019/11/191120121133.htm>. |
| APA | University of Otago. (2019, November 20). Be aware of potential complications following tongue-tie surgery in babies. ScienceDaily. Retrieved November 20, 2019 from www.sciencedaily.com/releases/2019/11/191120121133.htm |
| Chicago | University of Otago. "Be aware of potential complications following tongue-tie surgery in babies." ScienceDaily. www.sciencedaily.com/releases/2019/11/191120121133.htm (accessed November 20, 2019). |


Mortgage visualizer
Set the value of your home, down payment, and interest rate. The visualizer will show your monthly payment and the total cost of your loan. Notice the relationship between your loan amount and the total cost of the loan after interest.
The pie chart on the left shows the ratio of loan amount to interest paid if you pay your mortgage according to schedule. Over the life of the loan, you will pay the original $ principle, plus an additional $ in interest.
The chart on the right shows the advantage of paying extra each month. If you pay $100 each month, you'll save $ and pay back your loan in years.
The bar graph shows the composition of your payments in each year of the loan. In the beginning you pay much more interest than principal. As the term of the loan goes on the ratio inverts.
There are actually two canvases here, one for the pie charts and another for the bar graph.
Similar to our slider application, the SVG elements on this page are constantly being wiped clear, then redrawn with new coordinates. To begin, declare a couple <div>
sections and assert id's on them so that we can have canvases to work with.
In addition to the Raphaël JavaScript library of functions that help manipulate SVG elements, Raphaël also has a library dedicated to making graphs, called gRaphaël. The pie charts above are a result of this library.
The library and information can be downloaded and viewed at their website.
Pie Chart
To draw a pie chart using the gRaphaël library, download and include the following files into your webpage file:
- raphael.js
- g.raphael.js (12 Kb)
- g.pie.js
The standard pie chart is straightforward to set up. However, you can modify the g.pie.js file so that your chart has more features.
For example, one of our pie graphs' colors are translucent. In order to achieve this, a new attribute (opacity) needs to be added to the g.pie.js file. Specifically, line 56. Which is:
var p = this.path(opts.init ? ipath : path).attr({
fill: opts.colors && opts.colors[i] || this.g.colors[i] ||"#666",
stroke: opts.stroke || "#fff",
"stroke-width": (opts.strokewidth == null ? 1 : opts.strokewidth),
"stroke-linejoin": "round"
});
This bit of code determines which attributes the programmer can change via the function call. If we add an attribute for opacity to this list, we can then change the opacity of our pie chart when we draw it.
The modified code:
var p = this.path(opts.init ? ipath : path).attr({
fill: opts.colors && opts.colors[i] || this.g.colors[i] ||"#666",
stroke: opts.stroke || "#fff",
"stroke-width": (opts.strokewidth == null ? 1 : opts.strokewidth),
"stroke-linejoin": "round",
"fill-opacity":opts.opacity[i]
});
now, when we call the method, we can pass in values for opacity:
var myPie = pie.g.piechart(
X,
Y,
radius,
[principleAmount/total, interest/total],
{colors:[principleColor, interestColor],
opacity:[.4,.4]
}
);
Additionally, it was necessary to remove the sorting algorithm. The standard code for drawing this, automatically places the larger piece of the pie on the top, which was inconvenient for our purposes, since that meant the colors would suddenly switch, as numbers would recalculate. To remedy this, the method .sort()
had to be removed from the pie chart function. (Line 46-48).
The values of the principle and interest change on the charts as you vary the loan amount, down payment, interest rate, etc. The labels on the chart reflect those changes each time one of the above variables are changed.
Since the pie chart is being redrawn each time a new calculation occurs, this number change happens because a variable is passed into the declaration for the labels each time.
For example, instead of:
pie.text(xLocation, yLocation, "$25000");
We write:
pie.text(xLocation, yLocation, "$"+total);
So total
, a previously declared variable, will constantly update the number fields and be relevant, instead of passing just '$25000' which is a static number. As the page renders, the variable total
will be accurate each time.
Bar Graph
The bar graph is not a part of Raphaël's JavaScript library. The method to draw the bar graph involves a for-loop, which loops as many times as there are years. On each iteration of the for-loop, two rectangles are created (one for principle, one for interest). These rectangles are placed stacked vertically on the canvas, with about 2 pixels separating them.
A variable which holds the starting coordinates for the next newly created element is offset each time the loop iterates, so that eventually the rectangles takes on a familiar image of a bar graph, and it's evident what's happening throughout the years of your loan.
The last caveat of this bar graph is its ability to be contained in a fixed area. To achieve this, before working with the principle amount and interest amount numbers, you must divide them by the desired height of your graph, then pass those quotients into the .rect()
method as heights. Similarly, you must divide the number of years by the desired length of your fixed graph (and pass that quotient into the length of your .rect()
method ), since the rectangle sizes are direct reflections of those numbers.


| Statistic | Value |
| Armor Class | (53 to 57) + dexterity bonus |
| Attack | +30/+25/+20/+15 + strength bonus |
| Charisma | -2 |
| Constitution | +15 |
| Damage | 1d8 + 10 + strength bonus |
| Damage Reduction | 6/- |
| Dexterity | ??? |
| Fortitude Save | +19 + constitution bonus |
| HP | 10d10 + 10d12 + 3 + HP from constitution |
| Intelligence | ??? |
| Reflex Save | +11 + dexterity bonus |
| Spell Resistance | 21 |
| Strength | +6 |
| Will Save | +15 + wisdom bonus |
| Wisdom | ??? |
| Item Slot | Item |
| Armor | +5 Dwarven Plate |
| Back | +5 Cloak of Resistance |
| Belt | +6 Belt of Giant Strength |
| Boots | Boots of Teleportation |
| Eyes | ??? |
| Head | Helm of Underwater Action |
| Neck | +6 Amulet of Health |
| Other | Pink Ioun Stone |
| Ring1 | +5 Ring of Protection |
| Ring2 | +5 Ring of Protection |
| Robe | Mantle of Spell Resistance |
| Shield | +5 Adamantine Shield |
| Shirt | ??? |
| Weapon | +4 Defending Adamantine Battleaxe |
| Wrists | +8 Bracers of Armor |
| Level Total | Level Class | Feats | Skills | Attributes |
| 1 | Fighter 0->1 | Endurance, Improved Toughness | +(2 + int bonus) x 4 | |
| 2 | Fighter 1->2 | Dodge | +2 + int bonus | |
| 3 | Fighter 2->3 | Toughness | +2 + int bonus | |
| 4 | Fighter 3->4 | {Fighter Feat} | +2 + int bonus | +1 Con |
| 5 | Fighter 4->5 | +2 + int bonus | ||
| 6 | Fighter 5->6 | {Feat}, {Fighter Feat} | +2 + int bonus | |
| 7 | Fighter 6->7 | +2 + int bonus | ||
| 8 | Dwarven Defender 0->1 | +2 + int bonus | +1 Con | |
| 9 | Dwarven Defender 1->2 | {Feat} | +2 + int bonus | |
| 10 | Dwarven Defender 2->3 | +2 + int bonus | ||
| 11 | Dwarven Defender 3->4 | +2 + int bonus | ||
| 12 | Dwarven Defender 4->5 | {Feat} | +2 + int bonus | +1 Con |
| 13 | Dwarven Defender 5->6 | +2 + int bonus | ||
| 14 | Dwarven Defender 6->7 | +2 + int bonus | ||
| 15 | Dwarven Defender 7->8 | {Feat} | +2 + int bonus | |
| 16 | Dwarven Defender 8->9 | +2 + int bonus | +1 Con | |
| 17 | Dwarven Defender 9->10 | +2 + int bonus | ||
| 18 | Fighter 7->8 | {Feat}, {Fighter Feat} | +2 + int bonus | |
| 19 | Fighter 8->9 | +2 + int bonus | ||
| 20 | Fighter 9->10 | {Fighter Feat} | +2 + int bonus | +1 Con |


Godwin Ebikwo is a developer
who designs, develops
websites & mobile apps.
Available for freelance or full-time work


Question
Given an unsorted array of length N, a slice is defined as a pair of numbers (P, Q) so that:
- 0 <= P < Q <= N
- A[P], A[P+1]….A[Q] is arithmetic sequence
Example:
input = { -1, 1, 3, 3, 3, 2, 1, 0 }
Output 5 because there’re slices:
(0, 2) (2, 4) (4, 6) (4, 7) (5, 7)
Solution
- count the length of arithmetic (countinuous) sequence
- form some slices
- proceed from the end of that sequence, till the end.
Code
public int solve(int[] input) {
int len = input.length;
int p = 0;
int totalSlices = 0;
while (p + 1 < len) {
// check if there is a arithmetic sequence starting at p
// note that p is NOT the last element.
int diff = input[p + 1] - input[p];
int q = p + 1;
// starting from q, check arithmetic difference
while (q < len) {
if (input[q] - input[q - 1] == diff) {
q++;
} else {
break;
}
}
// so, the range [p, q-1] is a arithmetic sequence.
int seqLength = q - p;
if (seqLength >= 3) {
totalSlices += getSlicesCountFromArithmeticSeq(seqLength);
}
// update p (skip the range [p, q-1])
p = q - 1;
}
return totalSlices;
}
private int getSlicesCountFromArithmeticSeq(int k) {
// choose 2 from (k - 1)
return (k - 1) * (k - 2) / 2;
}


Auto deploying to multiple servers with GitHub and Webhooks
In yesterdays post, i mentioned that i wanted to try get an auto deploy working for this site. It already builds automagically using Forestry and puts the static HTML into a Github repo, but i needed to manually update the servers hosting the site… Well, not any more!
using the magic of Github’s Web hooks, the Webhook project and a small piece of bash shell script, i have managed to get this auto deploying…
First, Download the Webhook project (its a Go application, so it works pretty much anywhere). Copy it somewhere on your machine. Next, you need a config. I used the Github sample config from the project site and made tweaks to what script to run and what i was passing in.
next, the script to pull from Github was simple enough:
The repo should already be cloned into the folder, /var/www/localfolder
and your web server should be pointing at that also. Then, its just a matter of running the command:
./webhook --hooks github.json --verbose
The --verbose
tag gives you lots of info, so its handy for testing. and then your app is running and listening on the default port, 9000.
next, head over to your project on Github and go to settings:
select webhooks and add new web hook
Fill in the required details on the page, and click save.
Github will go out and have a chat with the webhook and verify it can send and recieve stuff from the hook. You can see this in the deliveries section:
Clicking on these will show you the headers that were sent, along with the payload, and you can also see the response from your server. Finally, you have the option of resending the payload, just in case anything goes wrong.
So, there you have it.  Any questions, leave a comment below!
[UPDATE] yesterday i mentioned i had to modify the sample that was included on the webhook site. Well, i noticed something this morning. The reason i needed it modified was the trigger rule was checking the header and the reference for the branch, but any time i ran it, it would not trigger… The reason was simple: the webhook app is expecting application/json
but i had it set to application/x-www-form-urlencoded
which is the default… the webhook app then couldn’t parse it correctly… changing that fixes the problem! happy days!
was last updated: July 5, 2019: fixing all aliases and build issues (41ef786). Found an issue? Improve this page
About
homepage of Tiernan OToole, Geek, photographer, GeekPhotographer, and lazy git.
Recent Posts
- Fixing CID (Caller ID) on incoming calls with 3CX
- Posts
- Network Update Info April 2019
- Adding a Netgear LB2120 to the homelab
- Finally going all in on VoIP
- Auto deploying to multiple servers with GitHub and Webhooks
- Moving the site to Hugo
- Playing with AMD’s Epyc
- AS204994, Own IP Space and Anycast
- Blogging on an iPad Pro


A Large-scale Video Text Dataset
DAVAR LAB
[Download (Please email us [See Contact])]
Introduction
Here, we release a large-scale video text dataset named LSVTD. In recent years, research in video scene text still remains unpopular in contrast to its promising application prospect. The existing video scene text datasets are limited on the scale of video items and scenarios, which may restrain research of video scene text spotting. Then we collect and annotate LSVTD, which contains 129 scene videos acquired from 21 typical real-life scenarios.
The dataset contains 129 video clips (ranging from several seconds to over 1 minutes long) from 21 real-life scenes. It was extended on the basis of LSVTD dataset by addding 15 videos for 'harbor surveillance' scenario and 14 videos for 'train watch' scenario, for the purpose of solving video text spotting problem in industrial transportation applications.
LSVTD mainly characterized is described in detail as follows:
Dataset released
Contact
If you have any questions about the dataset, please contact Jing Lu or Zhanzhan Cheng<EMAIL_ADDRESS>or 11821104@zju.edu.cn).
Terms of Use
Change Log
Recommended Citation
If you find this dataset is helpful to your research, please feel free to cite us:@inproceedings{cheng2019you, title={You Only Recognize Once: Towards Fast Video Text Spotting}, author={Cheng, Zhanzhan and Lu, Jing and Niu, Yi and Pu, Shiliang and Wu, Fei and Zhou, Shuigeng}, booktitle={Proceedings of the 27th ACM International Conference on Multimedia}, pages={855–863}, year={2019}, organization={ACM} } }


Order the girls below with your winner as #1 and your first elimination as #14. Then bookmark this page and come back after each episode for your updated score.
Points so far:
Link to this bracket:
Bookmark this link, send it to friends or post it somewhere public as proof of your picks. The new score will be available to view at this page after each show.
The Rules
If you guess a contestant's place in the rankings correctly, you get 13 points. If your guess is off by one, you get 12 points, and so on.
We expect the winner to be selected from a top three, which is why there are two second places.
By the way, there is no central database of scores. So we won’t be crowning a winner, baby.


--- title: 02 - Sad Plot Made Better author: Saundra Schlesinger date: '2018-06-10' slug: 02-sad-plot-made-better categories: - R tags: [] description: Desc hacker_news_id: '' lobsters_id: '' meta_img: /images/image.jpg ---
CHALLENGE #3
#Read in new dataset, post-1981 males only with post-IFOCE TRUE/FALSE column
hdm_affil <- read_csv(("https://gist.githubusercontent.com/sschlesinger/3a846e9f56eb6603471cce60181ac2c8/raw/3a2e4039f5bf958344ce5a8db97a72576624c57a/hot_dog_contest_with_affiliation.csv"),
col_types = cols(
affiliated = col_factor(levels = NULL),
gender = col_factor(levels = NULL)
)) %>%
mutate(post_ifoce = year >= 1997) %>%
filter(year >= 1981 & gender == "male")
glimpse(hdm_affil)
## Observations: 37
## Variables: 6
## $ year <int> 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 200...
## $ gender <fct> male, male, male, male, male, male, male, male, mal...
## $ name <chr> "Joey Chestnut", "Joey Chestnut", "Matthew Stonie",...
## $ num_eaten <dbl> 72.000, 70.000, 62.000, 61.000, 69.000, 68.000, 62....
## $ affiliated <fct> current, current, current, current, current, curren...
## $ post_ifoce <lgl> TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRU...
CHALLENGE #4
#Use dplyr::distinct to figure out how many unique values there are of affiliated.
#Use dplyr::count to count the number of rows for each unique value of affiliated; use ?count to figure out how to sort the counts in descending order.
hdm_affil %>%
distinct(affiliated)
## # A tibble: 3 x 1
## affiliated
## <fct>
## 1 current
## 2 former
## 3 not affiliated
hdm_affil %>%
count(affiliated, sort=TRUE)
## # A tibble: 3 x 2
## affiliated n
## <fct> <int>
## 1 not affiliated 20
## 2 current 11
## 3 former 6
CHALLENGE #5
#Update the colors using hex colors: c('#E9602B','#2277A0','#CCB683').
#Change the legend title to "IFOCE-affiliation".
#Save this plot object as "affil_plot".
affil_plot<- ggplot(hdm_affil, aes(x = year, y = num_eaten, fill=affiliated)) + #fill by IFOCE status
geom_col(colour = "white") + #make all columns outlined in white
labs(title = "Nathan's Hot Dog Eating Contest Results, 1981-2017", x = "Year", y = "Hot Dogs and Buns Consumed")+
scale_fill_manual(values=c("#E9602B", "#2277A0", "#CCB683"), name="IFOCE-affiliation") #change colors and legend title
FINAL FREE-FOR-ALL PLOT
Get female data
hdm_females <- read_csv(("https://gist.githubusercontent.com/sschlesinger/3a846e9f56eb6603471cce60181ac2c8/raw/3a2e4039f5bf958344ce5a8db97a72576624c57a/hot_dog_contest_with_affiliation.csv"),
col_types = cols(
affiliated = col_factor(levels = NULL),
gender = col_factor(levels = NULL)
)) %>%
mutate(post_ifoce = year >= 1997) %>%
filter(year >= 1981 & gender == "female")
affil_plot +
geom_col(data = hdm_females, width =0.75, fill = "#92ebb1") + #add in female data
annotate('text', x = 2018.3, y = 39, label="*", size = 6) +
labs(caption = "* From 2011 on, separate Men's and Women's prizes have been awarded. \n All female champions to date have been MLE/IFOCE-affiliated.") + #add caption
annotate('text', x=1992, y=55.5, label="Kobayashi revolutionizes the game with novel technique, \nleading to a doubling of the previous year's best", size = 3, color="#d95f02") +
scale_y_continuous(expand = c(0, 0), breaks = seq(0, 80, 10)) +
scale_x_continuous(expand = c(0, 0))+
coord_cartesian(xlim=c(1980,2019), ylim=c(0,80)) +
theme(plot.title = element_text(hjust = 0.5), #center title
text=element_text(family="Verdana"),
axis.text = element_text(size = 10), #set axis font size
panel.background = element_blank(), #remove grey background
panel.grid.major.y = element_line(color = "gray95"), #adds back in major gridlines
panel.border = element_rect(color = "gray80", fill = NA), #creates a border around plot
axis.line.x = element_line(color = "gray80", size = 0.5), #change size and color of tick marks on x-axis
axis.ticks = element_line(color = "gray80", size = 0.5), #change size and color of tick marks on y-axis
legend.background = element_rect(colour = "gray80", fill = "white", size = 0.25, linetype='solid')) +
scale_fill_manual(values=c("#1b9e77", "#d95f02", "#7570b3"), name="IFOCE-affiliation", guide = guide_legend(reverse = TRUE)) #change bar colors and legend order to match appearance order in graph
## Scale for 'fill' is already present. Adding another scale for 'fill',
## which will replace the existing scale.
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x
## $y, : font family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x
## $y, : font family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x
## $y, : font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
Type of graph: This is a bar graph.
Description of data: These data were from a list of hot dog eating champions, including related data (like year and number eaten). Also included were gender and IFOCE-affiliation status.
Description of audience: This would be a person interested in the history of hot-dog eating competitions and those interested in Takeru Kobayashi’s history in the game.
Representation Description: I am trying to show how dramatically the winning number of hotdogs has increased over time, particularly with the introduction of Takeru Kobayashi to the game.
How to read it & What to look for: Pay attention to the dramatic difference in 2000. Also pay attention to the number of hot dogs female winners consume versus male competitors.
Presentation tips: The colors are categorical because although affiliation does have a some ordinality, I did not feel that ordinality needed to be highlighted. The scale is linear so it is easy to appreciate the dramatic differences in winner consumption.
Variations and alternatives: An alternative would be a line graph. I feel a bar graph better highlights the amounts, whereas a line graph better highlights the changes over time.
Methods: For this graph, I pulled all the male and female data and plotted based on how much the winner ate each year. I also colored by IFOCE affliation. Finally I added some annotation to add additional context to the graph.


Numcipher
Home
(current)
Your results
You have not encipherd/deciphered a message yet.
Encipher
Decipher
Message
Submit
Clear


Elevation is an add-on utility of PrimeFlex and used to specify the separation between surfaces and elements along the z-axis.
Elevation is added to an element using the .p-shadow-{level} class.
There are 24 depths available varying from 1 to 24.
PrimeFlex.


Welcome to the newly minted Pinellas911.co! Try it on your Android (Add to Home Screen) or iPhone. Old site is still accessible (for now) go to lachesis.pinellas911.co.
Active Incidents {{getPublishedCount 'ActiveIncidents'}}
{{#each incidents}} {{> incidentItem}} {{/each}}
{{> incidentMap}}
Active Users {{getPublishedCount 'ActiveUsers'}}
Incidents Today
{{getPublishedCount 'getIncidentsToday'}}
Active Incidents
{{getPublishedCount 'ActiveIncidents'}}
Working on the history feed to put here... You see this cause you have a big screen!


This website has been blocked temporarily because of the following reason(s):
You think this domain is incorrectly categorized?


ESTIMATED POPULATION STRUCTURE IN THE YEAR 2040
By: DTT
Projected population based on gender and age (2015-2040)
Projected population based on age group (2015-2040)
Projected working and non-working population in 2040
Projected population based on states in 2040
Population ranking based on states
* All values per thousand


Delicious
The best food blog on the web
Chocolate Pizza
POSTED ON 15 DEC 2013/DESSERTS
PRINT
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
1 1/2 cups milk
1/2 mascarpone
1/2 tsp pink salt
1 lb black mission figs
1/2 cup brown sugars
2-4 tbsp water
1 1/2 cups heavy cream
1/3 granulated sugar
2 egg yolks
1 lemon, juiced
2 tbsp butter
1 cup honey roasted peacans, roughly chopped


References
ArqDummyNode
Renames and re-exports DummyNode
ArquintOperator
Renames and re-exports Operator
SugiDummyNode
Renames and re-exports DummyNode
arqcoordSpread
Renames and re-exports spread
columnAdjacent
Renames and re-exports adjacent
columnCenter
Renames and re-exports center
columnComplex
Renames and re-exports complex
columnLeft
Renames and re-exports left
coordCenter
Renames and re-exports center
coordGreedy
Renames and re-exports greedy
coordMinCurve
Renames and re-exports minCurve
coordQuad
Renames and re-exports quad
coordVert
Renames and re-exports quad
dagConnect
Renames and re-exports connect
dagHierarchy
Renames and re-exports hierarchy
dagStratify
Renames and re-exports stratify
decrossOpt
Renames and re-exports opt
decrossTwoLayer
Renames and re-exports twoLayer
layeringSimplex
Renames and re-exports simplex
twolayerMean
Renames and re-exports mean
twolayerMedian
Renames and re-exports median
twolayerOpt
Renames and re-exports opt
This file contains all of the exports that make it into the pure javascript flat structure.


PIZZERIA EPICODUS
Create your perfect pizza. Let's begin!
Please enter your name:
What is the size of your pizza?
Small 8" for $9
Medium 12" for $13
Large 16" for $17
Please select the toppings that you would like on your pizza ($2 per topping)
Mozzarella Cheese
Pepperoni
Green Pepper
Black Olives
Mushrooms
Fresh Onions
Italian Sausage.
Canadian Bacon
Anchovies.
Gimme my pizza!
Order Confirmation
Thank you for your order!
, you ordered:
Your total cost is: $
.


Across 1. Empty Apartment (4) 4. Soft grass (maybe edible) covers a side (10) 9. A regular beet / devil's tongue cooked ain't no good to taste, for example (6,9) 10. Alternative fuel vehicle goes ahead extremely laboriously and cautiously (9) 12. Pick second vehicle, not the Audi at the front but the SUV from the middle (5) 15. A dress fits evenly and looks like a dream? (6) 16. Guide and preach on reforms (8) 17. Say, shoes exchange counter (8) 18. Not acceptable to sing-along around bar - that would be a way to fight? (6) 20. Fresh crackers - not one is broken (5) 23. Work upon grim areas to form ties (9) 24. Perhaps, a half and a quarter of oral anti-inflammatory pain killers (8,7) 25. Shocked by the first lapse on flip side (10) 26. Corner retreat full of odd lime trees (4) Down 2. Animal suit model took off for party top (7) 3. Sharp tools to stab evil Ken, perhaps (5,6) 4. Peter on vacation, rose hurriedly on receiving dog's signals (10) 5. Spirit of a company besieged by an issue (5) 6. A temple perhaps, found in central Mugello (Tuscany) (5) 7. Quietly stripped varnish spread on alloy (5) 8. Menial worker should be Brown, perhaps says Spooner (7) 11. A navy bordered lace used to design a kind of butterfly (7) 13. The introductory note given before a tour? (3,8) 14. Stage set for second base (10) 17. Twisted laughter, a backstabber's hidden act (7) 19. Principle of other variable measurement (7) 21. Cover up in winters (5) 22. City of Tokyo remodelled (5) 23. Highways seen outside a metropolis (5)


First, we need to be clear about what data is being queried. SPARQL queries RDF graphs. An RDF graph is a set of triples (Jena calls RDF graphs "models" and triples "statements" because that is what they were called at the time the Jena API was first designed).
It is important to realize that it is the triples that matter, not the serialization. The serialization is just a way to write the triples down. RDF/XML is the W3C recommendation but it can difficult to see the triples in this serialized becuae ethere are multiple ways to encode the same graph. In this tutorial, we use a more "triple-like" serialization, called Turtle (see also N3 languea described in the W3C semantic web primer).
We will start with the simple data in vc-db-1.rdf: this file contains RDF for a number of vCard descriptions of people. vCards are described in RFC2426 and the RDF translation is described in the W3C note "Representing vCard Objects in RDF/XML". Our example database just contains some name information.
Graphically, the data looks like (click to enlarge):
In triples, this might look like:
@prefix vCard: <http://www.w3.org/2001/vcard-rdf/3.0#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix : <#> . <http://somewhere/MattJones/> vCard:FN "Matt Jones" ; vCard:N [ vCard:Family "Jones" ; vCard:Given "Matthew" ] . <http://somewhere/RebeccaSmith/> vCard:FN "Becky Smith" ; vCard:N [ vCard:Family "Smith" ; vCard:Given "Rebecca" ] . <http://somewhere/JohnSmith/> vCard:FN "John Smith" ; vCard:N [ vCard:Family "Smith" ; vCard:Given "John" ] . <http://somewhere/SarahJones/> vCard:FN "Sarah Jones" ; vCard:N [ vCard:Family "Jones" ; vCard:Given "Sarah" ] .
or even more explicitly as triples:
@prefix vCard: <http://www.w3.org/2001/vcard-rdf/3.0#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . <http://somewhere/MattJones/> vCard:FN "Matt Jones" . <http://somewhere/MattJones/> vCard:N _:b0 . _:b0 vCard:Family "Jones" . _:b0 vCard:Given "Matthew" . <http://somewhere/RebeccaSmith/> vCard:FN "Becky Smith" . <http://somewhere/RebeccaSmith/> vCard:N _:b1 . _:b1 vCard:Family "Smith" . _:b1 vCard:Given "Rebecca" . <http://somewhere/JohnSmith/> vCard:FN "John Smith" . <http://somewhere/JohnSmith/> vCard:N _:b2 . _:b2 vCard:Family "Smith" . _:b2 vCard:Given "John" . <http://somewhere/SarahJones/> vCard:FN "Sarah Jones" . <http://somewhere/SarahJones/> vCard:N _:b3 . _:b3 vCard:Family "Jones" . _:b3 vCard:Given "Sarah" .
It is important to realize that these are the same RDF graph and that the triples in the graph are in no particular order. They are just written in related groups above for the human reader - the machine does not care.


The samp element is used to define sample output from a computer program.
Message from my computer:
File not found.Press F1 to continue


Transport Directory contains all the details like name, contact
number and addresses of all the transporters of the each city. Every
transporter has transport directory by which he is able to fulfil
the requirement of trucks or part load of his client. By using our
transport directory, transporter gets all the contact information of
every transporter of his city. Our company provides all the contact
information of transporters in a separate book which is
professionally printed and distributed among transporters.
Types of directories we provide :
Booking Companies Directory
Truck Supplier (Fleet Owners) Directory
Broker & Commission Agents Directory
Contact Us To Buy The Directory Book
If you are running a transport business, our transport directory
will help you to increase your network with other transporters.
Due To High Demand Price Are Going To Be Increased After 31st
March 2020.


Are you living in Thailand? Planning a trip to Thailand and want to arrange to meet some friends before you set off? ThaiLoveFinder has thousands of active members, whether you're seeking friendship or love our community will give you a big welcome!
We're not what you would consider a dating agency. Our service is aimed at creating interactions among our members. We let you choose to interact with - we do try to provide you with relevant matches however nobodies perfect so the control is ultimately in your hands!
Our platform is free, you can chat, comment, like, love and interact with other members freely without any restrictions. We do also provide premium features that give you wider coverage on our website and makes it more likely to meet other members. This isn't required and you're welcome to use our service for free, forever!


{% extends "base.html" %} {% block contents %}
This page provides access to the network devices available for auditing. Select the device(s) to be audited by IP Address or TBD.
{% if ip_address_list %}No entries are available.
{% endif %} {% endblock %}


Samplyr is a npm package for generating data, you can verify generate objects and arrays. It can define types, if a string or array includes something and much more, creator: arze website arze.io
Samplyr
Easily generate data in node.js
444 Downloads and counting
new
Samplyr
.gen({
type: "array",
options: {
amount: 5
},
data: Math.random
})


interface CryptoServiceTestSupport
The optional interface which can be implemented to clear up the HSM when running TCK tests.
delete |
Deletes the key corresponding to the input alias. This method doesn't throw if the alias is not found. abstract fun delete(alias: String): Unit |


Information on Apple's One Year Limited Warranty is available at www.apple.com/legal/warranty. The version of Apple's One Year Limited Warranty that was originally delivered with your product is the warranty applicable to your product.


Using PhyloPen
Test the functionality of PhyloPen
Obtain a Tree from Open Tree of Life
You can use web services to obtain a phylogeny as part of an Arbor workflow
Introduction to a New Arbor Interface
Use a new interface for Arbor apps.
Kembel Biodiversity Workflow
Use R package 'picante' to explore and analyze community data
Spider
Use R package 'spider' to analyze species delimitation
Web services 2
You can use web services to obtain data as part of an Arbor workflow
Creating new collections and functions
How to make your own collection of Arbor functions and workflows
Using the Arbor webapp
Basics on using the webapp to build workflows
Timetrees
You can time-scale phylogenetic trees with Arbor
Megaphylogenies
You can analyze very large phylogenetic trees using Arbor
Web services 1
You can use web services to obtain data as part of an Arbor workflow
Arbor apps
Arbor apps let you do comparative methods using drag-and-drop
PGLS
Use PGLS to test for a correlation between two continuous variables
Continuous ancestral character states
How to build a workflow that can reconstruct continuous ancestral character states on nodes in your tree using Arbor
Discrete ancestral character states
How to reconstruct discrete ancestral character states on nodes in your tree using Arbor
Creating a new collection
How to make your own collection of Arbor functions and workflows
Using the Arbor webapp
Basics on using the webapp to build workflows
What is Arbor?
An introduction to our workflow software


In January, Presidential Candidate Donald Trump and Fox News had a falling out around Trump’s decision not to appear at a Presidential Debate. The candidate had polled his Twitter followers prior to the debate to determine whether he should attend. Feeling snubbed, a Fox spokeswoman said the following: “a nefarious source tells us that Trump has his own secret plan to replace the Cabinet with his Twitter followers to see if he should even go to those meetings.”
Twitter Cabinet gathers data on the Twitter followers of the presidential candidates Bernie Sanders, Donald Trump, Hillary Clinton, and Ted Cruz in order to determine how they feel about key political issues relevant to the presidential race. By doing this, we hope to attain a representative sample of each network’s ideas and political leanings.
First, the app scrapes the most recent tweets from each of the candidates’ followers. These tweets are then tagged with topics that are related to election. Once the tweets have been sorted by topics, the app runs the tweets through a sentiment analysis engine. With this data, we provide to a nice visualization allowing you to explore the different topic areas and easily compare the sentiment of each candidate’s followers.
This work was done as part of a class assignment for Georgia Tech's CS4464/6465 Fall 2016 (https://github.com/jacobeisenstein/gt-compj-class/). The opinions expressed here, if any, are solely those of the students working on this assignment and not of the Instructor or Georgia Tech.


ADAPt
Automobile Data science Artificial Intelligence Platform
A Project by Team ADAPt
ADAPt
Platform to share AI software modules in cars
Make AI technology and datasets accessible to a broader audience
Meet the stakeholders
Name: Franziska Fahrer
Occupation: Student
Age: 20
Role: Customer
Five years later...
Name: Franziska Fahrer
Occupation:
Student
Engineer
Age:
20
25
Role: Customer with additional need
Name: Dave
Occupation: Salesman for Supremacy Motors
Age: 38
Role: OEM
Name: Steve Smart
Occupation: Data Scientist
Age: 27
Role: AI developer
Standardized programming interface for OEMs and AI developers
Compatibility database to match car models and software modules
Interface for AI training data
Benefits
Customer (Franziska)
Easy access to additional car software module
Remote module maintenance
Dynamic composition of car modules
Is offered the top rated module for their needs
OEM (Dave)
Can sell additional features to customers after the sale
Find all compatible software solutions for the customer's requirement
Find the best software solution for each customer need
AI developer (Steve)
Paid on commission
Access to real customer data for AI models
Access to data concerning OEM needs
Distribution of software solutions to large customer base
ADAPt owner
Paid on commission
Driver of innovation
Able to define standards in automobile AI
Empowers autonomous driving industry
Sell certificates for hardware
Future possibilities and questions
Legal responsibility in case of damages
Validation and ranking of AI modules
How to involve end-customer feedback?
Introducing standards for
Datasets
Car descriptions
AI model descriptions
Implementation of AI modules
Image Sources
CollegeDegrees360 @ Flickr.com
stocksnap.io
Alper Çuğun @ Flickr.com


|
Bomberman
1.0
|
Header file of the bombs logic. More...
Go to the source code of this file.
Data Structures | |
| struct | bomb_t |
| structure representing a bomb. More... | |
| struct | bomb_node_t |
| A linked list node for bombs. More... | |
Typedefs | |
| typedef struct TMap | TMap |
| typedef enum bomb_status_t | bomb_status_t |
| Constants of the possible status when a player try to drop a bomb. More... | |
| typedef enum bomb_reason_t | bomb_reason_t |
| Constants of the possible reason when the drop of a bomb have failed. More... | |
| typedef enum bomb_type_t | bomb_type_t |
| Constants of the types of bombs available. More... | |
| typedef struct bomb_t | bomb_t |
| structure representing a bomb. More... | |
| typedef struct bomb_node_t | bomb_node_t |
| A linked list node for bombs. More... | |
Enumerations | |
| enum | bomb_status_t { BOMB_POSED, BOMB_CANCELED } |
| Constants of the possible status when a player try to drop a bomb. More... | |
| enum | bomb_reason_t { ALREADY_ITEM, NO_MORE_CAPACITY, INTERNAL_ERROR, NO_REASON } |
| Constants of the possible reason when the drop of a bomb have failed. More... | |
| enum | bomb_type_t { CLASSIC } |
| Constants of the types of bombs available. More... | |
Functions | |
| void | add_bomb (bomb_node_t **bombs_head, bomb_t *bomb) |
| Method for adding a bomb to a bomb linked list. More... | |
| void | remove_bomb (bomb_node_t **bombs_head, bomb_t *bomb) |
| Method for deleting a bomb from a bomb linked list. More... | |
| void | do_bomb_logic (TMap *map, bomb_t *bomb, TServer *server) |
| Call the logic function corresponding to the bomb type. More... | |
Header file of the bombs logic.
All methods for bombs logic are here.
| typedef struct bomb_node_t bomb_node_t |
A linked list node for bombs.
bomb_node_t is an linked list node for stock bombs objects.
| typedef enum bomb_reason_t bomb_reason_t |
Constants of the possible reason when the drop of a bomb have failed.
bomb_reason_t is a series of predefined constants for the different possible reason when the drop of a bomb have failed
| typedef enum bomb_status_t bomb_status_t |
Constants of the possible status when a player try to drop a bomb.
bomb_status_t is a series of predefined constants for the different possible status when a player try to drop a bomb.
structure representing a bomb.
bomb_t is an object representing a bomb.
| typedef enum bomb_type_t bomb_type_t |
Constants of the types of bombs available.
TButton_State is a series of predefined constants for the different types of bombs available.
| enum bomb_reason_t |
Constants of the possible reason when the drop of a bomb have failed.
bomb_reason_t is a series of predefined constants for the different possible reason when the drop of a bomb have failed
| Enumerator | |
|---|---|
| ALREADY_ITEM | A bomb or extra is already here. |
| NO_MORE_CAPACITY | The player has no more bombs left. |
| INTERNAL_ERROR | An internal error occured. |
| NO_REASON | Reason given if bomb has been drop. |
| enum bomb_status_t |
| enum bomb_type_t |
| void add_bomb | ( | bomb_node_t ** | bombs_head, |
| bomb_t * | bomb | ||
| ) |
Method for adding a bomb to a bomb linked list.
| bombs_head | A pointer to the linked list. |
| bomb | The bomb to add. |
Call the logic function corresponding to the bomb type.
| map | A pointer to the game map. |
| bomb | A pointer to the bomb. |
| server | A pointer to the network server. |
| void remove_bomb | ( | bomb_node_t ** | bombs_head, |
| bomb_t * | bomb | ||
| ) |
Method for deleting a bomb from a bomb linked list.
| bombs_head | A pointer to the linked list. |
| bomb | The bomb to delete. |


2 references to s_NULL
Microsoft.PowerShell.CoreCLR.Eventing (2)
DotNetCode\Eventing\UnsafeNativeMethods.cs (2)
90
UnsafeNativeMethods.
s_NULL
, errorCode, 0, sb, sb.Capacity, UnsafeNativeMethods.
s_NULL
);


Remarks on Adaptation and Typecasting¶
Both PostgreSQL and Python have the concept of data types, but there are of course differences between the two type systems. Therefore PyGreSQL needs to adapt Python objects to the representation required by PostgreSQL when passing values as query parameters, and it needs to typecast the representation of PostgreSQL data types returned by database queries to Python objects. Here are some explanations about how this works in detail in case you want to better understand or change the default behavior of PyGreSQL.
Supported data types¶
The following automatic data type conversions are supported by PyGreSQL out of the box. If you need other automatic type conversions or want to change the default conversions, you can achieve this by using the methods explained in the next two sections.
| PostgreSQL | Python |
|---|---|
| char, bpchar, name, text, varchar | str |
| bool | bool |
| bytea | bytes |
| int2, int4, int8, oid, serial | int [1] |
| int2vector | list of int |
| float4, float8 | float |
| numeric, money | Decimal |
| date | datetime.date |
| time, timetz | datetime.time |
| timestamp, timestamptz | datetime.datetime |
| interval | datetime.timedelta |
| hstore | dict |
| json, jsonb | list or dict |
| uuid | uuid.UUID |
| array | list |
| record | tuple |
Note
Elements of arrays and records will also be converted accordingly.
| [1] | int8 is converted to long in Python 2 |
Adaptation of parameters¶
When you use the higher level methods of the classic pg
module like
DB.insert()
or DB.update()
, you don’t need to care about
adaptation of parameters, since all of this is happening automatically behind
the scenes. You only need to consider this issue when creating SQL commands
manually and sending them to the database using the DB.query()
method.
Imagine you have created a user login form that stores the login name as login and the password as passwd and you now want to get the user data for that user. You may be tempted to execute a query like this:
>>> db = pg.DB(...)
>>> sql = "SELECT * FROM user_table WHERE login = '%s' AND passwd = '%s'"
>>> db.query(sql % (login, passwd)).getresult()[0]
This seems to work at a first glance, but you will notice an error as soon as
you try to use a login name containing a single quote. Even worse, this error
can be exploited through a so called “SQL injection”, where an attacker inserts
malicious SQL statements into the query that you never intended to be executed.
For instance, with a login name something like ' OR ''='
the user could
easily log in and see the user data of another user in the database.
One solution for this problem would be to clean your input from “dangerous”
characters like the single quote, but this is tedious and it is likely that
you overlook something or break the application e.g. for users with names
like “D’Arcy”. A better solution is to use the escaping functions provided
by PostgreSQL which are available as methods on the DB
object:
>>> login = "D'Arcy"
>>> db.escape_string(login)
"D''Arcy"
As you see, DB.escape_string()
has doubled the single quote which is
the right thing to do in SQL. However, there are better ways of passing
parameters to the query, without having to manually escape them. If you
pass the parameters as positional arguments to DB.query()
, then
PyGreSQL will send them to the database separately, without the need for
quoting them inside the SQL command, and without the problems inherent with
that process. In this case you must put placeholders of the form $1
,
$2
etc. in the SQL command in place of the parameters that should go there.
For instance:
>>> sql = "SELECT * FROM user_table WHERE login = $1 AND passwd = $2"
>>> db.query(sql, login, passwd).getresult()[0]
That’s much better. So please always keep the following warning in mind:
Warning
Remember to never insert parameters directly into your queries using
the %
operator. Always pass the parameters separately.
If you like the %
format specifications of Python better than the
placeholders used by PostgreSQL, there is still a way to use them, via the
DB.query_formatted()
method:
>>> sql = "SELECT * FROM user_table WHERE login = %s AND passwd = %s"
>>> db.query_formatted(sql, (login, passwd)).getresult()[0]
Note that we need to pass the parameters not as positional arguments here,
but as a single tuple. Also note again that we did not use the %
operator of Python to format the SQL string, we just used the %s
format
specifications of Python and let PyGreSQL care about the formatting.
Even better, you can also pass the parameters as a dictionary if you use
the DB.query_formatted()
method:
>>> sql = """SELECT * FROM user_table
... WHERE login = %(login)s AND passwd = %(passwd)s"""
>>> parameters = dict(login=login, passwd=passwd)
>>> db.query_formatted(sql, parameters).getresult()[0]
Here is another example:
>>> sql = "SELECT 'Hello, ' || %s || '!'"
>>> db.query_formatted(sql, (login,)).getresult()[0]
You would think that the following even simpler example should work, too:
>>> sql = "SELECT %s"
>>> db.query_formatted(sql, (login,)).getresult()[0]
ProgrammingError: Could not determine data type of parameter $1
The issue here is that DB.query_formatted()
by default still uses
PostgreSQL parameters, transforming the Python style %s
placeholder
into a $1
placeholder, and sending the login name separately from
the query. In the query we looked at before, the concatenation with other
strings made it clear that it should be interpreted as a string. This simple
query however does not give PostgreSQL a clue what data type the $1
placeholder stands for.
This is different when you are embedding the login name directly into the
query instead of passing it as parameter to PostgreSQL. You can achieve this
by setting the inline parameter of DB.query_formatted()
, like so:
>>> sql = "SELECT %s"
>>> db.query_formatted(sql, (login,), inline=True).getresult()[0]
Another way of making this query work while still sending the parameters separately is to simply cast the parameter values:
>>> sql = "SELECT %s::text"
>>> db.query_formatted(sql, (login,), inline=False).getresult()[0]
In real world examples you will rarely have to cast your parameters like that, since in an INSERT statement or a WHERE clause comparing the parameter to a table column the data type will be clear from the context.
When binding the parameters to a query, PyGreSQL does not only adapt the basic
types like int
, float
, bool
and str
, but also tries to make
sense of Python lists and tuples.
Lists are adapted as PostgreSQL arrays:
>>> params = dict(array=[[1, 2],[3, 4]])
>>> db.query_formatted("SELECT %(array)s::int[]", params).getresult()[0][0]
[[1, 2], [3, 4]]
Note that again we only need to cast the array parameter or use inline parameters because this simple query does not provide enough context. Also note that the query gives the value back as Python lists again. This is achieved by the typecasting mechanism explained in the next section.
Tuples are adapted as PostgreSQL composite types. If you use inline paramters,
they can also be used with the IN
syntax.
Let’s think of a more real world example again where we create a table with a composite type in PostgreSQL:
CREATE TABLE on_hand (
item inventory_item,
count integer)
We assume the composite type inventory_item
has been created like this:
CREATE TYPE inventory_item AS (
name text,
supplier_id integer,
price numeric)
In Python we can use a named tuple as an equivalent to this PostgreSQL type:
>>> from collections import namedtuple
>>> inventory_item = namedtuple(
... 'inventory_item', ['name', 'supplier_id', 'price'])
Using the automatic adaptation of Python tuples, an item can now be inserted into the database and then read back as follows:
>>> db.query_formatted("INSERT INTO on_hand VALUES (%(item)s, %(count)s)",
... dict(item=inventory_item('fuzzy dice', 42, 1.99), count=1000))
>>> db.query("SELECT * FROM on_hand").getresult()[0][0]
Row(item=inventory_item(name='fuzzy dice', supplier_id=42,
price=Decimal('1.99')), count=1000)
The DB.insert()
method provides a simpler way to achieve the same:
>>> row = dict(item=inventory_item('fuzzy dice', 42, 1.99), count=1000)
>>> db.insert('on_hand', row)
{'count': 1000, 'item': inventory_item(name='fuzzy dice',
supplier_id=42, price=Decimal('1.99'))}
However, we may not want to use named tuples, but custom Python classes to hold our values, like this one:
>>> class InventoryItem:
...
... def __init__(self, name, supplier_id, price):
... self.name = name
... self.supplier_id = supplier_id
... self.price = price
...
... def __str__(self):
... return '%s (from %s, at $%s)' % (
... self.name, self.supplier_id, self.price)
But when we try to insert an instance of this class in the same way, we
will get an error. This is because PyGreSQL tries to pass the string
representation of the object as a parameter to PostgreSQL, but this is just a
human readable string and not useful for PostgreSQL to build a composite type.
However, it is possible to make such custom classes adapt themselves to
PostgreSQL by adding a “magic” method with the name __pg_str__
, like so:
>>> class InventoryItem:
...
... ...
...
... def __str__(self):
... return '%s (from %s, at $%s)' % (
... self.name, self.supplier_id, self.price)
...
... def __pg_str__(self, typ):
... return (self.name, self.supplier_id, self.price)
Now you can insert class instances the same way as you insert named tuples. You can even make these objects adapt to different types in different ways:
>>> class InventoryItem:
...
... ...
...
... def __pg_str__(self, typ):
... if typ == 'text':
... return str(self)
... return (self.name, self.supplier_id, self.price)
...
>>> db.query("ALTER TABLE on_hand ADD COLUMN remark varchar")
>>> item=InventoryItem('fuzzy dice', 42, 1.99)
>>> row = dict(item=item, remark=item, count=1000)
>>> db.insert('on_hand', row)
{'count': 1000, 'item': inventory_item(name='fuzzy dice',
supplier_id=42, price=Decimal('1.99')),
'remark': 'fuzzy dice (from 42, at $1.99)'}
There is also another “magic” method __pg_repr__
which does not take the
typ parameter. That method is used instead of __pg_str__
when passing
parameters inline. You must be more careful when using __pg_repr__
,
because it must return a properly escaped string that can be put literally
inside the SQL. The only exception is when you return a tuple or list,
because these will be adapted and properly escaped by PyGreSQL again.
Typecasting to Python¶
As you noticed, PyGreSQL automatically converted the PostgreSQL data to
suitable Python objects when returning values via the DB.get()
,
Query.getresult()
and similar methods. This is done by the use
of built-in typecast functions.
If you want to use different typecast functions or add your own if no
built-in typecast function is available, then this is possible using
the set_typecast()
function. With the get_typecast()
function
you can check which function is currently set. If no typecast function
is set, then PyGreSQL will return the raw strings from the database.
For instance, you will find that PyGreSQL uses the normal int
function
to cast PostgreSQL int4
type values to Python:
>>> pg.get_typecast('int4')
int
In the classic PyGreSQL module, the typecasting for these basic types is
always done internally by the C extension module for performance reasons.
We can set a different typecast function for int4
, but it will not
become effective, the C module continues to use its internal typecasting.
However, we can add new typecast functions for the database types that are not supported by the C modul. Fore example, we can create a typecast function that casts items of the composite PostgreSQL type used as example in the previous section to instances of the corresponding Python class.
To do this, at first we get the default typecast function that PyGreSQL has
created for the current DB
connection. This default function casts
composite types to named tuples, as we have seen in the section before.
We can grab it from the DB.dbtypes
object as follows:
>>> cast_tuple = db.dbtypes.get_typecast('inventory_item')
Now we can create a new typecast function that converts the tuple to an instance of our custom class:
>>> cast_item = lambda value: InventoryItem(*cast_tuple(value))
Finally, we set this typecast function, either globally with
set_typecast()
, or locally for the current connection like this:
>>> db.dbtypes.set_typecast('inventory_item', cast_item)
Now we can get instances of our custom class directly from the database:
>>> item = db.query("SELECT * FROM on_hand").getresult()[0][0]
>>> str(item)
'fuzzy dice (from 42, at $1.99)'
Note that some of the typecast functions used by the C module are configurable
with separate module level functions, such as set_decimal()
,
set_bool()
or set_jsondecode()
. You need to use these instead of
set_typecast()
if you want to change the behavior of the C module.
Also note that after changing global typecast functions with
set_typecast()
, you may need to run db.dbtypes.reset_typecast()
to make these changes effective on connections that were already open.
As one last example, let us try to typecast the geometric data type circle
of PostgreSQL into a SymPy Circle
object. Let’s
assume we have created and populated a table with two circles, like so:
CREATE TABLE circle (
name varchar(8) primary key, circle circle);
INSERT INTO circle VALUES ('C1', '<(2, 3), 3>');
INSERT INTO circle VALUES ('C2', '<(1, -1), 4>');
With PostgreSQL we can easily calculate that these two circles overlap:
>>> q = db.query("""SELECT c1.circle && c2.circle
... FROM circle c1, circle c2
... WHERE c1.name = 'C1' AND c2.name = 'C2'""")
>>> q.getresult()[0][0]
True
However, calculating the intersection points between the two circles using the
#
operator does not work (at least not as of PostgreSQL version 9.5).
So let’ resort to SymPy to find out. To ease importing circles from
PostgreSQL to SymPy, we create and register the following typecast function:
>>> from sympy import Point, Circle
>>>
>>> def cast_circle(s):
... p, r = s[1:-1].split(',')
... p = p[1:-1].split(',')
... return Circle(Point(float(p[0]), float(p[1])), float(r))
...
>>> pg.set_typecast('circle', cast_circle)
Now we can import the circles in the table into Python simply using:
>>> circle = db.get_as_dict('circle', scalar=True)
The result is a dictionary mapping circle names to SymPy Circle
objects.
We can verify that the circles have been imported correctly:
>>> circle['C1']
Circle(Point(2, 3), 3.0)
>>> circle['C2']
Circle(Point(1, -1), 4.0)
Finally we can find the exact intersection points with SymPy:
>>> circle['C1'].intersection(circle['C2'])
[Point(29/17 +<PHONE_NUMBER>0121*sqrt(17)/100000000000000,
-80705216537651*sqrt(17)/500000000000000 + 31/17),
Point(-64564173230121*sqrt(17)/100000000000000 + 29/17,
80705216537651*sqrt(17)/500000000000000 + 31/17)]


Thank you for your interest in our efforts to get people to the polls.
For the run-offs, our partners are working with drivers who are already registered to help riders get to the polls.
Need a ride and unable to enter your details online?
Call our
interactive voice
response
service at
804-424-5335, and an operator will contact you.


{{define "dashboard.html"}}
Your current session details.
Administrators can temporarily impersonate another user.


10.00 $
Super fine grounds
1 pack is 250g
12.00 $
Medium-fine grounds
14.00 $
Coarse grounds
16.00 $
Medium-coarse grounds
18.00 $
Fine grounds
25.00 $
Medium grounds


SYNOPSIS
git cvsimport [-o <branch-for-HEAD>] [-h] [-v] [-d <CVSROOT>] [-A <author-conv-file>] [-p <options-for-cvsps>] [-P <file>] [-C <git_repository>] [-z <fuzz>] [-i] [-k] [-u] [-s <subst>] [-a] [-m] [-M <regex>] [-S <regex>] [-L <commitlimit>] [-r <remote>] [-R] [<CVS_module>]
DESCRIPTION
Imports a CVS repository into git. It will either create a new repository, or incrementally import into an existing one.
Splitting the CVS log into patch sets is done by cvsps. At least version 2.1 is required.
WARNING: for certain situations the import leads to incorrect results. Please see the section ISSUES for further reference.
You should never do any work of your own on the branches that are created by git cvsimport. By default initial import will create and populate a "master" branch from the CVS repository’s main branch which you’re free to work with; after that, you need to git merge incremental imports, or any CVS branches, yourself. It is advisable to specify a named remote via -r to separate and protect the incoming branches.
If you intend to set up a shared public repository that all developers can read/write, or if you want to use git-cvsserver(1), then you probably want to make a bare clone of the imported repository, and use the clone as the shared repository. See gitcvs-migration(7).
OPTIONS
- -v
-
Verbosity: let cvsimport report what it is doing.
- -d <CVSROOT>
-
The root of the CVS archive. May be local (a simple path) or remote; currently, only the :local:, :ext: and :pserver: access methods are supported. If not given, git cvsimport will try to read it from
CVS/Root
. If no such file exists, it checks for theCVSROOT
environment variable. - <CVS_module>
-
The CVS module you want to import. Relative to <CVSROOT>. If not given, git cvsimport tries to read it from
CVS/Repository
. - -C <target-dir>
-
The git repository to import to. If the directory doesn’t exist, it will be created. Default is the current directory.
- -r <remote>
-
The git remote to import this CVS repository into. Moves all CVS branches into remotes/<remote>/<branch> akin to the way git clone uses origin by default.
- -o <branch-for-HEAD>
-
When no remote is specified (via -r) the HEAD branch from CVS is imported to the origin branch within the git repository, as HEAD already has a special meaning for git. When a remote is specified the HEAD branch is named remotes/<remote>/master mirroring git clone behaviour. Use this option if you want to import into a different branch.
Use -o master for continuing an import that was initially done by the old cvs2git tool.
- -i
-
Import-only: don’t perform a checkout after importing. This option ensures the working directory and index remain untouched and will not create them if they do not exist.
- -k
-
Kill keywords: will extract files with -kk from the CVS archive to avoid noisy changesets. Highly recommended, but off by default to preserve compatibility with early imported trees.
- -u
-
Convert underscores in tag and branch names to dots.
- -s <subst>
-
Substitute the character "/" in branch names with <subst>
- -p <options-for-cvsps>
-
Additional options for cvsps. The options -u and -A are implicit and should not be used here.
If you need to pass multiple options, separate them with a comma.
- -z <fuzz>
-
Pass the timestamp fuzz factor to cvsps, in seconds. If unset, cvsps defaults to 300s.
- -P <cvsps-output-file>
-
Instead of calling cvsps, read the provided cvsps output file. Useful for debugging or when cvsps is being handled outside cvsimport.
- -m
-
Attempt to detect merges based on the commit message. This option will enable default regexes that try to capture the source branch name from the commit message.
- -M <regex>
-
Attempt to detect merges based on the commit message with a custom regex. It can be used with -m to enable the default regexes as well. You must escape forward slashes.
The regex must capture the source branch name in $1.
This option can be used several times to provide several detection regexes.
- -S <regex>
-
Skip paths matching the regex.
- -a
-
Import all commits, including recent ones. cvsimport by default skips commits that have a timestamp less than 10 minutes ago.
- -L <limit>
-
Limit the number of commits imported. Workaround for cases where cvsimport leaks memory.
- -A <author-conv-file>
-
CVS by default uses the Unix username when writing its commit logs. Using this option and an author-conv-file maps the name recorded in CVS to author name, e-mail and optional timezone:
exon=Andreas Ericsson<EMAIL_ADDRESS>spawn=Simon Pawn<EMAIL_ADDRESS>America/Chicago
git cvsimport will make it appear as those authors had their GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL set properly all along. If a timezone is specified, GIT_AUTHOR_DATE will have the corresponding offset applied.
For convenience, this data is saved to
$GIT_DIR/cvs-authors
each time the -A option is provided and read from that same file each time git cvsimport is run.It is not recommended to use this feature if you intend to export changes back to CVS again later with git cvsexportcommit.
- -R
-
Generate a
$GIT_DIR/cvs-revisions
file containing a mapping from CVS revision numbers to newly-created Git commit IDs. The generated file will contain one line for each (filename, revision) pair imported; each line will look likesrc/widget.c 1.1 1d862f173cdc7325b6fa6d2ae1cfd61fd1b512b7
The revision data is appended to the file if it already exists, for use when doing incremental imports.
This option may be useful if you have CVS revision numbers stored in commit messages, bug-tracking systems, email archives, and the like.
- -h
-
Print a short usage message and exit.
OUTPUT
If -v is specified, the script reports what it is doing.
Otherwise, success is indicated the Unix way, i.e. by simply exiting with a zero exit status.
ISSUES
Problems related to timestamps:
-
If timestamps of commits in the CVS repository are not stable enough to be used for ordering commits changes may show up in the wrong order.
-
If any files were ever "cvs import"ed more than once (e.g., import of more than one vendor release) the HEAD contains the wrong content.
-
If the timestamp order of different files cross the revision order within the commit matching time window the order of commits may be wrong.
Problems related to branches:
-
Branches on which no commits have been made are not imported.
-
All files from the branching point are added to a branch even if never added in CVS.
-
This applies to files added to the source branch after a daughter branch was created: if previously no commit was made on the daughter branch they will erroneously be added to the daughter branch in git.
Problems related to tags:
-
Multiple tags on the same revision are not imported.
If you suspect that any of these issues may apply to the repository you want to import consider using these alternative tools which proved to be more stable in practice:
-
cvs2git (part of cvs2svn),
http://cvs2svn.tigris.org
-
parsecvs,
http://cgit.freedesktop.org/~keithp/parsecvs
GIT
Part of the git(1) suite