PostgreSQL can be extended to run user-supplied code in separate processes.
Such processes are started, stopped and monitored by postgres
,
which permits them to have a lifetime closely linked to the server's status.
These processes have the option to attach to PostgreSQL's
shared memory area and to connect to databases internally; they can also run
multiple transactions serially, just like a regular client-connected server
process. Also, by linking to libpq they can connect to the
server and behave like a regular client application.
There are considerable robustness and security risks in using background
worker processes because, being written in the C
language,
they have unrestricted access to data. Administrators wishing to enable
modules that include background worker processes should exercise extreme
caution. Only carefully audited modules should be permitted to run
background worker processes.
Background workers can be initialized at the time that
PostgreSQL is started by including the module name in
shared_preload_libraries
. A module wishing to run a background
worker can register it by calling
RegisterBackgroundWorker(
from its BackgroundWorker *worker
)_PG_init()
. Background workers can also be started
after the system is up and running by calling the function
RegisterDynamicBackgroundWorker(
. Unlike
BackgroundWorker
*worker, BackgroundWorkerHandle **handle
)RegisterBackgroundWorker
, which can only be called from within
the postmaster, RegisterDynamicBackgroundWorker
must be
called from a regular backend or another background worker.
The structure BackgroundWorker
is defined thus:
typedef void (*bgworker_main_type)(Datum main_arg); typedef struct BackgroundWorker { char bgw_name[BGW_MAXLEN]; char bgw_type[BGW_MAXLEN]; int bgw_flags; BgWorkerStartTime bgw_start_time; int bgw_restart_time; /* in seconds, or BGW_NEVER_RESTART */ char bgw_library_name[BGW_MAXLEN]; char bgw_function_name[BGW_MAXLEN]; Datum bgw_main_arg; char bgw_extra[BGW_EXTRALEN]; int bgw_notify_pid; } BackgroundWorker;
bgw_name
and bgw_type
are
strings to be used in log messages, process listings and similar contexts.
bgw_type
should be the same for all background
workers of the same type, so that it is possible to group such workers in a
process listing, for example. bgw_name
on the
other hand can contain additional information about the specific process.
(Typically, the string for bgw_name
will contain
the type somehow, but that is not strictly required.)
bgw_flags
is a bitwise-or'd bit mask indicating the
capabilities that the module wants. Possible values are:
BGWORKER_SHMEM_ACCESS
Requests shared memory access. Workers without shared memory access cannot access any of PostgreSQL's shared data structures, such as heavyweight or lightweight locks, shared buffers, or any custom data structures which the worker itself may wish to create and use.
BGWORKER_BACKEND_DATABASE_CONNECTION
Requests the ability to establish a database connection through which it
can later run transactions and queries. A background worker using
BGWORKER_BACKEND_DATABASE_CONNECTION
to connect to a
database must also attach shared memory using
BGWORKER_SHMEM_ACCESS
, or worker start-up will fail.
bgw_start_time
is the server state during which
postgres
should start the process; it can be one of
BgWorkerStart_PostmasterStart
(start as soon as
postgres
itself has finished its own initialization; processes
requesting this are not eligible for database connections),
BgWorkerStart_ConsistentState
(start as soon as a consistent state
has been reached in a hot standby, allowing processes to connect to
databases and run read-only queries), and
BgWorkerStart_RecoveryFinished
(start as soon as the system has
entered normal read-write state). Note the last two values are equivalent
in a server that's not a hot standby. Note that this setting only indicates
when the processes are to be started; they do not stop when a different state
is reached.
bgw_restart_time
is the interval, in seconds, that
postgres
should wait before restarting the process, in
case it crashes. It can be any positive value,
or BGW_NEVER_RESTART
, indicating not to restart the
process in case of a crash.
bgw_library_name
is the name of a library in
which the initial entry point for the background worker should be sought.
The named library will be dynamically loaded by the worker process and
bgw_function_name
will be used to identify the
function to be called. If loading a function from the core code, this must
be set to "postgres".
bgw_function_name
is the name of a function in
a dynamically loaded library which should be used as the initial entry point
for a new background worker.
bgw_main_arg
is the Datum
argument
to the background worker main function. This main function should take a
single argument of type Datum
and return void
.
bgw_main_arg
will be passed as the argument.
In addition, the global variable MyBgworkerEntry
points to a copy of the BackgroundWorker
structure
passed at registration time; the worker may find it helpful to examine
this structure.
On Windows (and anywhere else where EXEC_BACKEND
is
defined) or in dynamic background workers it is not safe to pass a
Datum
by reference, only by value. If an argument is required, it
is safest to pass an int32 or other small value and use that as an index
into an array allocated in shared memory. If a value like a cstring
or text
is passed then the pointer won't be valid from the
new background worker process.
bgw_extra
can contain extra data to be passed
to the background worker. Unlike bgw_main_arg
, this data
is not passed as an argument to the worker's main function, but it can be
accessed via MyBgworkerEntry
, as discussed above.
bgw_notify_pid
is the PID of a PostgreSQL
backend process to which the postmaster should send SIGUSR1
when the process is started or exits. It should be 0 for workers registered
at postmaster startup time, or when the backend registering the worker does
not wish to wait for the worker to start up. Otherwise, it should be
initialized to MyProcPid
.
Once running, the process can connect to a database by calling
BackgroundWorkerInitializeConnection(
or
char *dbname
,
char *username
, uint32 flags
)BackgroundWorkerInitializeConnectionByOid(
.
This allows the process to run transactions and queries using the
Oid dboid
,
Oid useroid
, uint32 flags
)SPI
interface. If dbname
is NULL or
dboid
is InvalidOid
, the session is not connected
to any particular database, but shared catalogs can be accessed.
If username
is NULL or useroid
is
InvalidOid
, the process will run as the superuser created
during initdb
. If BGWORKER_BYPASS_ALLOWCONN
is specified as flags
it is possible to bypass the restriction
to connect to databases not allowing user connections.
A background worker can only call one of these two functions, and only
once. It is not possible to switch databases.
Signals are initially blocked when control reaches the
background worker's main function, and must be unblocked by it; this is to
allow the process to customize its signal handlers, if necessary.
Signals can be unblocked in the new process by calling
BackgroundWorkerUnblockSignals
and blocked by calling
BackgroundWorkerBlockSignals
.
If bgw_restart_time
for a background worker is
configured as BGW_NEVER_RESTART
, or if it exits with an exit
code of 0 or is terminated by TerminateBackgroundWorker
,
it will be automatically unregistered by the postmaster on exit.
Otherwise, it will be restarted after the time period configured via
bgw_restart_time
, or immediately if the postmaster
reinitializes the cluster due to a backend failure. Backends which need
to suspend execution only temporarily should use an interruptible sleep
rather than exiting; this can be achieved by calling
WaitLatch()
. Make sure the
WL_POSTMASTER_DEATH
flag is set when calling that function, and
verify the return code for a prompt exit in the emergency case that
postgres
itself has terminated.
When a background worker is registered using the
RegisterDynamicBackgroundWorker
function, it is
possible for the backend performing the registration to obtain information
regarding the status of the worker. Backends wishing to do this should
pass the address of a BackgroundWorkerHandle *
as the second
argument to RegisterDynamicBackgroundWorker
. If the
worker is successfully registered, this pointer will be initialized with an
opaque handle that can subsequently be passed to
GetBackgroundWorkerPid(
or
BackgroundWorkerHandle *
,
pid_t *
)TerminateBackgroundWorker(
.
BackgroundWorkerHandle *
)GetBackgroundWorkerPid
can be used to poll the status of the
worker: a return value of BGWH_NOT_YET_STARTED
indicates that
the worker has not yet been started by the postmaster;
BGWH_STOPPED
indicates that it has been started but is
no longer running; and BGWH_STARTED
indicates that it is
currently running. In this last case, the PID will also be returned via the
second argument.
TerminateBackgroundWorker
causes the postmaster to send
SIGTERM
to the worker if it is running, and to unregister it
as soon as it is not.
In some cases, a process which registers a background worker may wish to
wait for the worker to start up. This can be accomplished by initializing
bgw_notify_pid
to MyProcPid
and
then passing the BackgroundWorkerHandle *
obtained at
registration time to
WaitForBackgroundWorkerStartup(
function.
This function will block until the postmaster has attempted to start the
background worker, or until the postmaster dies. If the background worker
is running, the return value will be BackgroundWorkerHandle
*handle
, pid_t *
)BGWH_STARTED
, and
the PID will be written to the provided address. Otherwise, the return
value will be BGWH_STOPPED
or
BGWH_POSTMASTER_DIED
.
A process can also wait for a background worker to shut down, by using the
WaitForBackgroundWorkerShutdown(
function and passing the
BackgroundWorkerHandle
*handle
)BackgroundWorkerHandle *
obtained at registration. This
function will block until the background worker exits, or postmaster dies.
When the background worker exits, the return value is
BGWH_STOPPED
, if postmaster dies it will return
BGWH_POSTMASTER_DIED
.
If a background worker sends asynchronous notifications with the
NOTIFY
command via the Server Programming Interface
(SPI), it should call
ProcessCompletedNotifies
explicitly after committing
the enclosing transaction so that any notifications can be delivered. If a
background worker registers to receive asynchronous notifications with
the LISTEN
through SPI, the worker
will log those notifications, but there is no programmatic way for the
worker to intercept and respond to those notifications.
The src/test/modules/worker_spi
module
contains a working example,
which demonstrates some useful techniques.
The maximum number of registered background workers is limited by max_worker_processes.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/Is.20this.20a.20bug.3F.html ---
lemma foo : true := let a := 1 in begin have : ∀θ:ℕ, (0 < θ) → a ≤ a, -- Throw the following error: -- type mismatch at application -- has_le.le a -- term -- a -- has type -- 0 < θ : Prop -- but is expected to have type -- ?m_1 : Type ? end
Change a
to b
will fix it.
lemma bar : true := let b := 1 in begin have : ∀θ:ℕ, (0 < θ) → b ≤ b, end
That's the letter a
bug. Something to do with the have
being parsed as ∀θ:ℕ, ∀ a : 0 < θ, a ≤ a
Oh, good to know it's already known!
Is this a
bug? Yes.
I suggest a change to the style manual to never use a
as a variable: #1285
Note to self: it would probably be doable to write a tactic that checks whether you have used the variable name a
in declarations, to help a user spot this.
I think this is a bit strong. I rarely use have
with implies. The letter a
is used everywhere.
The workaround style is to use forall _:A, B
instead of A -> B
in tactics
Ok, maybe banning the letter a
everywhere is a bit of an overreaction (I was already doing it myself though, for this exact reason).
I went through a "no a" phase after being bitten by this early on, but it wore off...
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Sample Crawler
Here is a sample crawler build using the same functions. Lets crawl the uoft cs website
As you can see, it starts crawling from the url. Crawlers not only get urls, they also put the text content of the website into a database for indexing.
Crawling in progress...


#FuckDiscord | Cadence's Blog Here's the index of all the sections in this post. The sections' ordering is not related to how important they are. If you only read one section, perhaps make it "Discord staff are absolutely untrustworthy", or perhaps "Actual despicable actions and despi...
JuneteenthConf: Call for Speakers / Call for Papers (CfP) @ Sessionize.com Sessionize is the smart way to manage Call for Papers, Speakers and Agenda for your conference.
Death of George Floyd George Floyd’s death after a white Minneapolis police officer pressed a knee into his neck sparked international protests and drew new attention to police treatment of people of color.
Google resumes its senseless attack on the URL bar, hides full addresses on Chrome 85 Google has tried on and off for years to hide full URLs in Chrome's address bar, because apparently long web addresses are scary and evil. Despite the
Fast 2D rendering on GPU Previously on my quest for fast rendering of 2D vector graphics on GPU, I have posted a piet-gpu update and a deeper exploration into a sort-middle architecture. These intermediate results showed promise, but fell short of my vision for truly high perform...
May 2020 news · Gwern.net May 2020 gwern.net newsletter with anime GAN updates, links on AI scaling, discussion of GPT-3, and 1 book review.
How I Used Revenue Stacking To Generate Over $4,000 In One Month — Brendan Cahill Revenue Stacking is the process of adding high equity streams of income into your business.
jbogard/nsb-diagnostics-poc Contribute to jbogard/nsb-diagnostics-poc development by creating an account on GitHub.
I made an actual Drum Machine in Excel and you can do more than just play drums with it download link in description Please consider supporting me on patreon: Patreon: https://www.patreon.com/dylantallchief Download Drum Machine (tested on Excel 2019/Office 365): https://drive.google.com/dr...
microsoft/PowerToys Windows system utilities to maximize productivity. Contribute to microsoft/PowerToys development by creating an account on GitHub.
SageMath Mathematical Software System - Sage SageMath is a free and open-source mathematical software system.
Microsoft: Rust Is the Industry’s ‘Best Chance’ at Safe Systems Programming – The New Stack Microsoft has deemed C++ no longer acceptable for writing mission-critical software. The industry sorely needs to move to a performant, memory-safe language for its low-low system work. And the best choice on the market today is Rust, Levick said.
Publishing an NPM Package- Webinar There are millions of packages on NPM that are used by developers, but have you ever wondered what it's like to publish an NPM Package of your own? Well, my friend, Brad Garropy, is going to join me to teach you how to do just that! Go to https://www.ja...
How Many U.S. Taxpayers Are There? According to the IRS, 143.3 million people paid federal income taxes in 2017 for a total of $10.9 trillion in adjusted gross income. Total income taxes paid equaled $1.6 trillion in individual income...
Urgent Immigration Update — News of a Damaging Proposed Immigration Proclamation on Non-Immigrant Visa Holders | Kuck Baxter Immigration Two months ago, the Trump administration used the Coronovirus epidemic as an excuse to stop legal employment and familybased immigration to the United States. The same proponents are now poised to sto
Adding Additional Mime Mappings to the Static File Provider If you're using the Static File Provider in ASP.NET Core you might need to add some additional extensions that are not handled by default. For example, if you host a Blazor site in your own application an additional mime mapping for `.dll` is required. He...
Below the Great Pacific Garbage Patch: More Garbage - Eos New research is finding there’s more to marine debris than just what appears near the ocean surface, including tons of microplastics extending hundreds of meters into the deep.
5 Common Feelings Being a Woman of Color in Tech From the day I realized I was destined to be a coder, I knew I was going to be an underrepresented group in more ways than one. It started to hit me in the few classes I took throughout grade school, but I didn’t realize how much of a minority I was until...
Uber says engineer is on his own for US$180 million legal award to Google Engineer Anthony Levandowski, who used to head Uber’s self-driving car programme, pleaded guilty to trade secret theft last month after being driven into bankruptcy by former employer Google, which won a contract-breach arbitration case against him.
Names of PPP Business Borrowers Won’t Be Released Trump's administration argued that names of borrowers and the amounts they receive are “proprietary” and “confidential”
Analysing the (Alleged) Minneapolis Police Department "Hack" The situation in Minneapolis at the moment (and many other places in the US) following George Floyd's death is, I think it's fair to say, extremely volatile. I wouldn't even know where to begin commentary on that, but what I do have a voice on is data bre...
This 26-year-old 'died three times' after police hit her with a blast ball On Sunday night, on the tenth day of protests for racial justice in Seattle, a petite young woman stood between protesters and a barricade of police.
Wil Shipley: Every year I fill out this survey from Apple, for Apple developers. Every year nothing changes. Every year I fill out this survey from Apple, for Apple developers. Every year nothing changes. Don’t run ads for competitors in App Store s...
Detecting soccer teams using unsupervised learning and tensorflow object detection (images and videos) In the past we have used Tensorflow Object Detection to detect sharks, social distancing and squirrels. Detecting objects is fun and we can build on top of that. Our main task will be to detect the…
Alex Money People who don’t use credit don’t need credit scores! It’s that simple.  The truth is you don’t need one. Credit scores are how banks have bullied a...
In Defense of Myers Briggs The Meyers-Briggs Personality Indicator (MBTI) gets a lot of scorn:About 2 million people take it annually, at the behest of corporate HR departments, colleges, and even government agencies. The co…
Getting Started with Nix Nix, the purely functional package manager. The Nix package manager has been, on and off, on my radar for a couple of years now, the premise of it, using “functional programing”-esque behaviours in order to create a reproducible package management, seeme...
UPDATED: A HUGE List of Bay Area Protests & Rallies This Weekend Important note: We’re seeing spikes in COVID right now so, while attending all these Bay Area protests, it’s important to protect yourself and others. Make sure to wear masks, use hand sanitizer, and social distance yourself as much as possible. It’s also...
Record charts Standards and expectations have been squashed since covid began spreading. Business implications range from record breaking unemployment rates, savings rates, debt rates, hiring rates, and more. I&…
The Upcoming Future of Online Meetups As we adventure into the phase where society needs to learn to cohabit with the virus, the tech industry comes to the full realization that in-person…
Dependence Today’s innovations and progress swoop humanity into a neat cycle of anticipation and acquisition through deceptive notions that guide it to dependence. We’re sold on products and ideas through questionable but politically acceptable marketing tactics. We...
Introduction to Bimachines Bimachines are deterministic finite-state devices that represent the class regular string functions and are commonly used for text rewriting. What is fascinating about them is that they process the input text in both directions - from left to right and fr...


The DBC seemingly started off as a experiment - with a handful of tutors and a cohort of working professionals, business owners and college/university students who didn't really know what they were getting themselves into. The curriculum itself deviates away from the traditional consumerist "restaurant" model of education in favour of a transformational creative package where the individual determines their educational success through sharing, co-creating with tutors & peers alike and learning heaps more by going down rabbitholes.
My very first (virtual) encounter with EDA was awesome, as if the stars and planets were in perfect alignment and reading through their website just ignited a genuine desire to be a part of this experience; as if there was a sense of humanness coded within the text, images and videos that resonated with me. This feeling of awesomeness was further cemented with an interview - where I learned that experiences and the right behaviour and attitude were invaluable in working collaboratively within teams. What an indelible experience this has been so far!
I've found over the last 15 years of teaching that self exploration, self discovery and the wonder that comes with intrinsic realization has a profound affect on learning and understanding. What EDA offers aligns and is naturally conducive with my preferred (kinesthetic/visual) learning style.  I particularly enjoy/look forward to the whakawhanaungatanga (building relationships) aspect as my prime state of learning is through physical engagement & working with others.
If the above commentary is anything to go by, then my expectations haven't changed. I'm gaining clarity of my own expectations, my own limits and the habits that disable/enable my own learning and understanding. Subconsciously the expectations of EDA are rewriting over old, redundant legacy code - some may call it a lifestyle change...or a (good) midlife crisis.
My mind's telling me that the next 18 weeks will be really frightening, fraught with an avalanche of achievable assessments and lots of cool new vocabulary, concepts, languages and frameworks. My heart however is resolute to give everything a go and embrace failure as a stepping stone towards learning more.


This command returns information on the status of the fwrite options:
fwrite
The commands to set or change the fwrite options are set gxout fwrite, set fwrite, and disable fwrite.
set gxout fwrite
set fwrite
disable fwrite


About
Composi is the gradual evolution of front-end development since 2007. Its genesis was in the library ChocolateChip-UI. As an experiment, we took the component API from ChocolateChip-UI and combined it with a small and fast virtual DOM. The result was Composi. Because of the virtual DOM, when you change the state or data that a component uses, it updates automatically.
Composi is Small
Although only 3KB
, Composi includes everything you need to create complex components. The Composi virtual DOM code is less that 1KB
. It will only update the parts of the DOM that do not match the current state of a component. If you try to render a component with the same data again, no update will occur.
Composi Works Well with Others
Composi was designed to be used with other libraries. You can use Lodash, Ramda, Boostrap, Material Design Lite, Redux, Mobx and other third party libraries with Composi. You can also use jQuery plugins in the same document. You cannot use jQuery on a Composi component. You can use any pubsub library to implement communication between jQuery plugins and Composi components.
Similar to React
Composi shares some features and many development patterns with React, Preact and Inferno. All have a Component class and a virtual DOM. However, Composi is not a React clone. Internally it works quite differently. Most of the similarities arrise from the use of JSX. Composi's Component class shares some naming conventions with React.Component. Both have a render
function, which works basically the same. It takes some data and returns some markup that gets converted into a virtual node. With React and friends, you pass a component class definition to the render
function along with an elemement in which you want to insert it. This is completely unnecessary with Composi components. Instead you define a container property directly in the component definition.
Lifecycle Methods
All of these have lifecycle methods. The React family generally has the following ones:
- componentWillMount()
- componentDidMount()
- componentWillReceiveProps()
- shouldComponentUpdate()
- componentWillUpdate()
- componentDidUpdate()
- componentWillUnmount()
In contrast, Composi has only the following:
- componentWillMout()
- componentDidMount()
- componentWillUpdate()
- componentDidUpdate()
- componentWillUnmount()
Composi's componentWillMount
is the same as React's componentWillMount
. Composi's componentDidMount
is like React's componentDidMount
. Composi's componentWillUpdate
is the same as React's componentWillUpdate
. Composi's componentDidUpdate
is the same as React's componentDidUpdate
. Composi's componentWillUnmount
is the same as React's componentWillUnmount
.
React has ReactDOM.render
. Preact has render
. Inferno has Inferno.render
. And Composi has render
. Although all of these use the same name, Composi's implementation is different. All of them can take JSX tags, functional components, and use them to patch the DOM. However, the React family expects you to pass class components into this as well in order to render them. This is not necessary with Composi components since they encapsulate the container they should render in and state assign automatically triggers rending of a component in the DOM.
Class Component
Here's an example of extending the React component class. To render the component we pass it as a tag to the ReactDOM.render
function, along with a query for the selector #root
:
See the Pen React About by Robert Biggs (@rbiggs) on CodePen.
And here's the same example using a Composi class component. Notice that we provide the container selector #root
in the call signature for the component instance. And no need to render. We just create a new instance. That will trigger the render.
See the Pen Composi-About by Robert Biggs (@rbiggs) on CodePen.
The main different here is that Composi requires the use of the new
keyword.
Similar But Different
So, in short Composi and React are similar. But in the details they are different. If you've used React, Preact or Inferno, you should be comfortable using Composi in an hour. If you're coming from Angular or Vue, it might take two hours.


The japgolly fork is a part of an attempt to get metric_fu working in a modern Ruby environment, specifically compatibility with Ruby 1.9 and Bundler.
Version 0.2
Saikuro: Saikuro is a Ruby cyclomatic complexity analyzer. When given Ruby source code Saikuro will generate a report listing the cyclomatic complexity of each method found. In addition, Saikuro counts the number of lines per method and can generate a listing of the number of tokens on each line of code.
License: Saikuro uses the BSD license.
Installation: Option 1: Using setup.rb
login as root
run “ruby setup.rb all”
Option 2: The manual way Saikuro is a single Ruby file that is executable. You can run it where you unpacked it or you can move it your preferred location such as “/usr/local/bin” or “~/bin”.
Note: Ruby 1.8.5 has a bug in ri_options that will prevent Saikuro from running. If you are using 1.8.5 please apply this patch : www.ruby-lang.org/cgi-bin/cvsweb.cgi/ruby/lib/rdoc/ri/ri_options.rb.diff?r1=<IP_ADDRESS>;r2=<IP_ADDRESS>
Usage: Saikuro is a command line program. Running “saikuro -h” will output a usage statement describing all the various arguments you can pass to it.
“saikuro -c -p tests/samples.rb”
The above command is a simple example that generates a cyclomatic complexity report on the samples.rb file, using the default filter, warning and error settings. The report is saved in the current directory.
A more detailed example is “saikuro -c -t -i tests -y 0 -w 11 -e 16 -o out/”
This will analyze all Ruby files found in the “tests/” directory. Saikuro will generate a token count report and a cyclomatic complexity report in the “out” directory . The “-y 0” command will turn off filtering and thus show the complexity of all methods. The “-w 11” will mark all methods with a complexity of 11 or higher with a warning. Finally, “-e 16” will flag all methods with a complexity of 16 or higher with an error.
About Cyclomatic Complexity:
The following document provides a very good and detailed description by the author of cyclomatic complexity.
NIST Special Publication 500-235 Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric
By Arthur H. Watson and Thomas J. McCabe HTML hissa.nist.gov/HHRFdata/Artifacts/ITLdoc/235/title.htm PDF www.mccabe.com/iq_research_nist.htm
How and what Saikuro counts to calculate the cyclomatic complexity:
Saikuro uses the Simplified Complexity Calculation, which is just adding up the number of branch points in a method.
Each method starts with a complexity of 1, because there is at least one path through the code. Then each conditional or looping operator (if, unless, while, until, for, elsif, when) adds one point to the complexity. Each “when” in a case statement adds one point. Also each “rescue” statement adds one.
Saikuro also regards blocks as an addition to a method's complexity because in many cases a block does add a path that may be traversed. For example, invoking the "each" method of an array with a block would only traverse the give block if the array is not empty. Thus if you want to find the basis set to get 100% coverage of your code then a block should add one point to the method's complexity. It is not yet for sure however to what level the accuracy is decreased through this measurement, as normal Ruby code uses blocks quite heavily and new paths are not necessarily introduced by every block.
In addition, the short-circuiting “and” operators (&& and “and”) currently do not contribute to a method’s complexity, although McCabe’s paper listed above suggests doing so.
#Example for “and” operator handling:
# Starting values for case 1 and 2 x = false y = 15 r, q = nil # case 1 puts "W" if ((r = x) && (q = y)) puts r # => false puts q # => nil # case 2 puts "W" if ((q = y) && (r = x)) puts r # => false puts q # => 15
Case 1 illustrates why “and” operators should add to a method’s complexity, because the result of ( r = x ) is false the if statement stops and returns false without evaluating the ( q = y ) branch. Thus if a total coverage of source code is desired, one point should be added to the method’s complexity.
So why is it not added? Mainly, because we have not gotten around to it. We are wondering if this would increase the noise more than it should.
Tests: In the test directory is a sample file that has examples of the various possible cases that we examined and documented the expected cyclomatic complexity result. If you find mistakes or missing tests please report them.
Contact: Saikuro is written by Zev Blut (zb at ubit dot com)
Acknowledgments: Thanks to Elbert Corpuz for writing the CSS for the HTML output!
Other metric tools for Ruby: Ryan Davis has an abc metric program as an example in his ParseTree product: www.zenspider.com/ZSS/Products/ParseTree/
The PMD project has a tool called CPD that can scan Ruby source code looking for source duplication: pmd.sourceforge.net/


--- layout: default ---
We're going to get into some more emotional stuff now, but I just wanted to congratulate you for taking the time to meet your physical needs.


Translator: shazi4399
The definition of a prime number seems simple,which is said to be prime number if it can be divided by 1 and itself.
However,don’t think that the definition of prime numbers is simple. I am afraid that few people can write a prime-related algorithm that works really efficiently. Let’s say you write a function like this:
// Returns several primes in the interval [2, n)
int countPrimes(int n)
// E.g. countPrimes (10) returns 4
// Because 2,3,5,7 is prime numbers
How would you program this function? I think you maybe write like this:
int countPrimes(int n) {
int count = 0;
for (int i = 2; i < n; i++)
if (isPrim(i)) count++;
return count;
}
// Determines whether integer n is prime
boolean isPrime(int n) {
for (int i = 2; i < n; i++)
if (n % i == 0)
// There are other divisibility factors
return false;
return true;
}
The time complexity is O (n ^ 2), which is a big problem.First of all, the idea of using the isPrime function to assist is not efficient; and even if you want to use the isPrime function, there is computational redundancy in writing the algorithm.
Let’s briefly talk about how to write an algorithm if you want to determine whether a number is prime or not. Just slightly modify the for loop condition in the isPrim code above:
In other words, i
does not need to traverse ton
, but only to sqrt (n)
. Why?
let’s take an example, suppose n = 12
.
As you can see, the last two products are the reverse of the previous two, and the critical point of inversion is
at sqrt (n)
.
In other words, if no divisible factor is found within the interval [[2, sqrt (n)]
, you can directly
conclude that n
is a prime number, because in the interval [[sqrt (n), n]
Nor will you
find a divisible factor.
Now, the time complexity of the isPrime
function is reduced to O (sqrt (N)), ** but we don’t actually
need this function to implement thecountPrimes
function. The above just hope that readers understand
the meaning of sqrt (n)
, because it will be used again later.
countPrimes
The core idea of efficiently solving this problem is to reverse the conventional idea above:
First from 2, we know that 2 is a prime number, then 2 × 2 = 4, 3 × 2 = 6, 4 × 2 = 8 … all are not prime numbers.
Then we found that 3 is also a prime number, so 3 × 2 = 6, 3 × 3 = 9, 3 × 4 = 12 … are also impossible to be prime numbers.
Seeing this, do you understand the logic of this exclusion method a bit? First look at our first version of the code:
int countPrimes(int n) {
boolean[] isPrim = new boolean[n];
// Initialize the arrays to true
Arrays.fill(isPrim, true);
for (int i = 2; i < n; i++)
if (isPrim[i])
// Multiples of i cannot be prime
for (int j = 2 * i; j < n; j += i)
isPrim[j] = false;
int count = 0;
for (int i = 2; i < n; i++)
if (isPrim[i]) count++;
return count;
}
If you can understand the above code, then you have mastered the overall idea, but there are two subtle areas that can be optimized.
First of all, recall the isPrime
function that just judges whether a number is prime. Due to the
symmetry of the factors, the for loop only needs to traverse[2, sqrt (n)]
. Here is similar, our outer
for loop only needs to traverse to sqrt (n)
:
In addition, it is difficult to notice that the inner for loop can also be optimized. Our previous approach was:
for (int j = 2 * i; j < n; j += i)
isPrim[j] = false;
This can mark all integer multiples of i
asfalse
, but there is still computational
redundancy.
For example, when n = 25
andi = 4
, the algorithm will mark numbers such as 4 × 2 = 8, 4 ×
3 = 12, and so on, but these two numbers have been marked by 2 × 4 and 3 × 4 that is i = 2
andi = 3
.
We can optimize it slightly so that j
traverses from the square ofi
instead of starting
from 2 * i
:
for (int j = i * i; j < n; j += i)
isPrim[j] = false;
In this way, the algorithm for counting prime numbers is efficiently implemented. In fact, this algorithm has a name, which called Sieve of Eratosthenes. Take a look at the complete final code:
int countPrimes(int n) {
boolean[] isPrim = new boolean[n];
Arrays.fill(isPrim, true); for (int i = 2; i * i < n; i++)
if (isPrim[i])
for (int j = i * i; j < n; j += i)
isPrim[j] = false;
int count = 0;
for (int i = 2; i < n; i++)
if (isPrim[i]) count++;
return count;
}
The time complexity of this algorithm is difficult to calculate.It is obvious that the time is related to these two nested for loops. The operands should be:
n/2 + n/3 + n/5 + n/7 + … = n × (1/2 + 1/3 + 1/5 + 1/7…)
In parentheses, ther is the inverse of the prime number .The final result is O(N * loglogN),and readers interested in this can refer to the time complexity of the algorithm
That is all about how to find prime Numbers.The seemingly simple problem does has a lot of details to polish


| DOSE: |
repeated |
insufflated |
Cocaine |
(powder / crystals) |
I’ll skip past the first time I did coke to save time, but I am sure it was very similar to everyone else’s first time. But soon after I did it for the first time I became infatuated with it. Everything I did was either to buy more, or find a way to make money to buy more. For a good 5 months I drained my bank account, and sold many of my things, not to mention spent all of my paycheck, to keep up my habit. I bought off many different dealers because I bought it everyday and I couldn’t rely on just one source to support my habit.
I was so embarrassed of my addiction, that many times I told my dealer I was buying it for other people. Finally, after buying grams and half grams multiple times a day off the same guy (Let’s call him Greg), he asked me if I would like to just get fronted a quarter oz. so that I would not have to keep coming back to him. I really had to think about it for a while, but once I needed my next fix, I agreed and picked up the quarter. I did the whole thing to myself and struggled to find a way to pay back the $175 I owed Greg. Luckily I had just gotten paid so I gave him my entire paycheck. Greg gave me another quarter once again.
This time I swore that I would not do it all myself and that I would sell most of it. I told many of my friends that I was now selling and I actually got a few sales. I sold 3 grams for $50 each and I did the rest myself and coughed up the extra $20. When I went to pay Greg back and re-up, he told me he didn’t have anymore to give me. I freaked out and called his dealer and told him what I was now doing for Greg and that he had no more to give me. His dealer confirmed that I was who I said I was and asked me to come by.
I went by (Let’s call him Mike) Mike’s house and did not know what to expect. He asked me how much Greg usually gave me and I honestly told him I usually got a quarter (even though I had only picked up twice). He gave me a half ounce and said “See what you can do with that”. I was eager to impress Mike so I made it my duty to sell the half, and sell it fast. I spread the word and hit a couple parties and ended up making back the money within the first 6 hours. I called Mike (7 hours after he gave me the half) and told him I was ready to up again
Mike was shocked and asked me to come by. He praised me for doing a good job, and then gave me a full ounce and said “Now see what you can do with that”. Once again I hit the street, but by now I had somewhat of a reputation and it was not so hard to find customers. I made it my duty to make every single sale I could. I sold the ounce within a day and returned back to Mike’s. Mike told me that I was now his “Main Coke Guy” and said he was going to cut Greg and one other guy out of the loop and give me their normal portion as well. I was really excited because not only had I knocked my old dealer and his friend out of the game, but I was now getting 2 ounces at a time.
I continued selling like this month after month. I was so caught up in selling that I would prepare for the night before it even happened. I would load up my bullet (my personal stash for the night) which held 1.5 grams and then weigh out about 15 grams in individual bags and hide them in my dash.  I would drive all around town, hitting the bullet and drinking beers just answering calls and making sales. This became an everyday thing, and I had no time to do anything else but get high all night on coke, get drunk, and make sales.
I had been doing this for so long, that I had even come up with a few routes that I would drive around on. I even planned out a few safe places to stop at to chop up and reload my bullet (by now 1.5 grams would not last a full night, so I would need to fill the bullet twice), and started hiding my beers in Del Taco cups to avoid suspicion when driving. This saved me one time, when I got pulled over on one of my normal routes. The cop pulled me over for a broken head light and even caught me with an open container in my backseat. He ordered me out of the car and gave me a field sobriety test and I passed. The only reason I passed is because I was so high (and alert) on coke. I had already had enough beer to blow at least a .15 BAC test. He warned me about how badly they could have busted me right then and there if they wanted to and let me go. I was so scared I packed up for the night and went home.
I kept this up for over a year and even managed to overdose on prom night. I know you think that I would go into more detail, but I don’t remember much. I remember not caring about my well-being and doing more than I usually would, and next thing I remember I was in the hospital. That’s pretty much it.
I decided to quit, but continued to sell on the side. It was amazing how much money I was making. Around this time, I had started dating a girl that I had been in love with since second grade. Nothing could be better in my mind. I was so happy with her, but it became very difficult to hide that I was selling drugs. I finally confessed and she amazingly didn’t care. She even asked if she could try some. I told her my story and that I hadn’t done it for a long while, but she insisted we try it together. This is the time that made me believe the phrase “Once an addict, always an addict”.
I went right back into my old habits, getting high all night, driving around, drinking the whole time. I found that if I did just a small amount all night along with drinking, that I would not freak out like I did after the O.D.  My girlfriend eventually came to her senses and asked that we never do coke again; that we stop doing it and put it behind us. I agreed but kept doing it behind her back. To hide my habit, I made excuses where I was every night and this eventually led to our break-up.
The Break-up broke my heart so badly that I didn’t even want coke anymore. At the time she was living 2 hours away and I pledged that I would stop doing and selling coke, and move to her town and get an honest job. She scoffed at my promise and this became the base of my life. I quit doing coke cold turkey and despite death threats from my dealer, quit selling. Within 3 days I had packed up my stuff and moved out to my ex’s hometown. I found a job within a day and started work the day after. I began living with my brother who lived in the same town, paying minimal rent. I let a month go by, and I showed my ex the progress I had made. I had quit doing, selling, or even thinking about coke.
I could not believe it, I had changed my whole life and moved away from my family and friends just to be with her, but she wouldn’t take me back. I realized that I would have to do more to impress her. I got a much better job working 8-5 at a big-time financial institution and had begun working out to impress her with my body. Just like cocaine, I spent every minute of everyday to impress her and win her back.
This went on unsuccessfully for over a year, and I had come to the conclusion that we would never be together again. This realization hurt so bad, that I felt no real reason to do good anymore. I began doing coke again on a daily basis. I hold down my job and my apartment, but I now spend every night high on coke. I have a girlfriend, but it almost seems like we’re just together for convenience. I am writing this now, high coming down off coke.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Abstract:
The Antarctic Ice Sheet is an important indicator of climate change and
driver of sea-level rise. Here we combine satellite observations of its
changing volume, flow and gravitational attraction with modelling of its
surface mass balance to show that it lost 2,720 ± 1,390 billion tonnes
of ice between 1992 and 2017, which corresponds to an increase in mean sea
level of 7.6 ± 3.9 millimetres (errors are one standard deviation).
Over this period, ocean-driven melting has caused rates of ice loss from
West Antarctica to increase from 53 ± 29 billion to 159 ± 26
billion tonnes per year; ice-shelf collapse has increased the rate of ice
loss from the Antarctic Peninsula from 7 ± 13 billion to 33 ± 16
billion tonnes per year. We find large variations in and among model
estimates of surface mass balance and glacial isostatic adjustment for
East Antarctica, with its average rate of mass gain over the period
1992–2017 (5 ± 46 billion tonnes per year) being the least certain.


| button - A button gadget handle |
|
ButtonState returns the current on/off state of a checkbox or radio style button.
A return value of 1 indicates the button is currently 'on', while a return value of 0 indicates the button is currently 'off'. The function is often used in response to a gadget action event to determine the new state of a button. See also: CreateButton, SetButtonState. |
|
; Example based on one provided by Mag, extended by Mark Tiffany
; first, let's create a window WinHandle=CreateWindow("Desert Menu",0,0,400,250) ; now create some buttons OptionButton1=CreateButton("Apple Pie",50,10,300,40,WinHandle,3) OptionButton2=CreateButton("Cheesecake",50,40,300,40,WinHandle,3) Checkbox=CreateButton("With Cream",50,70,300,40,WinHandle,2) ExitButton=CreateButton("Place Order",50,120,300,40,WinHandle) ; now loop and deal with events as they arise Repeat If WaitEvent()=$401 Then If EventSource()=ExitButton Then Exit End If Forever ; and report the selected options! msg$ = "You selected " If ButtonState(OptionButton1) Then msg$=msg$+"Apple Pie " ElseIf ButtonState(OptionButton2) Then msg$=msg$+"Cheesecake " Else msg$=msg$+"Nothing " End If If ButtonState(Checkbox) Then msg$=msg$+"with cream" Notify msg$ End |


About Us
This web app is developed by
Rahul Arya
. The name of this app is
ROW
which stands for
Refresh On Web
This app will allow you to listen to high quality songs.
Click Here
to go back to Main page


Method List
Search:
- #addAll (Geochat.Views.Channels.IndexView)
- #addOne (Geochat.Views.Channels.IndexView)
- #destroy (Geochat.Views.Channels.ChannelView)
- #filterInput (Geochat.Views.Channels.NewView)
- #index (Geochat.Routers.ChannelsRouter)
- #initialize (Geochat.Routers.ChannelsRouter)
- #initialize (Geochat.Views.Channels.IndexView)
- #missing (Geochat.Routers.ChannelsRouter)
- #newChannel (Geochat.Routers.ChannelsRouter)
- #render (Geochat.Views.MissingView)
- #render (Geochat.Views.Channels.ChannelNavView)
- #render (Geochat.Views.Channels.NewView)
- #render (Geochat.Views.Channels.ShowView)
- #render (Geochat.Views.Channels.IndexView)
- #render (Geochat.Views.Channels.ChannelView)
- #save (Geochat.Views.Channels.NewView)
- #show (Geochat.Routers.ChannelsRouter)
- #showChat (Geochat.Views.Channels.ChannelNavView)
- #showInfo (Geochat.Views.Channels.ChannelNavView)
- #showMap (Geochat.Views.Channels.ChannelNavView)


public static interface NBMWebRTCPeer.Observer
This interface class has to be implemented outside API. NBMWebRTCPeer requires an Observer instance in constructor
| Modifier and Type | Method and Description |
|---|---|
void |
onBufferedAmountChange(long l,
NBMPeerConnection connection,
org.webrtc.DataChannel channel)
WebRTC event which is triggered when a data channel buffer amount has changed
|
void |
onDataChannel(org.webrtc.DataChannel dataChannel,
NBMPeerConnection connection)
WebRTC event which is triggered when peer opens a data channel
|
void |
onIceCandidate(org.webrtc.IceCandidate localIceCandidate,
NBMPeerConnection connection)
WebRTC event which is triggered when new ice candidate is received
|
void |
onIceStatusChanged(org.webrtc.PeerConnection.IceConnectionState state,
NBMPeerConnection connection)
WebRTC event which is triggered when ICE status has changed
|
void |
onInitialize()
Called when the NBMWebRTCPeer initialization has completed
|
void |
onLocalSdpAnswerGenerated(org.webrtc.SessionDescription localSdpAnswer,
NBMPeerConnection connection)
WebRTC event which is triggered when local SDP answer has been generated
|
void |
onLocalSdpOfferGenerated(org.webrtc.SessionDescription localSdpOffer,
NBMPeerConnection connection)
WebRTC event which is triggered when local SDP offer has been generated
|
void |
onMessage(org.webrtc.DataChannel.Buffer buffer,
NBMPeerConnection connection,
org.webrtc.DataChannel channel)
WebRTC event which is triggered when a message is received from a data channel
|
void |
onPeerConnectionError(java.lang.String error)
WebRTC event which is triggered when there is an error with the connection
|
void |
onRemoteStreamAdded(org.webrtc.MediaStream stream,
NBMPeerConnection connection)
WebRTC event which is triggered when A new remote stream is added to connection
|
void |
onRemoteStreamRemoved(org.webrtc.MediaStream stream,
NBMPeerConnection connection)
WebRTC event which is triggered when a remote media stream is terminated
|
void |
onStateChange(NBMPeerConnection connection,
org.webrtc.DataChannel channel)
WebRTC event which is triggered when a data channel state has changed.
|
void onInitialize()
void onLocalSdpOfferGenerated(org.webrtc.SessionDescription localSdpOffer, NBMPeerConnection connection)
localSdpOffer
- The generated local SDP offerconnection
- The connection for which this event takes placevoid onLocalSdpAnswerGenerated(org.webrtc.SessionDescription localSdpAnswer, NBMPeerConnection connection)
localSdpAnswer
- The generated local SDP answerconnection
- The connection for which this event takes placevoid onIceCandidate(org.webrtc.IceCandidate localIceCandidate, NBMPeerConnection connection)
localIceCandidate
- Ice candidateconnection
- The connection for which this event takes placevoid onIceStatusChanged(org.webrtc.PeerConnection.IceConnectionState state, NBMPeerConnection connection)
state
- The new ICE connection stateconnection
- The connection for which this event takes placevoid onRemoteStreamAdded(org.webrtc.MediaStream stream, NBMPeerConnection connection)
stream
- The new remote media streamconnection
- The connection for which this event takes placevoid onRemoteStreamRemoved(org.webrtc.MediaStream stream, NBMPeerConnection connection)
stream
- The removed remote media streamconnection
- The connection for which this event takes placevoid onPeerConnectionError(java.lang.String error)
error
- Error stringvoid onDataChannel(org.webrtc.DataChannel dataChannel, NBMPeerConnection connection)
dataChannel
- The data channelconnection
- The connection for which the data channel belongs tovoid onBufferedAmountChange(long l, NBMPeerConnection connection, org.webrtc.DataChannel channel)
l
- The previous amountconnection
- The connection for which the data channel belongs tochannel
- The data channel which triggered the eventvoid onStateChange(NBMPeerConnection connection, org.webrtc.DataChannel channel)
connection
- The connection for which the data channel belongs tochannel
- The data channel which triggered the eventvoid onMessage(org.webrtc.DataChannel.Buffer buffer, NBMPeerConnection connection, org.webrtc.DataChannel channel)
buffer
- The message bufferconnection
- The connection for which the data channel belongs tochannel
- The data channel which triggered the event


This document provide note and summary of RFC 4954, SMTP Service Extension for Authentication.
1. EHLO Extension
The EHLO keyword associated with this extension is "AUTH".
This extension provide one command "AUTH".
This extension add one optional parameter to MAIL FROM command: "AUTH"
This extension extends the maximum line length of the MAIL FROM command to 500 characters.
1.1. Common Response
-
530 5.7.0 Authentication required
This response SHOULD be returned by command MAIL, RCPT, DATA, VRFY, EXPN, and HELP, when server policy requires authentication in order to perform the requested action.
2. AUTH Command
"AUTH" mechanism ( initial-response / "=" ) CRLF mechanism = A string identifying a [SASL] authentication mechanism. initial-response = base64
Initial-response MUST be encoded in base64 and may or may not empty, depends on mechanism.
Initial-response "=" is response with zero length, to indicate that the response is present.
After a successful AUTH command completes, a server MUST reject any further AUTH commands with a 503 reply.
An AUTH command issued during a mail transaction MUST be rejected with a 503 reply.
There are two modes of AUTH handshakes: directly with initial-response and non-directly with initial-response in the second response.
2.1. Direct Handshake
In this mode, the $INITIAL_RESPONSE contains non empty text other than "=". This mode SHOULD be used when length of command line less than maximum (512 octets), to minimize round-trip to server.
; TLS handshake ; EHLO handshake C: AUTH $MECHANISM $INITIAL_RESPONSE S: 235 2.7.0 Authentication successful
2.2. Indirect Handshake
In this mode, the $INITIAL_RESPONSE is empty, which cost client additional step. This mode MUST be used when AUTH line is exceeding maximum command line (512 octets, see RFC 5321, section 4.5.3).
; TLS handshake ; EHLO handshake C: AUTH $MECHANISM S: "334" SP [ $SERVER_CHALLENGE ] CRLF C: $INITIAL_RESPONSE S: 235 2.7.0 Authentication successful
$SERVER_CHALLENGE is encoded in base64 and may or may not present depends on $MECHANISM.
2.3. Response
2.3.1. Success Response
"235" SP "2.7.0 Authentication successful" CRLF
The client SHOULD send an EHLO command as the first command after a successful SASL negotiation that results in the enabling of a security layer.
2.3.2. Error Response
-
432 4.7.12 A password transition is needed
This response indicates that the user needs to transition to the selected authentication mechanism. This is typically done by authenticating once using the [PLAIN] authentication mechanism. The selected mechanism SHOULD then work for authentications in subsequent sessions.
-
454 4.7.0 Temporary authentication failure
This response indicates that the authentication failed due to a temporary server failure. The client SHOULD NOT prompt the user for another password in this case, and should instead notify the user of server failure.
-
500 5.5.6 Authentication Exchange line is too long
This response indicates that the authentication failed due to the client sending a [BASE64] response that is longer than the maximum buffer size available for the currently selected SASL mechanism.
-
501 Syntax error in parameters or arguments
This response indicates that client canceling authentication or server failed to decode base64 from handshake.
-
504 5.5.4 Command parameter not implemented
If the requested authentication mechanism is invalid (e.g., is not supported or requires an encryption layer).
-
534 5.7.9 Authentication mechanism is too weak
This response indicates that the selected authentication mechanism is weaker than server policy permits for that user. The client SHOULD retry with a new authentication mechanism.
-
535 5.7.8 Authentication credentials invalid
This response indicates that the authentication failed due to invalid or insufficient authentication credentials. The client SHOULD ask the user to supply new credentials (such as by presenting a password dialog box).
2.4. Canceling AUTH
Client can cancel authentication, for example when client can’t decode base64 from server, by sending,
"*" CRLF
and server MUST reject the AUTH by response with 501 status code.
3. AUTH Parameter for MAIL FROM Command
"AUTH=" (mailbox / "<>")
If the server trusts the authenticated identity of the client to assert that the message was originally submitted by the supplied <mailbox>, then the server SHOULD supply the same <mailbox> in an AUTH parameter when relaying the message to any other server which supports the AUTH extension. For this reason, servers that advertise support for this extension MUST support the AUTH parameter to the MAIL FROM command even when the client has not authenticated itself to the server.
A parameter of AUTH=<> indicates that the original submitter of the message is not known. The server MUST NOT treat the message as having been originally submitted by the authenticated identity that resulted from the AUTH command.
If the AUTH parameter is not supplied and the client has authenticated, and the server believes the message is an original submission, the server MAY generate a <mailbox> from the user’s authenticated identity for use in an AUTH parameter when relaying the message to any server which supports the AUTH extension. The generated <mailbox> is implementation specific, but it MUST conform to the syntax of [SMTP]. If the implementation cannot generate a valid <mailbox>, it MUST transmit AUTH=<> when relaying this message.
If the server does not sufficiently trust the authenticated identity of the client, or if the client is not authenticated, then the server MUST behave as if the AUTH=<> parameter was supplied. The server MAY, however, write the value of any supplied AUTH parameter to a log file.
If an AUTH=<> parameter was supplied, either explicitly or due to the requirement in the previous paragraph, then the server MUST supply the AUTH=<> parameter when relaying the message to any server which it has authenticated to using the AUTH extension.
A server MAY treat expansion of a mailing list as a new submission, setting the AUTH parameter to the mailing list address or mailing list administration address when relaying the message to list subscribers.
4. Additional Requirements on Servers
Upon successful authentication, a server SHOULD use the "ESMTPA" or the "ESMTPSA" [SMTP-TT] (when appropriate) keyword in the "with" clause of the Received header field.
5. Security Considerations
Clients and servers MUST discard any knowledge obtained prior to the start of the SASL negotiation upon the establishment of a security layer.
Servers MAY implement a policy whereby the connection is dropped after a number of failed authentication attempts. If they do so, they SHOULD NOT drop the connection until at least 3 attempts to authenticate have failed.
The implementation MUST support at least one configuration where these SASL mechanisms are not advertised or used without the presence of an external security layer such as [TLS].
If an SMTP client is willing to use SASL PLAIN over TLS to authenticate to the SMTP server, the client verifies the server certificate according to the rules of [X509]. If the server has not provided any certificate, or if the certificate verification fails, the client MUST NOT attempt to authenticate using the SASL PLAIN mechanism.


There are many American Community Survey tables which provide information on the income of people living in the United States. Even for releases of data collected over three or five years, income data is reported in inflation-adjusted dollars for the release year.
Most income data is reported at the household level, but there are tables which are focused on family households, as well as some which report on individual income. There are also some tables which are particularly applicable to understanding income inequality, including one, B19083 which provides the Gini index for a place as its only column.
Income is reported in a number of ways: as a median value, or as a series of medians for groups within a total population; as a number of people or households earning in a certain bracket; as well as a few other structures.
Median incomes are reported by household, with subsets for only family households and also for nonfamily households. One table, B19326 reports median income for individuals by sex.
For all of these tables, income refers to income for "the last 12 months" prior to the survey response.
| Code | Title |
|---|---|
| B19013† | Median Household Income |
| B19019 | Median Household Income by Household Size |
| B19049 | Median Household Income by Age of Householder |
| B19113† | Median Family Income |
| B19119 | Median Family Income by Family Size |
| B19121 | Median Family Income by Number of Earners in Family |
| B19125 | Median Family Income by Presence of Own Children Under 18 Years |
| B19126 | Median Family Income by Family Type by Presence of Own Children Under 18 Years |
| B19202† | Median Nonfamily Household Income |
| B19215 | Median Nonfamily Household Income by Sex of Householder by Living Alone by Age of Householder |
| B19326 | Median Income by Sex by Work Experience in the Past 12 Months for the Population 15 Years and Over With Income |
|
†Also available in racial iterations. |
The various aggregate income tables provide the total amount of income, as well as broken down by income type, for the summary geography.
Table B19313 aggregates all income in the geography, which will produce a number somewhat higher than B19025 because it includes people who live in "group quarters."
Table B19301, "Per Capita income", is simply the value for B19313 "Aggregate Income" divided by the total population estimate for the summary geography. This statistic is more or less the 'average' income. Note the potential for misunderstanding: A) the aggregate income is divided among all people, not only those who actually had income, and B) as with any average, outliers (very big earners) can have a disproportionate effect on resulting figure.
For all of these tables, income refers to income for "the last 12 months" prior to the survey response.
| Code | Title |
|---|---|
| B19025† | Aggregate Household Income |
| B19050 | Aggregate Household Income by Age of Householder |
| B19061 | Aggregate Earnings for Households |
| B19062 | Aggregate Wage or Salary Income for Households |
| B19063 | Aggregate Self-employment Income for Households |
| B19064 | Aggregate Interest, Dividends, or Net Rental Income for Households |
| B19065 | Aggregate Social Security Income for Households |
| B19066 | Aggregate Supplemental Security Income (SSI) for Households |
| B19067 | Aggregate Public Assistance Income for Households |
| B19069 | Aggregate Retirement Income for Households |
| B19070 | Aggregate Other Types of Income for Households |
| B19127 | Aggregate Family Income |
| B19128 | Aggregate Family Income by Family Type by Presence of Own Children Under 18 Years |
| B19129 | Aggregate Family Income by Number of Workers in Family |
| B19130 | Aggregate Family Income by Family Type by Age of Householder |
| B19214 | Aggregate Nonfamily Household Income |
| B19216 | Aggregate Nonfamily Household Income by Sex of Householder by Living Alone by Age of Householder |
| B19301† | Per Capita Income |
| B19313† | Aggregate Income |
|
†Also available in racial iterations. |


Call Of Duty: Modern Warfare finishing moves and how to do them
If you’ve heard about finishing moves in Call Of Duty: Modern Warfare but aren’t sure how to do them then follow these handy tips.
It may sound like something that’s more likely to crop up in Mortal Kombat but finishing moves are one of the coolest new features in Call Of Duty: Modern Warfare.
They’re pretty easy to pull off too, if you know the trick to them. They work like stealth kills in other games and to get them to work you need to sneak up to an enemy without being seen and then press the melee button prompt when it appears on-screen.
That may sound easy but in a hectic game of Call Of Duty it’s anything but. The important thing is that you have to make sure you approach the enemy from behind, as it won’t work from the front or the sides.
Advertisement Advertisement
Call Of Duty: Modern Warfare finishing move tips
The other thing to be aware of is that the whole finishing move animation takes a good few seconds to run all the way through and during that whole time you’ll be essentially helpless to attacks from other players.
What can help to ensure a successful finishing move though is if you have the Dead Silence perk, which stops you from making any noise when moving and makes sneaking up on other people a lot easier.
It’s important to remember that you don’t get any extra points, or any kind of bonus, for performing a finishing move; only you and your victim will know it happened, so it really is just for the kudos.
If you get good at finishing moves there are quite a few to collect, including stabbing enemies in the back and breaking their necks.
Which animation plays out depends on where you’re looking when you initiate the attack – so if you’re going for the neck break, for example, then aim high.
Email<EMAIL_ADDRESS>leave a comment below, and follow us on Twitter


Football rumours from the media
Raheem Sterling, Troy Parrott and Erling Braut Haaland are among those making headlines.
What the papers say
Raheem Sterling has opened contract talks with Manchester City over improving his current £300k-a-week deal, the Daily Mirror reports.
Bayern Munich are preparing a shock move for 17-year-old Tottenham and Republic of Ireland striker Troy Parrott, according to the Daily Mail.
Tottenham’s compensation for sacking Mauricio Pochettino and his staff could reach the £19.6million figure that United had to pay Jose Mourinho and his team in December 2018, the Daily Mirror says.
Social media round-up
Players to watch
Jonny Hayes: Swansea and Stoke want Celtic’s 32-year-old Republic of Ireland winger as his contract comes to an end, The Sun’s Scottish edition reports.
Gianluca Busio: The Sporting Kansas City youngster has caught the eye of Manchester United, Fiorentina and Inter Milan, ESPN says.


I'll never forget the day that miprocin arrived in the area where I live. I had read tons of reports on it on an internet forum, and it seemed to be a 'cleaner version of mushrooms'.
I measured out three doses of 24 mg and I took one with my girlfriend and a close friend. We set out to walk around the still slightly wintery world and the effects quickly set in.
I have a very fast metabolism, which accounts for my insignificant body weight. Most chemicals still take ~45 minutes to hit me, however. The miprocin had me feeling pretty crazy within fifteen minutes. The only things I can ever remember hitting me this fast are mushrooms and, on occasion, high doses of LSD.
The 4-HO-MiPT had been described as psilocin (the active chemical in shrooms) without any of the body load. Shulgin states in TIHKAL that 4-HO-MiPT is more potent that psilocin (4-HO-DMT) and all of my testing confirms this.
I've always been a bit of a hardhead and my fellow trippers for the initial testing were hardheads as well. 24 milligrams, however, was enough to get my visual field warped to the point where all the plants I could see looked like weird alien life forms. I've taken 3.5 grams of cubensis mushrooms many times and none of those trips touched this one.
My body felt very receptive to the compound and I actually feel like 4-HO-MiPT makes my body feel better than at baseline. It gives me a certain acuity towards my body that seems like it would be very helpful for diagnostic body work. I could feel every fiber of my body and my balance and poise seemed dramatically enhanced.
The trees were just beginning to develop leaves and flowers again after the winter frost and I couldn't believe how well-defined the fractals were. I jumped up and down on a trampoline while I watched the world erupt with alien chaos around me. I felt complete.
I've since imbibed this compound at the 27 milligram level and I felt like the peak was a lot more intense. I want to try ~35 milligrams as I think this would be either a +4 experience or very close.
I have experimented with LSD, mushrooms, 2C-I, 2C-E, 2C-B, AMT, 5-MeO-AMT, 5-MeO-DMT, 5-MeO-DiPT, DMT, 2C-T-2, 2C-T-21, nitrous, ketamine, DXM, MDMA, salvia, and a few other notable psychedelics. DMT, salvia, and 5-MeO-DMT are not traditional psychedelics in my opinion because they are such short experiences with seemingly no value to be gained mentally. Of the traditional psychedelics then, I feel that LSD and miprocin are far superior to any others I have tried. Mushrooms are very comparable to miprocin, but I find the bodyload is a bit overwhelming at large doses. In the future I will stick to 4-HO-MiPT when I want a medium length trip and LSD when I want a long trip.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% extends "base.html" %} {% block title %}Form{% endblock %} {% block body %} {% if result %}
Thank you!
{% else %}The format is 'job' followed by a space then a number representing the number of years there. The records are separated by commas.
Example: undergrad 3, postgrad 4, noc 3, software 4, ioc 5, microservice 10


--- layout: archive title: Zulip Chat Archive permalink: /stream/116395-maths/topic/pow_lt_pow_of_lt.20golf.html ---
variable (x : ℝ) -- or [linear_ordered_field] theorem pow_lt_pow_of_lt {i j : ℕ} : x > 1 → i < j → x^i < x^j := sorry
Is this in mathlib?
all the other versions of this are in group_power.lean
, but it looks like this one was missed
nat.pow_lt_pow_of_lt_right : ∀ {x : ℕ}, x > 1 → ∀ {i j : ℕ}, i < j → x ^ i < x ^ j
This should be a theorem about partially ordered semirings or something, right?
linear_ordered_semiring
because we don't have partially ordered semirings
I spotted this hole this time last year, when I didn't understand the purpose of the mathlib library. At the time, I just figured this was the sort of thing you had to prove yourself, because I had no concept of what "should be there already" (so I proved it in the case I needed it). I understand this concept much better now.
here's my proof:
theorem pow_lt_pow {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le ((lt_mul_iff_one_lt_left (pow_pos (lt_trans zero_lt_one ha) _)).2 ha) (pow_le_pow (le_of_lt ha) h)
I'm doing all my own example sheet questions again after last year's attempts. Some of the code I wrote a year ago was absolutely terrible.
Here's the library I wrote this year, to do a question on my problem sheet about n'th roots (n a positive integer)
Any stylistic comments or anything would be welcome. I only care about the reals but really that's for stylistic reasons -- I am trying to write a library with a lot of tactic mode proofs so maths students can follow them more easily, and I wanted to make it as simple as possible. Maybe some of this stuff is in mathlib but I understand my own proofs better -- I find them much more readable.
My proof differs from yours in the proof strategy, which is most of why it is shorter
lt_of_pow_lt
also has a very short proof using pow_le_pow
The lesson is "use lemmas"
And I don't just mean use theorems that have already been proven, I mean arrange the proofs of similar facts to make the best use of commonality
your assumptions to lt_of_pow_lt
are also stronger than they need to be - it's nice when you can learn this by attempting the proof itself
nth_root_unique
is reducible in the sense that it has an equality hypothesis - I would prove a lemma which doesn't have that hypothesis first
it also factors into x ^ n = y ^ n -> x = y
, which should also be in group_power
in some generality
here's my proof:
theorem pow_lt_pow {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le ((lt_mul_iff_one_lt_left (pow_pos (lt_trans zero_lt_one ha) _)).2 ha) (pow_le_pow (le_of_lt ha) h)
pow_le_pow (le_of_lt ha) h
is a dirty trick, isn't it?
So the reason I have noticed that pow_le_pow
trick is because I manually completely unfolded your proof:
theorem pow_lt_pow' {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := begin apply lt_of_lt_of_le, { exact ((lt_mul_iff_one_lt_left (pow_pos (lt_trans zero_lt_one ha) _)).2 ha)}, exact (pow_le_pow (le_of_lt ha) h) end theorem pow_lt_pow'' {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := begin apply lt_of_lt_of_le, { refine (lt_mul_iff_one_lt_left _).2 ha, refine pow_pos _ _, -- got it exact lt_trans zero_lt_one ha }, { refine pow_le_pow _ h, -- dirty trick? exact le_of_lt ha } end
into a form which I can actually read. Could there be some code which helps me do this unravelling? It is so much easier for me to inspect nodes of the tree when in tactic mode. @Simon Hudon can code do this? Break down some simple class of term mode functions into a tactic proof?
explode
does this
Even after this breaking-down I still lose information. For example after that first lt_of_lt_of_le
-- when I do it in tactic mode I get an extra metavariable goal which Lean has solved in the term mode proof but has not solved in the tactic mode proof. I just want to inspect the metavariable-free goal which is actually proved at each function application I think. How does one do this?
How do I run explode
?
found it
ooh, explode
actually works pretty well on that proof
Quick, we need an emoji
hey #explode
is exactly the answer to my question!
:grinning:
import tactic.explode import algebra.group_power variables {α : Type*} [linear_ordered_semiring α] theorem pow_lt_pow {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le ((lt_mul_iff_one_lt_left (pow_pos (lt_trans zero_lt_one ha) _)).2 ha) (pow_le_pow (le_of_lt ha) h) #explode pow_lt_pow
MWE. Say kids! Understand Mario's proofs in seconds with #explode
! Cool name, cool tactic.
variables {α : Type*} [linear_ordered_semiring α] theorem pow_lt_pow {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le ( iff.mpr ( lt_mul_iff_one_lt_left $ pow_pos ( lt_trans zero_lt_one ha ) _ ) ha ) ( pow_le_pow ( le_of_lt $ ha ) h )
Here is another way of taking your proof apart Mario. I have tried to have some sort of a system when unravelling. Is there some sort of name for a form like this? Again I feel like I applied an algorithm. I used $ for functions of one variable and indented for two or more.
How do I tell which term fills the underscore in that proof, by the way? What's the easiest way?
I discovered recently if you replace a _
by a hole {! !}
then Lean will give you an error saying there's only one way to fill the hole and tell you what it should be
I was just about to say that ^
In this case it's n
theorem pow_lt_pow' {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le -- 14 ( iff.mpr -- 11 ( lt_mul_iff_one_lt_left $ -- 10 pow_pos -- 9 -- takes two inputs ( lt_trans -- 8 zero_lt_one -- 7 ha -- 5 ) _ -- gaargh explode doesn't tell me ) ha -- 5 ) ( pow_le_pow -- 13 ( le_of_lt $ -- 12 ha -- 5 ) h -- 6 )
I can't immediately see how to fill in that hole using the output of #explode
though
Funky numbering by the way.
This is post-hoc and probably not immediate enough, but first note that the underscore is the second argument to pow_pos
(easy to see right away with the bracket colorizer extension), and then compare with the corresponding line of #explode
, which says 0 < a ^ n
.
Maybe this indentation is better:
import tactic.explode import algebra.group_power variables {α : Type*} [linear_ordered_semiring α] theorem pow_lt_pow' {a : α} {n m : ℕ} (ha : 1 < a) (h : n < m) : a ^ n < a ^ m := lt_of_lt_of_le -- 14 ( iff.mpr -- 11 ( lt_mul_iff_one_lt_left -- 10 ( pow_pos -- 9 -- takes two inputs ( lt_trans -- 8 zero_lt_one -- 7 ha -- 5 ) _ -- gaargh explode doesn't tell me ) ) ha -- 5 ) ( pow_le_pow -- 13 ( le_of_lt -- 12 ha -- 5 ) h -- 6 ) #explode pow_lt_pow'
import tactic.explode import algebra.group_power theorem pow_lt_pow' {α : Type*} -- 0 [linear_ordered_semiring α] -- 1 {a : α} -- 2 {n m : ℕ} -- 3,4 (ha : 1 < a) -- 5 (h : n < m) : -- 6 a ^ n < a ^ m := -- proof starts lt_of_lt_of_le -- 14 ( iff.mpr -- 11 ( lt_mul_iff_one_lt_left -- 10 ( pow_pos -- 9 ( lt_trans -- 8 zero_lt_one -- 7 ha) -- 5 _)) -- gaargh explode doesn't tell me ha) -- 5 ( pow_le_pow -- 13 ( le_of_lt -- 12 ha) -- 5 h) -- 6 #explode pow_lt_pow'
explode covers basically every other line of code
#explode zmodp.quadratic_reciprocity -- (deterministic) timeout
boo
Hmm, so the line in the output of #explode
corresponding to pow_pos
is this:
9 │8 │ pow_pos │ 0 < a ^ n
Why doesn't the second column read 8,3
(3
is the line corresponding to n : nat
)? It's the same whether I put in n
or _
.
Non-propositional arguments are automatically suppressed, because they would otherwise dominate the output and they are inferrable from the (fully elaborated) types in the right column
Wow, explode
is really nice. It is great for teaching. I just tried
theorem foo (A B C : Prop) : (A → B → C) → (A ∧ B → C) := λ h hab, and.elim hab (λ ha hb, h ha hb) #explode foo
It made me realize that the proof can be shortened:
theorem foo' (A B C : Prop) : (A → B → C) → (A ∧ B → C) := λ h hab, and.elim hab h
The tactic doesn't behave well with have
, though.
theorem bar (A B C : Prop) : A ∧ (B ∨ C) → (A ∧ B) ∨ (A ∧ C) := assume h : A ∧ (B ∨ C), have h₁ : A, from and.left h, have h₂ : B ∨ C, from and.right h, or.elim h₂ (assume h₃ : B, or.inl (and.intro h₁ h₃)) (assume h₃ : C, or.inr (and.intro h₁ h₃)) #explore bar
@Mario Carneiro Would it be hard to handle have
nicely in the tactic?
hm, it's explode
not explore
but that is also an interesting name
Oops, sorry, I forgot to cut-and-paste that part and added it manually. You are right, it is also a good name.
have
should be handled well since it will translate to a proof line that is referred to twice
what does it look like now? (on my phone)
indeed it is best suited to the basic dtt proofs used in intro logic
In general, I think I'd rather read the output from the bottom up when trying to figure out what you're doing.
yes absolutely
so...it's upside-down?
well no, it is meant to be read bottom up
but it follows the usual proof order
it is a fitch style proof display
Thanks a lot for alerting me to it.
#explode bar
looks like this now:
bar : ∀ (A B C : Prop), A ∧ (B ∨ C) → A ∧ B ∨ A ∧ C 0│ │ A ├ Prop 1│ │ B ├ Prop 2│ │ C ├ Prop 3│ │ h ├ A ∧ (B ∨ C) 4│ │ λ (h₁ : A), have h₂ : B ∨ C, from h.right, or.elim h₂ (λ (h₃ : B), or.inl ⟨h₁, h₃⟩) (λ (h₃ : C), or.inr ⟨h₁, h₃⟩) │ A → A ∧ B ∨ A ∧ C 5│3 │ and.left │ A 6│4,5│ ∀E │ A ∧ B ∨ A ∧ C
also pp.beta helps sometimes
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Trans Mountain made an animated movie about its Burnaby terminal project
Burnaby Now
by Chris CampbellTrans Mountain has ramped up its promotion of the work being done at Burnaby’s Westridge Marine Terminal.
Construction kick-started again in August and Trans Mountain has been sharing details through a variety of methods, including photos and a recent time-lapse video.
Now, Trans Mountain is showing off a three-minute-30-second animated film about what’s involved in a project that could take up to three years to finish.
The video can be seen below, but here are a few highlights from the video:
- The video starts by saying that the terminal was built back in 1954 and has been “operating safely” ever since.
- The project will expand the terminal from one berth to three.
- A series of “cells” will be built using 1,900 sheet piles. A “turbidity curtain” will be used to protect marine life during construction.
- A “rockfish reef” will be built to protect rockfish and other marine life.
- 160 piles will need to be added, with shrouds and curtains used to try and dampen the noise from the hammers driving the piles into the ground.
- Bubble curtains will be used to try and protect marine life from the underwater noise produced by the pile driving.
- Spotters in boats on the water are supposed to signal the pile driving to stop if marine life such as seals are spotted nearby.
The last part of the video is aimed at saying the project will bring economic prosperity through the Trans Mountain pipeline expansion.


Thousands march in Paris against Islamophobia after attack
PARIS (Reuters) - Thousands marched through Paris on Sunday in an anti-Islamophobia demonstration that has divided France’s political class.
Organizers said they had called the rally in a sign of support two weeks after a man with far-right connections fired shots in a mosque in the southwestern city of Bayonne, injuring two elderly men.
Members of hard-left parties took part in the march - though some others in the center stayed away saying it threatened France’s tradition of secularism, and far right leader Marine Le Pen said the event had been organized by Islamists.
Crowds walked through the capital waving banners marked with the messages “Stop all racism” and “Islamophobia is not an opinion but a crime” at the event organized by the Collectif Contre l’Islamophobie en France.
“It’s up to us to demonstrate after an event like Bayonne to ensure the freedom of religion and thought that goes with it,” the head of the far left France Unbowed party, Jean-Luc Melenchon, told journalists.
But the state secretary in charge of fighting discrimination, Marlene Schiappa, had said the demonstration was a protest against secularism “under the disguise of fighting discrimination”.
More than 40% of Muslims said they had felt religious discrimination in France, according to a survey by Ifop earlier this month.
Islam is the second biggest religion in France, which has the biggest Muslim minority in Western Europe.
Last month, a member of Le Pen’s National Rally party fueled an ongoing debate about the position of Muslims and Muslim symbols in France by publicly telling a woman to remove her headscarf.


3 writes to RemainingActionsToProcess
System.Management.Automation (3)
engine\EventManager.cs (3)
1155
subscriber.
RemainingActionsToProcess
--;
1347
currentSubscriber.
RemainingActionsToProcess
++;
1880
RemainingActionsToProcess
= 0;
2 references to RemainingActionsToProcess
System.Management.Automation (2)
engine\EventManager.cs (2)
1157
subscriber.
RemainingActionsToProcess
== 0;
1351
if (currentSubscriber.RemainingTriggerCount == 0 && currentSubscriber.
RemainingActionsToProcess
== 0)


See how we're reinventing the way teams activate influencer marketing campaigns.
How FanDuel closed 2015 with over
$1.8 billion in collected entry fees to
become one
of the fastest-growing
comapnies in the world.They even beat
DraftKings by a $600
million leadt by.
As measured
against LTV
influencer
spend
How Tik Tok achieved breakout success
through regional specific influencer
campaigns
at scale.
Posts
created
Paid to
influencers
How Airbnb promoted a travel-basd
user-generated content campaign and
resolve
operational bottlenecks in
influencer contracting,relationship
management,and
performance.
Campaign
duration
influencer
How World of Tanks generated targeted
brand awareness among males ages 17
to 25 before the
launch of their 2016
Super Bowl Ad.
Reduction in YouTube CAC
Average view duration
How H&R Block increased sales by
generating awareness of their new Tax
Pro Go Review with
over 6K
engagements before the 2018 tax
season ended.
influencers
Blog Posts
How Walmart generated social
awareness for the launch of their Star
Wars product line and
Gold Disc
Giveaway in a family-friendly way.
Posts
Impressions
By creating and distributing targeted
and timed content on social media for a
three-night
special event, Investigation
Discovery was able to create a trending
conversation on
Twitter.
Contact Views
Twitter Trending Hashtag
How Casper created targeted
consumer exposure on YouTube as “the
Internet’s favorite
mattress” promoting
a path to purchase.
Targeted Websites Visits
Items over $595 added to cart
- Ryan Faber, Fanduel
Submit the form below, tell us a bit more about
your business, and we’ll be in touch
shortly.
Are you an Influencer? Sign up here


Exact Change
* Seller: That will be fourteen dollars.
* Buyer: Here’s a twenty.
* Seller: Sorry, I don’t have any change.
* Buyer: OK, here’s a ten and a five. Keep the change.
When travelling to remote locations, it is often helpful to bring cash, in case you want to buy something from someone who does not accept credit or debit cards. It is also helpful to bring a variety of denominations in case the seller does not have change. Even so, you may not have the exact amount, and will have to pay a little bit more than full price. The same problem can arise even in urban locations, for example with vending machines that do not return change.
Of course, you would like to minimize the amount you pay (though you must pay at least as much as the value of the item). Moreover, while paying the minimum amount, you would like to minimize the number of coins or bills that you pay out.
The first line of each test chunk contains an integer specifying the number of test cases in this chunk to follow. Each test case begins with a line containing an integer, the price in cents of the item you would like to buy. The price will not exceed 10 000 cents (i.e., $100). The following line contains a single integer n, the number of bills and coins that you have. The number n is at most 100. The following n lines each contain one integer, the value in cents of each bill or coin that you have. Note that the denominations can be any number of cents; they are not limited to the values of coins and bills that we usually use in Canada. However, no bill or coin will have a value greater than 10 000 cents ($100). The total value of your bills and coins will always be equal to or greater than the price of the item.
Please process to the end of the data file.
The first line of each test chunk contains an integer specifying the number of test cases in this chunk to follow. Each test case begins with a line containing an integer, the price in cents of the item you would like to buy. The price will not exceed 10 000 cents (i.e., $100). The following line contains a single integer n, the number of bills and coins that you have. The number n is at most 100. The following n lines each contain one integer, the value in cents of each bill or coin that you have. Note that the denominations can be any number of cents; they are not limited to the values of coins and bills that we usually use in Canada. However, no bill or coin will have a value greater than 10 000 cents ($100). The total value of your bills and coins will always be equal to or greater than the price of the item.
Please process to the end of the data file.
1
1400
3
500
1000
2000
1
1400
3
500
1000
2000
1500 2
1500 2
一道很简单的0-1背包;
不过条件是每个只能用一次(不是完全背包);因为这个理解的错误,怎么也是wrong anwer,
后来用0-1一试,a掉了.不过发现速度差距很大,要来傻崽的代码,发现题目有两个条件可以挖掘,就是每个数据都不打于10000,所以背包最大放到20001就够了.果然加速不少,从原来的238ms到64ms,后来发现还可以加速,就是写法换了一下.加到了15ms,爽啊…
解题参考：http://yxq0620.blog.163.com/blog/static/4449439220102812734832/
(adsbygoogle = window.adsbygoogle || []).push({});
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
为什么不去练体操？
第二个是python代码啊。。
不错，再多来的CF上面的题
方法4中使用hash表，只要用出现次数作为Value，就可以解决重复元素的问题了。
程序是对的。有些地方用了C++的写法
无需用转移方程也可以解决，哈哈
使用代码高亮的插件，再修改下css
此题的样例描述不正确
懂了，谢谢啦
太好了，收藏
学习了
else if也是要比较两次
多谢支持！
问题3中，GetRightPosition()和GetLeftPosition()与STL中的upper_bound()和lower_boune()的代码实现一样吗？


Music & Sound
Dual audio layers allow music to play, even across routes while still using sounds activated by interactions or time.
Play music while still reacting to events with sounds!
This technique can be used with animations to create responsive and emissive experiences.
First: Load Music & Sounds
Again, we pre-load all sounds for a route using the <n-audio-action-sound-load> and <n-audio-action-music-load> components. This gets the audio ready to play and waits for the start command.
Then: Activate
Again, we play the music by sending an action with start command using the <n-action-activator> , <n-audio-action-music> and <n-audio-action-sound> elements with their command and track-id.


catChat
Login
Are you a cat?
Please log in to see the chat or your profile!
Profile
Username:
Name:
Birthdate:
Description:
Edit Profile
Update Profile
your first name
your birthdate
describe yourself
Received Messages
From
To
Title
Sent
You have not received any messages.
Sent Messages
From
To
Title
Sent
You do not have any sent messages.
×
's Profile
Name:
Birthdate:
Description:
×
Private* Message
Send To
Message Title
Message Body
*not private


When starting a new "unit of test" (method, interface, module, ...), the first test to write should define its behaviour in the "zero case" i.e. when zero/null/empty goes in, or out.
First, the zero case is often the easiest to implement. Just return "zero", throw an exception or something like that. And because the feature itself is easy, it is effective at driving the creation of the new unit, satisfying dependencies in the test environment and otherwise getting started.
Second, the zero case is often a nasty boundary case that gets overlooked without the test. Sometimes (often with collections) it is automatically OK, but too often it is not.
Originally published on 2009-08-27 at http://www.jroller.com/wipu/entry/test_the_zero_case_first under category Art of programming


As you probably already know, my name is Matt Beal and I currently reside in Norman, OK. I am studying web devolpment at DevBootcamp and this site will be used to showcase not only the projects that I will be working on, but the progress that I make as I go through the curriculum. So feel free to take a look around, and if you have any questions or comments, hit the contact link.


(a) This subpart prescribes policies and procedures for identification of commercial and government entities. The Commercial and Government Entity (CAGE) code system may be used, among other things, to–
(1) Exchange data with another contracting activity, including contract administration activities and contract payment activities.
(2) Exchange data with another system that requires the unique identification of a contractor entity; or
(3) Identify when offerors are owned or controlled by another entity.
(b) For information on the unique entity identifier, which is a different identifier, see 4.605 and the provisions at 52.204-6, Unique Entity Identifier, and 52.204-7, System for Award Management.
As used in this part–
“Commercial and Government Entity (CAGE) code” means–
(1) An identifier assigned to entities located in the United States or its outlying areas by the Defense Logistics Agency (DLA) Commercial and Government Entity (CAGE) Branch to identify a commercial or government entity; or
(2) An identifier assigned by a member of the North Atlantic Treaty Organization (NATO) or by the NATO Support and Procurement Agency (NSPA) to entities located outside the United States and its outlying areas that the DLA Commercial and Government Entity (CAGE) Branch records and maintains in the CAGE master file. This type of code is known as a NATO CAGE (NCAGE) code.
“Highest-level owner” means the entity that owns or controls an immediate owner of the offeror, or that owns or controls one or more entities that control an immediate owner of the offeror. No entity owns or exercises control of the highest level owner.
“Immediate owner” means an entity, other than the offeror, that has direct control of the offeror. Indicators of control include, but are not limited to, one or more of the following: ownership or interlocking management, identity of interests among family members, shared facilities and equipment, and the common use of employees.
(a) Commercial and Government Entity code.
(1) Offerors shall provide the contracting officer the CAGE code assigned to that offeror’s location prior to the award of a contract action above the micro-purchase threshold, when there is a requirement to be registered in the System for Award Management (SAM) or a requirement to have a unique entity identifier in the solicitation.
(2) The contracting officer shall include the contractor’s CAGE code in the contract and in any electronic transmissions of the contract data to other systems when it is provided in accordance with paragraph (a)(1) of this section.
(b) Ownership or control of offeror. Offerors, if owned or controlled by another entity, shall provide the contracting officer with the CAGE code and legal name of that entity prior to the award of a contract action above the micro-purchase threshold, when there is a requirement to be registered in SAM or a requirement to have a unique entity identifier in the solicitation.
(a) Contracting officers shall verify the offeror’s CAGE code by reviewing the entity’s registration in the System for Award Management (SAM). Active registrations in SAM have had the associated CAGE codes verified.
(b) For entities not required to be registered in SAM, the contracting officer shall validate the CAGE code using the CAGE code search feature at https://cage.dla.mil.
(a) Insert the provision at 52.204-16, Commercial and Government Entity Code Reporting, in all solicitations that include–
(1) 52.204-6, Unique Entity Identifier; or
(2) 52.204-7, System for Award Management.
(b) Insert the provision at 52.204-17, Ownership or Control of Offeror, in all solicitations that include the provision at 52.204-16, Commercial and Government Entity Code Reporting.
(c) Insert the clause at 52.204-18, Commercial and Government Entity Code Maintenance, in all solicitations and contracts when the solicitation contains the provision at 52.204-16, Commercial and Government Entity Code Reporting.
(d) Insert the provision at 52.204-20, Predecessor of Offeror, in all solicitations that include the provision at 52.204-16, Commercial and Government Entity Code Reporting.


Menu
Home
About
Salary Map
Stats by Team
NBA Statistics
Salaries and Statistics
NBA Teams:
Player Salary


| BIRD NAME | BIO NAME | IMAGE | DESCRIPTION | ORDER | FAMILY | GENUS | SPECIES | BIN AUTH | |
| {{results.bindings.0.BIRD_NAME.value}} | {{results.bindings.0.BIO_NAME.value}} | {{results.bindings.0.BIRD_DESCRIPTION.value}} | {{results.bindings.0.ORDER.value}} | {{results.bindings.0.FAMILY.value}} | {{results.bindings.0.GENUS.value}} | {{results.bindings.0.SPECIES.value}} | {{results.bindings.0.BIN_AUTH.value}} |


There is'nt a real start of anything when you're using W.
Just type an adress in your web browser, after your W folder. You should see an empty page, not existing yet. You can login to create one at this adress. If you are already logged in, you can juste type page_id/add
, this will directly create a page at this adress.
This page_id
is the identifier of each page, you cant change it later, this is like a real solid adress, it cant move. It can only contain lowercase letters, numbers, hyphens or underscore charachters.
No visitor can see the full list of pages you've created. The only way to see the whole map of your project, is to be conected at least as an editor, and go to the "homepage", the root adress where W is instaled.
The structure of website is very simple as there is no structure. It's you to link the pages together or not.
A page is defined by a unique id
. As it's created, you can access it typing .../your_page_id/
or without slash .../your_page_id
An ID can only contain lowercase letters, numbers, underscore and "-"
Unique identifier, this is the url that point to your page
Page title, can use more complex characters than the ID element. It's printed in the explorer tab name. It's the official name of your page.
The description attribute is a short informations about your page. It's used to create tooltip, when the mouse hover internal links.
tags are used to create selections of pages. tags are one word only, sepparated by commas and whitespace.
Set the level of privacy of your page. 0 -> public 1 -> private reserved to private readers 2 -> not published Nobody but editors can see it.
You can manualy set a date and time for each pages.
All this pages are stored in your database, as a file by page. You can access them in the .../database/name_of_your_store/
W use the fives basics html elements to store your content
You can use any of them, only one or all at the same time, as you prefer.
In any of the five html element you can use to store content, you can use the following syntax, that is specific to W, extending the Markdown syntax :
You can create internal link very quickly, only by using the id of your page. The link text will be remplaced by the title associated with this page.
[page_id]
This will output :
url" class="internal" title="page->description">page->title
%TITLE%
Will output the page title
attribute. This can be usefull when templating, or including differents page element.
%DESCRIPTION%
As for the title, this will output the description
attribute of the page
%DATE% %DATECREATION% %DATEMODIF%
There are tree dates attributes that can be printed. The date attribute, will return the date that can be manualy set in the editor. datecreation will return the date of the page creation. datemodif will output the last editing date.
You can automatically generate summary, based on the page <h*>
elements
%SUMMARY%
This will generate a classic

html list.
You can create a html list of links pointing to all the pages using this tag.
%TAG:__tag__%
Let's suppose we are in page3 and we have page2, page3, page5, using this tag, this will output :

 url" class="internal" title="2->description">2->title

 url" class="internal actualpage" title="3->description">3->title

 url" class="internal" title="5->description">5->title

The list is ordered by the date
attribute, that you can set manualy for each page. You may have noticed that the actual page (page 3), has been specified using .actualpage
class. This can be usefull to create a menu and highlight the current page.
You can use the article
html element, by separating text using at least ====
. It is of course possible to use Markdown synthax inside those articles separators
==== some text ======important this is a longer text ======
This will ouptut :

 some text

 this is a longer textt

As you may have noticed, there is also the possibility to add a custom id
to any of the articles created that way
As it is too long adding all media of a folder one by one, you can just print the content of an entire folder using this method.
%MEDIA:__directory__
Just point to the good directory inside the media folder. This will output html list, creating image elements, audio players, video players, or just basic link, depending on the media type.
%HTML_ELEMENT%
This will include the matching html element from your page's content in your page body. If there is nothing in the corresponding element, it won't print anything. The name of the html element as to be UPPERCASE.
For example :
%ASIDE% %MAIN%
Will output :
 __the content of your aside__   __the content of your main__
You can also use one element multiple times.
%HTML_ELEMENT:page_id%
By doing this, you can include the HTML_ELEMENT
of the page using this page_id
id. You can even nest differents pages source by adding page_id
separated by a dot, this would be like :
%HTML_ELEMENT:page1_id+page2_id%
And you can mix it with the original page content using !
identifier
%HTML_ELEMENT:page3_id+!%
This will output :
<html_element class="page3_id page_id"> __content of page1's html element__ __content of this page html element__ </html_element>