Finding All Instances of a Pattern
See the kitten on the wall, sporting with the leaves that fall, Withered leaves—one—two—and three, from the lofty elder-tree! Through the calm and frosty air, of this morning bright and fair . . . —But the kitten, how she starts; Crouches, stretches, paws, and darts! First at one, and then its fellow, just as light and just as yellow; There are many now—now one—now they stop and there are none; What intenseness of desire, in her upward eye of fire! With a tiger-leap half way, now she meets the coming prey, Lets it go as fast, and then, has it in her power again: Now she works with three or four, like an Indian Conjuror; Quick as he in feats of art, far beyond in joy of heart.
Search pattern:
Search for pattern


-
work whenever you want
-
Become Dropoff driver and earn up to $400 per week for driving around
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Temporibus dignissimos ad, ratione facere provident voluptatem veritatis esse. Temporibus iure cumque unde nihil neque, quisquam dicta, sequi beatae omnis ea nobis. Lorem ipsum dolor sit, amet consectetur
adipisicing elit. Quaerat minima nemo ut dicta impedi adipisicing elit. Quaerat
-
Cadence
Driver since 2018
Frequently Asked Questions
-
How do I become a driver?
- Click on ‘Start Earning’ or ‘Become a driver’ above to sign up. You can also sign up as a driver via visiting our website www.dropoff.ng and clicking on “become a driver.” Alternatively, you can sign up through the app after downloading
the app from Google Playstore (for android devices) and Apple store (for iOS devices). On the website or app, select your member type (individual in this instance), fill in the required details in the provided registration form
and click on submit. You will receive an SMS and e-mail from us to confirm your account registration. Having done this, you will need to provide certain documents for our review while visiting our office for an onboarding session
which includes a thorough background check. You must also be at least 21 years old at the time of registering your account. As soon as this is done, you can go online to receive ride requests.
-
What are the documents required to become a Dropoff Driver?
-
To be eligible for driving on our platform, you would need to provide the following documents for our review: - Valid driver’s license - Vehicle registration and allied documents - Vehicle Insurance certificate - Proof of residential location
-
How do I get paid by riders?
- As a driver, you get paid by the rider through cash or debit card. When payment is made via card, do not collect cash from the rider. If payment is to be by card, this is displayed in the app as soon as the trip commences.
-
How much can I make?
- You can make any amount you want depending on how long you can stay online and how many trips you can make. Averagely, you can make 100,000 in a week!
-
What is your commission?
- 10% only.
-
How do I go online?
- To go online and start accepting ride requests, simply login to your app using your registration details and tap on “go online”.
Do you have questions or do you need help?
E-mail us help@dropoff.ng


Dagnabbit.
The page you were looking for isn't where you thought it was. Sorry about that. Maybe try searching in the field up top? Or maybe you're looking for one of our authors?
In any case, if you really can't find what you're looking for, send us an email.


Direct Web RemotingDWR is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible. DWR is Easy Ajax for Java |
DWR version 3.0.2 is the latest stable release. Download it now and use DWR in your website in minutes.
DWR will generate the JavaScript to allow web browsers to securely call into Java code almost as if it was running locally. It can marshal virtually any data including collections, POJOs, XML and binary data like images and PDF files. All that is required is a security policy that defines what is allowed.
With Reverse Ajax, DWR allows Java code running on a server to use client side APIs to publish updates to arbitrary groups of browsers. This allows interaction 2 ways - browser calling server and server calling browser. DWR supports Comet, Polling and Piggyback (sending data in with normal requests) as ways to publish to browsers.
DWR provides integration with Spring, Struts, Guice, Hibernate and others.
DWR is Open Source, available under the Apache Software License v2.
YourKit is kindly supporting open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications. Take a look at YourKit's leading software products: YourKit Java Profiler and YourKit .NET Profiler.
Atlassian provides us with JIRA which is used for issue tracking and Bamboo which is used for continuous integration builds.


With <IP_ADDRESS> changing the angle or size will cause the drag boxes on the corners and sides to not update with the object. Deselecting and re selecting seems to fix this.
Changing the top and left values and then immediately trying to re size manually breaks everything and gives you values of NaN. Moving the object slightly by hand after setting those values will prevent this from happening.
BrainFooLong
Administrator
Ok. The bug with NAN i've found.
Just doing that emblem.emblem.canvas._activeObject[attr] = parseFloat(this.value);
// instead of that
emblem.emblem.canvas._activeObject[attr] = this.value;
But i cannot find any solution to update that damn control positions.
I've tried out so many things with the emblem functions but non really worked.
BrainFooLong
Administrator
Ok, i've found that also battlelog native functions doesn't update the controls properly (Rotate button, Flip Button). I have to wait that they fix it.


The package use a Node.js core package that allow to access the network. These core package are:
⚠ This flag only work if the AST analysis as successfully retrieved all dependencies as expected.


Landing Page
© Copyright 2020, The Post, Athens, OH
Emma Dengler
05.28.20
Dining hall food can be either as healthy or as unhealthy as you make it. With an endless supply of processed, ready-to-eat food right at your fingertips, it’s easy to pick convenience over health.
Here’s a list of six healthy snacks that can be made in a dorm room:
Staple foods, like rice, can be a perfect base for a healthy snack or dinner that can be easily made in a dorm. All you need to do is cook minute rice in the microwave, add whatever steamed veggies you like, and top it off with some soy sauce. Add any additional seasonings you want, and it’s the perfect five-minute dinner for anyone wanting a quick and healthy meal.
With the right toppings, oatmeal can be a delicious way to get in some whole grains. Mix whole grain oats with water and cook in the microwave for 1-2 minutes. Top it with milk, peanut butter, cinnamon, fresh fruit, or whatever else you have for a balanced, healthy meal.
It’s the perfect healthier modification for anyone who loves chocolate without the guilt. Grab the chocolate hummus sold at Boyd and Jefferson market and dip some strawberries in it, or dip pretzels in it for a salty but sweet combo. Sweet tooth = cured.
A smoothie from Boyd market is one of the best healthy options when you’re on the go, or just needing a quick snack. Add a pastry and fruit for one swipe to keep you full for a few hours.
Chips and salsa is the staple snack that every college student needs in their dorm. Choose multigrain chips for a healthier option. Add salsa and pre-packaged guacamole from the market or make your own by smashing up a few avocados.
Rice cakes are a low-calorie staple food that can satisfy a craving for either savory or sweet foods. Add peanut butter and jelly for a lower calorie version of PB&J, or avocado for a savory twist.
BackLanding Page
© Copyright 2020, The Post, Athens, OH


Posted on August 24, 2013 at 9:00 PM
Mental health, a person’s condition with regard to their psychological, social, and emotional well-being. It is all about how we think, whether we have control over it or not. Anyone has the potential to develop a mental problem, no matter the circumstances. Almost 1 in 5 Americans develop a mental health issue each year. It is important that your mental health is in a good state. A large portion of people who have a mental disorder have more than one. A positive mental health allows people to have a better productivity rate, realise their full potential, make contributions to their community, etc.
Depression is a serious medical illness that negatively affects your mood. It is one of the most common disorder in the US. It can happen at any age, but usually during teen, or adult years. It can go away and reoccur depending on circumstances. Some symptoms of depression are irritability, anxiety or empty mood, feelings of guilt, worthlessness, helplessness, loss in interest in activities, etc.
A mental issue often times makes people feel hopeless, so many people don’t try to seek help or think it’s worth it. The best thing to do is seek help whether it be professional or a trusted family or friend, stay positive, try to connect with others, help others, get enough sleep, and develop coping skills.
 A bad mental state can cause poor physical health, sedentary lifestyle, poor socio-eco status, poor diet, and high amounts of stress.


Node.js is a platform built on Chrome's JavaScript runtime for easily building fast and scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
Features of Node.js
Asynchronous and Event Driven
Very Fast
Single Threaded but Highly Scalable
No Buffering
Who Uses Node.js?
Following is the link on github wiki containing an exhaustive list of projects, application and companies which are using Node.js. This list includes eBay, General Electric, GoDaddy, Microsoft, PayPal, Uber, Wikipins, Yahoo!, and Yammer to name a few.


Basic Implementation details¶
Coordinate Systems and Vectors¶
As of now, sympy.vector
only deals with the Cartesian (also called
rectangular) coordinate systems. A 3D Cartesian coordinate system can
be initialized in sympy.vector
as
>>> from sympy.vector import CoordSysCartesian
>>> N = CoordSysCartesian('N')
The string parameter to the constructor denotes the name assigned to the system, and will primarily be used for printing purposes.
Once a coordinate system (in essence, a CoordSysCartesian
instance)
has been defined, we can access the orthonormal unit vectors (i.e. the
\(\mathbf{\hat{i}}\), \(\mathbf{\hat{j}}\) and
\(\mathbf{\hat{k}}\) vectors) and coordinate variables/base
scalars (i.e. the \(\mathbf{x}\), \(\mathbf{y}\) and
\(\mathbf{z}\) variables) corresponding to it. We will talk
about coordinate variables in the later sections.
The basis vectors for the \(X\), \(Y\) and \(Z\)
axes can be accessed using the i
, j
and k
properties respectively.
>>> N.i
N.i
>>> type(N.i)
<class 'sympy.vector.vector.BaseVector'>
As seen above, the basis vectors are all instances of a class called
BaseVector
.
When a BaseVector
is multiplied by a scalar (essentially any
SymPy Expr
), we get a VectorMul
- the product of
a base vector and a scalar.
>>> 3*N.i
3*N.i
>>> type(3*N.i)
<class 'sympy.vector.vector.VectorMul'>
Addition of VectorMul
and BaseVectors
gives rise to
formation of VectorAdd
- except for special cases, ofcourse.
>>> v = 2*N.i + N.j
>>> type(v)
<class 'sympy.vector.vector.VectorAdd'>
>>> v - N.j
2*N.i
>>> type(v - N.j)
<class 'sympy.vector.vector.VectorMul'>
What about a zero vector? It can be accessed using the zero
attribute assigned to class Vector
. Since the notion of a zero
vector remains the same regardless of the coordinate system in
consideration, we use Vector.zero
wherever such a quantity is
required.
>>> from sympy.vector import Vector
>>> Vector.zero
0
>>> type(Vector.zero)
<class 'sympy.vector.vector.VectorZero'>
>>> N.i + Vector.zero
N.i
>>> Vector.zero == 2*Vector.zero
True
All the classes shown above - BaseVector
, VectorMul
,
VectorAdd
and VectorZero
are subclasses of Vector
.
You should never have to instantiate objects of any of the
subclasses of Vector
. Using the BaseVector
instances assigned to a
CoordSysCartesian
instance and (if needed) Vector.zero
as building blocks, any sort of vectorial expression can be constructed
with the basic mathematical operators +
, -
, *
.
and /
.
>>> v = N.i - 2*N.j
>>> v/3
1/3*N.i + (-2/3)*N.j
>>> v + N.k
N.i + (-2)*N.j + N.k
>>> Vector.zero/2
0
>>> (v/3)*4
4/3*N.i + (-8/3)*N.j
In addition to the elementary mathematical operations, the vector
operations of dot
and cross
can also be performed on
Vector
.
>>> v1 = 2*N.i + 3*N.j - N.k
>>> v2 = N.i - 4*N.j + N.k
>>> v1.dot(v2)
-11
>>> v1.cross(v2)
(-1)*N.i + (-3)*N.j + (-11)*N.k
>>> v2.cross(v1)
N.i + 3*N.j + 11*N.k
The &
and ^
operators have been overloaded for the
dot
and cross
methods respectively.
>>> v1 & v2
-11
>>> v1 ^ v2
(-1)*N.i + (-3)*N.j + (-11)*N.k
However, this is not the recommended way of performing these operations. Using the original methods makes the code clearer and easier to follow.
In addition to these operations, it is also possible to compute the
outer products of Vector
instances in sympy.vector
. More
on that in a little bit.
SymPy operations on Vectors¶
The SymPy operations of simplify
, trigsimp
, diff
,
and factor
work on Vector
objects, with the standard SymPy API.
In essence, the methods work on the measure numbers(The coefficients of the basis vectors) present in the provided vectorial expression.
>>> from sympy.abc import a, b, c
>>> from sympy import sin, cos, trigsimp, diff
>>> v = (a*b + a*c + b**2 + b*c)*N.i + N.j
>>> v.factor()
((a + b)*(b + c))*N.i + N.j
>>> v = (sin(a)**2 + cos(a)**2)*N.i - (2*cos(b)**2 - 1)*N.k
>>> trigsimp(v)
N.i + (-cos(2*b))*N.k
>>> v.simplify()
N.i + (-cos(2*b))*N.k
>>> diff(v, b)
(4*sin(b)*cos(b))*N.k
>>> from sympy import Derivative
>>> Derivative(v, b).doit()
(4*sin(b)*cos(b))*N.k
Integral
also works with Vector
instances, similar to
Derivative
.
>>> from sympy import Integral
>>> v1 = a*N.i + sin(a)*N.j - N.k
>>> Integral(v1, a)
(Integral(a, a))*N.i + (Integral(sin(a), a))*N.j + (Integral(-1, a))*N.k
>>> Integral(v1, a).doit()
a**2/2*N.i + (-cos(a))*N.j + (-a)*N.k
Points¶
As mentioned before, every coordinate system corresponds to a unique origin
point. Points, in general, have been implemented in sympy.vector
in the
form of the Point
class.
To access the origin of system, use the origin
property of the
CoordSysCartesian
class.
>>> from sympy.vector import CoordSysCartesian
>>> N = CoordSysCartesian('N')
>>> N.origin
N.origin
>>> type(N.origin)
<class 'sympy.vector.point.Point'>
You can instantiate new points in space using the locate_new
method of Point
. The arguments include the name(string) of the
new Point
, and its position vector with respect to the
‘parent’ Point
.
>>> from sympy.abc import a, b, c
>>> P = N.origin.locate_new('P', a*N.i + b*N.j + c*N.k)
>>> Q = P.locate_new('Q', -b*N.j)
Like Vector
, a user never has to expressly instantiate an object of
Point
. This is because any location in space (albeit relative) can be
pointed at by using the origin
of a CoordSysCartesian
as the
reference, and then using locate_new
on it and subsequent
Point
instances.
The position vector of a Point
with respect to another Point
can
be computed using the position_wrt
method.
>>> P.position_wrt(Q)
b*N.j
>>> Q.position_wrt(N.origin)
a*N.i + c*N.k
Additionally, it is possible to obtain the \(X\), \(Y\) and \(Z\)
coordinates of a Point
with respect to a CoordSysCartesian
in the form of a tuple. This is done using the express_coordinates
method.
>>> Q.express_coordinates(N)
(a, 0, c)
Dyadics¶
A dyadic, or dyadic tensor, is a second-order tensor formed by the
juxtaposition of pairs of vectors. Therefore, the outer products of vectors
give rise to the formation of dyadics. Dyadic tensors have been implemented
in sympy.vector
in the Dyadic
class.
Once again, you never have to instantiate objects of Dyadic
.
The outer products of vectors can be computed using the outer
method of Vector
. The |
operator has been overloaded for
outer
.
>>> from sympy.vector import CoordSysCartesian
>>> N = CoordSysCartesian('N')
>>> N.i.outer(N.j)
(N.i|N.j)
>>> N.i|N.j
(N.i|N.j)
Similar to Vector
, Dyadic
also has subsequent subclasses like
BaseDyadic
, DyadicMul
, DyadicAdd
. As with Vector
,
a zero dyadic can be accessed from Dyadic.zero
.
All basic mathematical operations work with Dyadic
too.
>>> dyad = N.i.outer(N.k)
>>> dyad*3
3*(N.i|N.k)
>>> dyad - dyad
0
>>> dyad + 2*(N.j|N.i)
(N.i|N.k) + 2*(N.j|N.i)
dot
and cross
also work among Dyadic
instances as well as
between a Dyadic
and Vector
(and also vice versa) - as per the
respective mathematical definitions. As with Vector
, &
and
^
have been overloaded for dot
and cross
.
>>> d = N.i.outer(N.j)
>>> d.dot(N.j|N.j)
(N.i|N.j)
>>> d.dot(N.i)
0
>>> d.dot(N.j)
N.i
>>> N.i.dot(d)
N.j
>>> N.k ^ d
(N.j|N.j)


This section summarizes the changes that have been performed on
the Modelica standard library. Furthermore, it is explained in
Modelica.UsersGuide.ReleaseNotes.VersionManagement
how the versions are managed. This is especially important for
maintenance (bug fix) releases where the main version number is not
changed.
| Name |
Description |
| VersionManagement |
Version Management |
| Version_3_2_3 |
Version 3.2.3 (January 23, 2019) |
| Version_3_2_2 |
Version 3.2.2 (April 3, 2016) |
| Version_3_2_1 |
Version 3.2.1 (August 14, 2013) |
| Version_3_2 |
Version 3.2 (Oct. 25, 2010) |
| Version_3_1 |
Version 3.1 (August 14, 2009) |
| Version_3_0_1 |
Version 3.0.1 (Jan. 27, 2009) |
| Version_3_0 |
Version 3.0 (March 1, 2008) |
| Version_2_2_2 |
Version 2.2.2 (Aug. 31, 2007) |
| Version_2_2_1 |
Version 2.2.1 (March 24, 2006) |
| Version_2_2 |
Version 2.2 (April 6, 2005) |
| Version_2_1 |
Version 2.1 (Nov. 11, 2004) |
| Version_1_6 |
Version 1.6 (June 21, 2004) |
| Version_1_5 |
Version 1.5 (Dec. 16, 2002) |
| Version_1_4 |
Version 1.4 (June 28, 2001) |


DBpedia Hackathon: TerminusDB & Conflict Data
TerminusDB in the DBpedia Hackathon
Team TerminusDB took part in the DBpedia Autumn Hackathon 2020 DBpedia is an extract of all of the structured data from Wikipedia. You can clone the full data set from TerminusHub and run all of the below steps for yourself (for non-technical users - like your correspondent - it is easy to do and feels like a type of magic when the queries emerge with data attached).
We started with a great working seminar with well-known American archaeologist and anthropologist Peter Peregrine. It was an illuminating session, we set out the context of the work and we got started on delivery (first 25 minutes is a discussion of Peter’s work and the work of Seshat: Global History Databank, the remainder is working with TerminusDB and TerminusHub).
Peter left us with some interesting ideas for how we might combine the the DBpedia data with Seshat in the context of his work on historical conflicts:
Here are some ideas for tasks to give to hackathon teams:
1) Using the Social Resilience cases identify episodes of famine and/or epidemic disease in the 50-year period following 535CE, with estimates of deaths, where possible.
2) Using the Social Resilience cases identify military conflicts in the period 500-600CE, with estimates of the number of combatants and the number of deaths, where possible.
Bonus: link references to their MARC records
As examples for the workshop, you might use the Seshat Latium case and illustrate pulling information and images from Perseus and shapefiles from Pleiadies.
Into the Server
With the context set, we moved the action into the TerminusDB Discord server. We used a public Mural board to brainstorm and plot our course.
We knew that we were looking for conflicts between 500CE and 600 CE in the DBpedia data set and wrote this simple query to find and extract that information:
limit(10).triple("v:X", "type", "scm:MilitaryConflict")
.triple("v:X", "scm:date", "v:Date")
.re("(....)-..-..", "v:Date", ["v:All", "v:Year"])
.cast("v:Year", "xsd:integer", "v:Year_Integer")
.greater("v:Year_Integer", 500)
.greater(600, "v:Year_Integer")
That query gave us this result:
As the object of the exercise is to enrich the Seshat conflict data between 500 and 600CE, we were able to quickly exclude the Battle of the Eclipse as it was fought between the Medes and Lydians in the early 6th century BCE. This is an issue when working with data like that taken from Wikipedia - it is inputted by non-professionals and there are errors.
Here is a short video of the 500-600BCE query and our results
With the remaining four conflicts from DBpedia, we broke into teams and worked on each battle - first we checked the Seshat data (available to clone on TerminusHub) to see if the polities in Seshat matched the belligerents in the battles
This query returns the list of all the Seshat polities and their start and end date
triple("v:X", "type", "scm:Polity")
.triple("v:X", "scm:end", "v:End")
.triple("v:X", "scm:start", "v:Start")
.triple("v:X", "label", "v:Name")
Here is a video of the query running:
That actually provides too much information from Seshat and we found it easier to use a query that scans for patterns in the Seshat polity names and alternative names
triple("v:X", "type", "scm:Polity").triple("v:X", "scm:end", "v:End").triple("v:X", "scm:start", "v:Start").triple("v:X", "label", "v:Name")
.triple("v:X", "scm:alternative_names", "v:YYY").triple("v:YYY", "scm:string", "v:AName")
.or(
re("Rom", "v:Name", ["v:Match"]),
re("Rom", "v:AName", ["v:Match"])
)
In the above case looking for the string Rom
- you can change that to Byz
for the Byzantines or Sas
for the Sassanids.
Battle of Vézeronce
Of the remaining battles we need to find out if the relevant belligerents are polities in the Seshat databank and add the Battles if they are. For this write up, we’ll use the Battle of Vézeronce and our exploration there (thou we added all the remaining battles too).
The Battle of Vézeronce was fought by the Franks and the Burgundians in 524CE.
We first looked for the Franks using the scanning query and get this result:
We can see that the Franks in that period are the Early Merovingian variety (Clovis, the first King of the Franks, has died and his sons are fighting over his former lands). The associated doc is:
doc:frmerve
This is the search for the Franks:
On the other side of the Battle of Vézeronce is the Burgundians - those Scandinavian/East Germanic people who ended up in South Central France.
Burgundy turns out to not be represented in the Seshat databank:
This is the view script that colors the timeline according the presence and absence of soldiers
view.height(800);
view.width(1200);
view.edges(["v:Predecessor", "v:Polity"], ["v:Polity", "v:Successor"])
view.node("v:Predecessor").text("v:Plab").icon({label: true})
view.node("v:Successor").text("v:Slab").icon({label: true})
view.node("v:Polity").text("v:Lab").icon({label: true})
view.node("v:Polity", "v:Presence").in("scm:absent").color([255,0,0])
view.node("v:Polity", "v:Presence").in("scm:present").color([0,255,0])
view.node("v:Polity", "v:Presence").in("scm:unknown").color([150,150,150])
Now we have established where we are in relation to the data in DBpedia and Seshat, we can now move to enriching the Seshat conflict data with the conflict data from DBpedia.
Lets take a quick look at the evolution of professional soldiers in the polities in Seshat. It certainly links across to the battles and gives us more context on the type of political entities we are talking about.
This query will give a timeline of polities and which ones had professional soldiers
WOQL.and(
WOQL.triple("v:Polity", "type", "scm:Polity"),
WOQL.triple("v:Polity", "successor", "v:Successor"),
WOQL.triple("v:Polity", "predecessor", "v:Predecessor"),
WOQL.triple("v:Polity", "label", "v:Lab"),
WOQL.triple("v:Successor", "label", "v:Slab"),
WOQL.triple("v:Predecessor", "label", "v:Plab"),
WOQL.opt().and(
WOQL.triple("v:Polity", "professional_soldiers", "v:Variable"),
WOQL.triple("v:Variable", "epistemicState", "v:Presence")
)
)
Here is a video of the query running in the console:
This the full graph of the changing polities so you can appreciate the complex picture of constant change and upheaval:
To return to the Battle of Vézeronce, we use this query to insert the battle with our belligerent polity doc:frmerve
add_triple("doc:Battle_of_Vézeronce", "type", "scm:Battle")
.add_triple("doc:Battle_of_Vézeronce", "label", "doc:Battle of Vézeronce")
.add_triple("doc:Battle_of_Vézeronce", "scm:end", literal("524", "xdd:integerRange"))
.add_triple("doc:Battle_of_Vézeronce", "scm:start", literal("524", "xdd:integerRange"))
.add_triple("doc:Battle_of_Vézeronce", "scm:belligerent", "doc:frmerve")
This enrichment is made to the conflict branch of the Seshat Databank which can then be kept as a separate area for study. Perhaps later we can merge the conflict branch into the main Seshat data.
Focus
We focused on the second of Peter Peregrine’s questions:
Using the Social Resilience cases identify military conflicts in the period 500-600CE, with estimates of the number of combatants and the number of deaths, where possible.
We were able to establish the conflicts in the period and enrich the data with that information. Unfortunately there was no estimates of the numbers of deaths in the DBpedia data. This will have to be extracted from other sources.
Generalized Script and Jupyter Notebooks
We used the TerminusDB Jupyter Notebook integration for exploration and visualization of the data. All our work can be seen in our GitHub repository:
https://github.com/terminusdb-labs/dbpedia-hackathon-autumn-2020
We were able to generalize a cross-database query that allows us, and other researchers, to take the full list of all polities from Seshat and then combine with all the battle from DBpedia. This script check names and dates to make sure there is a match and then carries out an auto insert.
The query is available on GitHub:
https://github.com/terminusdb-labs/dbpedia-hackathon-autumn-2020/blob/master/DBpedia_to_Seshat.ipynb
This is the output visualized as a graph. The battles cluster around certain polities (Ottoman Empires I, II & III stand out in particular).
You can also explore the visualization in your browser.
*Red - Battle/War/Conflict*
*Purple - polity with a standing army*
*Blue - polity with no standing army*
*Grey - no information about standing army (unknown unknowns)*
*Yellow - known unknown (we know we don’t know)*
Historical Context
To contextualize the hackathon effort, we are looking at the Late Antique Little Ice Age period that lasted for about 100 years after the extreme events of 535-536 - think 2020 and multiply it by 10 and throw in an ice age - so we can study social resilience. That’s important because it can help us to understand how societies fare when faced with extreme events.
In the examples we used, the Sassanids were no more by the end of the Little Ice Age. They along with the Eastern Roman or Byzantine Empire (another one that popped up in our battles) were so weakened by plague and internal and external conflicts in this period that they were unable to resist the onslaught of the Arabs. In the Battle of Qadisiyyah, the Muslim army defeated the Sassanids and Persia never recovered. This also led to the massive decline of the Zoroastrian religion. We can see this on the graph visualization - the Empire cuts some time after the Battle of Callinicum that we documented.
This is the resulting Late Antique Ice Age graph for you to examine:
You can explore the visualization in your browser.
*Red - Battle/War/Conflict*
*Purple - polity with a standing army*
*Blue - polity with no standing army*
*Grey - no information about standing army (unknown unknowns)*
*Yellow - known unknown (we know we don’t know)*
You can see the East Romans and the Sassanids and their battles during the period, including of course the Battle of Callinicum. We have enriched the data to give us a fuller picture.
On the other end of our polities, the Franks increase their strength through the Little Ice Age and emerge with an Empire under Charles ‘The Hammer’ Martel at the turn of the 8th Century.
Documenting and enriching this data allows for deeper understanding of the drivers of resilience and will hopefully allow us to better understand how societies can prepare for cataclysmic change.
And Finally
We had a great time doing this work. TerminusHub makes distributed collaboration easy - so we could work on the same data at our own pace, but we also got to come together for a few collective sessions. Here is an extract (excuse the colorful language in the middle):
Thanks!
Building the database of the future.


CANHack
— CANHack toolkit¶
-
class
CANHack
([bit_rate=500])¶ Initializes the CANHack toolkit.
- Raises
ValueError – if bit_rate is not one of
500
,250
, or125
This class manages low-level protocol attacks on the CAN bus. It is included in pre-built firmware for MicroPython for the Raspberry Pi Pico and uses fixed pins on the board to interface to a CAN transceiver.
Methods¶
-
set_frame
([can_id=0x7ff] [, remote=False] [, extended=False] [, data=None] [, set_dlc=False] [, dlc=0] [, second=False] )¶ Sets the frame buffer
- Parameters
can_id (int) – An 11-bit or 29-bit integer representing the CAN ID of the frame
remote (bool) – True if the frame is a remote frame
extended (bool) – True if can_id is a 29-bit CAN identifier
data (bytes) – The payload of the CAN frame
set_dlc (bool) – True if the DLC should be set to a specific value
dlc (int) – the value of DLC if set_dlc is True
second (bool) – True if this call is setting the shadow frame in preparation for the Janus Attack
- Raises
ValueError – if the dlc value is > 15 or if the payload is more than 8 bytes or remote is True and data is set
This function pre-computes the layout of a CAN frame into a frame buffer inside the toolkit (it will set the shadow frame buffer is second is True because the Janus Attack requires two separate CAN frames).
This function must be called prior to mounting an attack: the pre-computed bit pattern in the frame buffer is used to synchronize the attack on a targeted frame.
-
get_frame
([second=False])¶ Returns details of the frame buffer
- Parameters
second (bool) – True if the details of the shadow frame buffer should be returned
- Return type
tuple
- Raises
ValueError – if the selected frame buffer has not been set by a prior call to
set_frame()
- The method returns an 8-element tuple of:
A string representing the frame bitstream (including stuff bits) with
1
and0
characters for the bitsA string representing where the stuff bits are located (with
X
being a stuff bit and-
being a data bit)The integer index of the last arbitration bit in the bitstream
The integer index of the last DLC bit in the bitstream
The integer index of the last data bit in the bitstream
The integer index of the last CRC bit in the bitstream
The integer index of the last EOF bit in the bitstream
A 15-bit integer of the CRC of the frame
-
send_frame
([timeout=65535] [, second=False] [, retries=0]) Send a frame on the CAN bus
- Parameters
timeout (int) – The number of bit times to wait for idle before giving up
second (bool) – True if the frame should come from the shadow frame buffer
retries (int) – the number of times to try again to send the frame after loss of arbitration or error
- Raises
ValueError – if the selected frame buffer has not been set by a prior call to
set_frame()
This function sends the specified frame on the CAN bus. It waits for the bus to become idle and then starts transmitting, following the CAN protocol for arbitration. If it loses arbitration or detects an error then it tries again, up to a maximum set by retries.
This function can mount a tradition spoof attack on the bus where the frame pretends to be from another node. A problem with this being mounted from a CAN controller is the risk of a ‘doom loop’: if the spoof frame and the legitimate frame happen to win arbitration at the same time then an error will be raised and arbitration will re-start. This will continue in a loop until one of the devices has gone error passive or bus-off. This function avoids this risk by being able to skip re-sending.
-
send_janus_frame
([timeout=65535] [, sync_time=0] [, split_time=0], [, retries=0])¶ Send a Janus frame on the CAN bus
- Parameters
timeout (int) – The number of bit times to wait for idle before giving up
sync_time (int) – The number of clock ticks to wait to ensure controllers have synced (0 = 1/4 of a CAN bit time)
split_time (int) – The number of clock ticks from the start of the bit before the second CAN bit value is set (0 = 5/8th of a CAN bit time)
retries (int) – the number of times to try to send the frame after loss of arbitration or error
- Raises
ValueError – if either frame buffer has not been set by a prior call to
set_frame()
This function sends the specified Janus frame on the CAN bus. It waits for the bus to become idle and then starts transmitting, following the CAN protocol for arbitration. If it loses arbitration or detects an error then it tries again, up to a maximum set by retries.
A Janus frame is a CAN frame with two different contents, specified by the frame buffer and shadow frame buffer. It must have the same ID and be the same number of bits long, which means it must have the same number of stuff bits (although they can be in different places).
-
spoof_frame
([timeout=65535] [, overwrite=False] [, retries=0])¶ Target a frame and send a spoof version
- Parameters
timeout (int) – The number of bit times to wait for the targeted frame to appear before giving up
overwrite (bool) – Once the targeted frame has been detected, overwrite the remainder with the selected spoof frame
retries (int) – the number of times to try to send the frame after loss of arbitration or error
- Raises
ValueError – if the frame buffer has not been set by a prior call to
set_frame()
If overwrite is True then the spoof frame is written over the top of the targeted frame. If the targeted sender is error passive then it will not be able to signal an error frame and other controllers will receive the spoofed version of the frame. If overwrite is set to False then the spoof frame is entered into arbitration immediately following the end of the targeted frame.
-
error_attack
([repeat=2] [, timeout=2000000])¶ Repeatedly destroy a targeted frame with errors
- Parameters
timeout (int) – The number of bit times to wait for the targeted frame to appear before giving up
repeat (int) – the number of times to repeat the attack
- Returns
True if the timeout occurred, False otherwise
- Return type
bool
- Raises
ValueError – if the buffer has not been set by a prior call to
set_frame()
A CAN frame with the targeted frame’s ID must be set using the
set_frame()
before calling this method. When the ID of the targeted CAN frame has been seen then an error is generated (six dominant bits) and all CAN controllers go into error handling. The error delimiter is targeted for further repeating of the attack. With this approach a targeted node can quickly be driven into the error passive or bus-off state.
-
double_receive_attack
([repeat=2] [, timeout=2000000])¶ Cause a targeted frame to be received twice
- Parameters
timeout (int) – The number of bit times to wait for the targeted frame to appear before giving up
repeat (int) – the number of times to repeat the attack
- Raises
ValueError – if the buffer has not been set by a prior call to
set_frame()
A CAN frame with the targeted frame’s ID must be set using the
set_frame()
before calling this method. When the ID of the targeted CAN frame has been seen then an error is generated at the last bit of the EOF field, after the receivers have accepted the CAN frame but before the transmitter has marked it as sent. This causes the transmitter to signal an error and retransmit the frame, leading to it being received twice.
-
freeze_doom_loop_attack
([repeat=2] [, timeout=2000000])¶ Freeze the bus after a targeted frame has been successfully transmitted
- Parameters
timeout (int) – The number of bit times to wait for the targeted frame to appear before giving up
repeat (int) – the number of times to repeat the attack
- Raises
ValueError – if the buffer has not been set by a prior call to
set_frame()
A CAN frame with the targeted frame’s ID must be set using the
set_frame()
before calling this method. When the ID of the targeted CAN frame has been seen then an overload frame is generated after the last bit of the EOF field, after the receivers have accepted the CAN frame and the transmitter has marked it as sent. This causes the controllers to enter the overload frame recovery mode (like error recovery, except the error counters are not incremented). At the end of the error delimiter, another overload frame is generated until the number in the repeat parameter is reached.
Diagnostic methods¶
-
set_can_tx
([recessive=True])¶ Sets the CAN TX pin to recessive or dominant
- Parameters
recessive – Set to True if the pin should be set recessive
- Returns
True if CAN RX was recessive, False otherwise
- Return type
bool
This is intended for diagnostics to check that the TX and RX pins have been identified correctly on the hardware.
-
square_wave
()¶ Drives the CAN TX pin with a square wave with a 50:50 duty cycle and a period of two CAN bit times.
The purpose of this function is for hardware bring-up to check that the CAN TX pin is driven correctly. It is particularly useful if the hardware is being assembled using breadboard and the wiring needs to be checked.
-
loopback
()¶ It waits for a falling edge on CAN RX and then drives the debug / trigger pin with the value of CAN RX for 160 bit times.
The purpose of this function is for hardware bring-up to check that the CAN RX pin is connected correctly. It is particularly useful if the hardware is being assembled using breadboard and the wiring needs to be checked.
-
get_clock
()¶ Get the current time
- Returns
The free-running counter used to measure time
- Return type
int
The purpose of this function is to check that the free-running counter has been initialized properly and is counting correctly.
-
reset_clock
()¶ Resets the free-running counter to zero
- Returns
The value of the counter prior to resetting it
- Return type
int
-
send_raw
()¶ Sends the raw bitstream of a CAN frame on the CAN TX pin
The CAN frame to send must have been set with a call to
set_frame()
before calling this method. This call does not enter into CAN arbitration or participate in the CAN protocol, it merely sends a sequence of bits to the pin. Consequently the CAN bus must be idle when this function is called.The primary purpose of this function is to check that the bits are output with correct timing and that the Pico is running fast enough. This can be checked with a logic analyzer or CAN bus monitor.


Things I've learned from
Time Managment Techiques
I've tried meditiation and pomodoro.
I really like the concepts of the growth mindset. As well as the pomodoro technique. I feel some of the Fogg Method comes across as common sense. But it really is easier said then done when changing a habit.
I will definintely continue meditation. I find it very relaxing and I often find clearing my mind to help get me back into a good work ethic. I found the pomadoro method didn't work as well as I had hoped. even timing myself I find it very hard to return to work after a break. So I think it's easier for me to work in blocks of several hours. I have enjoyed reading about the counterproductive methods and plan to try them out.


Masonry is a design pattern used to create grid having items of variable height and width like Pinterest. Built using Javascript libary Masonry. This is responsive as well i.e. width and number of columns are adjusted based on screen size


Feature list:
- Rich text editing, including:
- heading levels,
- bold,
- italic,
- strikethrough,
- underline,
- blockquotes,
- dividers (ie,

) - text alignment
- Add links:
- select text to decorate with link, or add your own link text
- smart parsing into “mailto:” link string if email entered
- add downloadables as links via file-picker or drag-and-drop
- ability to set target:blank to open in a new tab (rel=”noopener noreferrer” added automatically)
- Add documents:
- add documents via file-picker or drag-and-drop
- give documents captions
- edit embedded documents by selecting and clicking toolbar table button
- Add tables:
- add tables with variable column and row counts
- edit embedded tables by selecting and clicking toolbar table button
- Photo embeds:
- add photos via file-picker or drag-and-drop
- give users the option to set image width and (max)height (inlined styles)
- give users the option to add photo links, and to open those links in a new tab
- give photos captions
- edit embedded photos by selecting and clicking toolbar photo button
- Rich embeds:
- add YouTube videos, SoundCloud audio clips, PayPal “buy now” buttons – any service that can be embedded via iframe
- give rich embeds captions
- edit embedded content by selecting and clicking toolbar rich button (share icon)
- Import/export:
- export to raw (Javascript), or to html for persistence to your render target (blog, website, etc)
- import from raw or from html back to editorState
Public methods
| Name | Description |
|---|---|
| focus | Focus the editor. |
| save | Save content to whatever format is specified in the exportTo prop (see below). Returns a promise, and resolves with content or error message if an error is thrown. |
| clear | Clear content from the editor. Returns a promise. |
Props
| PropName | Type | Description | Default value |
|---|---|---|---|
| content | string (html string or stringified JSON for raw) | HTML or raw content | none |
| placeholder | string | Editor placeholder message | ‘Enter text here…’ |
| spellcheckEnabled | boolean | Enable browser spellcheck (behavior is dependent on user settings) | true |
| customControls | array (of strings) | If you wish to exclude any of the default options, do so by passing an array of the control names that you do wish to include as customControls prop. |
defaults (see list below) |
| detachToolbarOnScroll | boolean | Whether to detach the toolbar on scroll. Fixes to top of viewport for better user experience on longer posts. | true |
| allowPhotoLink | boolean | Whether to allow users to wrap uploaded photos in links. | false |
| allowPhotoSizeAdjust | boolean | Whether to allow users to adjust the size of uploaded images. | false |
| maxImgWidth | number | Setting this param will not constrain image upload sizes, but will warn users on photo upload that their image is too large and they need to size down below this max size. | none |
| linkInputAcceptsFiles | boolean | If you’d like to give users the option to add downloadable file links inlined, in addition to (or instead of) as block components with optional captions, pass true. | false |
| onFocus | function | Respond to editor focus event. | no-op |
| onBlur | function | Respond to editor blur event. | no-op |
| onFileUpload | function, *required | Respond to file upload event. Hook for saving file to server or cloud service. | none, required |
| exportTo | string (‘html’ or ‘raw’), *required | Import/Export format. Raw option exports DraftJS raw format, which can be parsed into markdown or other format. | none, required |
Toolbar controls
headings
bold
italic
underline
strikethrough
quotes
bulletList
orderedList
alignLeft
alignCenter
alignRight
divider
link
table
file
photo
rich
Installation
$ npm install react-drafts
Use
This package includes a Common module build at /lib
and a UMD bundle in /dist
. Most applications will use the Common build by importing ReactDrafts
as below.
## editor parent component
import React, { Component } from 'react';
import ReactDrafts from 'react-drafts';
class MyEditor extends Component {
...
render() {
return (

<button onClick={this.handleSave}>Save</button>
<button onClick={this.handleClear}>Clear</button>
<ReactDrafts
onFileUpload={this.handleFileUpload}
exportTo="raw"
/>

);
}
}
To include styles, just import the css file from /dist
, ie:
## manifest.css
@import <path_to>/node_modules/react-drafts/dist/react-drafts.css
See the demo directory for a more complete example. Demo contains a sample editor parent container that instantiates the ReactDrafts
component and passes in props.


ecotrajectory: Genetic Drift in Python
ecotrajectory is a Python package that simulates an ecosystem populated by herbivores and carnivores. Both populations respond to one another, and occasional genetic mutations force adapations in the community. Sometimes interesting competetive strategies emerge, and sometimes one population so severely outcompetes the other that an extinction occurrs.
You can technically pip install ecotrajectory right now, but the version indexed by PyPi isn't functional. You can grab a copy of the development branch from my Github or check back later.


Open this page in Chrome or Firefox for best results, support in other browsers is lagging.
Your browser will ask for your location using the geolocation API of modern browsers to give provide an idea of the origin of participants. You can manually supply a latitude and longitude if you are worried about the precision of the location provided by browsers.


This website will be images, information and discussions about Amy Winehouse's work. Some topics will include:
| Week | Topic | Detail | Suggestions |
|---|---|---|---|
| Week 1 | Favorite Songs | Love is a Losing Game | See about page for instructions on how to send suggestions in the coming weeks |
| Week 2 | Unreleased Songs | Long Day | |
| Week 3 | Incluences | Donny Hathaway |
Here is a link to the Official Amy Winehouse Page. The website is a bit hard to read. It is displayed like some scrolling blogs I have seen on Tumblr. The posts come one after the other, but it is difficult to see where one post ends and another begins. It would be helpful on the eyes maybe to see lines between separate posts. The site has a cool title, and it is linked to social media which is useful.


Chef Andrzejewski offers Mexican-style banquet at Cantina Loco
If you wondered what Mike Andrzejewski has been up to since his much-loved restaurant Seabar closed, buy a ticket to Nov. 25 at Cantina Loco.
At his place at 191 Allen St., Andrezejewski is presenting a one-night-only menu of refined Mexican-inspired cuisine, a special event amid its usual tacos and burritos.
Chorizo flautas, filled with housemade sausage, and snapper ceviche with lime, charred onion, and herbs, are the appetizers.
Esquite, sweet corn with spicy crema, herbs and chiles, and avacado Caesar, are the vegetables. The main event is lamb shank with Mexican stylings, then there's dessert.
Seats, available through Brown Paper Tickets, are $87.50 including tax, tip, and service fees.
Send restaurant tips to<EMAIL_ADDRESS>and follow @BuffaloFood on Instagram and Twitter.


Coords:
Oops ... your browser doesn't support the HTML5 canvas element
Polygon:
cube
sphere
cone
cylinder
Translation:
x:
0
y:
0
z:
0
Rotation:
x:
0
y:
0
z:
0
Scale:
x:
1
y:
1
z:
1
Material:
ambient:
diffuse:
specular:
shininess:
0.5
Place
Delete
Selected:
None
Light 1
enabled:
Color:
ambient:
diffuse:
specular:
Attenuation:
constant attenuation:
0
linear attenuation:
0.7
quadratic attenuation:
0
Light 2
enabled:
Color:
ambient:
diffuse:
specular:
Attenuation:
constant attenuation:
0
linear attenuation:
0.7
quadratic attenuation:
0


Meteor.js in Action: Create an App, Test with Laika
Meteor is a next generation framework used for rapidly developing web apps, which seamlessly combines popular packages like MongoDB, Node.js, and jQuery, to name a few.
Check out the excellent Meteor documentation for more information. Grab the code from the repo here.
Please note: Before you can follow this tutorial, please install Node and npm.
With that, let’s start building …
This tutorial uses Meteor version
<IP_ADDRESS>
- which, as of writing, is the latest version
Contents
- Setup a Project
- Create a Basic App
- Restructure
- Testing Framework
- Users can submit answers
- Users can see all submitted answers
- Users can up or down vote answers
- Users can login via Twitter
- Users can only answer or vote if they are logged in
- Remove insecure packages
- Deployment
- What’s next?
- Conclusion
Setup a Project
1. Install Meteor and the Meteor Package Manager, Meteorite:
$ curl https://install.meteor.com/ | sh
$ meteor update
$ npm install -g meteorite
Alternatively, you can install meteor with npm,
npm install -g meteor
), however the npm package is not uploaded or maintained by Meteor Development Group
2. Create a Meteor project:
$ meteor create mymeteor
Look! It tells you exactly what to do:
To run your new app:
cd mymeteor
meteor
Go ahead and run it:
$ cd mymeteor
$ meteor
[[[[[ ~/Desktop/mymeteor ]]]]]
=> Meteor server running on: http://localhost:3000/
We just initialized the Meteor server. Navigate to [http://localhost:3000/] (http://localhost:3000/), and you should see:
If port 3000 is unavailable, you can use –port
as an option:
$ meteor --port 1337
Leave the app running. The browser will automatically update as you save changes to your code.
What’s going on here?
Look at your basic project structure:
.
├── mymeteor.css
├── mymeteor.html
└── mymeteor.js
Your JS file contains both client and server code:
// client!
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to mymeteor.";
};
Template.hello.events({
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
});
}
// server!
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
The behavior of {{greeting}}
in the HTML file is controlled by Template
within the client-side code in the JS file, as well as the handling of events.
Create a Basic App
In this example, we’ll be creating an app, which displays a question with a list of answers. Users can -
- Submit answers
- See all submitted answers
- Up or down vote answers
- Login via Twitter
- Only answer or vote if they are logged in
- View question but not submitted answers without logging in
Before we start adding this functionality, let’s first restructure the project.
Restructure
1. Add Packages (err Smart Packages!)
$ mrt add accounts-ui
accounts-ui: Simple templates to add login widgets to an app
$ mrt add accounts-twitter
accounts-twitter: Login service for Twitter accounts
$ mrt add bootstrap-3
bootstrap-3: Provides bootstrap 3.
Watch your browser as you add these. You should see the styles update almost immediately.
You can read more about these packages here, here, here. It’s pretty awesome that you can add these web components in just a matter of minutes! Awesome for prototyping!
You can view the available packages from the terminal by running the command -
meteor list
2. Add client and server folders
Add two new folders - “client” and “server”. Essentially, if Meteor detects a client folder, all the JavaScript within the folder will be run on the client-side, while JavaScript code found within the server folder will run only on the server-side.
Within the client folder, create a file called “mainClient.js” and add the following code:
if (Meteor.isClient) {
Template.hello.greeting = function () {
return "Welcome to mymeteor.";
};
Template.hello.events({
'click input' : function () {
// template data, if any, is available in 'this'
if (typeof console !== 'undefined')
console.log("You pressed the button");
}
});
}
Then within the server folder, and a file called “mainServer.js” and add the following code:
if (Meteor.isServer) {
Meteor.startup(function () {
// code to run on server at startup
});
}
Delete the “mymeteor.js” file. If you look at your browser, everything should look the same. Add one more folder called “tests”, which as you probably guessed will include our unit tests along with a file called “index.js”.
Your project structure should now look like this:
.
├── client
│ └── mainClient.js
├── mymeteor.css
├── mymeteor.html
├── server
│ └── mainServer.js
└── tests
└── index.js
3. Update HTML
Update “mymeteor.html”:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>One Question. Several Answers.</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css">

{{> hello}}

<template name="hello">

Hello World!

{{greeting}}
<input type="button" value="Click" />
</template>
Your app should now look like this:
Testing Framework
Since both client and server code are interconnected, we want to be able to write test cases that target both the client and server. Laika is by far the best framework for this.
For this reason, your tests will run bit slower.
Before installing Laika, make sure you have Node.js, PhantomJS, and MongoDB installed. Also, run mongod
in a separate terminal window.
Install Laika:
$ sudo npm install -g laika
All of our tests will reside in the “index.js” file within the “tests” folder.
Now let’s start building.
Users can submit answers
1. Client JS
Answers = new Meteor.Collection("answers");
Template.addAnswer.events({
'click input.add-answer' : function(e){
e.preventDefault();
var answerText = document.getElementById("answerText").value;
Meteor.call("addAnswer",answerText,function(error , answerId){
console.log('Added answer with ID: '+answerId);
});
document.getElementById("answerText").value = "";
}
});
What’s going on?
First, we have a click event, which grabs the value from the input box. This value is then passed to the server side via the .call()
- which is used to invoke a method. answerId
is then the call back, which is then assigned to the console.log.
1. Server JS
Answers = new Meteor.Collection("answers");
Meteor.methods({
addAnswer : function(answerText){
console.log('Adding Answer ...');
var answerId = Answers.insert({
'answerText' : answerText,
'submittedOn': new Date()
});
console.log(answerId)
return answerId;
}
});
What’s going on?
On the client side we passed the answerText
- inputted value - to the server side. This answer is the added to the MongoDB collection, then we return the answerID, which is handled on the client side.
Notice how we established the Mongo collection on both the client and server.
3. HTML

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>One Question. Several Answers.</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css">

Add an answer. Or vote.

Question: Is the world getting warmer?

{{> addAnswer}}

<template name="addAnswer">
<textarea class="form-control" rows="3" name="answerText" id="answerText" placeholder="Add Your Answer .."></textarea>

<input type="button" class="btn-primary add-answer btn-md" value="Add Answer"/>
</template>
4. Manually Test
First, your browser view should now look like this:
Next, arrange your screen so that you can view both your terminal as well as your browser. Also, open up the JS debug console:
Then, just like in the screenshot above, add an answer. On the client side, you should see the MongoDB ID - i.e., Added answer with ID: ECrTqRQha7vpXu78q
, which should match the ID on the server side:
I20140114-07:38:27.061(-7)? Adding Answer ...
I20140114-07:38:27.340(-7)? ECrTqRQha7vpXu78q
Want to see something cool? Of course you do.
Open up your browser’s console. Let’s add an answer:
> Answers.insert({answerText: 'Client Side Console Test!'});
"3D9nQYn87gXQX66ha"
You should see the answer appear on the page instantly!!
5. Automated Test
Now, add a Laika test by adding the following code to “index.js”:
'use strict'
var assert = require('assert');
suite('submitAnswers', function() {
// ensure that -
// (1) the "Answers" collection exists
// (2) we can connect to the collection
// (3) the collection is empty
test('server initialization', function(done, server) {
server.eval(function() {
var collection = Answers.find().fetch();
emit('collection', collection);
}).once('collection', function(collection) {
assert.equal(collection.length, 0);
done();
});
});
// ensure that -
// (1) we can add data to the collection
// (2) after data is added, we can retrieve it
test('server insert : OK', function(done, server, client) {
server.eval(function() {
Answers.insert({answerText: "whee!" });
var collection = Answers.find().fetch();
emit('collection', collection);
}).once('collection', function(collection) {
assert.equal(collection.length, 1);
done();
});
client.once('collection', function(collection) {
assert.equal(Answers.find().fetch().length, 1);
done();
});
});
});
What’s going on here?
Basically, we are just testing that the Answers collection exists and is accessible. See the inline comments for more info.
You may have noticed that Laika runs a bit slow. Well, that’s normal - because Laika creates a new, isolated app and database for each test, and each test is also isolated for the other, so you don’t have to worry about dumping the database after each test.
Run the test
If all goes well, you should see this:
$ laika
injecting laika...
loading phantomjs...
loading initial app pool...
submitAnswers
✓ server initialization (1517ms)
✓ server insert : OK
2 passing (2s)
cleaning up injected code
Congrats! You just wrote your first test!
If you have not initialized a Git repo yet, go ahead and do this now. Then commit the code.
Users can see all submitted answers
1. Client JS
Add the following template to pull out the data from the collection and sort in descending order.
return Answers.find({},{sort:{'submittedOn':-1}});
2. HTML
Add the templates to the HTML file:

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>One Question. Several Answers.</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css">

Add an answer. Or vote.

Question: Is the world getting warmer?

{{> addAnswer}}
{{> answers}}

<template name="addAnswer">
<textarea class="form-control" rows="3" name="answerText" id="answerText" placeholder="Add Your Answer .."></textarea>

<input type="button" class="btn-primary add-answer btn-md" value="Add Answer"/>
</template>
<template name="answers">

All Questions

{{#each items}}
{{> answer}}
{{/each}}
</template>
<template name="answer">

{{answerText}}

</template>
3. Manually Test
You should see all of the submitted answers:
Go ahead and add new answers. They should immediately appear.
As far as automated testing goes, we are already testing this with this code:
client.once('collection', function(collection) {
assert.equal(Answers.find().fetch().length, 1);
done();
Commit your code.
Users can up or down vote answers
Let’s add some voting capabilities. Think about what we need to add for this.
- Update collection to store votes
- Update HTML to add vote buttons
- Event handler for when the user clicks a button so that the collection is updated
1. Server JS
Add the following code:
incrementYesVotes : function(answerID){
console.log(answerID);
Answers.update(answerID,{$inc : {'yes':1}});
},
incrementNoVotes : function(answerID){
console.log(answerID);
Answers.update(answerID,{$inc : {'no':1}});
}
This utilizes Meteor’s collection update to increment the counter.
2. Client JS
Add the event handler:
Template.answer.events({
'click': function () {
Session.set("selected_answer", this._id);
},
'click a.yes' : function(e) {
e.preventDefault();
var answerId = Session.get('selected_answer');
console.log('updating yes count for answerId '+answerId);
Meteor.call("incrementYesVotes",answerId);
},
'click a.no': function(e) {
e.preventDefault();
var answerId = Session.get('selected_answer');
console.log('updating no count for answerId '+answerId);
Meteor.call("incrementNoVotes",answerId);
}
});
3. HTML
Update the answer
template:
<template name="answer">

{{answerText}}

 Yes {{yes}}
 No {{no}}

</template>
3. Manually Test
You should see Yes and No buttons below the answers:
Test it out:
4. Automated Test
Add the following code to “index.js”:
suite('addVotes', function() {
// ensure that -
// (1) we can add data to the collection
// (2) after data is added, we can retrieve it
test('server insert votes : OK', function(done, server, client) {
server.eval(function() {
Answers.insert({answerText: "wheeeeeeeeeee!"});
Answers.update({answerText: "wheeeeeeeeeee!"},{$inc : {'yes':1}});
var voteCollection = Answers.find().fetch();
emit('collection', voteCollection);
}).once('collection', function(voteCollection) {
// console.log(collection[0].yes)
assert.equal(voteCollection[0].yes, 1);
done();
});
});
});
What’s going on here?
Similar to the last test, we are just testing that the collection exists and that it returns certain data. This time, though, we are not just testing that the collection exists, but that the yes
key contains a value of 1.
Run the test
$ laika
injecting laika...
loading phantomjs...
loading initial app pool...
submitAnswers
✓ server initialization (1882ms)
✓ server insert : OK (2957ms)
addVotes
✓ server insert votes : OK (3105ms)
3 passing (8s)
cleaning up injected code
Commit your code!
Users can login via Twitter
Remember when we added these two packages-
accounts-ui
accounts-twitter
-well, let’s go ahead and use them.
1. Update HTML

Add an answer. Or vote.

{{loginButtons}}

Question: Is the world getting warmer?

{{> addAnswer}}
{{> answers}}

Check your browser. You should see the “Configure Twitter Login” button.  This tells you exactly how to setup your app on Twitter for logging via Oauth. Follow the instructions to create the app, then copy and paste the consumer key and consumer secret into the window on the Meteor app.
Next, test logging in. If all went well you should see:
If you need to add a different Twitter app to authenticate with you must drop the
meteor_accounts_loginServiceConfiguration
collection from MongoDB -db.meteor_accounts_loginServiceConfiguration.drop()
4. Automated Test
Since the Twitter login is part of a pre-written package, we do not need to do any unit tests. In general, unit tests should be reserved to code that you have written. Other people’s code should be tested within the scope of a functional test, which I cannot figure out how to do with Laika. You could use Selenium or PhantomJS here, but I think just the manual testing is fine for now. The Meteor team really needs to develop an internal testing solution.
Commit your code. Take a breath. Move on.
Users can only answer or vote if they are logged in
Finally, let’s add some restrictions so that a user must be logged in before adding answers or voting.
1. Client JS
Template.answer.events({
'click': function () {
Session.set("selected_answer", this._id);
},
'click a.yes' : function(e) {
e.preventDefault();
if(Meteor.userId()){
var answerId = Session.get('selected_answer');
console.log('updating yes count for answerId '+answerId);
Meteor.call("incrementYesVotes",answerId);
}
},
'click a.no': function(e) {
e.preventDefault();
if(Meteor.userId()){
var answerId = Session.get('selected_answer');
console.log('updating no count for answerId '+answerId);
Meteor.call("incrementNoVotes",answerId);
}
}
});
2. Server JS
var answerId = Answers.insert({
'answerText' : answerText,
'submittedOn': new Date(),
'submittedBy' : Meteor.userId()
});
3. HTML

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>One Question. Several Answers.</title>
<link rel="stylesheet" type="text/css" href="http://netdna.bootstrapcdn.com/bootswatch/3.0.3/yeti/bootstrap.min.css">

Add an answer. Or vote.

{{#if currentUser}}
{{loginButtons}}
{{/if}}

Question: Is the world getting warmer?

{{#if currentUser}}
{{> addAnswer}}
{{> answers}}
{{/if}}
{{#unless currentUser}}
{{> login}}
{{loginButtons}}
{{/unless}}

<template name="addAnswer">
<textarea class="form-control" rows="3" name="answerText" id="answerText" placeholder="Add Your Answer .."></textarea>

<input type="button" class="btn-primary add-answer btn-md" value="Add Answer"/>
</template>
<template name="answers">

All Questions

{{#each items}}
{{> answer}}
{{/each}}
</template>
<template name="answer">

{{answerText}}

 Yes {{yes}}
 No {{no}}

</template>
<template name="login">

Sign in using Twitter to submit new questions or to vote on existing questions.

</template>
What’s going on here?
if(Meteor.userId()){}
prevents a user from voting if they are not logged in, but only on the JS side. In other words, the user can still click the button; it’s just nothing will happen if they do.'submittedBy' : Meteor.userId()
adds the logged in user to the collection{{#unless currentUser}}disabled{{/unless}}
disables the yes or no button. Now the it can’t even be clicked unless the user is logged in.{{#if currentUser}} ... {{/if}}
and{{#unless currentUser}} ... {{/unless}}
are used to display certain templates if the user is logged in or not.
4. Manual Test
Open your browser. If you’re logged in, go ahead and log out. You should see this:
Now, before logging in to test. Let’s dump the answers collection so that each record in the collection has a user associated with it. To do this, make sure your meteor app is running, then open a new terminal window and navigate to your app’s project root.
Follow these commands to dump the collection:
$ meteor mongo
MongoDB shell version: 2.4.8
connecting to: <IP_ADDRESS>:3002/meteor
meteor:PRIMARY> show dbs;
local 0.0625GB
meteor 0.0625GB
meteor:PRIMARY> use meteor;
switched to db meteor
meteor:PRIMARY> show collections;
answers
meteor_accounts_loginServiceConfiguration
questions
system.indexes
users
meteor:PRIMARY> db.answers.drop()
true
Back on your browser, go ahead and log back in. Add an answer.
Finally, jump back to the mongo shell:
meteor:PRIMARY> show collections;
answers
meteor_accounts_loginServiceConfiguration
questions
system.indexes
users
meteor:PRIMARY> db.answers.find()
{ "_id" : "cbWebazW8eehJkaXL", "answerText" : "This is my first test while logged in.", "no" : 2, "submittedBy" : "Ex2bHmCgkygNbByEc", "submittedOn" : ISODate("2014-01-14T20:07:53.080Z"), "yes" : 2 }
Success! There is a key/value pair for the user - "submittedBy" : "Ex2bHmCgkygNbByEc"
.
Remove insecure packages
All Meteor applications have a package called Insecure pre-installed. This handy little package gives the client the ability to interact with the database, as you saw before. While this may be handy for prototyping you always want to remove it for production applications.
To remove, just run:
$ meteor remove insecure
1. Manually Test
Manually test this on your end. With the Meteor server running and your browser open, try to insert an answer in the console. Make sure that the user is logged in.
> Answers.insert({answerText: 'Client Console Test!'})
"oeYhZMmXyBjivJ5uM"
insert failed: Access denied
You should the see above insertion error. Also, you know that it’s not working if the answer did not get immediately added to the page.
Finally, you can look in Mongo, just to be sure. Open a new window in your terminal, navigate to your “mymeteor” directory, then type the following commands:
$ meteor mongo
MongoDB shell version: 2.4.8
connecting to: <IP_ADDRESS>:3002/meteor
meteor:PRIMARY> show dbs;
local 0.0625GB
meteor 0.0625GB
meteor:PRIMARY> use meteor;
switched to db meteor
meteor:PRIMARY> show collections;
answers
meteor_accounts_loginServiceConfiguration
questions
system.indexes
users
Now search the collection:
meteor:PRIMARY> db.answers.find({answerText: 'Client Console Test!'})
meteor:PRIMARY>
This shouldn’t find anything.
Deployment
Although there are a number of deployment options, pushing your new app to the Meteor test servers is by far the easiest. Simply run the command: meteor deploy <YOUR-APP-NAME-HERE>
.
So -
meteor deploy answers
Check it out at http://answers.meteor.com/.
The Meteor servers are for testing only; they are not meant for apps in production.
Don’t forget to commit!
What’s next?
- Deploy to Heroku
- Setup Selenium Tests
- Add additional functionality
Conclusion
That’s it. Give me some feedback. In the coming weeks, I’ll be deploying an app into production. Stay tuned.
Grab the code from the repo here


OK pre logged in ka na
by ikaw - 19 March 2020 11:45 PM
Announcements
OK pre logged in ka na
by ikaw - 19 March 2020 11:45 PM
COVID-19 cases rise to 202
by admin - 19 March 2020 11:45 PM
Tara WW
by digitalsirkeith - 20 March 2020 12:01 AM
Venues and Promotions
Jollibee
Free Sundae Yum Borgar P50 off Free CoffeeMarga's Honesty Store
Free Stick-O


Class Gdi
Inheritance
System.Object
Gdi
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
Fields
|
Improve this Doc
View Source
PFD_DOUBLEBUFFER
The buffer is double-buffered. This flag and PFD_SUPPORT_GDI
are mutually exclusive in the current generic implementation.
Declaration
public const int PFD_DOUBLEBUFFER = 1
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_DRAW_TO_BITMAP
The buffer can draw to a memory bitmap.
Declaration
public const int PFD_DRAW_TO_BITMAP = 8
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_DRAW_TO_WINDOW
The buffer can draw to a window or device surface.
Declaration
public const int PFD_DRAW_TO_WINDOW = 4
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_GENERIC_ACCELERATED
The pixel format is supported by a device driver that accelerates the generic
implementation. If this flag is clear and the
PFD_GENERIC_FORMAT flag is set, the pixel format is supported
by the generic implementation only.
Declaration
public const int PFD_GENERIC_ACCELERATED = 4096
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
The pixel format is supported by the GDI software implementation, which is
also known as the generic implementation. If this bit is clear, the pixel
format is supported by a device driver or hardware.
Declaration
public const int PFD_GENERIC_FORMAT = 64
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_MAIN_PLANE
The layer is the main plane.
Declaration
public const int PFD_MAIN_PLANE = 0
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_NEED_PALETTE
The buffer uses RGBA pixels on a palette-managed device. A logical palette
is required to achieve the best results for this pixel type. Colors in the
palette should be specified according to the values of the cRedBits,
cRedShift, cGreenBits, cGreenShift, cBluebits,
and cBlueShift members. The palette should be created and realized in
the device context before calling wglMakeCurrent(IntPtr, IntPtr).
Declaration
public const int PFD_NEED_PALETTE = 128
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_NEED_SYSTEM_PALETTE
Defined in the pixel format descriptors of hardware that supports one
hardware palette in 256-color mode only. For such systems to use
hardware acceleration, the hardware palette must be in a fixed order
(for example, 3-3-2) when in RGBA mode or must match the logical palette
when in color-index mode.
When this flag is set, you must call in
your program to force a one-to-one mapping of the logical palette and the
system palette. If your OpenGL hardware supports multiple hardware palettes
and the device driver can allocate spare hardware palettes for OpenGL, this
flag is typically clear.
This flag is not set in the generic pixel formats.
Declaration
public const int PFD_NEED_SYSTEM_PALETTE = 256
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_STEREO
The buffer is stereoscopic. This flag is not supported in the current
generic implementation.
Declaration
public const int PFD_STEREO = 2
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SUPPORT_DIRECTDRAW
The buffer supports DirectDraw drawing.
Declaration
public const int PFD_SUPPORT_DIRECTDRAW = 8192
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SUPPORT_GDI
The buffer supports GDI drawing. This flag and
PFD_DOUBLEBUFFER are mutually exclusive in the current generic
implementation.
Declaration
public const int PFD_SUPPORT_GDI = 16
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SUPPORT_OPENGL
The buffer supports OpenGL drawing.
Declaration
public const int PFD_SUPPORT_OPENGL = 32
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SWAP_COPY
Specifies the content of the back buffer in the double-buffered main color
plane following a buffer swap. Swapping the color buffers causes the content
of the back buffer to be copied to the front buffer. The content of the back
buffer is not affected by the swap. PFD_SWAP_COPY is a hint only and
might not be provided by a driver.
Declaration
public const int PFD_SWAP_COPY = 1024
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SWAP_EXCHANGE
Specifies the content of the back buffer in the double-buffered main color
plane following a buffer swap. Swapping the color buffers causes the
exchange of the back buffer's content with the front buffer's content.
Following the swap, the back buffer's content contains the front buffer's
content before the swap. PFD_SWAP_EXCHANGE is a hint only and might
not be provided by a driver.
Declaration
public const int PFD_SWAP_EXCHANGE = 512
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_SWAP_LAYER_BUFFERS
Indicates whether a device can swap individual layer planes with pixel
formats that include double-buffered overlay or underlay planes.
Otherwise all layer planes are swapped together as a group. When this
flag is set, is supported.
Declaration
public const int PFD_SWAP_LAYER_BUFFERS = 2048
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_TYPE_COLORINDEX
Color-index pixels. Each pixel uses a color-index value.
Declaration
public const int PFD_TYPE_COLORINDEX = 1
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
PFD_TYPE_RGBA
RGBA pixels. Each pixel has four components in this order: red, green, blue,
and alpha.
Declaration
public const int PFD_TYPE_RGBA = 0
Field Value
| Type |
Description |
| System.Int32 |
|
Methods
Declaration
[CLSCompliant(false)]
public static bool _SetPixelFormat(IntPtr deviceContext, int pixelFormat, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public static int ChoosePixelFormat(IntPtr deviceContext, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Returns
| Type |
Description |
| System.Int32 |
|
CreateCompatibleDC(IntPtr)
Declaration
public static IntPtr CreateCompatibleDC(IntPtr hdc)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hdc |
|
Returns
| Type |
Description |
| System.IntPtr |
|
CreateFont(Int32, Int32, Int32, Int32, Int32, Boolean, Boolean, Boolean, Int32, Int32, Int32, Int32, Int32, String)
Declaration
public static IntPtr CreateFont(int height, int width, int escapement, int orientation, int weight, bool italic, bool underline, bool strikeOut, int charSet, int outputPrecision, int clipPrecision, int quality, int pitchAndFamily, string typeFace)
Parameters
| Type |
Name |
Description |
| System.Int32 |
height |
|
| System.Int32 |
width |
|
| System.Int32 |
escapement |
|
| System.Int32 |
orientation |
|
| System.Int32 |
weight |
|
| System.Boolean |
italic |
|
| System.Boolean |
underline |
|
| System.Boolean |
strikeOut |
|
| System.Int32 |
charSet |
|
| System.Int32 |
outputPrecision |
|
| System.Int32 |
clipPrecision |
|
| System.Int32 |
quality |
|
| System.Int32 |
pitchAndFamily |
|
| System.String |
typeFace |
|
Returns
| Type |
Description |
| System.IntPtr |
|
DeleteDC(IntPtr)
Declaration
public static bool DeleteDC(IntPtr hdc)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hdc |
|
Returns
| Type |
Description |
| System.Boolean |
|
DeleteObject(IntPtr)
Declaration
public static bool DeleteObject(IntPtr objectHandle)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
objectHandle |
|
Returns
| Type |
Description |
| System.Boolean |
|
Declaration
public static int DescribePixelFormat(IntPtr hdc, int iPixelFormat, uint nBytes, IntPtr pfd)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hdc |
|
| System.Int32 |
iPixelFormat |
|
| System.UInt32 |
nBytes |
|
| System.IntPtr |
pfd |
|
Returns
| Type |
Description |
| System.Int32 |
|
GetCharABCWidths(IntPtr, UInt32, UInt32, Gdi.ABC[])
Declaration
public static bool GetCharABCWidths(IntPtr hdc, uint uFirstChar, uint uLastChar, Gdi.ABC[] lpabc)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hdc |
|
| System.UInt32 |
uFirstChar |
|
| System.UInt32 |
uLastChar |
|
| Gdi.ABC[] |
lpabc |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetCharWidth32(IntPtr, UInt32, UInt32, Int32[])
Declaration
public static bool GetCharWidth32(IntPtr hdc, uint uFirstChar, uint uLastChar, int[] lpwidth)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hdc |
|
| System.UInt32 |
uFirstChar |
|
| System.UInt32 |
uLastChar |
|
| System.Int32[] |
lpwidth |
|
Returns
| Type |
Description |
| System.Boolean |
|
GetKerningPairs(IntPtr, Int32, Gdi.KERNINGPAIR[])
Declaration
public static int GetKerningPairs(IntPtr hDC, int cPairs, Gdi.KERNINGPAIR[] lpkrnpair)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
hDC |
|
| System.Int32 |
cPairs |
|
| Gdi.KERNINGPAIR[] |
lpkrnpair |
|
Returns
| Type |
Description |
| System.Int32 |
|
Declaration
public static int GetPixelFormat(IntPtr deviceContext)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
deviceContext |
|
Returns
| Type |
Description |
| System.Int32 |
|
SelectObject(IntPtr, IntPtr)
Declaration
public static IntPtr SelectObject(IntPtr deviceContext, IntPtr objectHandle)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
deviceContext |
|
| System.IntPtr |
objectHandle |
|
Returns
| Type |
Description |
| System.IntPtr |
|
|
Improve this Doc
View Source
Declaration
public static bool SetPixelFormat(IntPtr deviceContext, int pixelFormat, ref Gdi.PIXELFORMATDESCRIPTOR pixelFormatDescriptor)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
SwapBuffersFast(IntPtr)
Declaration
public static int SwapBuffersFast(IntPtr deviceContext)
Parameters
| Type |
Name |
Description |
| System.IntPtr |
deviceContext |
|
Returns
| Type |
Description |
| System.Int32 |
|


26. Schneider, teletype, 9 Nov. 1967; remark to reporters, "Apollo 4," p. 7.
27. MSFC, Saturn V News Reference, 12.1-12.2. Each Saturn V flight was preceded by a technical summary including miscellaneous diagrams, mission profile details, and operational highlights. See, for example, MSFC, Technical Information Summary, Apollo 4 (AS-501), and subsequent. A more comprehensive prelaunch publication, including details of the spacecraft and the launch facilities at KSC as well as the Saturn V launch vehicles, was issued as MSFC, Saturn V Flight Manual, SA-501, and subsequent. For a postmission analysis, see the continuing (and more voluminous) series of reports, such as MSFC, Saturn Flight Evaluation Working Group, Saturn V Launch Vehicle Flight Evaluation Report AS-501, Apollo 4 Mission, and subsequent. All of these doruments may be consulted in the files of the MSFC Historical Off. In addition, see Lockyer, A Summary of Major NASA Launchings (cited for Saturn I and IB mission narratives), and MSFC, Saturn V News Reference, Dec. 1968. The annual issues of NASA, Astronautics and Aeronautics include pertinent summary information on the successive Apollo-Saturn launches and missions. An excellent survey of Apollo-Saturn vehicies and operations, covering AS-501/508, is David Baker, "Saturn V," Spaceflight, Jan., Feb., and Mar., 1971, pp. 16-22, 61-65, 100-107. Unless otherwise noted, information for the composite summaries of the Saturn V launches was compiled from the assorted documents noted above.
28. For a clear and concise summary of vehicle AS-501 mission operations, see Haggerty, "Apollo 4," pp. 5-7; Baker, "Saturn V," Spaceflight, Mar. 1971, p. 100.
29. Von Braun daily journal, transcript of telephone call 15 Nov. 1967, ASRC files.
30. George Mueller to William M. Allen, 21 Nov, 1967.
31. Gen. Phillips to NASA centers, teletype, 15 Nov. 1967.
32. For the most concise assessment of the POGO investigation and ASI line analysis, see von Braun, "The Detective Story Behind Our First Manned Saturn V Shot," Popular Science, 193 (Nov. 1968): 98-100, 209. The quotations by von Braun have been taken from this source. On the background of the POGO problem and detailed study of the phenomenon, see L. L. Bickford and S. G. Meisenholder, POGO Analysis of the Saturn Propulsion System (Final Report), NASA CR-86432, 3 Apr. 1967; George L. von Pragenau, "Stability Analysis of Apollo-Saturn V Propulsion and Structure Feedback Loop," AIAA Paper 69-877, Aug. 1969. See also interviews with von Braun, MSFC, 30 Nov. 1971; Roy Godfrey, MSFC, 29 July 1975; and Robert Pease, MSFC, 3 Sept, 1971. The ASI line failure in particular is analyzed in Beirne Lay, Jr., Earthbound Astronauts (Englewood Cliffs, New Jersey, 1970), pp. 142-146.
33. Anon., "Manned Space Flight Program Progress," draft, 8 June 1967.
34. Robert O. Aller to Dir., Apollo Program, 9 June 1967.
35. Gilruth to George E. Mueller, 19 Sept. 1967.
36. Von Braun daily journal, von Braun and Mueller teleconference, 11 Apr. 1968, ASRC files.
37. NASA, Astronautics and Aeronautics, 1968, pp. 92-93; Arthur Rudolph to Gen. Phillips, telegram, 29 Apr. 1968.
38. Arthur Rudolph to Gen. Phillips, "Replacement of F-1 engine on AS-503," 14 May 1968, and attachment, William D. Brown, Mgr., Engine Program Off. to Arthur Rudolph," "Leaking F-1 Primary Fuel Pump Seal on Engine F-4023, AS-503," 13 May 1968.
39. Phillips' recollections are recounted in his essay, "The Shakedown Cruises," in Edgar M. Cortright, ed., Apollo Expeditions to the Moon, NASA SP-350 (Washington, 1973), pp. 171-175. All quotations are from this source. See also Brooks, Grimwood, and Swenson, Chariots for Apollo, chap. 12; Frank W. Anderson,Jr., Orders of Magnitude: A History of NACA and NASA, 1915-1976. NASA SP-4403 (Washington, 1976), p. 69.
40. Mueller to Acting Administrator, "Request for Approval to Man the Apollo/Saturn V Launch Vehicle," 5 Nov. 1968: Mueller to Dr. Thomas O. Paine, 11 Nov. 1968, with attachments: Phillips to Mueller, "Apollo 8 Mission Selection," 11 Nov. 1968; Paine to Mueller, 18 Nov. 1968.
41. Dieter Grau interview, MSFC, 24 Aug. 1971.
42. NASA, Astronautics and Aeronautics, 1968, pp. 318-320; Lockyer, Summary of Major NASA Launchings, p. 128. Copy of Apollo 8 invitation housed in JSC files.
43. Lockyer, Summary of Major NASA Launchings, pp. 127, 129; NASA, Astronautics and Aeronautics, 1969, pp. 62-65, 142-145.
44. Michael Collins, Carrying the Fire: An Astronaut's Journeys (New York, 1974), pp. 358-359.
45. NASA, Astronautics and Aeronautics, 1969, pp. 209-210.
46. Michael Collins interview, 17 Oct. 1975; Collins, Carrying the Fire, pp. 364-365.
47. Collins interview; Collins, Carrying the Fire, pp. 371-373.
48. Collins, Carrying the Fire, pp. 371-373.
49. The most convenient summary of the AS-506 mission is contained in NASA, Astronautics and Aeronautics, 1969, pp. 212 ff. It includes a wide range of editorial and public comment on the flight of Apollo 11, its significance and results. For published accounts see, for example, Neil Armstrong, Michael Collins, and Edwin Aldrin, First on the Moon (New York, 1970); Young, and others, Journey to Tranquility; Collins, Carrying the Fire; Norman Mailer, Of a Fire on the Moon (Boston, Massachusetts, 1969). See also Brooks, Grimwood, and Swenson, Chariots for Apollo.
50. See, for example, Boeing Co., "Saturn V Flight Evaluation Trend Report: AS-501 Through AS-506," 30 Sept. 1969,
51. NASA, Astronautics and Aeronautics, 1969, pp. 372-374; "Towards the Ocean of Storms," Time, 21 Nov. 1969, p. 8.
52. Von Braun interview, MSFC, 17 Nov. 1976; Roy Godfrey interview, MSFC, 29 July 1975; Walter Haeussermann, MSFC, to author, "History of Saturn Launch Vehicles," 22 June 1976.
53. NASA, Astronautics and Aeronautics, 1970, pp. 119 ff., 201 ff. See also, Edgar M. Cortright, "Report of the Apollo 13 Review Board," 15 June 1970. The report includes a one-volume narrative summary, and three volumes of appendices. Copies in JSC files. See also Brooks, Grimwood, and Swenson, Chariots for Apollo.
54. NASA, Astronautics and Aeronautics, 1971, pp. 25 ff.; MSFC, Public Affairs Off., news release, 5 Feb. 1971.
55. Commentary on the LRV can be found in David S. Akens, An Illustrated Chronology of the NASA Marshall Center and MSFC Programs, 1960-1973, MSFC, MHR-10, May 1974. On manned exploration of the lunar surface, including use of the LRV, see Richard S. Lewis, The Voyages of Apollo: The Exploration of the Moon (New York, 1974).
56. Interviews with von Braun, MSFC, 30 Nov. 1971; Richard N. Rodgers, MSFC, 24 Aug. 1971; Leonard Bostwick and Milan Burns, MSFC, 31 July 1975. See also Jonathan Eberhart, "Saturn V Only a Beginning," Science News, 11 Nov. 1967, pp. 472-473.
57. For a review of the scientific gear, experiments, and results, see Richard S. Lewis, The Voyages of Apollo: The Exploration of The Moon (New York, 1974).
1. David S. Akens, Skylab Illustrated Chronology, 1962-1973, MSFC, 1 May 1973, pp. 1-7; James T. Murphy to Robert G. Sheppard, "Comment Edition of History of Saturn Launch Vehicles," with enclosures, 15 June 1976.
3. Akens, Srylab, pp. 41-43; David S. Akens, An Illustrated Chronology of the NASA Marshall Center and MSFC Programs, 1960-1973, MSFC, MHR-10, May 1974, pp. 328, 332.
4. Akens, Skylab, pp. 55, 70-71.
5. Akens, Chronology of MSFC, pp. 333-341. For the full story of Skylab, see Charles D. Benson and W. David Compton, Skylab: A History, the forthcoming official NASA history.
6. For details of the ASTP launch and background, see NASA, Apollo-Soyuz Test Project: Press Kit (1975). Copy in JSC files.
7. The most authoritative single volume on Soviet launch vehicles and other Soviet space technology is Senate Committee on Aeronautical and Space Sciences, Soviet Space Programs, 1966-1970, staff report, 92nd Cong., 1st sess., 9 Dec. 1971. This document includes a general discussion of the standard launch vehicle series, known as the A version, p. 135 ff. The discussion is preceded by a highly useful table of the characteristics of Soviet launch vehicles, on pp. 133-134. Illustrations are included on pp. 560-561, 563, 572-573. See also, Peter L. Smolders, Soviets in Space (New York: Taplinger Publishing Co., 1974). This book is translated from the Dutch edition which appeared in 1971. The author used no footnotes, but apparently he had access to an unusually large amount of unpublished information, and had opportunities for interviews with a number of leading Russian cosmonauts and scientists. A good, brief discussion of Soviet rockets appears on pp. 59-69, a useful illustration on p. 64, and a numbered, cut-away diagram of the Salyut vehicle on pp. 70-71. A recent survey of rocket technology, including the Russian vehicles, is Kenneth Gatland, Missiles and Rockets (New York: Macmillan Co., 1975), pp. 184-199 especially. This discussion includes comments on some of the later engines and on the range of Soviet rockets, as well as photographs of the engines themselves. Useful and detailed illustrations, done by a professional illustrator team, appear on pp. 76-82. These include a very useful illustration of the RD-107 engine (p. 77) as well as a launch profile of a Soyuz mission (p. 81). A noted expert and writer on space technology, Gatland is editor of the authoritative British magazine, Spaceflight. See also Nicholas Daniloff, The Kremlin and the Cosmos (New York: Alfred A. Knopf, 1972); and Laonid Vladimirov, The Russian Space Bluff (New York: Dial Press, 1973). The latter was written by a former mechanical engineer and scientific editor from the Soviet Union, who decided to defect in 1966. His intriguing thesis is that the Russians remained one step ahead of the U.S. during the 1960s because they felt that American space programs were further ahead than they actually were, and the Russians undertook a series of very risky space shots to maintain their propaganda advantage. The publisher included a comment by von Braun that the book was "fascinating, informative and worthy of a wide readership in the United States" (cited opposite the book's title page).
8. See Vladimirov, Russian Space Bluff, pp. 79-80. The comment on the heavy gauge of Soviet tankage is from U.S. Senate, Soviet Space Programs, p. 136.
9. Gatland, Missiles and Rockets, pp. 192-199. For a brief discussion of Russian propellant development, see John D. Clark, Ignition! An Informal History of Liquid Rocket Propellants (New Brunswick, N.J., 1972), pp. 115-119.
10. MSFC, press release, 5 Aug. 1975. For the full story of ASTP, see Edward and Linda Ezell, The Partnership: A History of the Apollo Soyuz Test Project, NASA SP-4209 (Washington, 1978).
11. See, for example, Loyd S. Swenson, Jr., "The Fertile Crescent: The South's Role in the National Space Program," Southwestern Historical Quarterly, 71 (Jan. 1968): 377-392. Obviously, the impact of NASA's presence varied. MSC was sited near an existing metropolis (Houston) of considerable size. KSC, in Brevard County, Fla., was located in an area of several smaller communities. MSFC, near Huntsville, was established near a medium-sized, though well-established, city. MAF occupied existing facilities within the New Orleans metropolitan area, whereas MTF was largely a huge buffer zone for testing, different in concept from all of the above, employing a smaller number of permanent civil service and contractor personnel. Thus, the subtleties of NASA impact were different in each case, despite general patterns in terms of jobs, construction, and so on. See also Raymond A. Bauer, Second-Order Consequences: A Methodological Essay on the Impact of Technology (Cambridge, Mass.: MIT Press, 1969). Huntsville and Brevard County are specifically contrasted on pp. 92-101.
12. John S. Beltz, "Huntsville and the Aerospace Age," paper presented at the annual, meeting of the Southern Historical Assn., Houston, 1971. Copy in SHP files. The Huntsville Times, "25 Years Since," 3 Nov. 1974. This was a special 16-page supplement to the Times, commemorating the 25th anniversary of the decision to locate the Redstone Arsenal in Huntsville in 1949. The supplement included numerous signed articles on various phases of the impact on Huntsville in the ensuing two and one-half decades. Cited hereafter as Times, Supplement.
13. Bob Ward, "Famed von Braun Remembers Huntsville His Personal Choice," Times, Supplement, p. 4.
14. Bauer, Second Order Consequences, p. 93; Beltz, "Huntsville," pp. 18-21.
15. Beltz, "Huntsville," 21-22. Don Eddins, "City Schools," p. 11, John Park, "Medical Help Boomed," p. 15, in Times, Supplement.
16. Don Eddins, "Universitv of Alabama Spreads Wings," Times, Supplement, p. 13. The prior existence of a primarily Black state college, Alabama A&M, founded in 1873, seemed to underscore lingering racial divergences. Nevertheless, Huntsville's civil rights issues remained less volatile than elsewhere in the South during the turbulent 1960s. See Bauer, Second-Order Consequences, p. 98.
17. Bob Ward, "Small Error Turned Out to Be More Fact Than Fiction," Times, Supplement, p. 2.
18. Times, Supplement, passim.
19. Alan Moore, "Von Braun Civic Center Heralds Future," Times, Supplement, p. 14; information supplied by the Alabama Space and Rocket Center.
20. Bauer, Second Order Consequences, pp. 171-172, 174.
21. For a popular account of these and other aspects of the national space program in general, see, Frederick I. Ordway III, Carsbie C. Adams, and Mitchell R. Sharpe, Dividends from Space (New York, 1971).
22. Bauer, Second Order Consequences, p. 174.
23. William R. Lucas, "The Past, Present, and Future of Metals for Liquid Rockets," Metals Engineering Quarterly, Feb. 1966, p. 59.
24. R. V. Hoppes, "The Saturn V Space Program and Aluminum Welding Technology," MSFC, 1967, p. 10.
25. Hoppes, "Saturn Welding Technology" p. 3, passim.
27. See, for example: "Listing of Special Publications Published by the NASA Technology Utilization Division," 1968; NASA, Transferable Technology: Publications Reporting Innovations Suitable for Many Purposes, NASA Off. of Technology Utilization, Fall 1968; House Committee on Science and Astronautics, "For the Benefit of All Mankind; a Survey of the Practical Returns from Space Investment," House report, 91st Cong., 2nd sess., 7 Dec. 1970; JSC, "Space Benefits: Today and Tomorrow," pamphlet, Nov. 1971.
28. This became a standard interview question, even though it invariably elicited the same answer.
29. Statements to this effect were made to the author by numerous contractors as well as MSFC managers and engineers, and printed in various press releases. See, for example, MSFC, Press Release 75-174, 1975.