Converting numbers to text and vice versa is a common issue as it can be useful in many different situations and C++98 doesn't provide a tool designed specifically to solve this problem.
Luckily C++ is a general purpose language so it allows to solve this quite easily and, as most things, you have many ways of accomplishing this task.
Here are listed some
Contents:
C++ - stringstreams
The C++ stream library is powerful and it allows easy formatted input output operations. With stringstreams you can perform this input/output to string, this allows you to convert numbers ( or any type with the <<
>>
stream operators overloaded ) to and from strings.
With stringstreams
you can use the same syntax to convert the different numeric types.
To use stringstreams
you need to #include <sstream>
Number to String
Converting a number to a string takes two steps using stringstreams:
- Outputting the value of the number to the stream
- Getting the string with the contents of the stream
As with this conversion needs only output operation with the stream, an
ostringstream
( output string stream ) can be used instead of the stream for both input and output (
stringstream
)
Here is an example which shows each step:
1 2 3 4 5 6 7 8 9 10 11
|
int Number = 123; // number to be converted to a string
string Result; // string which will contain the result
ostringstream convert; // stream used for the conversion
convert << Number; // insert the textual representation of 'Number' in the characters in the stream
Result = convert.str(); // set 'Result' to the contents of the stream
// 'Result' now is equal to "123"
| |
This operation can be shorten into a single line:
1 2
|
int Number = 123;
string String = static_cast<ostringstream*>( &(ostringstream() << Number) )->str();
| |
Here is constructed an unnamed stringstream object and performed the output
ostringstream() << Number
Then, since the << returns a reference to an
ostream
( a base of
ostringstream
) the result of the operation needs to be casted back to a stringstream
static_cast<ostringstream*>
Finally, we get the contents of the resulting stream as a string
->str()
and we assign that value to the string
string String =
Custom formatting
Stringstreams allow
manipulators and
locales to customize the result of these operations so you can easily change the format of the resulting string
Example: - This is not a complete program -
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
// Headers needed:
#include <iomanip>
#include <locale>
#include <sstream>
#include <string> // this should be already included in <sstream>
// Defining own numeric facet:
class WithComma: public numpunct<char> // class for decimal numbers using comma instead of point
{
protected:
char do_decimal_point() const { return ','; } // change the decimal separator
};
// Conversion code:
double Number = 0.12; // Number to convert to string
ostringstream Convert;
locale MyLocale( locale(), new WithComma);// Crate customized locale
Convert.imbue(MyLocale); // Imbue the custom locale to the stringstream
Convert << fixed << setprecision(3) << Number; // Use some manipulators
string Result = Convert.str(); // Give the result to the string
// Result is now equal to "0,120"
| |
String to Number
Also converting a string to a number via stringstream takes two steps:
- Constructing the stream from the string
- Reading the value into the variable
For this ( as you need to read input from the stream ) an
istringstream
will be used
While a number can always be converted in a string, a string must be valid to be converted to a number ( eg: An attempt of converting
"hello"
to an integer would certainly fail ) so on this conversion, some checking must be done
Here is the code example:
1 2 3 4 5 6 7 8 9 10 11
|
string Text = "456"; // string containing the number
int Result; //number which will contain the result
istringstream convert(Text); // stringstream used for the conversion constructed with the contents of 'Text'
// ie: the stream will start containing the characters of 'Text'
if ( !(convert >> Result) ) //give the value to 'Result' using the characters in the stream
Result = 0; //if that fails set 'Result' to 0
//'Result' now equal to 456
| |
This conversion is even easier to reduce to a single line:
1 2 3
|
string Text = "456";
int Number;
if ( ! (istringstream(Text) >> Number) ) Number = 0;
| |
In the above code an object of istringstream gets constructed from 'Text'
istringstream(Text)
and its contents get read into the numeric variable
>> Number
.
If that operation fails
if ( !
, 'Number' is set to zero
Number = 0;
Locales and manipulators can be used as well as with any stream
More complex cases
A generic
stringstream
( which could be used both for input and for output ) can be useful in some more complex situations and in almost any situation you need to perform operations not provided by
string
Simple Sample Functions
Here are listed some functions to perform these conversion using stringstreams:
1 2 3 4 5 6 7
|
template <typename T>
string NumberToString ( T Number )
{
ostringstream ss;
ss << Number;
return ss.str();
}
| |
Usage:
NumberToString ( Number );
1 2 3 4 5 6 7
|
template <typename T>
T StringToNumber ( const string &Text )
{
istringstream ss(Text);
T result;
return ss >> result ? result : 0;
}
| |
Usage:
StringToNumber<Type> ( String );
Notice: In the code examples std:: was omitted to make the code simpler
Using the last functions, there is no way of detecting whether the conversion succeded or failed
C++11
C++11 introduced some standard library functions that can directly convert
basic types to std::string objects and vice-versa.
std::to_string
Converts basic numeric types to strings.
The set of functions
stoi, stol, stoll
convert to integral types, the functions
stof, stod, stold
to floating-point values.
These functions are declared in declared in <string>.
Note that since these functions were added in the latest version of the C++ standard,
they may not be available unless your implementation is very recent.
1 2 3 4 5
|
int number = 123;
string text = to_string(number);
text = "456"
number = stoi(number);
| |
C++ - Boost Library
Using stringstreams is the standard C++ way of doing these conversions but they usually need a few lines of code
Among the Boost libraries there is lexical_cast
which allows to perform the stringstream conversions through simple function call
To make this library working, just include the header, it doesn't need to be linked
1 2 3 4 5 6 7 8
|
// Boost header needed:
#include <boost/lexical_cast.hpp>
// Number to string conversion:
Text = boost::lexical_cast<string>(Number);
// String to number conversion:
Number = boost::lexical_cast<Type>(Text);
| |
The above examples don't handle eventual conversion failures
When
boost::lexical_cast
fails, it throws
boost::bad_lexical_cast
( derived from
std::bad_cast
)
1 2 3 4 5 6 7 8 9 10 11
|
try
{
Number = boost::lexical_cast<Type>(Text);
}
catch ( const boost::bad_lexical_cast &exc ) // conversion failed, exception thrown by lexical_cast and caught
{
Number = 0; // give 'Number' an arbitrary value ( in this case zero )
// if you don't give it any value, it would maintain the value it had before the conversion
// A string containing a description of the exception can be found in exc.what()
}
| |
C - stdio
Number to String
In C there is no stream library, but the function
sprintf
can be used for conversion
It works in a similar way to
printf
but it will put the characters in a C string ( a character array ) instead of
stdout
Using this is not as easy as with streams as the format string changes depending on the type of the number which needs to be converted
Example:
1 2 3 4 5
|
int Number = 123; // number to convert
char Result[16]; // string which will contain the number
sprintf ( Result, "%d", Number ); // %d makes the result be a decimal integer
| |
String to Number
As
printf
, also
scanf
has a related function which can read from a character array,
sscanf
1 2 3 4 5
|
char Text[] = "456"; // string to be converted
int Result; // number which will contain the result
sscanf ( Text, "%d", &Result );
| |
If
sscanf
fails ( ie: the string is not a number ), the value of the variable passed remains unchanged, in that case the function should return zero as no argument were read successfully, if the string passed is so bad that nothing can be read from it, it would return
EOF
:
1 2 3 4 5 6 7 8
|
char Text[] = "456"; // string to be converted
int Result; // number which will contain the result
int Succeeded = sscanf ( Text, "%d", &Result );
if ( !Succeeded || Succeeded == EOF ) // check if something went wrong during the conversion
Result = 0;
| |
C - stdlib
The stdlib header contains some functions to convert text and numbers
Notice that some of these functions are not standard!
These functions are:
- For examples refer to the individual reference pages -
Writing your own function
Using already existing libraries is easier and better but, just to show how some of the above solutions work, here are some examples of how to write functions to convert text to numbers and numbers to text using only the core language, the following examples are from the book "The C Programming Language"
Here is itoa
( Integer TO Alphabet )
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
/* itoa: convert n to characters in s */
void itoa(int n, char s[])
{
int i, sign;
if ((sign = n) < 0) /* record sign */
n = -n; /* make n positive */
i = 0;
do { /* generate digits in reverse order */
s[i++] = n % 10 + '0'; /* get next digit */
} while ((n /= 10) > 0); /* delete it */
if (sign < 0)
s[i++] = '-';
s[i] = '\0';
reverse(s);
}
| |
Here is the function
reverse
used in
itoa
:
1 2 3 4 5 6 7 8 9 10 11 12
|
/* reverse: reverse string s in place */
void reverse(char s[])
{
int i, j;
char c;
for (i = 0, j = strlen(s)-1; i<j; i++, j--) {
c = s[i];
s[i] = s[j];
s[j] = c;
}
}
| |
reverse
uses the function
strlen
from the header cstring ( string.h in C )
This is easy to implement, here is an example:
1 2 3 4 5 6 7 8
|
/* strlen: return length of s */
int strlen(char s[])
{
int i = 0;
while (s[i] != '\0')
++i;
return i;
}
| |
As you can see, is possible to create a ( bad ) conversion function with just some basic C
The same applies to the opposite conversion:
1 2 3 4 5 6 7 8 9
|
/* atoi: convert s to integer */
int atoi(char s[])
{
int i, n;
n = 0;
for (i = 0; s[i] >= '0' && s[i] <= '9'; ++i)
n = 10 * n + (s[i] - '0');
return n;
}
| |
Of course these functions are bad for many reasons and should not be used in actual code
They just show the idea behind the conversion between an integer value and a character sequence


‘Have drafted rules for vehicle scrapping units’
Centre tells National Green Tribunal
by Staff ReporterThe Ministry of Road, Transport and Highways on Tuesday informed the National Green Tribunal (NGT) that the draft guidelines for the setting up and operation of vehicle-scrapping centres have been prepared and uploaded on its website for public suggestions and objections.
A Bench headed by NGT Chairperson Justice Adarsh Kumar Goel was informed by the Ministry that a policy paper on the creation of an ecosystem for scrapping old vehicles and ensuring the transition into environment-friendly new vehicles, has also been circulated.
According to the draft Authorised Vehicle Scrapping Facility (AVSF) guidelines, individuals, firms, societies and trusts will be allowed to set up such facilities. However, it will be subject to meeting the requisite eligibility criteria and authorisation from the authorities.
The guidelines added that the authorisation will be valid for a decade and can be renewed for another 10 years.
Additionally, the Delhi Pollution Control Committee (DPCC) submitted before the Bench that a special task force is monitoring Mayapuri on a weekly basis to keep a check on any units dismantling vehicles on the roads. “The DPCC has constituted 16 teams to carry out night patrolling of industrial areas of Delhi to identify dumping and burning of any type of waste, apart from identifying industries emitting black smoke,” the DPCC submitted.


I’ve heard they call the “new” Warhound design Mars Pattern. So to keep in line with what GW has been doing with the Land Speeder, Land Raider, Missile Launcher, etc. let’s call the old (superior) design Proteus Pattern.
So, I have these sitting on my desk and I must admit that I really don’t like this Mars Pattern body, it’s not very elegant (don’t start me on the Lucius Patterns!) So, the obvious solution is to whip out OpenScad and start modelling replacement bodies for my new plastic warhounds!
After a few hours, things are beginning to take shape…
Still a lot of adjustments to do: rivets (lots), various details, exhaust vents, etc. The arm is intended to mount the laser blasters and vulcan mega bolters sideways, to keep the old approach. I don’t think that the plasma and flamer weapons would work visually sideways. Different mounting arms will be needed. The whole thing is designed so that the weapons can be magnetized, and hopefully, the weapon cabling will get under the carapace.
This is a work in progress, hopefully I will get the final design soon, and then… off to Shapeways!


Voting Portal
Loading...
#
Name
Votes
Select Candidate
Vote
Add Candidates
End Time:
hours
mins.
show timer
WINNER:
get winner


--- layout: page ---
I am Jiaxuan Li 李嘉轩 (pronounced as Lǐ Jiā Xuān ). I just graduate from Department of Astronomy, Peking University with a Bachelor's degree of Science. I'm currently having a gap year and working at Kavli Institute for Astronomy and Astrophysics, Peking University (KIAA, PKU) as an research assistant. I will be a graduate student at Department of Astrophysical Sciences, Princeton University in 2021.
I'm interested in a variety of topics in astronomy and astrophysics, such as galaxy formation and evolution, low surface brightness astrophysics, cosmology, deep sky surveys, supernova, data science and astronomical instrumentation. Currently I'm working with the data from cutting-edge deep sky surveys (such as Hyper Suprime-Camera (HSC) and Dragonfly) to study low surface brightness objects in our Universe. I also had experience on studying galaxy quenching mechanism utilizing MaNGA IFU data. In the future, I'm eager to develop expertise on various topics of galaxy and cosmology.
On my homepage, you can find more than my research. I'm a big fan of any kind of music, from Indian Sitar to Chopin and Rachmaninoff. I became an amateur astronomer since I was in sixth grade in primary school. I also took photos for a variety of objects, not only in the sky but also around myself. Check some of my collection here: Art!
I was born in Dingxi, Gansu, which is a small city in northwest China. Sichuan dishes often appear on my table. Check my dishes in Cooking .


---
layout: post
title: Notes on SAS
tags: sas data
category: Data Analysis
description: Notes from my Regression Analysis class on using SAS for data analysis.
---
The Data Step
Subsetting IF
In a Data Step you can exclude some observations from the dataset with an if statement.
{% highlight s %}
data tornados_1980s;
infile FileName;
input year city damages;
* this limits input data to 1980s data;
if 1980 <= year <= 1989;
run;
{% endhighlight %}
IF .. IN statement
{% highlight s %}
if year in (1980, 1981, 1982);
{% endhighlight %}
AND, OR
{% highlight s %}
if year = '1980' and city = 'Baltimore';
{% endhighlight %}
infile 'filename'
In the data step, import data from a file with the infile command.
{% highlight s %}
data tornados;
infile 'tornados.dat';
input year city cost;
run;
{% endhighlight %}
Set
Use the set command to create a new data set from an already created
set.
The following creates a dataset of 1980s tornado data from the larger
set of tornado data.
{% highlight s %}
data tornados_1980s;
set tornados;
if 1980 <= year <= 1989;
run;
{% endhighlight %}
The PROC Step
PROC SORT
The sort procedure, sorts data. You can sort by multiple fields.
Also you can print by a field.
{% highlight s %}
proc sort data=tornados;
by year city;
proc print data=tornados;
by year;
run;
{% endhighlight %}
PROC Univariate
PROC Univariate generates descriptive statistics
{% highlight s %}
proc univariate data=tornados;
histogram year;
run;
{% endhighlight %}
PROC means
Use proc means when you are only interested in basic descriptive statistics.
PROC freq
generates tables for data in categories.
PROC gplot
{% highlight s %}
proc gplot data=tornados;
plot year*cost;
title 'Year by Cost tornados';
run;
{% endhighlight %}
PROC corr
compute the correlation
{% highlight s %}
proc corr data=grades;
var exam1 exam2 hwscore;
run;
{% endhighlight %}
PROC reg
p: prints obs, predicted, residuals
r: same as p, plus more
clm: 95% conf interval for mean of each obs
cli: 95% prediction intervals.
{% highlight s %}
proc reg data=grades;
model final=exam1 hwscore / p r cli clm;
plot final*hwscore;
run;
{% endhighlight %}
Multiple Regression Analysis
Variable Selection
SAS has several methods for selecting variables
{% highlight s %}
proc reg data=cdi;
model y = x1-x8 /selection=rsquare best=1;
model y = x1-x8 /selection=adjrsq best=5;
model y = x1-x8 /selection=cp best=10;
model y = x1-x8 /selection=forward slentry=0.10;
model y = x1-x8 /selection=stepwise slentry=0.10 slstay=0.10;
model y = x1-x8 /selection=backward slstay=0.10;
run;
{% endhighlight %}
additional pages to try:
more sas


Implements several nonparametric regression approaches for the inclusion of covariate information on the receiver operating characteristic (ROC) framework.
| Version: | 1.0-5 |
| Imports: | lattice, graphics, stats |
| Suggests: | knitr, rmarkdown |
| Published: | 2017-04-23 |
| Author: | Maria Xose Rodriguez-Alvarez [aut, cre], Javier Roca-Pardinas [aut] |
| Maintainer: | Maria Xose Rodriguez-Alvarez <mxrodriguez at bcamath.org> |
| License: | GPL-2 | GPL-3 [expanded from: GPL] |
| NeedsCompilation: | yes |
| Materials: | NEWS |
| CRAN checks: | npROCRegression results |
| Reference manual: | npROCRegression.pdf |
| Vignettes: |
The npROCRegression package |
| Package source: | npROCRegression_1.0-5.tar.gz |
| Windows binaries: | r-devel: npROCRegression_1.0-5.zip, r-release: npROCRegression_1.0-5.zip, r-oldrel: npROCRegression_1.0-5.zip |
| OS X binaries: | r-release: npROCRegression_1.0-5.tgz, r-oldrel: npROCRegression_1.0-5.tgz |
| Old sources: | npROCRegression archive |
Please use the canonical form https://CRAN.R-project.org/package=npROCRegression to link to this page.


"I have a Ph.D. in Horribleness"
"The world is a mess and I just need to rule it."
"I don't go to the gym. I'm just naturally like this."
"It's curtains for you Dr. Horrible. Lacy, gently wafting curtains."
"Sometimes people are layered like that. There's something totally different underneath than what's on the surface."
"I was doing it [Dr. Horrible] as part of the strike [the Writer's Strike] to prove that we could make things without the studios."


Congrats.. You have saved {{offer.discount}}% Use coupon {{offer.coupon}}
Full Name:
State: {{state.name}}
City: {{city.name}}
Country
Submit


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/simple.20proof.20systems.html ---
Sorry in advance for a rather vague question, hopefully I can make it clear what I'm looking for.
Suppose I wanted to "compile" Lean formulas and proof terms to some other logical system. How "simple" could the target logical system be?
hm, it is a bit vague
I want a human-verifiable procedure for taking a theorem statement and turning it into a formula in some other system, and also a procedure for turning the Lean proof into a valid proof in the other system
you can go pretty simple for almost any system, by appropriate encoding in the language of PA
So one kind of simplicity which I would like is if the formulas of the target system could be described by an inductive type, and provability could be described by an inductive proposition
Is the encoding you have in mind sort of how like I could simulate a checker for any language by a universal Turing machine?
yes
I get the sense that misses your point though
I see.
 I'm pretty sure that I need additional rules to deal with quantifiers though.
like ZFC style?
+ FOL
I think so but then I think I have to deal with substitution and that seems a little bit more complicated than I would like
Is metamath based on something like this?
I was about to suggest metamath indeed
it doesn't have proper substitution
just direct substitution
I guess another way to frame the question is: Suppose you wanted to be as sure as possible that you had correctly implemented a proof checker which only accepts theorems provable in ZFC+U (or whatever).
The universal turing machine idea doesn't help you here, because you still need to write the "actual machine" (it is just part of the specification of what constitutes a proof, rather than being the checker itself)
I think you can avoid proper substitution in the axioms and what not by having it be an explicit judgment in the system
what's not "proper" about direct substitution? Something about not renaming bound variables?
yes
metamath has a notion of text substitution a la grep
I think I've heard phrases like "proof calculus with explicit substitution", is that relevant?
that's about having terms in the language that are a sort of "deferred substitution"
but you still have to do the substitution at some point
although you can build it into the steps of actual proof, which is basically what metamath does
but does that mean I can push the work of substitution into the proof itself
yes
that way all your substitutions are direct
and if I were to target one of these systems then is there some kind of bound on how large the proofs would become in terms of the size of the original Lean proof term?
like, a useful bound
no, but the problem in that case is not substitution
it is reduction
oh right
you can prove ridiculous theorems by rfl
in lean
If you deduplicate the proof I think substitution is a "modest" overhead, maybe linear in the proof
how about something like linear in the size of the term plus the total number of reduction steps Lean has to do (if that makes sense)
My favorite characterization is "linear in the run time of the lean checker"
Sure
You need substitution of some kind built in to your system so that you can express a proof schema like "|- P and |- P -> Q implies |- Q`
but direct substitution is good enough
Okay this was going to be exactly my next question: do I need some kind of substitution
Actually metamath also has a primitive notion of "disjoint variables" used in substitution
Well
meaning that you can say "P can be substituted for any expression not containing x"
again, this is grep style, so no provisos like "no free x", just "no x at all"
but that is good enough since you can build the rest into the proof system
this particular example though is substituting into a fixed formula, right? I could imagine representing it by a constructor of an inductive type
| mp (P Q : formula) (p : proof P) (pq : proof (formula.imp P Q)) : proof Q
yes, here you have lifted the substitution to the beta rule of the metatheory (which is lean, I guess)
which is just a built-in part of the syntax of proofs
But then, I don't know how to deal with "forall elim" without invoking substitution in a more serious way
right, you need a true substitution there... but you can get around it with some different axiomatizations
I think the safest/easiest way to do this while still being transparent about it is to have a judgment P(x |-> y) is Q
although when you get to the bottom you have to deal with z(x |-> y)
which depends on a disjointness requirement
which can be equality if you have decidable equality on the variables
metamath takes a more abstract approach and just axiomatizes what this "disjointness" should satisfy
Yes that's fine. This looks interesting.
So I have a rule of inference that takes forall x, P x
and y
and P(x |-> y) is Q
and concludes Q
right
and P(x |-> y) is Q
is also defined by some other induction
right
I like this.
Is this likely to mess up the "size of proof is linear in the Lean kernel runtime" property?
no
because lean has to do this too
oh, I see!
You can have a similar induction rule for deducing x is free in P
for the elim rules
By the way metamath doesn't do it this way, instead it uses a slightly tricky axiom system for pred calc that allows us to deduce these judgments without building them in directly, and lets the forall rule be the simple |- (forall x, P) -> P
But I think this is something like the difference between listing 20 obvious axioms for boolean algebras vs listing 3 incomprehensible ones and proving they are equivalent
So here is one reason why I have this question.
Cryptography people tell me (not in this language of course, and I hope I am not mistranslating anything) that if I have some fancy indexed inductive type proof P
, I can design some functions f, g and h with the following properties.
proof P
I can calculate a string x with f(x) = true and g(x) = h(P).proof P
, though I can also use other pairs (Q, y) which have been published as certificates of other statements as inputs to my term.The catch is that the third item is somewhat ridiculously expensive, though in the future it may become less ridiculously expensive.
As a ballpark estimate for ridiculously expensive, assume 1 constructor costs 1 second to compute
so I guess x is a "proof hash" of some sort, f means "this is a proof of something" and g means "this is the statement that is being proved"?
Right
Probably it is a bit better to think that the "proof hash" is a statement like "this is a proof of some statement which hashes to H"
I'm surprised the function g is easy
it's not even that easy to calculate the statement of a proof sometimes
I think that g can just be extracting some of the bits from the string though I confess I have not thought much about this particular aspect yet
I guess you can do something like that
I think the idea is that it was the job of the person producing the proof to include the information of what is being proved
This is really at a super early stage of "is it even conceivable that one could use this for theorem proving"--I'm trying to get a sense of what the minimal demands on the theorem proving side are
What I find to be really remarkable about these setups is that the cost to verify a proof is independent of the size of the proof
that's a good point. I wonder whether it can be used as a trusted alternative to caching
So, ignoring some inconvenient details like the ~1000000x slowdown, you could use it as part of a "distributed theorem verification system", without requiring trusted provers
(Concretely, you could imagine some kind of database to which anyone can upload proof certificates, with the amazing property that in order to verify the correctness of any proof, you only need to check that certificate and not the proofs of any of the results which the proof relies on)
Unless they decided to modify logic.basic
:)
In some sense we already have this, the difference is that you can do this check without even precomputing the proofs of earlier parts, or even knowing what the proofs are (e.g. proprietary proofs)
I think what we have is like a non-distributed version of this, where I trust the Lean kernel on my machine to only record as theorems the facts which it has checked. Or do you mean something else?
Solving the recompilation problem is somehow close to but not exactly the same as the problem this solves, I think.
That's true, but I'm pointing out that if you have mathlib, say, fully compiled, then you are currently in the state of trusting all the results in it, and if a new proof comes along that depends on these facts you only have to check that proof and not the rest of the library
In this crypto setup compilation is being replaced by certificate generation
where the difference is that if I send you a certificate you can have the same trust as if you created it yourself, while if I send you my compiled files then you don't know that I haven't tampered with them
Yes exactly
And if we had some massive proof of say FLT, then maybe it would be quite expensive for everyone to verify the whole proof, whether or not they do it incrementally over time. If the certificates can be computed by someone just once, then you can save total work (assuming there are > 1000000 people who want to verify the proof)
I think this isn't a realistic threat model though
Anyways, I think that today we're not really anywhere close to wanting something like this, and the technology is also not really that feasible yet
Which part is not realistic?
I think when people get mathlib they usually don't do it because they want additional assurance that the theorems in it are true
Well not for mathlib
I am pretty sure that feit thompson is true because Gonthier checked it, and my running it on my machine did not increase my confidence in the theorem as much as it increased my confidence that I had installed Coq correctly
In some distant future world, you could imagine that instead of posting papers to arXiv, we publish formal proofs to some other service. I guess your claim is that in that scenario, you are not too worried about people claiming to publish proofs which are in fact bogus.
Especially given that anyone could verify the proof and everything underneath it, it would just be quite expensive for everybody to do so.
I would want the service to be spending effort on checking for bogus proofs
that's not my responsibility
Right, you could delegate to the service to check correctness which seems quite reasonable
I would be responsible for convincing myself that the service is doing its job to my satisfaction
meaning that this service should be easily checkable (i.e. small trusted kernel)
Plus you have to trust the people who operate the service to actually verify the proofs
I think there is room for some crypto cross checks at this point
i.e. the process of verification by the service also produces a certificate that I can check quickly
In general the way to produce a certificate that a computation was done correctly is the same process that I am talking about for generating proof certificates.
Although nowadays this check is replaced with me being able to download and check the proof myself if I want
(Namely, SNARKs and applications like TinyRAM)
Right so in actual crypto applications, there is the far more important property that the person producing the certificate doesn't have to give you the proof.
As I mentioned, this stuff is currently quite impractical for large applications.
Probably a far more practical question would be: could Lean have a mode where it checks a given olean file against lean source, and is this faster than trying to recompute the proof from scratch.
Or more generally, what information could Lean write out to an .olean or other external certificate file which would make verifying the validity of a theorem more efficient
In principle lean should be able to check an olean file without reference to a lean file at all
and if you wanted you could view this as a "compiled file" same as the compiled binaries of any other program
in particular, it would be difficult to reverse engineer the sources from this
... I think. I need to write an olean viewer to be sure
Do .olean files and the export textual format and what #print foo
produces all contain roughly the same information?
looking at the export format it seems not to include all information about notation, which must be in .olean files, but aside from minor details like that
I think so
It should have the information necessary to construct an environment
object from the imported environments
I wonder whether there is a way today to convince Lean to export an .olean file to textual format
That would be nice... I probably wouldn't even write such an exporter in lean
(that is, there is no particular advantage to writing it in lean)
I guess you could import the module for which you had the .olean from a new module, and then run it through lean --export
it seems to work
though I wouldn't be 100% confident that lean importing an arbitrary .olean file and then exporting its contents and checking them in an external checker means lean is actually in a valid state after reading the .olean file
why? The checker doesn't matter for that
Lean itself will complain if the olean is bad
although I'm not sure how you can induce that without writing the olean bits manually, since lean won't produce olean files for errored files
I want a human-verifiable procedure for taking a theorem statement and turning it into a formula in some other system, and also a procedure for turning the Lean proof into a valid proof in the other system
My understanding (which may be wrong) is: Computer scientists want (and occasionally some claim that they have built) a procedure for translating code written in one common language to code written in another common language, and the reason none of these procedures are ever used in practice is that in practice they are typically not very good at all.
I am pretty sure that feit thompson is true because Gonthier checked it, and my running it on my machine did not increase my confidence in the theorem as much as it increased my confidence that I had installed Coq correctly
My understanding (which is much more likely to be correct this time) is that Feit Thompson is true because the pure mathematics community did an extremely good job of checking it in the 1960s, decided it was correct, and awarded Thompson the Fields Medal as a consequence. This is exactly why pure mathematicians are not excited by Gonthier et al's verification. Checking 400 pages of lemmas about finite groups and undergraduate/MSc level representation theory and number theoy is not difficult for a team of humans to do, it can be broken down into manageable sub-jobs etc.
Yeah, but I didn't understand what Thompson did at all, I at least have some idea of how Gonthier did it
I think you should not forget that one of the applications of formal mathematics is that at least in principle you can pick it up and read it from zero prior knowledge of the field
And I know several people who did exactly that, including myself
(Note that that quote was about my subjective perception of the truth of the theorem, not the mathematics community at large.) The whole point of this crypto stuff is that just because you trust X body of knowledge / institution / person doesn't mean I do, and the problem is to figure out how to reliably transfer your trust to me
Aah I see! So this is a perfect analogy. I say "I am a mathematician and my tribe can guarantee that Feit-Thompson is proved" and you reply "I am a computer scientist and I require a different kind of justification than just assurances from your tribe".
I think you should not forget that one of the applications of formal mathematics is that at least in principle you can pick it up and read it from zero prior knowledge of the field
I thought mathlib didn't care about human readability?
I'm talking about formal proof in general. Certainly it's more true of metamath than mathlib, because there are fewer skipped steps
The point is that it doesn't matter if it's been written to be human readable in the mathematician's sense. In fact, it's better if it doesn't make too much use of tactics that do what Kevin wants (i.e. trivial for a mathematician steps omitted)
because that way you can follow what's happening even if you aren't a mathematician
the worst kind of proof for people who want to learn like this are the big complicated statement proven by some blasty tactic. It's like the movie ends just as it's setting up for the climax, you feel robbed
luckily lean doesn't have too many blasty tactics yet, so it is still feasible to read a proof and get the details
I have been telling my maths students to never read any proofs in mathlib because they are all unreadable, and if they want to know why some theorem is true then to look it up on Wikipedia, which is written for humans. I am the anti-Paulson. I believe that proofs generated by computers in the future will inevitably be unreadable, and that anyone who attempts to make them readable will in some sense be holding the area back. I was always struck by something Johannes said to me months ago when I asked him why he'd changed my 10 line tactic proof into an incomprehensible two-line term proof, and he replied that he liked the challenge of finding a short efficient proof of something which was easy in maths. While he might not want to extrapolate this comment himself to longer proofs, I don't mind doing so.
My view is that there is a kind of readability that can't be harmed by "unreadable" proof style
because the information is still there to be given to the computer
and there are some enterprising kids that actually prefer this kind of exactitude to the "aimed for human level" style that is traditional in maths
This is where stuff like #explode
is useful, when you just want to see EVERYTHING and make your own choices about what is important
rather than whatever the author thought was important or trivial
I have been telling my maths students to never read any proofs in mathlib because they are all unreadable, and if they want to know why some theorem is true then to look it up on Wikipedia, which is written for humans.
I just did the exercise of reading the Wikipedia page on topological rings. It's full of plain wrong statements...
You have a clear choice then :-) Human efforts with wrong statements, or topological_structures.lean
written by Johannes and never meant to be read by a mathematician :-) Pure maths is two things and you are lucky enough to be able to choose which one you like best.
@Mario Carneiro @Reid Barton I find this topic of cryptographic proof certificates really interesting! Do you know if anything like this has been implemented for some theorem prover? I've thought about this on and off (basically as an amateur) and I couldn't find anything written about it. Are there references that go beyond speculating how nice it would be to have this? From Reid's description it is still quite a leap to an actual (fast) implementation.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Arsenal without Ceballos until mid-December
by Sports DeskArsenal midfielder Dani Ceballos is facing another month on the sidelines due to a hamstring injury.
The Spain playmaker sustained the problem during the 1-1 Europa League draw at Vitoria SC at the start of this month.
Head coach Unai Emery initially referred to that setback as a "small injury" but, in a short injury update posted on their official website ahead of Saturday's Premier League home match against Southampton, Arsenal confirmed damage to Ceballos' left hamstring means he is aiming to return to full training in mid-December.
The 23-year-old has made 17 appearances in all competitions since moving to Emirates Stadium on a season-long loan from Real Madrid
Emery will assess Sead Kolasinac before the Southampton game after the left-back returned to club duty with a tight left hamstring.
Bosnia-Herzegovina international Kolasinac completed 90 minutes of his country's 3-0 defeat to Italy last Friday but sat out the subsequent win over Liechtenstein by the same scoreline.
Emery finds himself under pressure following a run of four winless matches in the Premier League.


Annalisa Conti lives and writes in New York City, where she has been spending the last few years of her life. She is a woman who writes about women, real human beings facing drama and challenges, finding happiness and rewards, succeeding and failing. Normal people.
If you like Jane Austen for her honest humor, Gillian Flynn for her descent into human darkness, and Elena Ferrante for her focus on storytelling, you will find Annalisa’s tales wildly entertaining.
She recently published her third novel, NINE. It is a modern tale on motherhood, a unique story about pregnancy, its hidden fears, and its untold truths.
Her second novel, AFRICA, was an Amazon Kindle #1 in its category. Reviewers say it is a “fascinating” “astonishing” story of a life-changing journey to the end of the world, “powerful and dramatic, and well integrated into this incredible “decorum””.
Annalisa is also the author of ALL THE PEOPLE, a novel built around a woman’s secrets. Reviewers say “you cannot put it down”, it is “capturing reader’s attention since the very first lines”, and it has a “very deep and accurate psychological perspective”.
She publishes quarterly episodes in the collection of short stories THE W SERIES, which describe the world of W, a superhero like no other. Reviewers say it is “a classic action story but somehow very different from anything else”, with a “writing style packed of action and visual clues as if it was taken right out of a Marvel comic strip”. The first ten episodes of THE W SERIES have been collected in W IS FOR WONDER.
MITOMORROW (in Italian)
«Io, Milanese, vi spiego la gravidanza a New York»
LA VOCE DI NY (in Italian)
La scrittrice Annalisa Conti racconta il femminismo moderno ai tempi dei supereroi


[gecode-users] order in calls to status and commit...
Guido Tack
tack at ps.uni-sb.de
Mon May 28 18:29:46 CEST 2007
Sébastien Mouthuy wrote:
> Could you tell me what is exactly the order in which the functions
> status and commit are called ?
I presume you mean status and commit of a branching, right?
> For me it should be
>
> call to status with space S. if it returns true, then copy S. let's
> call
> the copy Sc. Then call commit() with S and a=0. when we will have
> backtracked, commit will be called with Sc and a=1.
In principle, this is how it works. Our search engines however use
recomputation, so they don't actually make a copy everytime, but
sometimes use a copy that is higher up in the search tree and
recompute the needed space from there.
The exact protocol is:
* When you call Space::status, after computing a fixpoint of the
propagators, the space calls the status method of the installed
branchings to find the first branching that returns true. If there is
none, the status is SS_SOLVED, otherwise it's SS_BRANCH.
* When you call Space::description, the space asks the branching
that returned true for a description and returns it
* When you call commit, the space tries to find the branching that
matches the description, and calls its commit method.
> I ask this question because I post a branching in the commit
> function of
> another branching. Then I catch the following exception:
> terminate called after throwing an instance of
> 'Gecode::SpaceNoBranching'
> what(): Space::commit: Attempt to commit with no branching
This means that in the commit step, the space didn't find a branching
that matched the branching description. This could either mean that
the branching description is bogus, or that your branching really
hasn't been installed yet.
Are you using the standard, built-in search engines? If yes, please
check if the problem still persists with c_d=1 and a_d=100000 as
parameters passed to e.g. DFS (switching off recomputation). If the
problem goes away using these options, there's either something wrong
in our Space::commit logic, or in the way you create and use
BranchingDescs.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20070528/eff63c93/attachment.htm>
More information about the gecode-users
mailing list


Provides various tools for analysing UK political data, including creating political cartograms and retrieving data.
| Version: | 0.2.1 |
| Depends: | R (≥ 3.3.3) |
| Imports: | hansard, mnis, dplyr, tibble, httr, jsonlite, stringi, sf |
| Suggests: | knitr, rmarkdown, testthat, covr, rgdal, devtools, leaflet, htmltools, cartogram, htmlwidgets, ggplot2 |
| Published: | 2017-09-23 |
| Author: | Evan Odell [aut, cre] |
| Maintainer: | Evan Odell <evanodell91 at gmail.com> |
| BugReports: | https://github.com/EvanOdell/parlitools/issues |
| License: | MIT + file LICENSE |
| URL: | http://docs.evanodell.com/parlitools |
| NeedsCompilation: | no |
| Citation: | parlitools citation info |
| CRAN checks: | parlitools results |
| Reference manual: | parlitools.pdf |
| Vignettes: |
British Election Study variables British Election Study variables British Election Study variables Introduction to parlitools Mapping Local Authorities Using cartograms with parlitools |
| Package source: | parlitools_0.2.1.tar.gz |
| Windows binaries: | r-devel: parlitools_0.2.1.zip, r-release: parlitools_0.2.1.zip, r-oldrel: parlitools_0.2.1.zip |
| OS X binaries: | r-release: parlitools_0.2.1.tgz, r-oldrel: parlitools_0.2.1.tgz |
| Old sources: | parlitools archive |
Please use the canonical form https://CRAN.R-project.org/package=parlitools to link to this page.


Register to The New York Stock Exchange
First Name
Last Name
Phone Number
Email address
Password
Register


We built NUSMods
(And some other things...)
Disclaimer
This talk is made up of our opinions and experiences.
Your results may vary.
No. 1 thing Google looks for?
Learning Ability
- Technology moves really rapidly
- Important to large companies
- Even more important to startups
- Eventually overtake those with more experience
Optimize for Learning (Not grades)
- Grades matter most before university
- University is a whole new ball game
- Choose what you want to learn
G.P.A.’s are worthless as a criteria for hiring, and test scores are worthless. ... We found that they don’t predict anything.
Laszlo Bock, senior VP of people operations for Google
Optimizing for Learning
- Not optimizing for grades doesn't mean it's ok to get C's
- You'll naturally get decent grades
- How much learning value vs. time spent?
Don't take easy modules
just to pull your CAP up
- Challenging modules force you to learn
- Pick electives you find interesting, not easier
S-shaped Learning Curve
Key: Increase Learning Efficiency
- Learning accelerates over time
- Small efficiency gains have compounding effect
Multiple Monitors
- 10% - 50% boost in productivity
- Diminishing marginal returns after dual monitors
- Sweet spot: Two 24" monitors
Silence
- Very focused mental concentration needed, especially coding
- Deep state of flow desired
- Give total silence a try
- Earplugs / noise-canceling headphones
Sleep & Exercise
- Often neglected, especially with many deadlines looming
- Proven many times over to improve learning and memory
- Health benefits (of course)
How to get started?
Many modules in SoC are optional
Do modules because you want to, not because you have to
The Good Modules
- CP3101A Global Open Source Project
- CP3101B Web Programming and Applications
- CP3108A Independent Work
- CP3108B Independent Work (Orbital)
- CS3216 Software Development on Evolving Platforms
- CS3217 Software Engineering on Modern Application Platforms
The Origin of CS3216 and CS3217
- It all started with one man: Prof Ben Leong
- Allow students to work with the latest technology relevant to the industry
- Opportunity to work on their own ideas
CS3216 Software Development on Evolving Platforms
- About product creation and development, not just about coding
- Learn to deal with cutting edge and evolving technology
- Work in multidisciplinary teams
CS3216
- Lots of teamwork involved
- Chance to work with different talented people
- Multidisciplinary in nature (developers, designers, biz dev)
Course Structure
- 3 Assignments (Facebook App, App Seminar, Mobile Web)
- Blogging assignments
- Final Project (Any web-based application)
Why CS3216?
- Get to meet cool people
- Level up in web development. Fast
- Build something you are interested in
Notable CS3216 Projects
- Library for building real-time multi-users interactive apps
- Instant Hangout / Skype service
- Along with useful collaboration features
- No login nor download required
CS3217 Software Engineering on Modern Application Platforms
- Hardcore software engineering module
- Reason for the existence of PL1 (iMac lab)
- Each student is loaned an iPad for the course
Course Structure
- 5 Problem Sets (individual)
- Build a Puzzle Bobble game by the first half of the semester
- 1 Final Project (team)
- Build any iOS application of your wish
Why CS3217?
- Mobile is hot.

- Mobile developers are highly sought after.
Notable CS3217 Projects
Tenza Yakitori
Notable CS3217 Projects
Huntville
How to Survive CS3216 and CS3217
- Sleep less
- Make friends
- Learn fast
- Use libraries and frameworks. Do not reinvent the wheel
Personal Experience
- Very little handholding; thrown into the deep end of the pool
- Extremely fast way to level up
provided you don't die
- You'll never die alone even if you do
Hackathons
Eat. Hack. Sleep. Repeat
What's a Hackathon?
- Form a team and code over 24 hours
- Free food for a weekend
- Cool swag!
What should I hack?
- Anything! But usually there's a theme
Winning Strategies
- Swiss-army knife team
- A front-end deve with design experience
- Using the right tools to accelerate development
- All about fluff and showmanship
Swiss Army Knife Team
- Diverse and multiple roles.
- Back-end guy
- Front-end guy (who can design)
- Guy who can pitch
- Pick up new skills fast.
Showmanship
- Only 2-3 mins per presentation.
- Know what you want to demonstrate and rehearse the presentation flow well.
- Focus on the part that needs to be shown. Make sure those work!
Hard code the rest
Winning Hacks
SoundMesh
3rd in PennApps Fall 2013
Winning Hacks
Magellan
2nd Runner Up in Smart Port Hackathon 2014
Hackathon Experience
- Good way to learn a new library/framework
- Tiring but rewarding process
- Potentially complete your homework through a hackathon
Open Source Software (OSS)
- Observe and learn from real-world projects
- Empowers you to make an immediate impact on the world (Even with limited resources as a student)
- Collaborate and learn from more experienced people
Open Source (Most Of) Your Code
- GitHub is almost like a portfolio
- Push projects and significant homework to GitHub
- 5 private repositories free for students
Commit Logs from Last Night
Soloing: Starting your own OSS Project
- Put together everything you've been learning
- Don't worry if not polished
- You only see final product
Early NUSMods Release
Please refresh if the page doesn't load
NUS-Related Projects
- Scratch your own itches
- Directly accessible community of users
- Help your fellow students
NUSMods.com
- 65K unique devices
- 2.1 million page views
- Most visible student-led OSS project
- Use that visibility to benefit the community
NUSModifications GitHub Organization
- Check it out here
- Link or host other NUS OSS projects
- Yang Shun integrated Corspedia
- Ashray integrated ModMaven
Keeping it Going: Write Code Every Day
- John Resig, jQuery creator has a great blog post about this
- Develop the habit of working on your side projects every single day
Gamification: GitHub Streaks
Q & A
By Beng and Yang Shun


A simple CLI tool with some utilities
node-baka --help, -h
Show available commands.
node-baka get|g <url> [options]
Download a file from the web.
NOTE:
url
must point directly to the file you want to download, e.g. https://www.(...)/cat.jpg
http://
or https://
-d, --destination <destination>
Where to store the file. Defaults to the current directory.
NOTE:
~/pics/
-f, --filename <filename>
Name of the file to be downloaded. Defaults to "file".
NOTE: If you don't specify the file extension, node-baka will try to guess based on the url
. You should avoid omitting it.
node-baka gzip|z <source> [options]
Compress a local file.
NOTE:
source
path must point directly to the file you want to compress, e.g. ~/docs/file.txt
-d, --destination <destination>
Where to store the compressed file. Defaults to the current directory.
-f, --filename <filename>
Name of the compressed file. Defaults to file._extension_
.
-p, --password <password>
Encrypt the compressed file with the given password.
npm install -g node-baka
git clone https://github.com/diego-c/node-baka.git
cd node-baka
npm install or yarn install
npm start [command] [options]
or yarn start [command] [options]
./src/index.js [command] [options]
To run all tests: npm test
or yarn test
Check the documentation at node-baka docs
Issues and PRs are welcome. Please write accompanying tests with your PRs if have the time.
Generated using TypeDoc


Chuta Kaimu:
(Show the item to Chuta Kaimu.)
This is...
Long years have changed its shape and appearance, making recognition difficult. Wait while I access more stored wisdom regarding it.
Check for other wisdom.
Wait.


Due to severe weather condition, the trains running on C line are experiencing delays. Our mission is to keep passagers travel safely. We will keep you updated on any latest information.


Create unique and responsive website design in less than 24hours, mobile friendly website, easy customization
We have experience in developing catchy UI for your website and develop the UI into templates, easy and quick
Graphics designers are wonderful and are always ready to create something new for you, develop. watch and see
Let's train you to become a better coder and experience the true ability of designing easily in (three) 3 steps
Geek web design
Yes, we built geek web
Geek Logo
We design geek new logo
Geek Training
Yo, We trained Geek to be better
Do you have any question? Please do not hesitate to contact us directly. Our team will get back to you within 24 hours.
Lagos, Nigeria
+2348140821500
ayodeji780@gmail.com


ssh-agent
Spawn an SSH Agent process.
An SSH Agent holds SSH keys decrypted in memory until removed or the process is killed.
See also `ssh-add`, which can add and manage keys held by an SSH Agent.
More information: home page
- Start an SSH Agent for the current shell:
eval $(ssh-agent)
- Kill the currently running agent:
ssh-agent -k


Your browser does not support WebGL or it is disabled. ScaffoldJS is falling back to canvas render mode. Please enable WebGL for best performance. http://get.webgl.org/troubleshooting
Maximum Objects Per Node:
Total Objects:
This checks for collisions between all of the Sprites in a single QuadTree. Sprites that turn green are overlapping. The QuadTree object is running in debug mode to draw the bounds of it's nodes.


Sylvanian Families Cottontail Baby (Epoch)
Baby Brother Charlie Cottontail likes to play in the water. He gets exited splashing water everywhere when he goes to the pool or a small stream. He doesn't have to worry though because his mother Sorrel washes his clothes straight away. He loves shower time, and always dashes playfully to the bathroom when it's his turn.


You've done an amazing job in the previous stage! Remember we mentioned retrieving large data? Let's improve your program by making it parse multiple website pages. To make it even more useful, let's also implement the opportunity to parse several kinds of articles at once.
https://www.nature.com/nature/articles
website and find out how to navigate between the pages with the requests
module changing the URL.Page_N
(where N is the page number corresponding to the number input by the user) for each page. Search and collect all articles page by page; filter all the articles by the article type and put all the articles that are found on the page with the matched type to the directory Page_N. Mind that when the user enters some number, for example, 4, the program should search all pages up to that number and the respective folders (Folder 1, Folder 2, Folder 3, Folder 4) should be created. Mind also that in articles of different types the content is contained in different tags.*.txt
files. Keep the same processing of the titles for the filenames as in the previous stage. You can give users some feedback on completion, but it is not required.If there's no articles on the page, your program should still create a folder, but in this case the folder would be empty.
The program takes two input values from the user and then continues to process the Nature website data.
The greater-than symbol followed by a space (>
) represents the user input. Note that it's not part of the input.
> 4
> Nature Briefing
Saved all articles.
The main goal is to save the articles with the correct article bodies once the program has been executed.


Put your hand on the scanner and keep on until the scan is finished.
Your vital data will be presented on the screen.
Check your personal health-history.
Put your hand on the scanner and keep on until the scan is finished.
Your vital data will be presented on the screen.
Go to the settings to change adapt the health-hub to your personal preferences.


Lessons from 1 Year at Microsoft
This was originally published on LinkedIn .
As 2018 comes to a close, I thought I’d share some of the lessons I learned this past year as a Program Manager at Microsoft. These opinions and observations are my own, and should be taken with the understanding that everyone’s professional journey is different. Some of these apply directly to the Program Management discipline, while others apply to anyone starting their first full-time job.
Have empathy at work. There’s more to your coworkers than their office personality and appearance. You may have just started your career, but many people have worked for a while, and even had multiple jobs in different companies. Meet them. See from their perspective. Learn from their experience. Office atmosphere is an important area of investment in every company’s HR department; in fact, there are companies whose purpose is to help build relationships with your coworkers in your own company (an example is Donut). Take the first step to get to know someone via a quick 30-minute 1:1 meeting. You can take the lead on this.
Know what your team/organization is building, and be on that critical path. Whether you are a Dev, PM, Designer, or another discipline, you should always ensure that your work is aligned to the current or future focus of your organization. This applies to graduate students as well: you should always strive to be on the critical path of your PI/advisor.
Assume good intentions and do your own job well. In the PM role, I’ve interacted with various individuals of different personalities: some are welcoming, some are indifferent, some are rude. Stand your ground, but also approach situations by assuming positive intentions. If you lead by example, others will too; ensure that you do your own job very well, and people will take notice.
Give back and help others. Microsoft’s mission statement is “to empower every person and every organization on the planet to achieve more”. Satya summed up the employee culture at Microsoft very well when he said “You join here, not to be cool, but to make others cool.” A truly great person is someone who makes every person great.
Ask questions and be humble. As a new employee, you have the added benefit of putting on your learning hat, and asking as many questions as you can. People are generally glad to talk and share their work with you, so give them the opportunity.
Listen more, talk efficiently. Especially in a role as a PM, your job is often to listen and correctly identify concerns that customers are raising. My manager Cory puts it best: “Talking is not as much about saying something as it is about hearing something”. It is unfortunate that many people default to speaking in fast, continuous stream of words for fear of running out of time during a meeting. Many listeners appreciate more pauses when someone is talking. Listen to your listeners.
Let your body be tired, but never your mind. You can always sleep and rejuvenate your physical strength, but mental tiredness can last for days or months. Which also means…
Take care of your body, and take care of yourself. Gone are the college days of staying up until 2 AM and eating junk food to get by. Even if your company caters food, be selective about what you put in your body, and learn some basic life skills, such as cooking for yourself.
Know that you will have some bad days at work and some good. Your career is a marathon, not a 100 meter sprint. Regroup & recuperate when you need to; measure yourself not in how well every single day went, but how well each month is going. Looking at your progress from a monthly perspective will also give you a clearer idea of how far you have come since day 1.
Sleep early! (especially for those transitioning from college - I still need to do a better job at this). Sleeping earlier means you can start your day earlier, and that can be very beneficial to your productivity; as a PM, for example, you’ll have more time to dedicate on individual work before the flock of meetings take over the rest of your day.
Looking forward to sleeping more & learning more in 2019!


Mercedes Benz AMG
Mercedes Benz AMG
Description
ORIGINAL JBL SPONSORED TOYOTA AUDIO SYSTEM WITH FM, AM, USB, DVD, TV, AUX AND BLUETOOTH JBL SURROUND SOUND SYSTEM WITH EQUIPPED SUBWOOFER ELEGANCE GRADE LEATHER SEATS ELEGANCE LEATHER DASHBOARD TRIM MULTIFUNCTIONAL STEERING WITH CRUISE CONTROL LANE SPLIT ASSIST 360 ALARM SENSORS
- Year:
- Mileage:
- Transmission:
- Engine Size:
- Fuel Type:
- Exterior:


Participants
Attended by thousands of coders from all walks of life and literally all states of America, our hackathon is huge.
Annual
Having been the biggest thing in the industry for the last 20 years, the Codathon now carries on into its 21st edition.
Schedule
Spread over the course of 4 full days, the Codathon starts at 6am every day and goes on until 2am – 20 hours straight!
Tickets
We’ve never lowered our tickets pricing policy lower than this year. Ultimately this means that it is cheaper this year!
If You Are a Coder & Want Interactive Practice & Challenge, Come Visit Our Hackathon!
Working with your website’s or your application’s backend architecture is just as important as making sure that the wheelbase of your car is ok, before driving it. This is why we are sure that coding hackathon’s such as the Codathon is, provides awesome practice for all of these skills!
For 20 Years Codathon’s Been The Hackathon to Go to…
…And with the 21st edition of our annual thing coming soon, we’ve decided to recollect just how awesome all the previous hackathons have been.
2016
First year the Codathon’s been covered by national press.
2015
That was the first time we’ve been broadcasted by local TV.
2014
First year the Codathon’s been covered by national press.
Hackathon Disciplines
Frontend
When it comes to developing a really working software solution, frontend comes first.
Backend
We’re dedicated to working with any kind of programming environment that poses a challenge for…
Hardware
From VR technologies to all kinds of other hardware gadgets, our hackathon provides a unique…
IoT
This year the whole Internet of Things industry seems to be one of the most prominent trends.
Tickets
…And with the 21st edition of our annual thing coming soon, we’ve decided to recollect just how awesome all the previous hackathons have been.
Hackathon Teams
…And with the 21st edition of our annual thing coming soon, we’ve decided to recollect just how awesome all the previous hackathons have been.
Testimonials
The past 20 annual hackathons we’ve had involved approximately 30 000 people. They all have something nice to say!
Justin Grierson
Senior Developer
I've worked on different teams on many different projects & this means that this hackathon is a perfect occasion for me to show my skills and emerge a winner!
Marcus Matt
Project Manager
As far as the list of all of my top favourite coding lingos goes, it includes both the JavaScript, C++ and C#, just as well as Nvidia’s CUDA and some other…
Marcus Mills
Front-end Developer
Finding out about this whole hackathon thing was a pure chance and luck, because it was one of my friends who referred me here for the first time.
News
The new feature lets you interact with what you see on screen. You can write giant words that float about next to real objects...
12 Jul 2016
The Olympic Council of Asia (OCA) said it wanted to reflect "the rapid development and popularity of this new form of sports participation".
12 Jul 2016
Can Tesla live up to its value?
Each time I’m unfortunate enough to find myself on this stretch, I’m struck by the symbolism: a road thick with fumes, overlooked by a factory working...
12 Jul 2016
Contact Us
With thousands of participants and attendees at every hackathon we do our inbox is always full of inquiries ad all other sorts of messages…
Still Have Some Questions Left?
Call us for a Free Consultation at<PHONE_NUMBER>
About
Annually the Codathon hackathon gathers thousands of talented coders and project managers from across the US and the world. With 20 hackathons already, this time it will get even more competitive in 2017!
Comments
Tom on
Brian Williamson on
Adam Smith on
Contacts
400 Madison St., Alexandria, VA, US


Edit Profile
Logout
May 05,2014,03:00 pm
Jim O'Dwyer
Profile-Type
Buyer
Member Since:
06/23/2013
Date of Birth
01/24/1988
Gender
Male
Location
XXX
Email
<EMAIL_ADDRESS>Phone Number
123-4567-890(Landline)
555-4567-890(Mobile)


Survey Form
Please provide your valuable feedback
Name*
Email*
Age
Gender*
Male
Female
Others
Please rate our Services*
1★
2★
3★
4★
5★
What do you like the most?
Service
Price
Quality
Packaging
Shipping
All
Message us
Submit


Weather Dashboard
Search for a city
Temperature:
Humidity:
Wind Speed:
UV Index:
5-Day Forecast
Temp:
Humidity:
Temp:
Humidity:
Temp:
Humidity:
Temp:
Humidity:
Temp:
Humidity:


Reference¶
This is the class and function reference of scikit-learn. Please refer to the full user guide for further details, as the class and function raw specifications may not be enough to give full guidelines on their uses.
sklearn_theano.base
: Base classes and utility functions¶
Base classes¶
base.Feedforward (weights[, biases, ...]) |
|
base.Convolution (convolution_filter[, ...]) |
A wrapper for a 2D convolution building block |
base.PassThrough ([input_dtype]) |
|
base.Standardize ([mean, std, input_dtype]) |
|
base.MaxPool (max_pool_stride[, input_dtype]) |
sklearn_theano.datasets
: Datasets¶
This module deals with loading datasets.
User guide: See the Dataset loading utilities section for further details.
Loaders¶
Samples generator¶
sklearn_theano.feature_extraction
: Feature Extraction¶
User guide: See the Feature extraction utilities section for further details.


Man threatened pub barmaids with Taser at Waterfront Inn pub
A man showed off a Taser and threatened pub bar staff after trouble flared, a judge heard.
by Thomas ParkesParesh Jethawa, 57, of Crossgate Road, Woodside, Dudley, had been drinking at The Waterfront Inn, at The Waterfront, in Brierley Hill, when he started using offensive language on September 8.
Staff member Reece Skinner recognised him as having been banned previously after a woman complained, Wolverhampton Crown Court was told.
Jethawa approached one of the barmaids and pulled out the Taser, which crackled and lit up but wasn’t used, said Mr Edward Soulsby, prosecuting.
Mr Skinner intervened and told him to put the item away, saying it was not “appropriate” but Jethawa became “irate”.
He threatened to use the weapon, which he had put away, after gesturing to the staff member to go outside with him.
Disguised
Jethawa was later ushered out of the pub, with officers then stopping him on Cochrane Road, where the weapon – disguised as a torch – was found. Jethawa admitted it was a Taser, which he had bought from China.
Mr Lennart Poulsen, defending, said Jethawa was remorseful and apologetic for his actions and had been drinking cider an hour before the incident.
Drinking had been a “demon” in Jethawa's life, which he had tried unsuccessfully to tackle, Mr Poulsen added.
Recorder James Smith said it was a “serious" case which passed the custodial threshold because of the weapon’s use in a public place. But, taking into account Jethawa's lack of previous convictions and good character, Recorder Smith suspended the sentence.
Jethawa was sentenced to 12 months in prison, suspended for two years, for using a prohibited weapon and using threatening behaviour. He must also undertake rehabilitation for his drinking within 12 months.


0.10.1 Release : Sister and friend
The PiTiVi team is proud to announce the second release of the 0.10.x series of the PiTiVi opensource video editor.
The 0.10.x series is an unstable series with 3-week release cycles. The goal of this series is to allow users to test new versions often, give their feedback, and remove bugs more often.
Features of this release
- More UI improvements for usability
- Works with X11/Imagesink
- Handles more formats
- More startup checks
Bugs Fixed
- 335500 : Render dialog never goes away
- 339993 : [i18n] use stock labels included with stock items
- 339998 : Gnome button order
- 340382 : current position should be ui-independent
- 342674 : Segmentation fault on load
List of bugs fixed on Bugzilla
Requirements
- gstreamer >= 0.10.4
- gst-python >= 0.10.0
- gnonlin >= 0.10.2
- pygtk >= 2.8.0
Contributors
- Edward Hervey
Information and Feedback
- Information for users and developers can be found on the PiTiVi website : http://www.pitivi.org/
- Comments and feedback are welcome.
- Mailing-list<EMAIL_ADDRESS>- PiTiVi bug-tracker : http://bugzilla.gnome.org/browse.cgi?product=pitivi
The results of the search are


{% extends "base.html" %} {% block content %}
Below is a list of all projects of which you are administrator. You can choose to download the articles, or the annotations. Articles are provided as a gzipped file with one article per line (in json format). Annotations contain all project settings as well as codebooks and manual codings in JSON format.
Please note that we are currently exporting all projects. If your project is labelled 'in progress', and you need access to the file, please email Wouter van Atteveldt and request for your project export to be expedited.
| Project | Download articles | Download annotations |
|---|---|---|
| {{ p.id}}:{{ p.name }} | {% if p.has_articles %} Download ({{ p.articles_size }}) {% else %} (Export in progress) {% endif %} | {% if p.has_annotations %} Download ({{ p.articles_size }}) {% else %} (Export in progress) {% endif %} |


BigVideo.js
Fullscreen Background Video Website With Playlist Example
Take a look at the source for this example to see how to implement a BigVideo.js playlist on a website. In addition to the normal functionality of BigVideo.js, I’ve added an auto-hide script to this example, so the content fades out away when you stop moving the mouse (unless you are over the playlist nav). Take a look and feel free to implement that if it makes sense.
Keep in mind, you may have to adjust the styles in the bigvideo.css file to get this working right in your design. Making the site work for both desktop and mobile browsers is pretty tricky as well. Use Modernizr’s touch feature detection to set up rules for how BigVideo behaves for touchscreen devices that likely do not allow autoplay.


We are a team of developers who created this site as a recommendation and review service. We strive to promote small, minority, women and differently-abled led and owned businesses, which are often disenfranchised and overlooked. This site will guide the conscious consumer to buy at and support these businesses, which will help build stable financial networks for these groups in our communities.


FIRST NAME
LAST NAME
EMAIL ADDRESS
COUNTRY
Choose a country
France
Italy
Portugal
BIOGRAPHY
PHONE NUMBER
AFFILIATIONS
OCCUPATION
Choose an occupation
CAT'S NAME
FAVORITE GADGET
TYPE OF TALENT
Choose a talent
FAVORITE DRINK
SPECIAL POWER
WEAPON OF CHOICE
COMMENTS


On Linux, follow these instructions to generate Kitura applications.
On macOS, kitura create and kitura init generate template Kitura applications.
| Command | Description |
|---|---|
| kitura init | Create a new Swift Server application with default options selected. |
| kitura create | Create a new Swift Server application. |
| kitura create {modelname} | Add a new model to a Swift Server Generator CRUD application |
This command generates a basic Kitura project including SwiftMetrics for monitoring and configuration files to allow you to easily deploy to a Docker container, a Kubernetes cluster, or the IBM Cloud.
This command generates an application based on your answers to a series of questions. Once all the questions have been answered, the project is created, written to the filesystem, and built using swift build. If you select ‘Basic’ and answer all questions with default responses it will generate the same application as kitura init.
Allows you to define a data model for a CRUD (Create-Read-Update-Delete) application through a series of questions.
You must run kitura create before creating your first model


User stories:
- I can pass a string as a parameter, and it will check to see whether that string contains either a unix timestamp or a natural language date (example: January 1, 2016)
- If it does, it returns both the Unix timestamp and the natural language form of that date.
- If it does not contain a date or Unix timestamp, it returns null for those properties.
https://timestamp-microservice-2017.herokuapp.com/December%2015,%202015
https://timestamp-microservice-2017.herokuapp.com/1450137600
{ "unix":<PHONE_NUMBER>, "natural": "December 15, 2015" }


Who am I?
Hello! My name is Sunny Harshdeep and I am currently a sophomore at the University of Arkansas at Little Rock. I am pursuing a BA in Web Design and Development and a AS in Mechanical Engineering. Currently a part of Society of Computer and Information Science and American Society of Mechanical Engineering.
What am I looking for?
I am currently looking for summer internship opportunities in central arkansas but I am can work remotely if need be. I entend to expand my knowledge on front end development and learn more about UX develoment.
Details
- Name
- Sunny Harshdeep
- Date of birth
- Nationality
- American
- Location
- Arkansas
- Telephone
-<PHONE_NUMBER>
-<EMAIL_ADDRESS>- Address
- 2801 South University Little Rock 72204 USA
-
Experience
UA Little Rock 2018
EIT Student Ambassador
Resident Assistant
First Orion 2017
Intern
-
Skills
What I can do
- HTML
- CSS
- JQuery
-
Education
UA Little Rock Class of 2020
BA Web Design & Development
AS Mechanical Engineering


dominant player in the workstation business.
The re-positioning came too late, and it did nothing to improve the disastrous state of the company’s financials. They were still spending money like crazy, as exemplified by their new offices facing a marina in Redwood City and its free-standing staircase designed by I.M. Pei’s architectural firm. But they were hardly selling: their revenues for 1990 were as low as $28 million (in comparison, Sun made $2.5 billion that same year). In addition, NeXT’s deal with IBM was canceled, as it proved difficult for two such radically different companies to cooperate.


TFrameViewer and TFrameBrowser components
property Viewers: TStrings;
Read only and run time only. The Viewers property lists all the currently displayed THtmlViewers in a Frame HTML document. The THtmlViewers are itemized in the Objects part of the TStrings return.
The String associated with the Object contains information to assist in identifying which viewer is which. The String portion contains combinations of the letters, l, t, r, and b which indicates if that particular viewer touches the Left, Top, Right, or Bottom sides of the overall Frame.
Some Examples:
A combination, "tr" would indicate the viewer is in the top right corner.
A combination, "lbr" would indicate the viewer is the one on the bottom.


--- title: 'Towards SMC: Importance Sampling with Sequential Data' author: Mauro Camara Escudero date: '2020-05-12' slug: towards-smc-importance-sampling-with-sequential-data categories: - sequential-importance-sampling - sequential-monte-carlo - importance-sampling - sequential-data tags: - sequential-monte-carlo - importance-sampling - sequential-importance-sampling - sequential-data subtitle: 'Simple Explanation of Importance Sampling with Sequential Data' summary: 'Importance Sampling tutorial for Sequential Data' authors: [] lastmod: '2020-05-12T17:22:50+01:00' featured: no image: caption: '' focal_point: '' preview_only: no projects: [] bibliography: biblio_is.bib nocite: | @esmc, @smc_bf, @mcs_sc, @mcsm, @bda,@brml ---
Suppose now that instead of having one posterior \(p(\boldsymbol{\mathbf{\theta}}\mid \boldsymbol{\mathbf{y}})\) we actually have a sequence of posterior distributions. This could happen in a scenario in which data comes in sequentially and we need to estimate the posterior each time. In particular, suppose that at time \(t\) we have the following data \(\boldsymbol{\mathbf{x}}_{t} = (x_1, \ldots, x_t)^\top\) and the respective posterior is given by \(\gamma_t(\boldsymbol{\mathbf{x}}_t)\). Then we can approximate the expected value of a function \(h(\boldsymbol{\mathbf{x}}_t)\) in a similar way as above by rewriting it in terms of an importance distribution \(q_t(\boldsymbol{\mathbf{x}}_t)\) \[\begin{align} \mathbb{E}_{\gamma_t}\left[h(\boldsymbol{\mathbf{x}}_t)\right] &= \int h(\boldsymbol{\mathbf{x}}_t)\gamma_t(\boldsymbol{\mathbf{x}}_t) d\boldsymbol{\mathbf{x}}_t \\ &= \frac{1}{Z_t}\int h(\boldsymbol{\mathbf{x}}_t)\frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t)}{q_t(\boldsymbol{\mathbf{x}}_t)} q_t(\boldsymbol{\mathbf{x}}_t) d\boldsymbol{\mathbf{x}}_t \\ &= \frac{\mathbb{E}_{q_t}\left[\frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t)}{q_t(\boldsymbol{\mathbf{x}}_t)}h(\boldsymbol{\mathbf{x}}_t)\right]}{\mathbb{E}_{q_t}\left[\frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t)}{q_t(\boldsymbol{\mathbf{x}}_t)}\right]} \\ &\approx \sum_{i=1}^N w_t(\boldsymbol{\mathbf{x}}_t^{(i)}) h_t(\boldsymbol{\mathbf{x}}_t^{(i)}) && \boldsymbol{\mathbf{x}}_t^{(i)} \overset{\text{iid}}{\sim} q_t(\, \cdot\,) \end{align}\] where we have defined the normalized weights and the unnormalized weights as \[ w_t(\boldsymbol{\mathbf{x}}_t^{(i)}) = \frac{\widetilde{w}_t(\boldsymbol{\mathbf{x}}_t^{(i)})}{\sum_{j=1}^N \widetilde{w}_t(\boldsymbol{\mathbf{x}}_t^{(i)})} \qquad \text{and} \qquad \widetilde{w}_t(\boldsymbol{\mathbf{x}}_t^{(i)}) = \frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t^{(i)})}{q_t(\boldsymbol{\mathbf{x}}^{(i)})} \] We can also use these weights to obtain an estimate of the normalization constant of the posterior, \(Z_t\), and of the normalized posterior itself. In order to do this, we need to recall the definition of the dirac delta mass. \[\begin{align} \gamma_t(\boldsymbol{\mathbf{x}}_t) &= \int \gamma_t(\boldsymbol{\mathbf{x}}_t')\delta_{\boldsymbol{\mathbf{x}}_t}(\boldsymbol{\mathbf{x}}_t') d\boldsymbol{\mathbf{x}}_t' \\ &\approx \frac{\sum_{i=1}^N \frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t^{(i)})}{q_t(\boldsymbol{\mathbf{x}}_t^{(i)})}\delta_{\boldsymbol{\mathbf{x}}_t^{(i)}}(\boldsymbol{\mathbf{x}}_t)}{\sum_{j=1}^N \frac{\widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t^{(j)})}{q_t(\boldsymbol{\mathbf{x}}_t^{(j)})}} \\ &= \sum_{i=1}^N w_t(\boldsymbol{\mathbf{x}}_t^{(i)}) \delta_{\boldsymbol{\mathbf{x}}_t^{(i)}}(\boldsymbol{\mathbf{x}}_t) \end{align}\]
And, similarly, to estimate the normalization constant we do the following \[ Z_t = \int \widetilde{\gamma_t}(\boldsymbol{\mathbf{x}}_t) d \boldsymbol{\mathbf{x}}_t \approx \sum_{i=1}^N \widetilde{w}_t(\boldsymbol{\mathbf{x}}_t^{(i)}) \]
Barber, David. 2012. Bayesian Reasoning and Machine Learning. USA: Cambridge University Press.
Doucet, Arnaud, Simon Godsill, and Christophe Andrieu. 2000. “On Sequential Monte Carlo Sampling Methods for Bayesian Filtering.” Statistics and Computing 10 (3). USA: Kluwer Academic Publishers: 197–208. https://doi.org/10.1023/A:1008935410038.
Gelman, Andrew, John B. Carlin, Hal S. Stern, and Donald B. Rubin. 2004. Bayesian Data Analysis. 2nd ed. Chapman; Hall/CRC.
Liu, Jun S. 2008. Monte Carlo Strategies in Scientific Computing. Springer Publishing Company, Incorporated.
Naesseth, Christian A., Fredrik Lindsten, and Thomas B. Schön. 2019. “Elements of Sequential Monte Carlo.”
Robert, Christian P., and George Casella. 2005. Monte Carlo Statistical Methods (Springer Texts in Statistics). Berlin, Heidelberg: Springer-Verlag.


Habitat
Blastoises can be found on the shores of islands near the ocean, but most often they settle on the shores of ponds and lakes. Most of them are located in the Kanto region. It is rare in nature. Basically, all Blastoises evolve from tamed Squirts, which were given to novice trainers in Kanto as start-ups.


Globe (styled globe) is a dance-oriented Japanese pop band, formed in 1995 by producer and songwriter Tetsuya Komuro. Originally consisting of Komuro, Keiko Yamada and Marc Panther, the group's singles consistently hit the charts. In late 2002 Yoshiki, former drummer and pianist for X Japan, joined the group, but he left the band about a year later.
| Name | Radius | Average Temperature |
|---|---|---|
| Mars | 3390km | -55 °C |
| Venus | 6852km | 460 °C |
Want to know more?


Formulate the equation of chemical reactions occurring during the interaction of bromine with magnesium.


tcvJSON is derived from the json module found in tcllib. The fundamental problem with tcllib is while it does a great job at parsing JSON data, it does so in a way that does not maintain the JSON structure unambiguously in Tcl. That is, going from JSON to Tcl and back to JSON is not possible. tcvJSON was written as an enhanced version of the json module in tcllib to address these issues.
This it does by tagging each ambiguous part of a JSON structure with a type. There is a type for numbers, strings, arrays, and objects. The bare words “true,” “false,” and “null” retain their meaning without tags. Everything else is qualified with some kind of tag indicating its types. This allows us to unambiguously convert JSON to Tcl, manipulate the result with Tcl commands, and finally convert back to JSON while maintaining the original structure, plus any intended structure added while it was in the Tcl representation.
Appends thing onto the end of the JSON list stored in jsonName. Signals an error if the value of jsonName is not a JSON array.
Adds the key/value pair given to the JSON object stored in jsonName. Signals an error if the value of jsonName is not a JSON object.
Nota adicional - Ao acrescentar um objeto usar o comando seguinte:
tcvJSON::put! -type obj jsonValue subObj [lrange $subObjJSON 1 end]
Writes the JSON representation of the data stored in jsonName out on channel (or stdout if not provided).
Parse the text stored in txt and return a Tcl representation of that JSON data.


Police hospital begins mass burial in 21 days
The Ghana Police Hospital has announced that it will in the next 21 days embark on a mass burial for about 120 unidentified and unclaimed bodies as part of routine measures to decongest the hospital mortuary.
These unidentified and unclaimed dead bodies are made up of mostly paupers, unknown former patients, abandoned dead bodies, unidentified accident and crime victims.
The police hospital in a statement signed by DSP Yaw Nketia-Yeboah head of public Affiars urged the public to contact the pathology department of the Ghana Police Hospital for identification of persons who might have not been seen for some time as part of the search.
“This is to avert a situation whereby such bodies are added to those earmarked for the mass burial,” the statement said.
The hospital further encouraged the public to acquire the habit of always having their National Identification Cards or that of any organisation on them to help police and others easily identify them whenever they are in any health crisis or involved in an accident.


Deck Name:
Model Name / Card Name:
Max English Translations:
Kanji Field Name:
Kana Field Name:
English Field Name:
English Example Field Name:
Japanese Example Field Name:


A mobile responsive HTML5 game on WeChat platform.
Freelancer Project. Sep. 2013, 1 Week
Beijing HuaYang Auto
(All images are translation from the orginal app.)
The game is a word guessing game. Players choose letters from the pool to build a word represents the picture on the screen.
This project is developing a customized HTML5 version of a popular mobile game "疯狂猜图" (translated as "Guess Pic Mania") for a vehicle serveice company.
This game used a very flat information architecture, considering the game will be played inside WeChat (a molibe social platform) There are three main screens in this app:
The start page shows instruction, game progress, a reset button and a start button.
The game page is the main part, which contains a picture and a letter pool.
In the congrats screen, user can start a vew level or view the ranking.
This is a local demo I developed. The main part of the game is working, while it has just one level and data is just for testing. (correct answer is "ABCD". )
It's already been more than two years since I developed this game. Both web technology and my understanding/skill on web development improved a lot. If I would develop this game again, there might be several changes:


websocket.js |
|
const WebSocket = require('ws');
const redis = require('redis');
const client = redis.createClient();
const axios = require('axios');
|
|
|
4 events related to websockets: need new because WebSocket is the constructor: |
const wss = new WebSocket.Server({ port: 6000 });
let usercount = 0;
|
|
event handler for connection: web socket server object |
wss.on('connection', (ws) => {
++usercount;
console.log('Someone has joined: '+ usercount)
|
|
This clears all the conversation out of the database when the last person disconnects: |
ws.on('close', (ws) => {
--usercount;
console.log('Someone has left: '+ usercount)
if (usercount < 1) {
axios.get('http://localhost:4000/messanger/clearMessages')
.then(() => { console.log('Cleared messages')})
.catch(e => console.log(e));
axios.get('http://localhost:4000/messanger/clearUsers')
.then(() => { console.log('Cleared users')})
.catch(e => console.log(e));
}
})
});
|
|
we want to listen to messages being broadcast |
client.on('message', (channel, message) => {
console.log(`subscriber hears message ${message}`)
|
|
now we re-broadcast to all open tabs: |
wss.clients.forEach((client) => {
client.send(message);
});
});
client.subscribe('chatChannel');
|


Looking for a healthy alternative to your typical burrito bowl from Chipotle? Well, this might be the perfect solution! Here's what you'll need to make Stuffed Peppers
Steps:
Preheat the oven to 365 degrees
Step 1: Start preparing your dish by browning the ground chicken
Step 2: Boil the rice and let it cool after cooking
Step 3: Sautee the vegetables in a frying pan
Step 4: Cut the top off of each pepper
Step 5: Hollow out the middle of the peppers by cutting against the inside of each; slicing the stems which connect to the sides of the peppers
Step 6: Fill the peppers with a combination rice, beans, ground chicken and lettuce
Step 7: Sprinkle the tops of the peppers with cheeese and put them in the oven
Step 8: Bake the peppers in the oven until the cheese is crispy


Image Url:
OR
Select a File on your Computer to Upload and Resize:
Dimensions you want the image to have:
Width:
Height:


A data object with support for annotated magic methods.
Protected Properties | |
| readonly Api Api | $api |
| array array self[] AbstractEntity[] | $data = [] |
| array bool[] | $diff = [] |
| const | MAP = [] |
Public Methods | |
| mixed | __call (string $method, array $args) |
| Magic method handler. More... | |
| __construct (Api|self $caller, array $data=[]) | |
| array | __serialize () |
| void | __unserialize (array $data) |
| bool | isDiff () |
| Whether the instance has changes. More... | |
| array | jsonSerialize () |
| bool | offsetExists (mixed $offset) |
| mixed | offsetGet (mixed $offset) |
| void | offsetSet (mixed $offset, mixed $value) |
| void | offsetUnset (mixed $offset) |
| array | toArray (bool $diff=false) |
| Dehydrated data. More... | |
Protected Methods | |
| mixed | _get (string $field) |
Magic method: getField() More... | |
| bool | _has (string $field) |
Magic method: hasField() More... | |
| T | _hydrate (string $class, $item) |
| Sub-data factory that draws from the entity pool. More... | |
| bool | _is (string $field) |
Magic method: isField() More... | |
| bool | _of (string $resourceSubtype) |
Magic method: ofResourceSubtypeValue() More... | |
| array | _select (string|iterable $subject, callable $filter,... $args) |
Magic method: selectField(callable $filter) More... | |
| $this | _set (string $field, $value) |
Magic method: setField(mixed $value) More... | |
| void | _setData (array $data) |
| Clears all diffs and sets all data, hydrating mapped fields. More... | |
| void | _setField (string $field, $value) |
| Sets a value, hydrating if mapped, and clears the diff. More... | |
|
final |
|
final |
|
final |
| array | $data |
|
protected |
Magic method: getField()
| string | $field |
Reimplemented in AbstractEntity.
|
finalprotected |
Magic method: hasField()
Whether a countable field has anything in it, or casts a scalar field to boolean.
| string | $field |
|
finalprotected |
Sub-data factory that draws from the entity pool.
@template T of self
| class-string<T> | $class | |
| null | string | array | self | $item |
|
finalprotected |
Magic method: isField()
Boolean casts a scalar field.
Do not use this for countable fields, use hasField()
instead.
| string | $field |
|
finalprotected |
Magic method: ofResourceSubtypeValue()
| string | $resourceSubtype |
|
finalprotected |
Magic method: selectField(callable $filter)
This can also be used to select from an arbitrary iterable.
| string | iterable | $subject | Iterable, or field name of iterable accessed via get<subject>() |
| callable | $filter | fn( Data|AbstractEntity $object ): bool |
| array | $args | Arguments for the getter, if $subject is a field name. |
|
protected |
Magic method: setField(mixed $value)
| string | $field | |
| mixed | $value |
Reimplemented in FieldEntry, and ExternalData.
|
protected |
Clears all diffs and sets all data, hydrating mapped fields.
| array | $data |
Reimplemented in Task, Story, Project, FieldEntry, Event, Status, AbstractEntity, Section, Change, FieldSetting, and Like.
|
protected |
Sets a value, hydrating if mapped, and clears the diff.
| string | $field | |
| mixed | $value |
Reimplemented in FieldEntries.
|
final |
Whether the instance has changes.
|
final |
| bool offsetExists | ( | mixed | $offset | ) |
| mixed | $offset |
| mixed offsetGet | ( | mixed | $offset | ) |
| mixed | $offset |
| void offsetSet | ( | mixed | $offset, |
| mixed | $value | ||
| ) |
| mixed | $offset | |
| mixed | $value |
| void offsetUnset | ( | mixed | $offset | ) |
| mixed | $offset |
| array toArray | ( | bool | $diff = false | ) |


Body and Soul (1925)
Grade: 62
"Body and Soul" is a silent film independently produced by Oscar Micheaux, who also directed, wrote the screenplay and the novel that the film was based upon.
One actor in the film is white. The remaining cast is African-American, and the film was distributed only in segregated black communities. The crew was largely black as well, except for white cameramen who could be hired cheaply as they were unable to get into the cinematographer's union. One of the film's supporting characters is white, played by a black in "whiteface". The only white actor is a character selling rancid meat, perhaps implying white exploitation.
Although "Body and Soul" is a marginally good film, it is significant for marking the film debut of Paul Robeson. Robeson was already a successful stage performer, and his screen charisma and strong bass voice would eventually make him a film star as well. His signature performance was "Old Man River" in "Showboat" from 1936.
Robeson has a dual role. He plays an escaped convict and con man who imposters as a Reverend. He also plays the Reverend's brother, who is as moral as the Reverend is immoral. (The roles of good and evil twins apparently is as old as the craft of film-making.) Both Robesons have an interest in blank-faced young Mercedes Gilbert, whose mother Julia Theresa Russell unwisely trusts the Reverend and prefers him as a suitor.
The film's conclusion is a mess. There is a murder, or is there, which quickly becomes meaningless when the last half of the film is revealed to be just a dream. The dream ending was a desperate measure for Micheaux, who had run out of money and was having trouble getting the film past the National Board of Review. The board objected to the miserably unhappy ending and the depiction of a Reverend as a complete scoundrel.
If "Body and Soul" was a Hollywood production, it would be considered racist. The dialogue is an offensive dialect, and many of the supporting characters are foolish and even stereotypical. Perhaps the comparison of black characters to white characters is in itself racist. I have no solution to this dilemma.
The film's editing is amateurish and jarring at times. The technique of narrowing the picture to a small circle to highlight a facial expression (with the rest of the screen darkened) was also used in "Birth of a Nation", but soon went with the silents.
Despite the film's technical, budgetary and censorship problems, "Body and Soul" is still an interesting film. Robeson is an impressive screen presence, and Micheaux clearly put everything he could into the film.
<EMAIL_ADDRESS>http://members.tripod.com/~Brian_Koller/movies.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


FIRST SECTION
*
Mandatory Radio button
Yes
No
You forgot to check this!
*
Text box 1:
You have to fill this
*
Text box 2:
You have to fill this too!
Not Mandatory Radio button:
Option
Other option
Date:
*
email box:
You need to enter a valid email
*
Confirm email box:
You need to confirm your email
You confirmed incorrectly your email
SECOND SECTION
*
Password box:
You need to enter a password
Your password must contain a number
Your password must have 8 characters
*
Confirm Password box:
You need to confirm your password
Button:
THIRD SECTION
Checkbox:
Option1
Option2
Option3
Option4
More than two radio button
Option1
Option2
Option3
Option4
*
I agree with the user privacy and service terms
You need to agree with the user privacy and service terms to sign up
(Mandatory fields are shown in bold and with a red asterisk)