3.2 Computer simulation: Symbulate
Note: some of the plots and tables in this and the following sections are not displayed properly in the text. See the accompanying Jupyter notebooks for a better representation of Symbulate output.
We will perform computer simulations using the Python package Symbulate. The syntax of Symbulate mirrors the language of probability in that the primary objects in Symbulate are the same as the primary components of a probability model: probability spaces, random variables, events. Once these components are specified, Symbulate allows users to simulate many times from the probability model and summarize the results.
This section contains a brief introduction to Symbulate; many more examples can be found throughout the text or in the Symbulate documentation. Remember to first import Symbulate during a Python session using the command
3.2.1 Simulating outcomes
We continue Example 3.1 from Section 3.1 where \(X\) is the sum of two rolls of a fair four-sided die, and \(Y\) is the larger of the two rolls (or the common value if a tie). The following Symbulate code defines a probability space35 P
for simulating the 16 equally likely ordered pairs of rolls via a box model.
The above code tells Symbulate to draw 2 tickets (size = 2
), with replacement36, from a box with tickets labeled
1, 2, 3, and 4 (entered as the Python list [1, 2, 3, 4]
). Each simulated outcome consists of an ordered37 pair of rolls. The sim(n)
command simulates n
realizations of probability space outcomes (or events or random variables).
## <symbulate.results.Results object at 0x00000000207D6F48>
3.2.2 Simulating random variables
A Symbulate RV
is specified by the probability space on which it is defined and the mapping function which defines it. Recall that \(X\) is the sum of the two dice rolls and \(Y\) is the larger (max).
The above code simply defines the random variables. Since a random variable \(X\) is a function, any RV
can be called as a function38 to return its value \(X(\omega)\) for a particular outcome \(\omega\) in the probability space.
## Warning: Calling an RV as a function simply applies the function that defines the RV to the input, regardless of whether that input is a possible outcome in the underlying probability space.
## Warning: Calling an RV as a function simply applies the function that defines the RV to the input, regardless of whether that input is a possible outcome in the underlying probability space.
## 5 3
The following commands simulate 100 values of the random variable Y
and store the results as y
. For consistency with standard notation, the random variable itself is denoted with an uppercase letter Y
, while the realized values of it are denoted with a lowercase letter y
.
## <symbulate.results.RVResults object at 0x000000001FA99748>
Values and their frequencies can be summarized using tabulate
.
## {2: 16, 4: 43, 1: 6, 3: 35}
By default, tabulate
returns frequencies (counts). Adding the argument normalize = True
returns relative frequencies (proportions).
## {2: 0.16, 4: 0.43, 1: 0.06, 3: 0.35}
Methods like sim
and tabulate
can be chained together in a single line of code.
## {2: 0.17, 4: 0.44, 1: 0.09, 3: 0.3}
Each call to sim
reruns the simulation to generate a new set of simulated values. To perform multiple operations on a single set of simulated values, store the simulation results as a variable (like y
above). When running Y.sim(100)
Symbulate simulates, in the background, outcomes from the probability space P
and then computes Y
for these outcomes; however, the outcomes themselves are not saved. (We will soon see how to simulate multiple quantities simultaneously.)
We can plot the 100 individual simulated values of \(Y\) in a rug plot.
The rug plot emphasizes that realizations of the random varible \(Y\) are numbers along a number line. However, the rug plot does not adequately summarize the relative frequencies. Instead, calling .plot()
produces39 an impulse plot which displays the simulated values and their relative frequencies.
3.2.3 Approximating distributions
The true distribution of \(Y\) is displayed in Figure XXX. The plot above, based on only 100 simulated values, provides a poor approximation to the distribution of \(Y\). We often initially simulate a small number of repetitions to see what the simulation is doing and check that it is working properly. However, in order to accurately approximate probabilities or distribution we simulate a large number of repetitions (usually thousands for our purposes).
Now we simulate 10,000 values of the random variable Y
and summarize the simulation output to approximate the distribution of \(Y\). Since the simulation results below are stored as y
, the same set of results is used to produce the table and the plot. Compare the simulation results with Table XXX and Figure XXX. The results of 10000 repetitions provide a much better approximation to the true distribution of \(Y\) than the results of just 100 repetitions.
## {4: 4412, 1: 611, 3: 3162, 2: 1815}
## Traceback (most recent call last):
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\backends\backend_qt5.py", line 508, in _draw_idle
## self.draw()
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\backends\backend_agg.py", line 388, in draw
## self.figure.draw(self.renderer)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
## return draw(artist, renderer, *args, **kwargs)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\figure.py", line 1709, in draw
## renderer, self, artists, self.suppressComposite)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\image.py", line 135, in _draw_list_compositing_images
## a.draw(renderer)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\artist.py", line 38, in draw_wrapper
## return draw(artist, renderer, *args, **kwargs)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 2607, in draw
## self._update_title_position(renderer)
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\axes\_base.py", line 2548, in _update_title_position
## ax.xaxis.get_ticks_position() in choices):
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\axis.py", line 2146, in get_ticks_position
## self._get_ticks_position()]
## File "C:\Users\kjross\Anaconda3\lib\site-packages\matplotlib\axis.py", line 1833, in _get_ticks_position
## minor = self.minorTicks[0]
## IndexError: list index out of range
The following is a summary of a simulation of \(X\) values. Compare with XXX
## {8: 618, 7: 1200, 4: 1832, 6: 1940, 5: 2446, 3: 1287, 2: 677}
3.2.4 Simulating events
Events can also be defined and simulated. For programming reasons, events are enclosed in parentheses ()
rather than braces \(\{\}\).
A realization of an event is True
if the event occurs for the simulated outcome, or False
if not.
## <symbulate.results.Results object at 0x000000002B49C808>
For logical equality use a double equal sign ==
. For example, (Y == 3)
represents the event \(\{Y=3\}\).
## {True: 3237, False: 6763}
3.2.5 Simulating multiple random variables
We can simulate \((X, Y)\) pairs using40 &
. We store the simulation output as xy
to emphasize that xy
contains pairs of values.
## <symbulate.results.RVResults object at 0x000000002B4A0AC8>
Pairs of values can also be tabulated.
## {(3, 2): 15, (6, 4): 15, (4, 3): 10, (5, 4): 9, (7, 4): 16, (8, 4): 6, (4, 2): 7, (2, 1): 5, (5, 3): 16, (6, 3): 1}
## {(3, 2): 0.15, (6, 4): 0.15, (4, 3): 0.1, (5, 4): 0.09, (7, 4): 0.16, (8, 4): 0.06, (4, 2): 0.07, (2, 1): 0.05, (5, 3): 0.16, (6, 3): 0.01}
Individual pairs can be plotting in a scatter plot, which is a two-dimensional analog of a rug plot.
The values can be “jittered” slightly, as in Figure ??, so that points do not coincide.
The two-dimensional analog of an impulse plot is a tile plot. For two discrete variables, the 'tile'
plot type produces a tile plot (a.k.a. heat map) where rectangles represent the simulated pairs with their relative frequencies visualized on a color scale.
We can add the impulse plot for each of each \(X\) and \(Y\) in the margins of the tile plot using the 'marginals'
argument.
3.2.6 Simulating outcomes and random variables
Recall Table 3.1 which displays both the outcomes of the two rolls and the corresponding values of \(X\) and \(Y\) for 10 repetitions. Calling (X & Y).sim(10)
as in the previous section produces results like those in the table, but only the values of (X & Y)
are saved and displayed. The outcomes of the rolls are generated in the background but not saved.
We can create a RV
which returns the outcomes of the probability space41. The default mapping function for RV
is the identity function, \(g(u) = u\), so simulating values of U=RV(P)
below returns the outcomes of the BoxModel P
representing the outcome of the two rolls.
## <symbulate.results.RVResults object at 0x000000002E664188>
Now we can simulate and display the outcomes along with the values of \(X\) and \(Y\) using &
.
## <symbulate.results.RVResults object at 0x000000002B537C88>
Because the probability space P
returns pairs of values, U=RV(P)
abve defines a random vector. The individual components^[The components can also be accessed using brackets. U1, U2 = RV(P)
is shorthand for
U = RV(P)
U1 = U[0]
U2 = U[1]
Python uses zero-based indexing, so 0 refers to the first components, 1 to the second, and so on.] of U
can be “unpacked” as U1, U2
in the following. Here U1
represents the result of the first roll and U2
the second.
## <symbulate.results.RVResults object at 0x000000002B57F248>
3.2.7 Simulating equally likely outcomes
In the code above we used a box model to specify the probability space correspoding to pairs of rolls of a four-sided die. When tickets are equally likely and sampled with replacement, a Discrete Uniform model can also be used. Think of a DiscreteUniform(a, b)
probability space corresponding to a spinner with sectors of equal area labeled with integer values from a
to b
(inclusive). For example, the spinner in Figure 3.1 corresponds to DiscreteUniform(1, 4)
.
In the following, \(U\) represents the result of a single roll of a fair four-sided die. The default mapping function in RV
is the identity, so U = RV(P)
represents42 \(U(\omega) = \omega\).
For two rolls the probability space corresponds to spinning the DiscreteUniform spinner two times, which is coded43 as DiscreteUniform(a = 1, b = 4) ** 2
. The first line below has the same effect44 as BoxModel([1, 2, 3, 4], size = 2, replace = True)
.
3.2.8 Brief summary of Symbulate commands
Many scenarios require only a few lines of Symbulate code to set up, run, analyze, and visualize. Table comprises the requisite Symbulate commands for a wide variety of situations.
| Command | Function |
|---|---|
BoxModel |
Define a box model |
ProbabilitySpace |
Define a custom probability space |
RV |
Define random variables, vectors, or processes |
RandomProcess |
Define a discrete or continuous time stochastic process |
apply |
Apply transformations |
[] (brackets) |
Access a component of a random vector, or a random process at a particular time |
* (and ** ) |
Define independent probability spaces or distributions |
AssumeIndependent |
Assume random variables or processes are independent |
| (vertical bar) |
Condition on events |
& |
Join multiple random variables into a random vector |
sim |
Simulate outcomes, events, and random variables, vectors, and processes |
tabulate |
Tabulate simulated values |
plot |
Plot simulated values |
filter (and relatives) |
Create subsets of simulated values (filter_eq , filter_lt , etc) |
count (and relatives) |
Count simulated values which satisfy some critera (count_eq , count_lt , etc) |
| Statistical summaries | mean , median , sd , var , quantile , corr , cov , etc. |
| Common models | See Chapters ?? and ?? |
While no previous experience with Python is required, it is also possible to incorporate Python programming with Symbulate code. In particular, Python functions or loops can be used: to define or transform random variables or stochastic processes, or to investigate the effects of changing parameter values. Also, while many common plots are built in with the Symbulate plot
function, the Matplotlib package can be used to create or customize plots. Some of these features will be illustrated in the next section and more examples are found throughout the text.
3.2.9 Exercises
Example 3.4 Flip a coin 4 times and let \(X\) be the number of H.
- Write the Symbulate code to define X using a box model with tickets labeled H and T. Simulate a few outcomes and a few values of X.
- Write the Symbulate code to define X using a box model with tickets labeled 1 and 0 and without counting. Simulate a few outcomes and a few values of X.
- Write the Symbulate code to conduct a simulation and use the results to approximate \(\IP(X = 3)\).
Solution.
to Example 3.3. See code below. Note the use of count_eq
with the H/T labels and sum
with the 1/0 labels. (It is also possible to use count_eq(1)
with the 1/0 labels, but the point of indicators is that they turn counting into summing.)
## <symbulate.results.Results object at 0x000000002EB49048>
## <symbulate.results.RVResults object at 0x000000002EB492C8>
## 0.2443
## <symbulate.results.Results object at 0x000000002EB49508>
## <symbulate.results.RVResults object at 0x000000002E4BB1C8>
## 0.2545
Technically, a probability space is a triple \((\Omega, \mathcal{F}, \IP)\). We primarily view a Symbulate probability space as a description of the probability model rather than an explicit specification of \(\Omega\). For example, we define a
BoxModel
instead of creating a set with all possible outcomes. We tend to represent a probability space withP
, even though this is a slight abuse of notation.↩The default argument for
replace
isTrue
, so we could have just writtenBoxModel([1, 2, 3, 4], size = 2)
.↩There is an additional argument
order_matters
which defaults toTrue
, but we could set it to false for unordered pairs.↩The warning you get when you call a
RV
as a function just means that Symbulate is not going to check for you that the inputs to the function you used to define theRV
actually match up with the outcomes of the probability spaceP
.↩For discrete random variables
'impulse'
is the default plot type. Like.tabulate()
, the.plot()
method also has anormalize
argument; the default isnormalize=True
.↩Technically
&
joins twoRV
s together to form a random vector. While we often intepret SymbulateRV
as random variable, it really functions as random vector.↩You might try
(P & X ).sim(10)
. ButP
is a probability space object, andX
is anRV
object, and&
can only be used to join like objects together. Much like in probability theory in generality, in Symbulate the probability space plays a background role, and it is usually random variables we are interested in.↩For technical reasons, Symbulate will not plot simulated outcomes from a
ProbabilitySpace
, only simulated realizations of anRV
. Essentially, as mentioned in earlier sections, probability space outcomes can be anything — not necessarily numbers — and so there are too many potential situations and plots for Symbulate to handle with a singleplot
command. In contrast, simulated realizations ofRV
are numbers (or vectors of numbers) which facilitates plotting. Plotting simulated outcomes from a probability spaceP
with numerical outcomes can be achieved by first definingX = RV(P)
and then simulating and plotting values ofX
. That is, replaceP.sim(1000).plot()
withRV(P).sim(1000).plot()
. However, this only works if the outcomes ofP
are numerical.↩For now you can interpret
DiscreteUniform(a = 1, b = 4)
as a spinner with four quarters labeled 1, 2, 3, 4, and** 2
as “spin the spinner twice”. In Python,**
represents exponentiation; e.g.,2 ** 5 = 32
. SoDiscreteUniform(a = 1, b = 4) ** 2
is equivalent toDiscreteUniform(a = 1, b = 4) * DiscreteUniform(a = 1, b = 4)
. Future sections will reveal why the product*
notation is natural for independent spins of spinners.↩BoxModel
assumes equally likely tickets by default, but there are options for non-equally likely cases.↩


1}" (click)="changeDay(selectedDay.day - 1)">
<
{{english? ( selectedDay.date | date : 'MMMM d ':'+0000') : ( selectedDay.date | ptDate) }}
>
Stands
{{ isPendingBook()? "Deselect this day": (isConfirmedBook()? "Selected day" : "Select this day")}}
{{activity}}
{{ws.id + 1}}
{{ws.start | date:'H:mm':'GMT'}}
-
{{ws.end | date:'H:mm':'GMT'}}
{{credentials.companyName}} {{ 'reservations.reservations' | translate }}


It's a Clarendon College, Kingston College ISSA Champions Cup final
KINGSTON, Jamaica - After two contrasting victories Clarendon College and Kingston College will now meet in the final of the ISSA Champions Cup final.
Clarendon easily put aside Cornwall College with a clinical 3-0 drubbing while KC after a 1-1 fulltime score were able to get by Jamaica College 3-2 on penalties.
Rodrick Granville scored twice for Clarendon College first in the 52nd minute and then in the 68th minute. The third Clarendon goal came late in the encounter, the 88th minute, from the boots of Tahjay Williams.
In the KC-JC match, KC took the lead through Demario McCarthy in the first half.
Playing with the rain pouring down in the second half, both sides had to change from their starting kits mainly because of the prevailing soggy conditions. Yet despite the conditions, JC found a late equaliser courtesy of Shadane Lopez in the 83rd minute.
The match then went to penalties, which KC won 3-2.


Thanks for visiting my site! My name is Larissa and I'm currently studying at Dev Bootcamp to become a web developer. I'm a proud member of the Chicago Grasshoppers cohort of DBC. My goal is to become a full-stack developer with proficiency in Ruby, JavaScript and SQL languages by the time I graduate. I'm interested in virtually all aspects of programming and web design, and so far I love what I'm learning!
Prior to starting DBC, I graduated with honors from the University of Chicago, concentrating in History and Latin American Studies. I also worked for two years as a paralegal in the Immigration law practice of Sidley Austin LLP. In addition to coding, my hobbies include reading, teaching yoga, and spending time with my dog. Thanks again for stopping by and please check out my About Me page for more info!


NAMING APP
You are required to enter your birthday and your gender to be able to access your Akan name
DATE OF BIRTH;
Select your Gender
Male
Female
GET NAME


Tek
20-Jun-19 12:41 PM
lmao i put an order at 314 sats too
incase it really flashcrashes
it was the lowest order I could make on binance
however there are even lower buy orders
why can others make lower buy orders but I cant?
theres a 200k buy order aat 3 sats


{% trans %} You're done! {% endtrans %}
{% if not already_promoted %}{% trans addon_name=addon.name, group_name=promoted_group.name %} The latest approved version of your add-on {{ addon_name }} will be re-signed and published as {{ group_name }}, and should become available shortly. If you have any questions, don't hesitate to contact us. {% endtrans %}
{% endif %} {% else %} {% if stripe_checkout_cancelled %}{% trans %} There was an error while setting up payment for your add-on. If you're experiencing problems with this process or you've changed your mind, please contact us at<EMAIL_ADDRESS>{% endtrans %}
{% trans %} Thank you for joining the Promoted Add-ons Program! {% endtrans %}
{% endif %}{% trans addon_name=addon.name %} Your add-on {{ addon_name }} will be included in the program once payment is set up through the Stripe system. Click on the button below to continue: {% endtrans %}
{% endif %}


Lorem Ipsum is simply dummy text of the printing and typesetting industryLorem Ipsum is simply dummy text of the printing and typesetting industry..
For Sale - Treasure Crest (D19)
Lorem Ipsum is simply dummy text of the printing and typesetting industry.


--- layout: post title: It wasn't so much about sticking with the chopsticks... published: 1 category: - Programming ---
In a previous post, I discussed what appeared to be my project partners' mild apprehension about using helpful CppUnit assertions like CPPUNIT_ASSERT_EQUAL()
, and preferring to stick with the very raw, way less helpful Asserter::failIf()
. Turns out it wasn't apprehension at all. A lot of ideas crystallized in my mind when I watched a certain programmer, within about an hour of one programming session, eliminate two compiler warnings, with the following constructs:
CPPUNIT_ASSERT_EQUAL( 2, aCArray.GetCount() );
for ( int i = 0; i < aStdVector.size(); ++i ) { /* ... */ }
The warnings:
If you're that certain programmer, the way you fix #2 is to cast the result of size()
on the std::vector
to int
. Sounds reasonable. And the way you fix #1 is...to discard CPPUNIT_ASSERT_EQUAL
in favor of:
Asserter::failIf( aCArray.GetCount() != 2, "there were not two items" );
??!?!
But then the following occurred to me:
Maybe I'm a code snob, but it just drives me crazy to watch people accrete terrible code time and time again, project after project, and not once look back and ask, "How can I do this better?" Clashing value systems and the aftermath of wreckage...(sigh)


About Me
My name is Jeff Clegg and I am 48 years old. I was born and raised in Toledo, Ohio and now reside in Livonia, Michigan. I have been married to my wife Heather for 18 years and we have two sons. Kellan is 17 and Keaton is 13 years of age.
I went to high school at Whitmer in Toledo, Ohio. Then attended and graduated from the University of Toledo with a Bachelor's degree in Construction Engineering and a associates degeree in Architectural Technology. I am currently pursuing my certificate in coding thru Michigan State University.
I have 22+ years as CAD Manager as well as a CAD Technician in the architectural and manufacturing sectors. Throuout my career, i have been recognized for demonstrating independent discipline, flexibility, and a customer-oriented attitude. Professional focal points include scheduling, data entry, web formatting, proofreading/editing, cross-functional team leadership, complex problem-solving, and client relationship management.
I am interested in learning about new opportunities and can be reached through this portfolio, by email<EMAIL_ADDRESS>through GitHub, or through LinkedIn.


|
Class Summary |
| AddItem |
This class represents an object that was added during the edit process. |
| CloneEditHandler |
Components of this type are attached to the CloneEditManager and are called at various points in
the clone edit process. |
| CloneEditManager |
This class contains the api for applying updates to a persisted order by making a clone
of the order and then reconciling the original order with the clone after updates are made. |
| CloneEditState |
Class used to hold the state information related to the clone edit
process. |
| CloneOrderStateContext |
Sets and returns the CloneEditState as a local thread variable. |
| CollectionEditHandler |
This handler implements a pattern to support automatic reconciling of objects in a collection. |
| CommerceItemEditHandler |
This handler updates commerce items between the clone and original order. |
| DeleteItem |
This class represents an object that's been deleted from a container during edit. |
| HandlingInstructionEditHandler |
This handler updates handling instructions between the clone and original order
and reconciles the gift repository based on the changes. |
| ListEditHandler |
This class extends the CollectionEditHandler to add objects to the original collection
at the same index they were at in the clone colletion. |
| ManualAdjustmentEditHandler |
This handler updates manual adjustments between the clone and original order. |
| MarkerEditHandler |
Clone edit handler for order markers. |
| OrderPropertyEditHandler |
This handler reconciles scalar properties of the order object. |
| PaymentGroupEditHandler |
This handler updates payment groups between the clone and original order. |
| ReconciledItem |
This class represents an object that was reconciled. |
| RelationshipEditHandler |
This handler updates relationships between the clone and original order. |
| ShippingGroupEditHandler |
This handler updates shipping groups between the clone and original order. |
| UpdateItem |
This class represents an object that was updated during the order edit process. |


LD cutoff: r
2
≥
Select a theme:
Login
Warning: Only SNPs were loaded. Perhaps you tried to load a zipped file, or an unsupported file type?
Note that we do not support FTDNA at this time. You may continue to explore the site with these variants, but the results may be unreliable.
Please be patient. This may take a few moments.
Please be patient. This may take a few moments.
Imputing
SNPs. Please be patient.
This will take a while.
Done:
0 SNPs
Are you sure you want to submit these SNPs?
Your information has been submitted.
Nothing was submitted.


New application:
https://github.com/settings/applications/new
OAuth documentation:
https://developer.github.com/v3/oauth/
New application:
https://apps.twitter.com/app/new
OAuth documentation:
https://dev.twitter.com/docs/auth/oauth
Sample Twitter app screenshot.
{% if host == '<IP_ADDRESS>:5000' %} {% elif host == 'oauth-dance.herokuapp.com' %} {% endif %}
New application:
https://console.developers.google.com/project
Create New Client ID
under APIs & auth → Credentials.
OAuth documentation:
https://developers.google.com/accounts/docs/OAuth2
Fork me at https://github.com/migurski/oauth-dance


The clTcl package embeds Tcl/Tk in Common Lisp. It parses Tcl scripts into lists of strings. These strings are properly escaped so they can be send to a Tcl/Tk interpreter. The package provides an interface to launch Tcl/Tk and setup a two-way stream for communication. Finally it provides synchronized communication between Lisp and Tcl/Tk.
Tcl scripts are parsed into list of strings. Just like Lisp, Tcl has a uniform syntax that is easily parsed. A Tcl script is a list of commands. The script is read and every command becoms a properly escaped string.
Reader macro #TCL[] reads the Tcl script between square brackets.
A running clTcl program is a Lisp process and a Tcl/Tk process that communicate via a two-way stream. Launching Tcl/Tk is implementation dependent. The stream is available via global *stream*.
The event-loop is synchronized with Tcl/Tk's event loop. There is a single flow of control that switches back and forth between Lisp and Tcl/Tk.
The event-loop starts a Tcl/Tk process, loads the given script and starts listening for events. When the user exits the application the event-loop terminates and so does the application.
The typical flow of control during a cycle in the event loop is


{{ message }}
{{ reversedMessage }}
{{ foo }}
{{ boo }}
Ask a yes/no question:
{{ answer }}
I have been poked {{ counter }} times. Thanks...
Type something and press enter for a surprise!


You can use our element without any module bundler with released library. It's pretty simple but be aware: this version contains own copy of web-lottie library.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.velocity.runtime.resource.loader.ResourceLoader | +--org.apache.velocity.runtime.resource.loader.JarResourceLoader
ResourceLoader to load templates from multiple Jar files.
The configuration of the JarResourceLoader is straightforward - You simply add the JarResourceLoader to the configuration via
resource.loader = jar jar.resource.loader.class = org.apache.velocity.runtime.resource.loader.JarResourceLoader jar.resource.loader.path = list of JAR <URL>s
So for example, if you had a jar file on your local filesystem, you could simply do
jar.resource.loader.path = jar:file:/opt/myfiles/jar1.jar
Note that jar specification for the .path
configuration property
conforms to the same rules for the java.net.JarUrlConnection class.
For a working example, see the unit test case, org.apache.velocity.test.MultiLoaderTestCase class
| Field Summary | |
private java.util.Hashtable |
entryDirectory
Maps entries to the parent JAR File Key = the entry *excluding* plain directories Value = the JAR URL |
private java.util.Hashtable |
jarfiles
Maps JAR URLs to the actual JAR Key = the JAR URL Value = the JAR |
| Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
className, isCachingOn, modificationCheckInterval, rsvc |
| Constructor Summary | |
JarResourceLoader()
|
| Method Summary | |
private void |
addEntries(java.util.Hashtable entries)
Copy all the entries into the entryDirectory It will overwrite any duplicate keys. |
private void |
closeJar(java.lang.String path)
Closes a Jar file and set its URLConnection to null. |
long |
getLastModified(Resource resource)
Get the last modified time of the InputStream source that was used to create the template. |
java.io.InputStream |
getResourceStream(java.lang.String source)
Get an InputStream so that the Runtime can build a template with it. |
void |
init(org.apache.commons.collections.ExtendedProperties configuration)
Called by Velocity to initialize the loader |
boolean |
isSourceModified(Resource resource)
Given a template, check to see if the source of InputStream has been modified. |
private void |
loadJar(java.lang.String path)
|
| Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader |
commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Hashtable entryDirectory
private java.util.Hashtable jarfiles
| Constructor Detail |
public JarResourceLoader()
| Method Detail |
public void init(org.apache.commons.collections.ExtendedProperties configuration)
init
in class ResourceLoader
private void loadJar(java.lang.String path)
private void closeJar(java.lang.String path)
private void addEntries(java.util.Hashtable entries)
public java.io.InputStream getResourceStream(java.lang.String source) throws ResourceNotFoundException
getResourceStream
in class ResourceLoader
name
- name of template to getResourceNotFoundException
- if template not found
in the file template path.public boolean isSourceModified(Resource resource)
ResourceLoader
isSourceModified
in class ResourceLoader
public long getLastModified(Resource resource)
ResourceLoader
getLastModified
in class ResourceLoader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Soma HTML5 Audio Player
Power
Dubstep Beyond
BAGeL Radio
Black Rock FM
South By Soma
Hard and Hacky
The Trip
Cliq Hop IDM
Doomed
DEF CON Radio
Atmospheric
Drone Zone
Mission Control
Deep Space One
SF 10-33
Experimental
Illinois Street Lounge
Space Station Soma
Sonic Universe
Earwaves
Easy
Suburbs Of Goa
Secret Agent
Beat Blender
Digitalis
Easiest
Indie Pop
PopTron
Lush
Groove Salad
Vintage
Covers
Underground 80s
Seven Inch Soul
Folk
Boot Liquor
Folk Forward
Iceland Airwawes
See the sources here!


09. String and Bytes Types
# String and Bytes Type
Variables of type bytes and string are special arrays. In this section, we will cover the differences between String Type and Bytes Type in Solidity and learn how to convert between strings to bytes.
C4L3 Concept 9 Strings Bytes V2
# Resources
Solidity Documentation
Github Source Code Link
1
SOLUTION:
True2
SOLUTION:
byte[1]3
SOLUTION:
Line 34
SOLUTION:
Compilation error, as bytes24 is smaller than bytes32.5
SOLUTION:
False6
SOLUTION:
True7
SOLUTION:
False8
SOLUTION:
if(bytes(str).length == 0)Coding Quiz
Task Description:
Use your knowledge of strings and byte to complete this coding challenge.
Task Feedback:
// Below is a sample code of how we approached this exercise
contract stringsContract {
// Retrieves the element at specified index
// Cannot do with strings, hence converting to bytes
function getElementAt(string name, uint index) public pure returns(byte) {
// Convert string to bytes
bytes memory bytesData = bytes(name);
// Get the element at the specified index
return bytesData[index];
}
}


Our name is 00-Hack (Double O - Hack, think James Bond, 007) and our mission is to provide college students with disabilities an exclusive platform for searching for and applying to jobs.
After an academic advisor shared with us a STEM access group struggling to get co-ops and internships, going back and forth through emails to hear about job opportunities, we saw a huge cry for help that could not go unattended to. We sought out to solve this problem by creating a11yrecruiter.com
a11yrecruiter.com is the first exclusive career services website for college students with disabilities. This website was made with accessibility positive frameworks and complies with all the Web Content Accessibility Guidelines(WCAG)2.0; the most universally accepted standard of web accessibility.
We aspire to be the handshake platform that disabled students in college need.
*The term ‘a11y’ stands for accessibility in the disabled community. Let’s inform the masses!*


Like a traditional PHP MVC Framework. Controllers should derive from the BaseController class, which is namespaced in PKMVC.
[sitebase]/PKMVCFramework: All library files.
In [sitebase], create the index.php file & config.php file.
use PKMVC\BaseController; use PKMVC\LayoutController; use PKMVC\BaseElement; use PKMVC\BaseDbElement; use PKMVC\BaseForm; use PKMVC\BaseModel; use PKMVC\RenderResult; use PKMVC\PartialSet; use PKMVC\ApplicationBase; use PKMVC\Application; use PKMVC\ControllerWrapper; use PKMVC\ViewRenderer; require_once (__DIR__.'/config.php'); $action = filter_request('action'); $actions = array('edit', 'delete','index', 'report',); if (!in_array($action, $actions)) { $action = 'index'; } $app = new Application(); $app->run($action);The $app->run method takes (actionName, controllerName, optArgs); by default it launches first the layout, then the chosen Action / Controller.
/** The Base Controller & Wrapper * Paul Kirkaas * 30-Apr-14 12:51 */ use PKMVC\BaseController; use PKMVC\LayoutController; use PKMVC\BaseElement; use PKMVC\BaseDbElement; use PKMVC\BaseForm; use PKMVC\BaseModel; use PKMVC\RenderResult; use PKMVC\PartialSet; use PKMVC\ApplicationBase; use PKMVC\Application; use PKMVC\ControllerWrapper; use PKMVC\ViewRenderer; class IndexController extends BaseController { /** * The main index action */ public function indexAction() { $data = array(); $data['sample'] = "My Data"; return $data; } }Layout Controller
PKMVC\LayoutController is part of the PKMVC Framework Library and extends the BaseController. It is responsible for the layout, the default template is [templatebase]/layout.phtml.
The default layout controller action just returns "$data['content'] => (result of the controller/action), which is dipslayed (echoed) in the layout.phtml template.
[sitebase]/config.php
/** * PKMVC Framework * @author Paul Kirkaas * @email<EMAIL_ADDRESS>* @link * @copyright Copyright (c) 2012-2014 Paul Kirkaas. All rights Reserved * @license http://opensource.org/licenses/BSD-3-Clause */ /*Example Configuration file for PKMVC Framework */ define('DB_NAME', 'pkirkaas_demo'); define('DB_SERVER','localhost'); define('DB_USER','root'); define('DB_PASSWORD','mysql');require_once __DIR__.'/PKMVCFramework/PKMVC-config.php'; require_once __DIR__.'/IndexController.php'; require_once __DIR__.'/DEMOORM.php'; ViewRenderer::$templateRoot = __DIR__.'/templates'; #Set base for templates
Additional Structures
Templates
The default template structue again follows the tradition - in the templatesdirectory, each controller has a subdirectory, and each action or partial of the controller has a actionname.phtml template file.
Each action returns an associative array. The keys of that array are variable names in the template.
ORM / Object Model
The application Object Model files should extend the PKMVC/BaseModel class.
PKMVC -- ORM
The Object / DB management component is independent of the PKMVC Framework. They were developed together but can be used separately.
Concepts
Intro
Currently, no clever OO query language. Queries done directly on the DB in SQL. There is support, though for objects that map to DB tables but contain collections -- one to many, like a shopping cart with items. As well as support for an object that contains a key (ID) to another table that represents another object -- many to one, like a shopping cart with a customer ID that represents a Customer object.
Technical Implementation
All objects conforming to this model will descend from PKMVC\BaseModel.
The convention is that all object tables will have a unique integer primary key called 'id'.
Every field in the underlying DB table has a corresponding Object attribute, but additional object attributes hold the foreign objects represented by the keys.
For a foreign object that is a many-to-one -- like a shopping cart that has and ID representing a customer, but several shopping carts might point to that same customer -- the convention (but not requirement, since there might be several foreign objects of the same type, like 'mother' and 'father' would both point to objects of type 'person') is the foreign table name followed by '_id'. In any case, the foreign keys are stored in this table/object, and it is required that the object field name be the same as the underlying table field name without the terminal '_id'. Fore example, if the external object represents "mother", this object attribute name containing the 'mother' object would be called 'mother', the DB table field would be called 'mother_id', but could represent a class "person".
For collections (one to many, like items in a cart), the collection in this object is represented by an object variable which is an array of foreign objects -- but there is not underlying field in this database.
Three types of object attributes/members
Using Magic __set/__get/__call, $this->objectName; will examine the integer field/member/attribute: $this->object_name_id, if it is set, will create or retrieve the matching underlying object and return/set it. The object itself is no longer maintained as an attribute of this class/object.
and as an object attribute - that is, the "Mother" object would have a single field in the DB table, "mother_id", and two attributes in the object/class -- one mirroring exactly the integer in the 'mother_id' field of the table, and the 'mother' object attribute, which holds an instance of the actual "mother" object, which is a member of the "person" table/class.
These three types of Class members are represented in three static arrays belonging to the class:
For example, for a shopping cart containing items: protected $memberCollectins = array('items'=>array('classname'=>'Item', 'foreignkey'=>'shopping_cart_id"));
The object class might have other member attributes for housekeeping, for example, all have the "$dirty" attribute.
Objects should not be created by $obj = new ObjClass();. Rather: $obj = ObjClass::get();.
::get() can take three types of arguments:
If the array contains an integer ID key, it is an update. First the get checks to see if that object exists already in its cache (more on that later). If not, it retrieves the object from the DB table. In either case, it then updates the object with the data contained in the array.
This is a static array of arrays belonging to the BaseModel class. The primary key is 'ClassName', the secondary key is 'id'. Every object retrieved from the DB is immediately entered/stored here. Any subsequent attempt to retrieve an object of that ClassName/ID is checked against the objects in the "instantiations" cache before it is retrieved from the DB.
Both can take an array of data. ::get will create a new object or retrieve an existing one, and if there is data in the data array, hands off to ->update() to complete.
For method docs, use the code, and docs generated from the code.
Other content is no longer relevant as other design decisions have been made, but might be revisited at some point.
(This list is a subset. Static methods indicated by ::methodName, instance methods by ->methodName())
Given an array of objects, returns an array of their integer IDs.
Deletes the current object, and its collections.
Just returns the array of member collections for this class.
A simple query function. Returns objects that match the criteria in the array, using the "::get()" static function.
Query function -- returns array from underlying DB table, according to params in the $params array.
Self explanatory.
Returns public/private/protected for the class attribute name.
Returns an array of all the member attributes.
Returns an array of all the object fields that map directly to underlying table fields. Currently, just the ::$memberDirects array.
Basically just camel-cases a table/object field name (person_id), to the corresponding class name (Person) in the foreign table, but also checks that both the field name exists and the foreign class exists.
As above, in reverse.
Confusing method name. Not currently used. See code.
Does the name/string match a field name in the underlying table.
TODO: Challenge: Figure out what to do with a person who as a collection of "children", but do they map to "mother_id" or "father_id" -- "parent_id" isn't enough.
Also figure out when to delete collection objects when the parent object is deleted, and when not?
Checks the given name represents a collection in this object, if so, returns the mapping of characteristics from the ::$memberCollections array. For example, if this is a "Person" instance with a "children" collection, this would return array('classname'=>'Person", 'foreignkey'=>'parent_id');
Just returns an array of all the collection names of this object/class.
As expected. Setting sets the dirty bit.
Should only be called by ::get(). Creates a new instance if $arg is empty, retrieves from the DB table if $arg is an int ID, OR creates a new object and initializes with data from $arg is an array without an 'id' key, OR retrieves from the DB if $arg contains an ID key, but updates with the new data in the rest of the arg array.
Also recursively populates any collections.


Such a light, crisp salad... especially on summer evenings! Everyone loves these noodle bowls and makes it a point to join us for dinner if they know they're being served. Increase or omit ingredients to suit your palate. THE NOODLES ARE OPTIONAL.
LEARN MORE


{% extends "global/Page.html" %} {% load otree static %} {% block title %} The Experiment is Over! {% endblock %} {% block content %} {% if subsession.round_number == Constants.last_round %}
This ends match {{Constants.num_matches}} and, thus, ends the experiment.
We will start payments shortly. Please wait quietly at your seat until the experimenter calls your computer station number.
Thank you very much for your participation!
{% else %}This is the first match to end after 1 hour of play. Thus, this is the end of the experiment.
We will start payments shortly. Please wait quietly at your seat until the experimenter calls your computer station number.
Thank you very much for your participation!
{% endif %} {% endblock %} {% block styles %} {% endblock %}


Fairbanks.io will be right back!
Sorry for the inconvenience but we’re performing some maintenance at the moment.
Please check back in a bit.
Sorry for the inconvenience but we’re performing some maintenance at the moment.
Please check back in a bit.


--- layout: news-post title: posts.news.8.title when: posts.news.8.when categories: news excerpt: posts.news.8.excerpt --- {% if site.lang == 'en' %}
Xceptance released version 4.3 of its load testing and test automation product Xceptance LoadTest (XLT). It features a wide range of improvements and new functionality.
As always, this update is free of charge for every user. You can use XLT freely for your daily automation work, regression testing, and performance validation. If you are an eligible Open Source project, you can get a full XLT license for your load and performance testing needs for free as well.
Enjoy more automation with less clicking. The new information panel summarizes the specifics of the currently selected item, so you do not need to open it anymore. Additionally, the new log panel lists all executed commands and their respective parameters.
If an element is styled with the CSS property text-transform, then the element’s text on the screen may have a different character casing from what is defined in the page’s DOM tree. The WebDriver specification mandates to return the text as shown on the screen. Script Developer will now record text with the character casing that appears on the screen and it will also take the CSS property text-transform into account when replaying text assertions.
The XLT load test reports have been improved by adding more charts and data details, such as overall statistics for all timers. Arrival rate charts have been added to visualize the load development over time and make sure the desired load factor was reached.
Charts can now optionally be configured to be logarithmic. A capping can be added to hide larger spikes, which usually make charts hard to read, without removing the important information altogether.
The new networking section summarizes all general network-related statistics and charts on a separate page.
The error and event page has been redesigned and includes a new error chart that contains separate graphs for all transactions/actions/requests so that the temporal distribution of transaction/action/request errors is displayed in one chart. A new error summary table groups all errors by their error message to help you see which types of errors occurred and how many of them.
The master controller features two new commands to validate the availability of agents and display their current configuration. A new command line option permits the skipping of result downloads when XLT is used as a load generator only.
A set of new commands is available in Script Developer and in the framework: commands such as assertAttribute, assertStyle, assertClass, assertEval, and their matching store and wait equivalents.
XLT can now send and receive IDs as part of the request to ease the correlation of server-side logs and test results. XLT may send a randomly generated alphanumeric ID as request header or extract such an ID from an arbitrary response header.
When dealing with different test environments, different load profiles, and/or different test data at the same time, managing different combinations of configuration settings can be challenging. The new property file include feature makes it easier now to predefine aspects and reuse them later in different configurations without copying and pasting.
When a test case reads a certain setting from the configuration, the framework uses a fallback strategy when doing the property look-up. This strategy performs an additional look-up step now, based on the transaction name (the short name to which the full class name is mapped). This additional step lets you parameterize different transactions differently, even if they are mapped to the same class and therefore share the same code.
The webdriver that will be used when executing functional tests can now be configured via properties. This allows greater flexibility and hardcoding is not necessary anymore.
When XLT executes XML script test cases with a WebDriver instance that is capable of taking screenshots, it can take a screenshot after each action, if desired.
A new look matches the overall styling of reports. Also, the navigation bar can now be resized, requests are color coded to visualize the content type, and the first page is displayed automatically. URLs are now active links, so you can click them easily.
If needed, the content of a response can be beautified for certain content types (HTML, JavaScript, JSON, CSS). This includes formatting and syntax highlighting.
Endlich ist sie da, die Xceptance LoadTest (XLT) 4.3 Version. Freuen Sie sich auf Verbesserungen und neue Features!
XLT 4.3 kommt mit einer großen Bandbreite neuer Funktionen und Verbesserungen. Der Script Developer vereinfacht das Auswählen von Elementen durch eine neue Informationsleiste. Die Test Reports beinhalten ab sofort noch mehr Datendetails. Darüber hinaus gibt es zahlreiche Framework-Erweiterungen.
Dieses Update ist wie immer kostenlos. Nutzen Sie XLT kostenfrei zur Testautomatisierung sowie für Regressions- und Performancetests. Anerkannte Open-Source Projekte erhalten eine kostenlose Community-Lizenz mit Zugang zum kompletten Funktionsumfang.
Einen detaillierten Überblick über XLT 4.3 gibt es hier.


Our Secure Payment Profile service allows merchants to create secure payment profiles, or just “profiles”, for storing confidential contact and/or credit details on our server. Transactions can then be processed against these profiles without the need to recollect payment information from the customer. Also, you do not need to store payment information on your systems. Each profile can store multiple cards.
When you save a payment profile you will be given a customer code ID in return. This ID can be used for retrieving the profile information, updating it, and also for making payments.
Payment Profiles can be created with a plain credit card number, however we recommend that you first tokenize the card data in the client-side application and then use that token to create the profile.
Creating and modifying Secure Payment Profiles requires you use your Profiles API Key. If you get an authentication error you might be using your Payments API Key, so double check!
You should create a profile with a single-use token instead of a credit card. This is the suggested method of creating profiles since the card number never has to touch your servers, thus lowering your PCI scope.
shell
curl -X POST https://api.na.bambora.com/v1/profiles
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"language":"en",
"comments":"hello",
"token": {
"name":"Bill Smith",
"code":"1eCe9480a7D94919997071a483505D17"
}
}'
With this action, you can create a new payment profile tied to one individual, assigning, and validating a credit card.
shell
curl -X POST https://api.na.bambora.com/v1/profiles
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"language":"en",
"comments":"hello",
"card":{
"name":"Bill Smith",
"number":"4030000010001234",
"expiry_month":"12",
"expiry_year":"23",
"cvd":"123"
}
}'
shell
curl -X GET https://api.na.bambora.com/v1/profiles/{id}
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
shell
curl -X PUT https://api.na.bambora.com/v1/profiles/{id}
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"billing": {
"name": "joh doe",
"address_line1": "123 main st",
"address_line2": "111",
"city": "victoria",
"province": "bc",
"country": "ca",
"postal_code": "V8T4M3",
"phone_number": "25012312345",
"email_address"<EMAIL_ADDRESS>},
"comment": "updated account"
}'
shell
curl -X DELETE https://api.na.bambora.com/v1/profiles/{id}
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
You can add a Card with a single-use token instead of a credit card. This is the suggested method of creating profiles since the card number never has to touch your servers, thus lowering your PCI scope.
We recommended that you add cards with a Single Use Token.
shell
curl -X POST https://api.na.bambora.com/v1/profiles/{id}/cards
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"token": {
"name":"John Doe",
"code":"1eCe9480a7D94919997071a483505D17"
}
}'
You can also add a card using the card details.
shell
curl -X POST https://api.na.bambora.com/v1/profiles/{id}/cards
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"card":{
"name":"Bill Smith",
"number":"5100000010001004",
"expiry_month":"02",
"expiry_year":"14"
}
}'
shell
curl -X GET https://api.na.bambora.com/v1/profiles/{id}/cards
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
Only the card expiry fields can be updated.
shell
curl -X PUT https://api.na.bambora.com/v1/profiles/{id}/cards/{card_id}
-H "Content-Type: application/json"
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
-d '{
"card":{
"expiry_month":"02",
"expiry_year":"14"
}
}'
### Delete a Card
shell
curl -X DELETE https://api.na.bambora.com/v1/profiles/{id}/cards/{card_id}
-H "Authorization: Passcode bWVyY2hhbnRfaWQ6cGFzc2NvZGU="
You can read the errors returned by the API here.


class TradeableCounter
TradeableCounter() |
fun decrement(tradeable: Tradeable, quantity: Int): Int |
|
operator fun get(tradeable: Tradeable): Int |
|
fun increment(tradeable: Tradeable, quantity: Int): Int |
|
operator fun set(tradeable: Tradeable, quantity: Int): Int |


| Resource | Description | Example Requests |
|---|---|---|
| GET /api/release/ | Fetch list of all Ensembl and RefSeq releases. | |
| GET /api/release/nopagination/ | Fetch list of Ensembl and RefSeq releases from a specified page number in a paginated result set. | |
| GET /api/release/{release_id}/ | Fetch details of a given Ensembl or Refseq release. |


Quick example to show a scriptprocessor being used to generate an arbitrary periodic waveform, in this case a sawtooth wave, properly band-limited to half the sample rate. The script processor sums a series of sine waves with the appropriate Fourier coefficients. The output of the scriptprocessor is connected to a BiquadFilter with cutoff and resonance controls, and the output of the filter is connected to the destination.


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


--- creation_epoch:<PHONE_NUMBER> lastmod_epoch:<PHONE_NUMBER> categories: Programming title: Windows Batch Script - Getting Script Location (Directory/Path) --- Inside a Windows batch file (.bat or .cmd) you can reference the drive and folder where the batch file is located by:
%~D0
CHDIR %~DP0
The first line causes the script to change to the drive where the script is located.
The second line causes the script to change to the directory where the script is located.
See Call command for further information.
When running a .cmd or .bat script and using %~f0 or %~dp0 to resolve the batch script name if the batch script name has spaces (ex: "my script.cmd") and you chdir within the script then further references to %~dp0 will incorrectly resolve to the new cwd instead of the correct batch script location.
This does not happen if the script name has no spaces in it.
Example script below:
@REM When this script is named "test.cmd" (no spaces) it works as expected for the value of %~f0 @REM When this script is named "test with spaces.cmd" it does not work echo "Stage 1: dp0 == %~dp0" SET STAGE1=%~dp0 %~d0 cd "%~dp0" mkdir TestSubFolder cd TestSubFolder echo "Stage 2: dp0 == %~dp0" echo Should have gotten value %STAGE1%
In the mean time if you make the FIRST statements in your batch as follows you can still use this trick:
@REM Must set these first thing due to bug in Windows 7 when batch script filename has spaces in it SET BATCH_SCRIPT_DRIVE=%~d0 SET BATCH_SCRIPT_FOLDER_PATHNAME=%~dp0
You could then do
%BATCH_SCRIPT_DRIVE%
CD "%BATCH_SCRIPT_FOLDER_PATHNAME%"
to make the current working drive and directory the same as your scripts.


{% extends "base.html" %} {% block title %}Share Your Message{% endblock %} {% block pagecontainerclass %}sharepage{% endblock %} {% block content %}
YOUR MESSAGE HAS BEEN RECORDED!
You have created your video, now you just need to share it. Where would you like to share it?


Blockly
>
Demos
> Custom Fields
These demos are intended for developers who want creating custom block fields.
Turtle Field
Pitch Field


Instructions for the first task
Please read these instructions carefully!
In this task, you have to guess the color of an urn.
The urn can be blue or
red.
Both colors are equally likely.
In each urn there are 100 balls. In the blue
urn there are
blue balls and
red balls. While in the red
urn there are
red balls and
blue balls.
To help you guess the correct color of the urn, one ball is randomly drawn out of the urn,
the color shown to you and then ball is returned to the urn. This procedure is possibly
repeated several times. Your hint might then look for example as follows:
blue, blue, red
In this task you have to guess which color the urn probably has.
You are paid when all your different guesses match the most likely color of
the different urns.
During the game we use an Experimental Currency (ECU).
10 ECU are equal to $. If you guess
the color of all urns correctly, you receive 30 ECU.
You receive information about
your performance and bonus payment in the end of the game.
If you understand the instructions press the 'Done' button to
proceed to the first task.


18 February 2003
Disease Outbreak Reported
As of 18 February, a total of 73 suspected cases and 59 deaths from Ebola haemorrhagic fever has been reported in the districts of Mbomo and Kellé in Cuvette Ouest Region ( see previous report).
The Government of the Republic of the Congo has officially declared the epidemic as due to Ebola haemorrhagic fever. Laboratory testing carried out at the Centre International de Recherches Médicales de Franceville (CIRMF), Gabon has confirmed the diagnosis of Ebola in clinical samples.
The government has requested the assistance of WHO in controlling the outbreak. A team including epidemiologists and social mobilization experts from WHO and the Global Outbreak Alert and Response Network have arrived in the Cuvette Ouest Region. Experts in clinical management will be joining them in the area shortly.


CFA Textbook
--------------------
Study Session 3 Quantitative Methods :
Application
--------------------
Reading 12 Hypothesis Testing
--------------------
Summary
- A hypothesis is a statement about one or more populations.
- The steps in testing a hypothesis are as follows:
- Stating the hypotheses.
- Identifying the appropriate test statistic and its
probability distribution.
- Specifying the significance level.
- Stating the decision rule.
- Collecting the data and calculating the test statistic.
- Making the statistical decision.
- Making the economic or investment decision.
- We state two hypotheses: The null hypothesis is the
hypothesis to be tested; the alternative hypothesis is the hypothesis
accepted when the null hypothesis is rejected.
- There are three ways to formulate hypotheses:
- H0: θ = θ0 versus Ha: θ ≠
θ0
- H0: θ ≤ θ0 versus Ha: θ >
θ0
- H0: θ ≥ θ0 versus Ha: θ <
θ0
where θ0 is a hypothesized value of the population
parameter and θ is the true value of the population parameter. In the
above, Formulation 1 is a two-sided test and Formulations 2 and 3 are
one-sided tests.
- When we have a “suspected” or “hoped for” condition for which
we want to find supportive evidence, we frequently set up that
condition as the alternative hypothesis and use a one-sided test. To
emphasize a neutral attitude, however, the researcher may select a
“not equal to” alternative hypothesis and conduct a two-sided test.
- A test statistic is a quantity, calculated on the basis of a
sample, whose value is the basis for deciding whether to reject or
not reject the null hypothesis. To decide whether to reject, or not
to reject, the null hypothesis, we compare the computed value of the
test statistic to a critical value (rejection point) for the same
test statistic.
- In reaching a statistical decision, we can make two possible
errors: We may reject a true null hypothesis (a Type I error), or we
may fail to reject a false null hypothesis (a Type II error).
- The level of significance of a test is the probability of a
Type I error that we accept in conducting a hypothesis test. The
probability of a Type I error is denoted by the Greek letter alpha,
α. The standard approach to hypothesis testing involves specifying a
level of significance (probability of Type I error) only.
- The power of a test is the probability of correctly rejecting
the null (rejecting the null when it is false).
- A decision rule consists of determining the rejection points
(critical values) with which to compare the test statistic to decide
whether to reject or not to reject the null hypothesis. When we
reject the null hypothesis, the result is said to be statistically
significant.
- The (1 − α) confidence interval represents the range of
values of the test statistic for which the null hypothesis will not
be rejected at an α significance level.
- The statistical decision consists of rejecting or not
rejecting the null hypothesis. The economic decision takes into
consideration all economic issues pertinent to the decision.
- The p-value is the smallest level of significance at which
the null hypothesis can be rejected. The smaller the p-value, the
stronger the evidence against the null hypothesis and in favor of the
alternative hypothesis. The p-value approach to hypothesis testing
does not involve setting a significance level; rather it involves
computing a p-value for the test statistic and allowing the consumer
of the research to interpret its significance.
- For hypothesis tests concerning the population mean of a
normally distributed population with unknown (known) variance, the
theoretically correct test statistic is the t-statistic
(z-statistic). In the unknown variance case, given large samples
(generally, samples of 30 or more observations), the z-statistic may
be used in place of the t-statistic because of the force of the
central limit theorem.
- The t-distribution is a symmetrical distribution defined by a
single parameter: degrees of freedom. Compared to the standard normal
distribution, the t-distribution has fatter tails.
- When we want to test whether the observed difference between
two means is statistically significant, we must first decide whether
the samples are independent or dependent (related). If the samples
are independent, we conduct tests concerning differences between
means. If the samples are dependent, we conduct tests of mean
differences (paired comparisons tests).
- When we conduct a test of the difference between two
population means from normally distributed populations with unknown
variances, if we can assume the variances are equal, we use a t-test
based on pooling the observations of the two samples to estimate the
common (but unknown) variance. This test is based on an assumption of
independent samples.
- When we conduct a test of the difference between two
population means from normally distributed populations with unknown
variances, if we cannot assume that the variances are equal, we use
an approximate t-test using modified degrees of freedom given by a
formula. This test is based on an assumption of independent samples.
- In tests concerning two means based on two samples that are
not independent, we often can arrange the data in paired observations
and conduct a test of mean differences (a paired comparisons test).
When the samples are from normally distributed populations with
unknown variances, the appropriate test statistic is a t-statistic.
The denominator of the t-statistic, the standard error of the mean
differences, takes account of correlation between the samples.
- In tests concerning the variance of a single, normally
distributed population, the test statistic is chi-square (χ2)
with n − 1 degrees of freedom, where n is sample size.
- For tests concerning differences between the variances of two
normally distributed populations based on two random, independent
samples, the appropriate test statistic is based on an F-test (the
ratio of the sample variances).
- The F-statistic is defined by the numerator and denominator
degrees of freedom. The numerator degrees of freedom (number of
observations in the sample minus 1) is the divisor used in
calculating the sample variance in the numerator. The denominator
degrees of freedom (number of observations in the sample minus 1) is
the divisor used in calculating the sample variance in the
denominator. In forming an F-test, a convention is to use the larger
of the two ratios, s21
/ s22 or s22 / s21 , as the actual test statistic.
- A parametric test is a hypothesis test concerning a parameter
or a hypothesis test based on specific distributional assumptions. In
contrast, a nonparametric test either is not concerned with a
parameter or makes minimal assumptions about the population from
which the sample comes.
- A nonparametric test is primarily used in three situations:
when data do not meet distributional assumptions, when data are given
in ranks, or when the hypothesis we are addressing does not concern a
parameter.
- The Spearman rank correlation coefficient is calculated on
the ranks of two variables within their respective samples.
中文手册整理
- 概念
- 假设检验（hypothesis testing）
- 原假设（null hypothesis）
- 备择假设（alternative hypothesis）
- 双尾检验（two-tailed test）
- 单尾检验（one-tailed test）
- 基本步骤
- 说明一个假设
- 确定合适的检验统计量及其概率分布
- 说明显著性水平，阐述决策规则
- 收集数据，计算相应的检验统计量
- 做出统计决策，经济决策或投资决策
- 检验统计量 = ( 样本统计量 - 原假设中的总体参数值μ ) / ( 样本统计量的标准误 )
- 检验统计量是根据样本统计量计算出来的
- 检验统计量服从正态分布，t分布，χ²分布，或F分布的
- 检验统计量的一般公式只适用于z分布和t分布
- 关键值
- 判断规则
- 基于检验统计量和关键值的判断规则
- 画分布图
- 确认是双尾还是单尾，显著性水平α，关键值，拒绝域
- 计算检验统计量
- 如果检验统计量落在拒绝域上则拒绝原假设，否则不能拒绝原假设
- 基于p值和显著性水平的判断规则
- 检验统计量得到的p值和显著性水平比较，如果p < α则拒绝原假设 ，否则不能拒绝原假设
- 结论的陈述
- reject, μ is significantly different from μ0
- fail to reject, μ is not significantly different from μ0
- 错误
- 第一类错误，错杀好人，原假设正确，却拒绝了原假设
- 第二类错误，放过坏人，原假设错误，却没有拒绝原假设
- 检验的势（power of the test） = 1 - P(type II error)
- 总体均值
- 单个总体均值的假设检验
- 正态总体下，已知方差用z~N(0,1)，未知方差用t~t(n-1)，大样本可以用z
- 两个独立正态总体均值是否相等
- 总体方差未知，假定相等
- 检验统计量，Sp=方差的样本容量均值
- 服从分布，t~t(n₁+n₂-2)
- 总体方差未知，假定不等
- 检验统计量
- 服从分布
- 成对数检验，两个非独立正态总体均值是否相等用t~t(n-1)
- 总体方差
- 单个总体方差的假设检验，χ²~χ²(n-1)
- 检验两个独立正态总体方差是否相等用F F~F(n₁-1,n₂-1)
- 永远把较大的样本方差放在上边，让F>1 拒绝域只在右边
- 其他
--------------------
Next Reading


Our Analytists thoroughly vet all of our holdings to ensure full compliance with local regulations, positive social change, and minimal environmental impact.
We understand that true inovation is never easy. We work to identify technologies that are well positioned to have a major impact in their industry.
Major disruptions often come with signifant pain for the impacted industry. We move without fear to break stay ahead of the curve and set the pace for those that follow.


Click on the board to change the color of points and then click on the "Next" button to see what happens, you can also change the rules breeding and dying of the points
or just Board: width:
height:
Rules: Die if num of neighbors >
Born if num of neighbors >
and <
Run:
Auto play: interval: in milisconds


-
Why India's Mars mission is so cheap - and thrilling
www.bbc.com
India's Mangalyaan satellite is staggeringly cheap by Western standards - but it hopes to address some of the biggest questions on Mars, writes the ...
-
Herokuが「Heroku DX」を発表、Herokuボタン、新ダッシュボード、Postgres強化などをまとめて
www.publickey1.jp
PaaS型クラウドサービスとしてクラウド上でRuby on Railsなどの開発環境と実行環境などを提供する提供するHerokuは、従来のサービスを強化した「H
-
Troy Hunt: Everything you need to know about the Shellshock Bash bug
www.troyhunt.com
Observations, musings and conjecture about the world of software and technology
-
oss-sec: Re: CVE-2014-6271: remote code execution through bash
seclists.org
oss-sec mailing list archives
-
Breaking News, World News & Multimedia
www.nytimes.com
The New York Times: Find breaking news, multimedia, reviews & opinion on Washington, business, sports, movies, travel, books, jobs, education, real ...
-
Postgres Outperforms MongoDB and Ushers in New Developer Reality
blogs.enterprisedb.com
Jump to content
-
The Great Lightbulb Conspiracy - IEEE Spectrum
spectrum.ieee.org
The Phoebus cartel engineered a shorter-lived lightbulb and gave birth to planned obsolescence
-
Micro Python - Python for microcontrollers
micropython.org
Micro Python - Python for microcontrollers
-
Landing Page In A Day: Launch your startup or product with custom design ...
landingpageinaday.com
Until Sept 30 , get your landing page for $100 off . Use code "launch-sale".
-
Announcing Clasp
drmeister.wordpress.com
Hello, everyone! Today I am happy to make the first release of the Common Lisp implementation “Clasp”. Clasp uses LLVM as its back-end and generates ...
-
Ok, shits real. Its in the wild... src:<IP_ADDRESS>
gist.github.com
You can clone with HTTPS or SSH .
-
Australian Government Scrambles to Authorize Mass Surveillance
www.eff.org
This week, Australian Prime Minister Tony Abbott used recent terrorist threats as the backdrop of a dire warning to Australians that “for some time ...
-
Docker Hub Official Repos: Announcing Language Stacks | Docker Blog
blog.docker.com
With Docker containers fast becoming the standard for building blocks for distributed apps, we’re working with the Docker community to make it easier ...
-
Errata Security: Bash 'shellshock' bug is wormable
blog.erratasec.com
Advanced persistent cybersecurity
-
Rethinking the origins of the universe | The University of North Carolina ...
unc.edu
Singled out: Laura Mersini-Houghton has mathematically proven that quantum effects are strong enough to stop the formation of black holes, work that ...
-
vgvassilev/cling
github.com
cling - Cling is an interactive C++ interpreter, built on top of Clang and LLVM compiler infrastructure.
-
Introduction | libsodium
doc.libsodium.org
A high-security, cross-platform, easy-to-use crypto library.
-
How To Migrate 50M+ Records From Mongo To PostgreSQL In Less Than A Day
tech.plug.dj
NOTE: To clarify - migrating a single "record" required gathering information from several separate tables in mongo, restructuring that data, and ...
-
How do I sign out of Netflix on my Vizio devices?
help.netflix.com
Use this article to disconnect from or sign into another Netflix account on your Vizio TV.
-
slackhq/SlackTextViewController
github.com
SlackTextViewController - iOS UIViewController subclass with a custom growing text input


Week 7 Cultural: DBC Values
August 29, 2014
When I think of times in my life I have been most proud and content, the following values come to mind:
- Self-knowledge
- Self-respect
- Stability
- Confidence
- Enthusiasm
I think it's telling that two of the values I chose are introspective - self-knowledge and self-respect. These values are important to me because I know I am not always the best at identifying and grappling with my own feelings. Being self-reflective is one of the first steps toward being empathetic toward those around you, which is why these values are so important to me.
In an ideal world, I would say that I try to live up to these values as much as possible every day. Realistically, though, I often prioritize other things, like being comfortable or complacent, when things get too difficult. I would say that of the five values above, I try the hardest to incorporate self-knowledge, self-respect, and confidence, while enthusiasm and stability may take a backseat to other more pressing concerns.
An important part of self-reflection and empathy is being able to give advice when friends, colleagues, and family ask for it. When asked for advice, I try not to just tell someone what I think they should do. For example, earlier this week my friend was deciding between two job offers and asked my advice on which one she should accept. Rather than just telling her what to choose, I got her to talk about what she sees as the benefits and drawbacks of each, and contextualize those with her long term goals. The most important thing to consider when giving advice is to listen, first and foremost. People usually know what is best for them, and if you encourage them to talk the problem out, they will likely come to the conclusion that is best for the situation.
Phase 0 of Dev Bootcamp has involved a lot more introspection and "soul-searching" than I thought it would. Before DBC, I'd never really thought much about explicitly defining what my values are. Being asked to identify what values we consider important and how we think and react to stressors is an important first step toward being empathetic programmers. By being self-aware, I will be better able to recognize when I feel threatened (by stereotype threat or otherwise), confused, frustrated, angry, sad, or any number of other emotions that will certainly arise during the course of DBC. Practicing yoga, and the mindfulness that comes along with that practice, has also been extremely enlightening, encouraging me to acknowledge the thoughts and feelings that come up, but not attach value to them.
Yoga cat image, courtesy of http://www.toxel.com/wp-content/uploads/2012/02/yogacats09.jpg


18 December 2009 - As of 13 December 2009, worldwide more than 208 countries and overseas territories or communities have reported laboratory confirmed cases of pandemic influenza H1N1 2009, including at least 10582 deaths.
WHO is actively monitoring the progress of the pandemic through frequent consultations with the WHO Regional Offices and member states and through monitoring of multiple sources of data.
In the temperate zone* of the northern hemisphere, transmission of pandemic influenza virus remains active and geographically widespread, however disease activity has peaked or passed its peak in many places, particularly North America. Influenza activity continues to increase in later affected areas of south-eastern and central Europe, and in central and south Asia.
In United States and Canada, active influenza transmission persists but overall levels of ILI** have declined substantially to near seasonal baselines. In the US, proportional mortality due to pneumonia and influenza (P&I mortality) has remained consistently elevated above the epidemic threshold for the past 10 weeks; however, weekly numbers of lab-confirmed hospitalizations and deaths continue to decline over the past month.
The preliminary analysis of data from Northern Hemisphere countries that have now passed through an entire season of winter transmission indicate that the mortality rate, as expressed in fatal cases per million people, is in the same range as that which was observed in the Southern Hemisphere winter. This would indicate that the overall severity of the pandemic has not changed although the proportion of the population infected has been much higher in the temperate countries of the Northern Hemisphere during their winter season compared to the circulation observed in their summer season.
In Europe, geographically widespread and active transmission of pandemic influenza virus continued to be observed across the continent. At least 10 countries, mostly in western and northern Europe, reported declining respiratory disease activity. During the last reporting period, ILI/ARI activity continued to increase or reach a plateau in a limited number of countries: the Czech Republic, Estonia,, Hungary, Montenegro and Switzerland (a range of 28-71% of sentinel respiratory samples were positive for influenza in these countries). A high intensity of respiratory disease activity was reported in parts of northern and south-eastern Europe and in parts of the Russian Federation. 99% of subtyped influenza A viruses in Europe were pandemic H1N1 2009. Detections of RSV in Europe continued to increase over the past five weeks, partially accounting for elevated ILI activity among young children in some countries.
In Western and Central Asia, influenza transmission remains active. ILI/ARI activity continues to increase in Kazakhstan and Kyrgyzstan, and has peaked in some countries including in Afghanistan, Oman, and Israel. Influenza virus continues to circulate in Iran, Iraq, Jordan, Egypt and in much of the surrounding region but may have recently peaked in some parts.
In East Asia, influenza transmission remains active but appears to be declining overall. Influenza activity has recently peaked and begun to decline in Japan. ILI activity continued to decline but remained elevated in northern and southern China, Chinese Taipei and in Mongolia. In southern Asia, influenza activity continues to increase in the northern parts of India, Nepal, Sri Lanka, and the Maldives.
In the tropical region of Central and South America and the Caribbean, influenza transmission remains geographically widespread but overall disease activity has been declining.
Pandemic H1N1 2009 virus appears to be the predominant influenza virus circulating in northern and eastern Africa. In West Africa, a mixture of pandemic and seasonal influenza viruses have been detected. Seasonal viruses have included both seasonal H1N1 and H3N2, with the later predominating.
In the temperate region of the southern hemisphere, sporadic cases of pandemic influenza are being reported without evidence of sustained community transmission.
The Global Influenza Surveillance Network (GISN) continues monitoring the global circulation of influenza viruses, including pandemic, seasonal and other influenza viruses infecting, or with the potential to infect, humans including seasonal influenza. For more information on virological surveillance and antiviral resistance please see the weekly virology update (Virological surveillance data, below).
*Countries in temperate regions are defined as those north of the Tropic of Cancer or south of the Tropic of Capricorn, while countries in tropical regions are defined as those between these two latitudes.
**Abbreviations: influenza-like-illness (ILI), acute respiratory infection (ARI), and severe acute respiratory infection (SARI)
The qualitative indicators monitor: the global geographic spread of influenza, trends in acute respiratory diseases, the intensity of respiratory disease activity, and the impact of the pandemic on health-care services.
The maps below display information on the qualitative indicators reported. Information is available for approximately 60 countries each week. Implementation of this monitoring system is ongoing and completeness of reporting is expected to increase over time.
The countries and overseas territories/communities that have newly reported their first pandemic (H1N1) 2009 confirmed cases since the last web update (No.78): none.
The countries and overseas territories/communities that have newly reported their first deaths among pandemic (H1N1) 2009 confirmed cases since the last web update (No 78): Bahamas, Bosnia & Herzegovina, Estonia, Montenegro, Libyan Arab Jamahiriya.
* No update since web update no. 78
** The reported number of fatal cases is an under representation of the actual numbers as many deaths are never tested or recognized as influenza related.