| I l@ve RuBoard |
The core language and the library of C++ were standardized in parallel. In this way, the library could benefit from improvements in the language and the language could benefit from experiences of library implementation. In fact, during the standardization process the library often used special language features that were not yet available.
C++ is not the same language it was five years ago. If you didn't follow its evolution, you may be surprised with the new language features used by the library. This section gives you a brief overview of those new features. For details, refer to books on the language in question.
While I was writing this book (in 1998), not all compilers were able to provide all of the new language features. I hope (and expect) that this will change very soon (most compiler vendors were part of the standardization process). Thus, you may be restricted in your use of the library. Portable implementations of the library typically consider whether features are present in the environment they use (they usually have some test programs to check which language features are present, and then set preprocessor directives according to the result of the check). I'll mention any restrictions that are typical and important throughout the book by using footnotes.
The following subsections describe the most important new language features that are relevant for the C++ standard library.
Almost all parts of the library are written as templates. Without template support, you can't use the standard library. Moreover, the library needed new special template features, which I introduce after a short overview of templates.
Templates are functions or classes that are written for one or more types not yet specified. When you use a template, you pass the types as arguments, explicitly or implicitly. The following is a typical example — a function that returns the maximum of two values:
template <class T> inline const T& max (const T& a, const T& b) { // if a <b then use b else use a return a < b ? b : a; }
Here, the first line defines T as an arbitrary data type that is specified by the caller when the caller calls the function. You can use any identifier as a parameter name, but using T is very common, if not a de facto convention. The type is classified by class, although it does not have to be a class. You can use any data type as long as it provides the operations that the template uses.[3]
[3] class was used here to avoid the introduction of a new keyword when templates were introduced. However, now there is a new keyword, typename, that you can also use here (see page 11).
Following the same principle, you can "parameterize" classes on arbitrary types. This is useful for container classes. You can implement the container operations for an arbitrary element type. The C++ standard library provides many template container classes (for example, see Chapter 6 or Chapter 10). It also uses template classes for many other reasons. For example, the string classes are parameterized on the type of the characters and the properties of the character set (see Chapter 11).
A template is not compiled once to generate code usable for any type; instead, it is compiled for each type or combination of types for which it is used. This leads to an important problem in the handling of templates in practice: You must have the implementation of a template function available when you call it, so that you can compile the function for your specific type. Therefore, the only portable way of using templates at the moment is to implement them in header files by using inline functions.[4]
[4] To avoid the problem of templates having to be present in header files, the standard introduced a template compilation model with the keyword export. However, I have not seen it implemented yet.
The full functionality of the C++ standard library requires not only the support of templates in general, but also many new standardized template features, including those discussed in the following paragraphs.
In addition to type parameters, it is also possible to use nontype parameters. A nontype parameter is then considered as part of the type. For example, for the standard class bitset<> (class bitset<> is introduced in Section 10.4,) you can pass the number of bits as the template argument. The following statements define two bitfields, one with 32 bits and one with 50 bits:
bitset<32> fIags32; // bitset with 32 bits bitset<50> flags50; // bitset with 50 bits
These bitsets have different types because they use different template arguments. Thus, you can't assign or compare them (except if a corresponding type conversion is provided).
Templates classes may have default arguments. For example, the following declaration allows one to declare objects of class MyClass with one or two template arguments[5] :
[5] Note that you have to put a space between the two ">" characters. ">>" would be parsed as shift operator, which would result in a syntax error.
template <class T, class container = vector<T> > class MyClass;
If you pass only one argument, the default parameter is used as second argument:
MyClass<int> x1; // equivalent to: MyClass<int,vector<int> >
Note that default template arguments may be defined in terms of previous arguments.
The keyword typename was introduced to specify that the identifier that follows is a type. Consider the following example:
template <class T> Class MyClass { typename T::SubType * ptr; ... };
Here, typename is used to clarify that SubType is a type of class T. Thus, ptr is a pointer to the type T::SubType. Without typename, SubType would be considered a static member. Thus
T::SubType * ptr
would be a multiplication of value SubType of type T with ptr.
According to the qualification of SubType being a type, any type that is used in place of T must provide an inner type SubType. For example, the use of type Q as a template argument
MyClass<Q> x;
is possible only if type Q has an inner type definition such as the following:
class Q { typedef int SubType; ... };
In this case, the ptr member of MyClass<Q> would be a pointer to type int. However, the subtype could also be an abstract data type (such as a class):
class Q { class SubType; ... };
Note that typename is always necessary to qualify an identifier of a template as being a type, even if an interpretation that is not a type would make no sense. Thus, the general rule in C++ is that any identifier of a template is considered to be a value, except it is qualified by typename.
Apart from this, typename can also be used instead of class in a template declaration:
template <typename T> class MyClass;
Member functions of classes may be templates. However, member templates may not be virtual, nor may they have default parameters. For example:
class MyClass { ... template <class T> void f(T); };
Here, MyClass::f declares a set of member functions for parameters of any type. You can pass any argument as long as its type provides all operations used by f().
This feature is often used to support automatic type conversions for members in template classes. For example, in the following definition the argument x of assign() must have exactly the same type as the object it is called for:
template <class T> class MyClass { private: T value; public: void assign(const MyClass<T>& x) { // x must have same type as *this value = x.value; } ... };
It would be an error to use different template types for the objects of the assign() operation even if an automatic type conversion from one type to the other is provided:
void f() { MyClass<double> d; MyClass<int> i; d.assign(d); //OK d.assign(i); //ERROR: i is MyClass<int> // but MyClass<double> is required }
By providing a different template type for the member function, you relax the rule of exact match. The member template function argument may have any template type, then as long as the types are assignable:
template <class T> class MyClass<T> { private: T value; public template <class X> // member template void assign(const MyClass<X>& x) { // allows different template types value = x.getValue(); } T getValue() const { return value; } ... }; void f() { MyClass<double> d; MyClass<int> i; d.assign(d); // OK d.assign(i); // OK (int is assignable to double) }
Note that the argument x of assign() now differs from the type of *this. Thus, you can't access private and protected members of MyClass<> directly. Instead, you have to use something like getValue() in this example.
A special form of a member template is a template constructor. Template constructors are usually provided to enable implicit type conversions when objects are copied. Note that a template constructor does not hide the implicit copy constructor. If the type matches exactly, the implicit copy constructor is generated and called. For example:
template <class T> class MyClass<T> { public: //copy constructor with implicit type conversion //- does not hide implicit copy constructor template <class U> MyClass(const MyClass<U>& x); ... }; void f() { MyClass<double> xd; ... MyClass<double> xd2(xd); // calls built-in copy constructor MyClass<int> xi (xd); // calls template constructor ... }
Here, the type of xd2 is the same as the type of xd, so it is initialized via the built-in copy constructor. The type of xi differs from the type of xd, so it is initialized by using the template constructor. Thus, if you write a template constructor, don't forget to provide a copy constructor, if the default copy constructor does not fit your needs. See Section 4.1, for another example of member templates.
Nested classes may also be templates:
template <class T> class MyClass { ... template <class T2> class NestedClass; ... };
If you use the syntax of an explicit constructor call without arguments, fundamental types are initialized with zero:
int i1; // undefined value int i2 = int(); // initialized with zero
This feature is provided to enable you to write template code that ensures that values of any type have a certain default value. For example, in the following function the initialization guarantees that x is initialized with zero for fundamental types:
template <class T> void f() { T x = T(); ... }
The C++ standard library uses exception handling. Using this feature, you can handle exceptions without "polluting" your function interfaces: arguments and return values. If you encounter an unexpected situation, you can stop the usual data processing by "throwing an exception":
class Error; void f() { ... if (excetion-condition) { throw Error(); // create object of class Error and throw it as exception } ... }
The throw statement starts a process called stack unwinding; that is, any block or function is left as if there was a return statement. However, the program does not jump anywhere. For all local objects that are declared in the blocks that the program leaves due to the exception their destructors are called. Stack unwinding continues until main() is left, which ends the program, or until a catch clause "catches" and handles the exception:
int main() { try { ... f(); ... } catch (const Error&) { ... //handle exception } ... }
Here, any exception of type Error in the try block is handled in the catch clause.[6]
[6] Exceptions end a call of the function, where you find the exception, with the ability to pass an object as argument back to the caller. However, this is not a function call back in the opposite direction (from the bottom where the problem was found to the top where the problem is solved or handled). You can't process the exception and continue from where you found the exception. In this regard, exception handling is completely different from signal handling.
Exception objects are ordinary objects that are described in ordinary classes or ordinary fundamental types. Thus, you can use ints, strings, or template classes that are part of a class hierarchy. Usually you design (a hierarchy of) special error classes. You can use their state to pass any information you want from the point of error detection to the point of error handling.
Note that the concept is called exception handling not error handling. The two are not necessarily the same. For example, in many circumstances bad user input is not an exception; it typically happens. So it is often a good idea to handle wrong user input locally using the usual error-handling techniques.
You can specify which set of exceptions a function might throw by writing an exception specification:
void f() throw(bad_alloc); //f() may only throw bad_alloc exceptions
You can specify that a function not throw an exception by declaring an empty set of exceptions:
void f() throw(); //f() does not throw
A violation of an exception specification causes special behavior to occur. See the description of the exception class bad_exception on page 26 for details.
The C++ standard library provides some general features for exception handling, such as the standard exception classes and class auto_ptr (see Section 3.3, and Section 4.2, for details).
As more and more software is written as libraries, modules, or components, the combination of these different parts might result in a name clash. Namespaces solve this problem.
A namespace groups different identifiers in a named scope. By defining all identifiers in a namespace, the name of the namespace is the only global identifier that might conflict with other global symbols. Similar to the handling of classes, you have to qualify a symbol in a namespace by preceding the identifier with the name of the namespace, separated by the operator :: as follows:
//defining identifiers in namespace josuttis namespace josuttis { class File; void myGlobalFunc(); ... } ... //using a namespace identifier josuttis::File obj; ... josuttis::myGlobalFunc();
Unlike classes, namespaces are open for definitions and extensions in different modules. Thus you can use namespaces to define modules, libraries, or components even by using multiple files. A namespace defines logical modules instead of physical modules (in UML and other modeling notations, a module is also called a package).
You don't have to qualify the namespace for functions if one or more argument types are defined in the namespace of the function. This rule is called Koenig lookup. For example:
//defining identifiers in namespace josuttis namespace josuttis { class File; void myGlobalFunc(const File&); ... } ... josuttis::File obj; ... myGlobalFunc(obj); //OK, lookup finds josuttis::myGlobalFunc()
By using a using declaration, you can avoid the (remaining) tedious, repeated qualification of the namespace scope. For example, the declaration
using josuttis::File;
makes File a local synonym in the current scope that stands for josuttis::File.
A using directive makes all names of a namespace available, because they would have been declared outside their namespace. However, the usual name conflicts may arise. For example, the directive
using namespace josuttis;
makes File and myGlobalFunc() global in the current scope. The compiler will report an ambiguity if there also exists an identifier File or myGlobalFunc() in the global scope and the user uses the name without qualification.
Note that you should never use a using directive when the context is not clear (such as in header files, modules, or libraries). The directive might change the scope of identifiers of a namespace, so you might get different behavior than the one expected because you included or used your code in another module. In fact, using directives in header files is really bad design.
The C++ standard library defines all identifiers in namespace std. See Section 3.1, for details.
To provide better support for Boolean values, type bool was introduced. Using bool increases readability and allows you to overload behavior for Boolean values. The literals true and false were introduced as Boolean values. Automatic type conversions to and from integral values are provided. The value 0 is equivalent to false. Any other value is equivalent to true.
By using the keyword explicit, you can prohibit a single argument constructor from defining an automatic type conversion. A typical example of the need for this feature is in a collection class in which you can pass the initial size as constructor argument. For example, you could declare a constructor that has an argument for the initial size of a stack:
class Stack { explicit Stack(int size); // create stack with initial size ... };
Here, the use of explicit is rather important. Without explicit this constructor would define an automatic type conversion from int to Stack. If this happens, you could assign an int to a Stack:
Stack s; ... s = 40; // Oops, creates a new Stack for 40 elements and assigns it to s
The automatic type conversion would convert the 40 to a stack with 40 elements and then assign it to s. This is probably not what was intended. By declaring the int constructor as explicit, such an assignment results in an error at compile time.
Note that explicit also rules out the initialization with type conversion by using the assignment syntax:
Stack s1(40); // OK Stack s2 = 40; // ERROR
This is because there is a minor difference between
X x; Y y(x); // explicit conversion
and
X x; Y y = x; // implicit conversion
The former creates a new object of type Y by using an explicit conversion from type X, whereas the latter creates a new object of type Y by using an implicit conversion.
To enable you to clarify the meaning of an explicit type conversion for one argument, the following four new operators were introduced:
static_cast
This operator converts a value logically. It can be considered a creation of a temporary object that is initialized by the value that gets converted. The conversion is allowed only if a type conversion is defined (either as a built-in conversion rule or via a defined conversion operation). For example:
float x; ... cout << static_cast<int>(x); // print x as int ... f(static_cast<string>("hello")); // call f() for string instead of char*
dynamic_cast
This operator enables you to downcast a polymorphic type to its real static type. This is the only cast that is checked at runtime. Thus, you could also use it to check the type of a polymorphic value. For example:
class Car; // abstract base class (has at least one virtual function) class Cabriolet : public Car { ... }; class Limousine : public Car { ... }; void f(Car* cp) { Cabriolet* p = dynamic_cast<Cabriolet*>(cp); if (p == NULL) { //p did not refer to an object of type Cabriolet ... } }
In this example, f() contains a special behavior for objects that have the real static type Cabriolet. When the argument is a reference and the type conversion fails, dynamic_cast throws a bad_cast exception (bad_cast is described on page 26). Note that from a design point of view, it it always better to avoid such type-dependent statements when you program with polymorphic types.
const_cast
This operator adds or removes the constness of a type. In addition, you can remove a volatile qualification. Any other change of the type is not allowed.
reinterpret_cast
The behavior of this operator is implementation defined. It may be but is not required to reinterpret bits. Using this cast is usually not portable.
These operators replace the old cast techniques that use parentheses. They have the advantage of clarifying the intention of the conversion. The old casts with parentheses could be used for any of these type conversions except for dynamic_cast, so when they were used you could not formulate the exact reason for the conversion. The new operators enable the compiler to receive more information regarding the reason for the conversion and to report an error if the conversion does more than it should.
Note that these operators are provided for only one argument. Consider the following example:
static_cast<Fraction>(15,100) // Oops, creates Fraction(l00)
This example does not do what you might expect. Instead of initializing a temporary fraction with numerator 15 and denominator 100, it initializes a temporary fraction only with the single value 100. The comma is not an argument separator here. Instead, it is the comma operator that combines two expressions into one expression and yields the second. The correct way to "convert" values 15 and 100 into a fraction is still
Fraction(15,100) // fine, creates Fraction(15,100)
It is now possible to initialize integral constant static members inside the class structure. This is useful when the constant is used in the class structure after the initialization. For example:
class MyClass { static const int num = 100; int elems[num]; ... };
Note that you still have to to define space for a constant static member that is initialized within a class definition:
const int MyClass::num; // no initialization here
I'd also like to clarify an important, often misunderstood, aspect of the core language — namely, the only correct and portable versions of main(). According to the C++ standard, only two definitions of main() are portable:
int main() { ... }
and
int main (int argc, char* argv[]) { ... }
where argv (the array of command-line arguments) might also be defined as char**. Note that the return type int is required because the implicit int is deprecated.
You may, but are not required to, end main() with a return statement. Unlike C, C++ defines an implicit
return 0;
at the end of main(). This means that every program that leaves main() without a return statement is successful (any value other than 0 represents a kind of failure). Because of this, my examples in this book have no return statement at the end of main(). Note that some compilers might print a warning message regarding this or even handle it as error. Well, that's life before the standard.
| I l@ve RuBoard |


Enumerable Method : #map
In addition to classes, ruby has something called modules. Modules are containers for methods and constants. Through modules you have to write your code only once and share it between different classes. Enumerable is one such module. It provides a set of methods to traverse, search, sort and manipulate collections.
You can checkout all the methods provided by this module by using instance_methods method (Enumerable.instance_methods.sort). One such method we are going to dive into today is #map, also sometimes known as collect. You can think of this method as doing something and collecting the result. Map always returns a new array filled with changes (whatever gets returned by the block each time it runs).
For example, lets say we have an array of integers:
array = [2,4,6,8,10]
array.map {|x| x**2}
=> [4,16,36,64,100]
If you want to change your orignal array, you can you map!


using `jupyter notebook` run your code and get the output then click file export as md or html up is wrong down is correct


Recover your account
{{#if siteKey}}
{{/if}}
Submit
An email with a link to reset your password has been sent.


We're sorry, but it seems you've tried to access a resources that doesn't exist. Please go back and try again.


| Author: | Sumithabha Das |
|---|---|
| Publisher: | VTC International Publications |
| Price: | $150 |
| Author: | Ali Mazidi Mohammed Gillispie |
|---|---|
| Publisher: | Pearson International Publications |
| Price: | $100 |
| Author: | Rajeev Mothwani |
|---|---|
| Publisher: | Pearson International Publications |
| Price: | $100 |


Publish Activities
Sprint
3:45 PM
100%
1:40 PM
Public Activities
*Can be seen by all the people
Private Activities
*ONLY be seen by invited friends


TEARS OF STONE A film review by James Berardinelli Copyright 1996 James Berardinelli
RATING (0 TO 10): 7.5 Alternative Scale: *** out of ****
Iceland, 1996 Running Length: 1:54 MPAA Classification: No MPAA Rating (Mature themes, sexual situations) Theatrical Aspect Ratio: 1.66:1 Shown at the Philadelphia Festival of World Cinema, 5/8/96, 5/11/96
Cast: Throstur Leo Gunnarsson, Ruth Olafsdottir, Heinz Bennent, Bergthora Aradottir Director: Hilmar Oddsson Producer: Jona Finnsdottir Screenplay: Hilmar Oddsson, Hjalmar H. Ragnarsson, and Sveinbjorn I. Baldvinsson Cinematography: Sigurdur Sverrir Palsson and Slawomir Idziak Music: Jon Leifs In Icelandic and German with subtitles
In recent years, Icelandic cinema has started to gain world recognition. Spearheaded by the export of the films of Iceland's premier movie maker, Fridrik Thor Fridriksson (COLD FEVER), this fledgling film industry is developing an international reputation. TEARS OF STONE, from director Hilmar Oddsson, tells the story of Jon Leifs, Iceland's most celebrated composer, and was filmed in both Iceland and Germany.
Jon Leifs (Throstur Leo Gunnarsson) made his reputation as a conductor and composer of "modern music" during the 1930s in Germany, where his wife, Annie (Ruth Olafsdottir), was a celebrated pianist. The couple had two daughters, a quiet adolescent named Snot, and a lively six-year old, Lif. As depicted in this biopic, Jon is completely devoted to his youngest child, taking her for long walks, buying her violins, and promising that he will never leave her -- a promise he is eventually forced to break.
The early portion of TEARS OF STONE focuses on the struggle between the pragmatist and the artist within Jon. His passion is to compose, and he finds himself bursting with music, but conducting is what pays the bills. As long as his wife is working, however, Jon can stay cloistered in a small, dimly-lit room, scrawling notes on paper. But, as the Nazis gain power, Annie, a Jew, finds work increasingly difficult to come by. To avoid compromising his integrity and reputation, Jon returns to Iceland, leaving his family behind. When he comes back to Berlin to protect them against the rising anti-Semitic tide, he is faced with a monstrous choice between collaborating with the Nazis or risking the three people that he loves.
Like almost every well-constructed Holocaust drama, TEARS OF STONE is ultimately about sacrifice and loss. No one, not the Jewish Anna or the Aryan Jon, escapes from Hitler's reign unscathed. Jon does what he has to do to save his family, but, ironically, loses them because of his actions. And, while this film lacks the gut-wrenching emotional impact of a SCHINDLER'S LIST (TEARS OF STONE is more melodramatic than hard- hitting), it forces us once again to confront the blackest era of modern history and the many individual tragedies that comprised the whole.
Some of the most poignant moments of TEARS OF STONE involve Jon's interaction with Lif. Young and naive, she cannot grasp why she, as the child of a Jew, is considered a foreigner in her own country. She doesn't understand the hatred and prejudice that will sever her from her home and eventually part her from her father.
One of the great strengths of TEARS OF STONE is the fine Icelandic exterior cinematography by longtime Kieslowski collaborator Slawomir Idziak. His amber-filtered shots of the sea are majestic -- the waves look like yellow glass or polished gold, undulating and alive as they crash upon an ice-littered beach. No other images in this visually satisfying movie are quite as vivid. There are times when such photographic excellence compensates for the lead actors' uneven performances.
The title TEARS OF STONE refers to a child's story that Jon tells Lif. A lost troll, searching for home, is unable to reach his cave before dawn. When the sun's first rays touch the troll, he is turned to stone, as is the single tear that he sheds. Jon carries a polished stone in his pocket that he says is the troll's tear. According to him, "whoever carries this stone will always be able to find his way home." It's ironic that, for most of this film, Jon and his family look for, but don't find, a place they can call home.
- James Berardinelli e-mail<EMAIL_ADDRESS>web: http://www.cybernex.net/~berardin
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


Toggle Navigation
Things I Tried
Home
Photos
Videos
Welcome to the Photo Gallery
Photos of Things I Tried. You can toggle the carousel and thumbnails on and off using the below buttons.

Thumbnail Gallery


When I was learning how to work with pastels on the pavement, I started by copying well-known paintings. Once I got the hang of it, I began to create my own compositions. The public thought they were lesser-known paintings by famous artists and did not realize they were my invention. I felt challenged to figure out how to get the public to see my pictures were original. I had noticed a slight 3D effect in photos of my work. I had not intended it and found it unusual. I realized that if my compositions were three-dimensional, it would be impossible to confuse them with masterpieces from the past. Once I figured out the geometry, I got started making three-dimensional images. They were so utterly different than anything ever seen before that many passers-by stopped and began talking with me about my work.
My artwork almost always tells a story. I enjoy using themes and stories that withstand the test of time as they spark recognition across generations. I often use stories from sacred art, mythology, and music.


Three rectangles that will change color
Note:
This example only works in Google Chrome, Firefox, and Opera.
Sorry, your browser does not support inline SVG.


Symphonia
Expand your music horizons
Start your music adventure
Get StartedAlready have an account?
Log InWhat is Symphonia?
Symphonia is a product designed to help music lovers everywhere discover new bands
How does it work?
After signing up, customers are sent three CDs of random genre and band
How much does it cost?
There is only one package currently which costs $20/month


{% extends 'tests/base.html' %} {% block content %} {% load template_extras %} {% if request.user|has_group:"Tutor" %}
Taught by: {{class.teacher_username}}
{{student.average_total}}%
{{student.student_name}}
Pron & Stats: {{student.average_t1}}
Alegbra: {{student.average_t2}}
Geometry: {{student.average_t3}}
trigonometry: {{student.average_t4}}
Stu Id: {{student.id}}
You must have Tutor-level access to view this page.
{% endif %} {% endblock %}


AI Research Scientist - Natural Language Processing - Mountain View, CA
Title: AI Research Scientist - Natural Language Processing
Company: Samsung Research America
Lab: Samsung Artificial Intelligence Center
Location: Mountain View, CA
Lab Summary:
Samsung is working towards a vision of providing world-class AI services on its industry-leading hardware platforms like the Galaxy phones, and home appliances like the smart refrigerators and TVs, smart washers and dryers, etc. Real-time AI services on these connected devices will enable users to interact with devices more naturally via spoken dialog, visual interaction, continuous learning, and big data analysis.
Researchers and engineers at Samsung Research America (SRA), located in Mountain View, CA, are working hard towards making the Samsung vision a reality. We are looking for candidates with expertise in AI, large scale data analysis, statistical analysis, deep learning, computer vision, robotics and language understanding to join us. You will work with a team of research scientists and engineers tackling real-world problems involving Samsung's Artificial Intelligence initiatives. You will also have the opportunity to collaborate with researchers and publish at top-tier conferences in natural language processing, language understanding, data mining, deep learning, computer vision, and robotics.
Position Summary:
We are looking for candidates interested in extending our capabilities on cross-lingual NLP and enabling novel NLP technologies. The ideal candidate will have strong software engineering skills. They should also have background in NLP systems, experience of deep learning, and experience working with massive amounts of data.
Responsibilities:
Build AI service prototypes for large-scale real-time data analysis for AI services like computer vision, natural language understanding, robotics, etc.
Collaborate with engineers and researchers to apply research results to prototypes and real-world applications of artificial intelligence technologies
Facilitate integration of the resulting system/software into existing production environment
Contribute to building research systems, research experimentation, and research paper and/or patent submissions
Experience Requirements:
PhD in CS, Statistics, EE, Applied Mathematics, Experimental Physics, or related field
6+ years of advanced research work, with strong record of publications in relevant fields.
R&D experience in natural language processing, machine learning and related fields
R&D experience in information extraction and text mining technologies
R&D experience in any Artificial Intelligence field --- natural language understanding and dialog, computer vision, speech recognition, machine/deep learning, text mining, robotics – preferred.
Hands-on experience of deep learning technologies and familiar with state-of-the-art deep learning toolkits (e.g., TensorFlow, PyTorch, Keras, etc)
Research publications at relevant conferences such as SIGGRAPH, ACM Trans on Graphics, CVPR, ICCV, ICCP, SPIE, JOSA, etc. is a major plus.
Strong R&D experience in speech science, natural language processing, machine learning and related fields
Strong R&D experience in information extraction and text mining technologies
Hands-on experience of deep learning technologies and familiar with state-of-the-art deep learning toolkits
Strong programming skills (C++, Python, Java, etc)
Strong research and problem solving skills
Good communication and team-working skills
Samsung is an EEO/Veterans/Disabled/LGBT employer. We welcome and encourage diversity as we strive to create an inclusive workplace.


stripe
about mexitecture
Architecture is the manifestation of the aspirations of societies. Hence, it is captivating to discover how people shape the cities and the buildings they choose to erect. I first got acquainted with the architecture of Mexico City through bright facades that frequent Instagram. Yet, after a more close and deliberate encounter, it saddens me those iconic bright walls do very little to describe the ambiance of the city.
Blessed with the near-perfect climate, Mexico City buildings are a hodgepodge of proud reincarnation of the remains of Aztec, the yearning for Spanish heritage as represented by flower-studded barrack courtyards, the ingenious take on mid-century modernism and eccentric variations on contemporary architecture.
Mexitecture is my effort to compile the most interesting milestones in the architecture of Mexico City: to highlight the ‘crown jewels’ as well as to re-surface it’s ‘classics’. I hope this project will become breadcrumbs for the curious adventurers ready to discover the man-made beautiful environment of Mexico City.


|
Contiki 2.5
|
Defines | |
| #define | BASE 31250/2 |
| Play polyphonic tune using buzzer. | |
| #define | MEASURE_ADC2 1 |
| Initialize the temperature sensor ADC2=EXT_SUPL_SIG can also be measured and sent to the 1284p along with the temperature reading. | |
Enumerations | |
| enum | temp_zero_offset_t |
| Type used together with find_temp() to find temperature. | |
| enum | temp_unit_t |
| Type used with temp_get() to select temperature unit. | |
Functions | |
| int | adc_init (adc_chan_t chan, adc_trig_t trig, adc_ref_t ref, adc_ps_t prescale) |
| This function will init the ADC with the following parameters. | |
| void | adc_deinit (void) |
| This will disable the adc. | |
| int | adc_conversion_start (void) |
| This will start an ADC conversion. | |
| int16_t | adc_result_get (adc_adj_t adjust) |
| This will read the ADC result during the ADC conversion and return the raw ADC conversion result. | |
| void | key_init (void) |
| This will intialize the joystick and the ADC for button readings. | |
| void | key_deinit (void) |
| This will disable the ADC used for button readings. | |
| uint8_t | is_button (void) |
| This will poll run key_task() to determine if a button has been pressed. | |
| uint8_t | get_button (void) |
| This function will wait for a user to press a button. | |
| key_state_t | key_task (void) |
| This will check the joystick state to return the current button status. | |
| key_state_t | key_state_get (void) |
| This function will start the ADC conversion and read the current converstion value to determine the button position. | |
| int | lcd_init (void) |
| This function will initialize the proper settings for the LCD driver. | |
| void | lcd_deinit (void) |
| This will disable the LCD operation. | |
| uint8_t | itobcd (uint8_t inNumber) |
| This will convert the incoming decimal number to BCD. | |
| int | lcd_num_puthex (uint16_t numb, lcd_padding_t padding) |
| This will put a HEX value on the LCD that represents the input parameter. | |
| int | lcd_num_putdec (int numb, lcd_padding_t padding) |
| This will put a DEC value on the LCD that represents the input parameter. | |
| int | lcd_num_clr (void) |
| This will clear numbers displayed on the LCD. | |
| int | lcd_puts (const char *s) |
| This will put a string of characters out to the LCD. | |
| int | lcd_puta (size_t length, const uint8_t *s) |
| This will put a string of characters of a certain length out to the LCD. | |
| int | lcd_puts_P (const char *s) |
| This will put a string out to the LCD from Flash. | |
| int | lcd_putchar (unsigned char c) |
| This will put a single character out to the LCD. | |
| void | lcd_symbol_set (lcd_symbol_t symbol) |
| This will enable any of the symbols on the Raven LCD. | |
| void | lcd_symbol_clr (lcd_symbol_t symbol) |
| This will clear any symbol on the Raven LCD. | |
| void | lcd_symbol_set_group (int start, int count) |
| This will enable a group of symbols from the lcd_symbol_chart. | |
| void | lcd_symbol_clr_group (int start, int count) |
| This will disable a group of symbols from the lcd_symbol_chart. | |
| ISR (LCD_vect) | |
| This is the LCD Start of Frame Interrupt Subroutine. | |
| void | led_on (void) |
| Turns the Raven nose LED on. | |
| void | led_off (void) |
| Turns the Raven nose LED off. | |
| void | lcd_single_print_dig (uint8_t numb, uint8_t pos) |
| This will add the passed in number to any of the four locations of the four digit segment display on the LCD. | |
| void | dectoascii (uint8_t val, char *str) |
| This function will convert decimal to ascii. | |
| uint8_t * | signed_dectoascii (int16_t n, uint8_t *str) |
| This will convert a signed decimal number to ASCII. | |
| void | eeprom_init (void) |
| This will check for DEBUG mode after power up. | |
| void | menu_run_sleep (uint8_t *val) |
| This will start a sleep operation. | |
| void | menu_run_doze (uint8_t *val) |
| This will start a sleep with wakes for temperature measurement and web requests. | |
| void | menu_ping_request (uint8_t *val) |
| This will setup a ping request command to the 1284p and reset the ping counter. | |
| uint8_t | menu_send_ping (void) |
| This will send the ping request to the 1284p via the serial port. | |
| void | menu_stop_ping (void) |
| This will stop the ping request. | |
| void | menu_debug_mode (uint8_t *val) |
| This will enable or disable the JTAG debug interface to allow for proper temperature sensor readings. | |
| void | menu_read_temp (uint8_t *val) |
| This will display the temperature in degrees F or C. | |
| void | menu_display_temp (void) |
| This will display the temperature in degrees F or C. | |
| void | menu_clear_temp (void) |
| This will clear the temperature displayed in the 4 digit LCD segments. | |
| void | menu_prepare_temp (uint8_t *val) |
| This will setup the current temperature for transfer to the ATmega1284p via a binary command transfer. | |
| void | menu_stop_temp (void) |
| This will stop the auto sending of temperature data. | |
| void | read_menu (uint8_t ndx) |
| This will read the menu_items[] from the index requested. | |
| void | check_main_menu (void) |
| This will toggle the CONTIKI and 6LOWPAN LCD menus in the main menu position, unless alternate text has been sent from the 1284p. | |
| void | check_menu (void) |
| This will check for the temp menu screen to determine if we need to clear the 4 digit LCD segments or stop an auto temp send. | |
| int | main (void) |
| This is main... | |
| void | sleep_now (int howlong) |
| Prepares for and executes sleep. | |
| void | sleep_wakeup (void) |
| This will send a wakeup command to ATmega1284p It may already be awake, if not it will respond during the next wake cycle Upon receiving the command it will return an acknowledgement frame. | |
| ISR (PCINT0_vect) | |
| This is the wake up button interrupt. | |
| ISR (TIMER2_OVF_vect) | |
| This is the timer2 overflow interrupt. | |
| int | temp_init (void) |
| This will initialize the digital IO and adc channel for temperture readings. | |
| void | temp_deinit (void) |
| This will disable temperature readings by reseting the initialed flag. | |
| int16_t | temp_get (temp_unit_t unit) |
| Read current temperature. | |
| void | timer_init (void) |
| TIMER1 init for timer used by LCD. | |
| void | timer_start (void) |
| Start the timer. | |
| void | timer_stop (void) |
| Stop the timer. | |
| ISR (TIMER1_COMPA_vect) | |
| This is the interrupt subroutine for the TIMER1 output match comparison. | |
| void | uart_init_circ_buf (tcirc_buf *cbuf) |
| This will intialize the circular buffer head and tail of tcirc_buf struct. | |
| void | uart_add_to_circ_buf (tcirc_buf *cbuf, uint8_t ch) |
| This will add a new character to the circular buffer. | |
| uint8_t | uart_get_from_circ_buf (tcirc_buf *cbuf) |
| This will get a character from the buffer requested. | |
| void | uart_clear_rx_buf (void) |
| This will clear the RX buffer. | |
| uint8_t | uart_circ_buf_has_char (tcirc_buf *cbuf) |
| This will check for a character in the requested buffer. | |
| uint8_t | uip_ntohex (uint8_t val) |
| This will convert a nibble to a hex value. | |
| void | itohex (uint8_t val, char *str) |
| Convert integer to hex value. | |
| uint8_t | uart_get_char_rx (void) |
| This will wait for a new character from the ATmega1284p and timeout if no new character is received. | |
| void | uart_init (void) |
| Initialize UART to 38400 Baud Rate and only enable UART for transmission. | |
| void | uart_deinit (void) |
| Turn off UART for sleep mode. | |
| void | uart_send_byte (uint8_t byte) |
| Send one byte over the uart. | |
| ISR (USART_RX_vect) | |
| This is the USART RX complete interrupt. | |
| void | uart_serial_send_frame (uint8_t cmd, uint8_t payload_length, uint8_t *payload) |
| This function builds and sends a binary command frame to the ATmega1284p. | |
| void | uart_timeout_msg (uint8_t x) |
| This displays a time out message to the user based on the parameter reason x. | |
| void | uart_serial_rcv_frame (uint8_t wait_for_ack) |
| This will receive a frame from the ATmega1284p and parse the incoming data. | |
Variables | |
| uint16_t | ADC2_reading |
| This will send the data via the serial port. | |
| bool | temp_initialized = false |
| Flag indicating initialized or not. | |
| uint16_t | ADC2_reading |
| This will turn on the adc channel for reading the temp sensor. | |
| tcirc_buf | rxbuf |
| The RX circular buffer, for storing characters from serial port. | |
Definition of Port Pin for temp sensor. | |
| #define | TEMP_PORT PORTF |
| #define | TEMP_DDR DDRF |
| #define | TEMP_PIN PINF |
| #define | TEMP_BIT_IN 4 |
| #define | TEMP_BIT_PWR 6 |
| #define BASE 31250/2 |
| #define MEASURE_ADC2 1 |
| #define TEMP_PORT PORTF |
Definition at line 62 of file temp.h.
Referenced by temp_get(), and temp_init().
| int adc_conversion_start | ( | void | ) |
This will start an ADC conversion.
Definition at line 105 of file adc.c.
Referenced by key_state_get(), and temp_get().
| int adc_init | ( | adc_chan_t | chan, |
| adc_trig_t | trig, | ||
| adc_ref_t | ref, | ||
| adc_ps_t | prescale | ||
| ) |
This function will init the ADC with the following parameters.
| chan | Determines the ADC channel to open. |
| trig | Sets what type of trigger is needed. |
| ref | Sets the proper reference voltage. |
| prescale | Sets the prescale to be used against the XTAL choice. |
| int16_t adc_result_get | ( | adc_adj_t | adjust | ) |
This will read the ADC result during the ADC conversion and return the raw ADC conversion result.
| adjust | This will Left or Right Adjust the ADC conversion result. |
Definition at line 126 of file adc.c.
Referenced by key_state_get(), and temp_get().
| void check_main_menu | ( | void | ) |
This will toggle the CONTIKI and 6LOWPAN LCD menus in the main menu position, unless alternate text has been sent from the 1284p.
The other menus will display normally.
Definition at line 278 of file raven3290.c.
References lcd_puts(), lcd_puts_P(), read_menu(), and tmenu_item::text.
Referenced by main().
| void check_menu | ( | void | ) |
This will check for the temp menu screen to determine if we need to clear the 4 digit LCD segments or stop an auto temp send.
Also check for stopping a ping request.
Definition at line 307 of file raven3290.c.
References lcd_num_clr(), menu_clear_temp(), menu_stop_ping(), menu_stop_temp(), and tmenu_item::text.
Referenced by main().
| void dectoascii | ( | uint8_t | val, |
| char * | str | ||
| ) |
This function will convert decimal to ascii.
| val | Decimal value to convert. |
| str | Address location to store converted value. |
Definition at line 76 of file menu.c.
Referenced by uart_timeout_msg().
| void eeprom_init | ( | void | ) |
This will check for DEBUG mode after power up.
Initialize the EEPROM module.
Definition at line 142 of file menu.c.
References menu_debug_mode().
Referenced by main().
| uint8_t get_button | ( | void | ) |
This function will wait for a user to press a button.
Definition at line 114 of file key.c.
References is_button().
Referenced by main(), menu_run_doze(), and menu_run_sleep().
| uint8_t is_button | ( | void | ) |
This will poll run key_task() to determine if a button has been pressed.
| True | if button is pressed |
| False | if button is not pressed |
Definition at line 95 of file key.c.
References key_task().
Referenced by get_button(), main(), menu_run_doze(), and menu_run_sleep().
| ISR | ( | LCD_vect | ) |
| ISR | ( | PCINT0_vect | ) |
| ISR | ( | TIMER2_OVF_vect | ) |
| uint8_t itobcd | ( | uint8_t | inNumber | ) |
This will convert the incoming decimal number to BCD.
| inNumber | Decimal number to convert |
Definition at line 356 of file lcd.c.
Referenced by lcd_num_putdec().
| void itohex | ( | uint8_t | val, |
| char * | str | ||
| ) |
Convert integer to hex value.
| val | Value to convert to hex. |
| str | Location to store converted value. |
Definition at line 179 of file uart.c.
References uip_ntohex().
| key_state_t key_state_get | ( | void | ) |
This function will start the ADC conversion and read the current converstion value to determine the button position.
| KEY_ENTER | Enter button has been pressed. |
| KEY_UP | Up Button has been pressed. |
| KEY_RIGHT | Right Button has been pressed. |
| KEY_LEFT | Left Button has been pressed. |
| KEY_DOWN | Down Button has been pressed. |
| KEY_NO_KEY | No Button has been pressed. |
Definition at line 174 of file key.c.
References adc_conversion_start(), adc_result_get(), and ENTER_PORT.
Referenced by key_task(), menu_run_doze(), and menu_run_sleep().
| key_state_t key_task | ( | void | ) |
This will check the joystick state to return the current button status.
Definition at line 133 of file key.c.
References key_state_get().
Referenced by is_button().
| int lcd_init | ( | void | ) |
This function will initialize the proper settings for the LCD driver.
Initialization and configuration of the LCD controller.
This ATmega3290p can directly support an LCD through register mapping.
Definition at line 277 of file lcd.c.
Referenced by main(), menu_run_doze(), and menu_run_sleep().
| int lcd_num_clr | ( | void | ) |
This will clear numbers displayed on the LCD.
Definition at line 428 of file lcd.c.
Referenced by check_menu(), and menu_clear_temp().
| int lcd_num_putdec | ( | int | numb, |
| lcd_padding_t | padding | ||
| ) |
This will put a DEC value on the LCD that represents the input parameter.
| numb | Number to display as DEC. |
| padding | This pads the location to place the value on the LCD. |
Definition at line 402 of file lcd.c.
References abs(), and itobcd().
Referenced by menu_display_temp().
| int lcd_num_puthex | ( | uint16_t | numb, |
| lcd_padding_t | padding | ||
| ) |
| int lcd_puta | ( | size_t | length, |
| const uint8_t * | s | ||
| ) |
| int lcd_putchar | ( | unsigned char | c | ) |
| int lcd_puts | ( | const char * | s | ) |
This will put a string of characters out to the LCD.
| s | First character pointer of string. |
Definition at line 451 of file lcd.c.
Referenced by check_main_menu(), and uart_timeout_msg().
| int lcd_puts_P | ( | const char * | s | ) |
This will put a string out to the LCD from Flash.
| s | First character pointer of the string located in Flash |
Definition at line 498 of file lcd.c.
Referenced by check_main_menu(), main(), and sleep_wakeup().
| void lcd_single_print_dig | ( | uint8_t | numb, |
| uint8_t | pos | ||
| ) |
This will add the passed in number to any of the four locations of the four digit segment display on the LCD.
| numb | Number to display. |
| pos | Position to display number. |
Definition at line 890 of file lcd.c.
Referenced by menu_ping_request(), and uart_serial_rcv_frame().
| void lcd_symbol_clr | ( | lcd_symbol_t | symbol | ) |
This will clear any symbol on the Raven LCD.
| symbol | Specific symbol to clear from the LCD. |
Definition at line 566 of file lcd.c.
Referenced by lcd_symbol_clr_group(), menu_clear_temp(), menu_display_temp(), and uart_serial_rcv_frame().
| void lcd_symbol_clr_group | ( | int | start, |
| int | count | ||
| ) |
This will disable a group of symbols from the lcd_symbol_chart.
| start | Position of table to start from. |
| count | Number of symbols to disable from start position. |
Definition at line 614 of file lcd.c.
References lcd_symbol_clr().
| void lcd_symbol_set | ( | lcd_symbol_t | symbol | ) |
This will enable any of the symbols on the Raven LCD.
| symbol | Specific symbol to enable on the LCD. |
Definition at line 541 of file lcd.c.
Referenced by lcd_symbol_set_group(), main(), menu_display_temp(), menu_run_doze(), menu_run_sleep(), and uart_serial_rcv_frame().
| void lcd_symbol_set_group | ( | int | start, |
| int | count | ||
| ) |
This will enable a group of symbols from the lcd_symbol_chart.
| start | Position of table to start from. |
| count | Number of symbols to enable from start position. |
Definition at line 593 of file lcd.c.
References lcd_symbol_set().
| void led_on | ( | void | ) |
Turns the Raven nose LED on.
Definition at line 862 of file lcd.c.
Referenced by uart_serial_rcv_frame().
| void menu_debug_mode | ( | uint8_t * | val | ) |
This will enable or disable the JTAG debug interface to allow for proper temperature sensor readings.
| val | Flag to trigger the proper debug mode. |
Definition at line 323 of file menu.c.
References temp_init().
Referenced by eeprom_init().
| void menu_ping_request | ( | uint8_t * | val | ) |
This will setup a ping request command to the 1284p and reset the ping counter.
| val | place holder |
Definition at line 264 of file menu.c.
References lcd_single_print_dig(), and menu_send_ping().
| void menu_prepare_temp | ( | uint8_t * | val | ) |
| void menu_read_temp | ( | uint8_t * | val | ) |
This will display the temperature in degrees F or C.
| val | Flag to trigger F or C temperature conversion. |
Definition at line 354 of file menu.c.
References menu_display_temp().
| void menu_run_doze | ( | uint8_t * | val | ) |
This will start a sleep with wakes for temperature measurement and web requests.
| val | Used for remembering the new menu to display after a wakeup. |
Definition at line 215 of file menu.c.
References ENTER_PORT, get_button(), is_button(), key_state_get(), lcd_deinit(), lcd_init(), lcd_symbol_set(), led_off(), sleep_now(), sleep_wakeup(), and uart_serial_send_frame().
| void menu_run_sleep | ( | uint8_t * | val | ) |
This will start a sleep operation.
| val | Used for remembering the new menu to display after a wakeup. |
Definition at line 165 of file menu.c.
References get_button(), is_button(), key_deinit(), key_init(), key_state_get(), lcd_deinit(), lcd_init(), lcd_symbol_set(), led_off(), sleep_now(), sleep_wakeup(), uart_deinit(), and uart_serial_send_frame().
| uint8_t menu_send_ping | ( | void | ) |
This will send the ping request to the 1284p via the serial port.
Definition at line 290 of file menu.c.
References uart_serial_send_frame().
Referenced by main(), and menu_ping_request().
| void read_menu | ( | uint8_t | ndx | ) |
This will read the menu_items[] from the index requested.
| ndx | Position index of menu_items[] lookup. |
Definition at line 258 of file raven3290.c.
Referenced by check_main_menu(), and main().
| uint8_t* signed_dectoascii | ( | int16_t | n, |
| uint8_t * | str | ||
| ) |
| void sleep_now | ( | int | howlong | ) |
Prepares for and executes sleep.
This function sets up the processor to enter sleep mode, and to wake up when the joystick button (PE2/PCINT2) is pressed or after the specified interval.
| howlong | Seconds to sleep, 0=until button pushed |
Definition at line 68 of file sleep.c.
References ENTER_PORT.
Referenced by menu_run_doze(), and menu_run_sleep().
| void sleep_wakeup | ( | void | ) |
This will send a wakeup command to ATmega1284p It may already be awake, if not it will respond during the next wake cycle Upon receiving the command it will return an acknowledgement frame.
This will send a single character forever to the ATmega1284p to cause a wakeup. The 1284p polls the USART for new data during each sleep cycle. Upon receiving a character from the user LCD, it will wake up and send an acknowledgement frame.
Definition at line 122 of file sleep.c.
References lcd_puts_P(), uart_serial_rcv_frame(), and uart_serial_send_frame().
Referenced by menu_run_doze(), and menu_run_sleep().
| void temp_deinit | ( | void | ) |
This will disable temperature readings by reseting the initialed flag.
De-initialize the temperature sensor.
Definition at line 145 of file temp.c.
References temp_initialized.
| int16_t temp_get | ( | temp_unit_t | unit | ) |
Read current temperature.
| [in] | unit | Selected temperature unit (temp_unit_t) |
Definition at line 170 of file temp.c.
References ADC2_reading, adc_conversion_start(), adc_deinit(), adc_result_get(), key_init(), temp_initialized, and TEMP_PORT.
Referenced by menu_display_temp().
| int temp_init | ( | void | ) |
This will initialize the digital IO and adc channel for temperture readings.
Optionally enable adc channel 2 for measurement of EXT_SUPL_SIG.
| 0 | Place holder for returning status. |
Definition at line 113 of file temp.c.
References temp_initialized, and TEMP_PORT.
Referenced by main(), and menu_debug_mode().
| void timer_init | ( | void | ) |
| void uart_add_to_circ_buf | ( | tcirc_buf * | cbuf, |
| uint8_t | ch | ||
| ) |
This will add a new character to the circular buffer.
| cbuf | Pointer to buffer where character will be stored. |
| ch | Character to store into buffer. |
Definition at line 80 of file uart.c.
References tcirc_buf::buf, tcirc_buf::head, and tcirc_buf::tail.
Referenced by ISR().
| uint8_t uart_circ_buf_has_char | ( | tcirc_buf * | cbuf | ) |
This will check for a character in the requested buffer.
| cbuf | Pointer to buffer to check for any characters. |
Definition at line 143 of file uart.c.
References tcirc_buf::head, and tcirc_buf::tail.
| uint8_t uart_get_char_rx | ( | void | ) |
This will wait for a new character from the ATmega1284p and timeout if no new character is received.
| TIMEOUT | Returns if timeout has occured. |
Definition at line 195 of file uart.c.
References uart_get_from_circ_buf().
Referenced by uart_serial_rcv_frame().
| uint8_t uart_get_from_circ_buf | ( | tcirc_buf * | cbuf | ) |
This will get a character from the buffer requested.
| cbuf | Pointer to buffer to get character from. |
Definition at line 107 of file uart.c.
References tcirc_buf::buf, and tcirc_buf::tail.
Referenced by uart_get_char_rx().
| void uart_init | ( | void | ) |
Initialize UART to 38400 Baud Rate and only enable UART for transmission.
Initialize the UART module.
Definition at line 219 of file uart.c.
References uart_clear_rx_buf().
| void uart_init_circ_buf | ( | tcirc_buf * | cbuf | ) |
This will intialize the circular buffer head and tail of tcirc_buf struct.
| cbuf | Pointer to buffer to initialize. |
Definition at line 66 of file uart.c.
References tcirc_buf::head, and tcirc_buf::tail.
| void uart_send_byte | ( | uint8_t | byte | ) |
Send one byte over the uart.
This is called to send binary commands.
| byte | The byte of data to send out the uart. |
Definition at line 258 of file uart.c.
Referenced by uart_serial_send_frame().
| void uart_serial_rcv_frame | ( | uint8_t | wait_for_ack | ) |
This will receive a frame from the ATmega1284p and parse the incoming data.
If the incoming data is a binary command acknowledgement, then this will not parse any data. If the incoming data is test reports, the menu will store the data for end of test metrics.
| wait_for_ack | Flag used to wait for acknowledgement when receving a serial frame. |
Definition at line 340 of file uart.c.
References beep(), EOF_CHAR, lcd_single_print_dig(), lcd_symbol_clr(), lcd_symbol_set(), led_off(), led_on(), REPORT_PING, SOF_CHAR, uart_get_char_rx(), and uart_timeout_msg().
Referenced by main(), and sleep_wakeup().
| void uart_serial_send_frame | ( | uint8_t | cmd, |
| uint8_t | payload_length, | ||
| uint8_t * | payload | ||
| ) |
This function builds and sends a binary command frame to the ATmega1284p.
| cmd | Command to send. |
| payload_length | Length of data to be sent with command. |
| payload | Pointer to data to send. |
Definition at line 295 of file uart.c.
References EOF_CHAR, SOF_CHAR, and uart_send_byte().
Referenced by menu_run_doze(), menu_run_sleep(), menu_send_ping(), and sleep_wakeup().
| void uart_timeout_msg | ( | uint8_t | x | ) |
This displays a time out message to the user based on the parameter reason x.
| x | Reason for USART time out. |
Definition at line 318 of file uart.c.
References dectoascii(), and lcd_puts().
Referenced by uart_serial_rcv_frame().
| uint8_t uip_ntohex | ( | uint8_t | val | ) |
| uint16_t ADC2_reading |
This will send the data via the serial port.
This will send the data via the serial port.
After the raw adc value is stored, it will be used to lookup a degree conversion based on the tables for F or C. Optionally, EXT_SUPL_SIG is also read on channel 2 and stored in the global ADC2_reading for subsequent transfer to the 1284p web server.
| unit | Used to determine what unit needs to be appended with the value. |
| temp | The newly converted value in degrees F or C. |
Definition at line 166 of file temp.c.
Referenced by temp_get().
| uint16_t ADC2_reading |
This will turn on the adc channel for reading the temp sensor.
This will send the data via the serial port.
After the raw adc value is stored, it will be used to lookup a degree conversion based on the tables for F or C. Optionally, EXT_SUPL_SIG is also read on channel 2 and stored in the global ADC2_reading for subsequent transfer to the 1284p web server.
| unit | Used to determine what unit needs to be appended with the value. |
| temp | The newly converted value in degrees F or C. |
Definition at line 166 of file temp.c.
Referenced by temp_get().
The RX circular buffer, for storing characters from serial port.
Definition at line 56 of file uart.c.
Referenced by serial_line_input_byte().


title: Playing with GIMP link: http://www.flamelily.co.uk/2013/11/playing-with-gimp/ author: admin description: post_id: 786 created: 2013/11/18 17:09:04 created_gmt: 2013/11/18 17:09:04 comment_status: open post_name: playing-with-gimp status: publish post_type: post
Just playing around with GIMP which is an excellent image manipulation software and is free under the GNU Lesser General Public License or LGPL. I created this image using the text tools within GIMP.


In this workshop, you
If you wish to clean it up, you will need to delete some or all of these resources:
From the AWS IoT Console click, Greengrass, Deployments, and Check the desired deployment (e.g. cv-lab
). Click, Revise and unselect the components you no longer wish to have as part of the deployment. This will leave the deployment in tact, but will delete the package from the the targeted devices. You can also Cancel the deployment, which will stop any future processing. Deployments cannot be deleted.
Components are independent of the Deployments. As such, they can be retained for future use or deleted. To delete the, click Greengrass, Components, then Click on the link for the un-desired component (e.g. aws.greengrass.JetsonDLRImageClassification
). Click, Delete version. Note that each Component version can be deleted separately.
Deleting the component does NOT remove the artifacts from S3 storage.
Navigate to the S3 console and use the interface to delete objects, prefixes, or the entire bucket.


class ACL
Simple Access Control Lists.
Access control lists are composed of “allow” and “deny” halves to control access. Use “all” or “*” to match any address. To match a specific address use any address or address mask that IPAddr can understand.
Example:
list = %w[ deny all allow <IP_ADDRESS> allow ::ffff:<IP_ADDRESS> allow <IP_ADDRESS> ] # From Socket#peeraddr, see also ACL#allow_socket? addr = ["AF_INET", 10, "lc630", "<IP_ADDRESS>"] acl = ACL.new p acl.allow_addr?(addr) # => true acl = ACL.new(list, ACL::DENY_ALLOW) p acl.allow_addr?(addr) # => true
Constants
- ALLOW_DENY
Default to allow
- DENY_ALLOW
Default to deny
- VERSION
The current version of ACL
Public Class Methods
new(list=nil, order = DENY_ALLOW)
click to toggle source
Creates a new ACL from list
with an
evaluation order
of DENY_ALLOW or ALLOW_DENY.
An ACL list
is an Array of “allow” or
“deny” and an address or address mask or “all” or “*” to match any address:
%w[
deny all
allow <IP_ADDRESS>
allow <IP_ADDRESS>/26
]
# File lib/drb/acl.rb, line 172 def initialize(list=nil, order = DENY_ALLOW) @order = order @deny = ACLList.new @allow = ACLList.new install_list(list) if list end
Public Instance Methods
allow_addr?(addr)
click to toggle source
Allow connections from addrinfo addr
? It must be formatted
like Socket#peeraddr:
["AF_INET", 10, "lc630", "<IP_ADDRESS>"]
# File lib/drb/acl.rb, line 196 def allow_addr?(addr) case @order when DENY_ALLOW return true if @allow.match(addr) return false if @deny.match(addr) return true when ALLOW_DENY return false if @deny.match(addr) return true if @allow.match(addr) return false else false end end
allow_socket?(soc)
click to toggle source
Allow connections from Socket soc
?
# File lib/drb/acl.rb, line 184 def allow_socket?(soc) allow_addr?(soc.peeraddr) end
install_list(list)
click to toggle source
Adds list
of ACL entries to this ACL.
# File lib/drb/acl.rb, line 216 def install_list(list) i = 0 while i < list.size permission, domain = list.slice(i,2) case permission.downcase when 'allow' @allow.add(domain) when 'deny' @deny.add(domain) else raise "Invalid ACL entry #{list}" end i += 2 end end


Audio, max frequency range when you hear nothing but huge amounts of static
Audio inversion for steganography in audio files
Python library to diff two wav files


Get Current Weather
Location: NA
Condition: NA
NA
°F
Details
Min.
NA
°F
Max.
NA
°F
Wind
NA
mph
Humidity
NA
%
Pressure
NA
hPa
Data provided by Open Weather.
API Source:
https://openweathermap.org/current


Test coverage user interface for C and C++
If you find a problem with ggcov, you can:
If you fix a bug or port ggcov to a new platform, please post your changes so they can be incorporated into the next release. A pull request on GitHub is the best choice, but you can also post a unified format patch to the mailing list.


is an innovative community for startups, communities, and creative minds to learn, grow and connect. The hub promotes the progress of tech-savvy students, tech startup owners, and entrepreneurs. This community helps inclined students and other innovative minds to learn, grow, connect, and collaborate on their projects as we ensure 100% satisfaction with our facilities.
TechHub EKSU, previously known as GDG EKSU Hub(Ekiti State University) was established by a team led by Solomon Awosupin, Olayinka Peter and Yemisi Obielodon. At that time the Hub was being used by the Google Developer Group, Ekiti State University. This GDG EKSU group was a group of tech enthusiasts passionate about Google technologies with a vision of creating a universal solution that drives change. This group has now being transitioned to Developer Student Club EKSU which is now a community in the TechHub EKSU communities.
Over the years, Tech Hub has been able to support the growth of different startups. And with the help of different Tech Communities available, we are able to help our members to get informed about the latest technology, updated tech news, scholarship/ job openings, grant/ funding opportunities and many more.
Hub Manager
Secretary
Program Director
Accountant
© TechHub EKSU. All Rights Reserved


conf.d/myapp.json
{
"services": [
{
"name": "myapp",
"group": "backend.production",
"ports": ["proxy", "api"]
},
{
"name": "nginx",
"group": "frontend.production"
}
],
"conf_name": "myapp_backend_production",
"template": "/etc/surok/templates/myapp.jj2",
"dest": "/etc/myapp/myapp.cfg",
"reload_cmd": "killall -9 myapp; /usr/local/bin/myapp -config /etc/myapp/myapp.cfg"
}
* services. List of hashes with required services for app.
1. name - string. App name in Marathon. If you use a Marathon discovery, you can use the "*" at the end of the string to indicate any character.
2. group - string. App group in Marathon. Optional. Discovery policy: 1) config 2) SUROKDISCOVERYGROUP environment variable 3) Marathon API
3. ports - list. Name of opened port. In marathon of course. If you use a Marathon discovery, you can use the "*" at the end of the string to indicate any character. Optional.
* confname. Unique app config name.
* template. Jinja2 template location.
* dest. Destination config path.
* reloadcmd. Command to execute if generated config is changed.


---
layout: post
title: Simple Memcached Reports In Rails
categories:
- ruby-rails
---
The Pragmatic Bookshelf's Using memcached: How to scale your website easily is way old. But then again, memcached is still very useful. One of the things I remember reading a long time ago was the stats for your process and how to pull out meaningful reports like a hit ratio, memory and a get to set ration.
I whipped these up today as a simple way of getting a report using Rails.cache.report
, assuming your cache strategy is set to memcached. Hope others find it useful. BTW, I do not recommend the book, it is too low level for any useful meaning to the average Rails developer.
{% highlight ruby %}
module ActiveSupport
module Cache
class MemCacheStore < Store
include ActionView::Helpers::DateHelper
include ActionView::Helpers::NumberHelper
# Higher percentages, above 90%, are good.
def hit_ratio
stats.inject({}) do |memo, (server,stat)|
value = (stat['get_hits'].to_f / stat['cmd_get'].to_f) * 100
memo[server] = number_to_percentage(value,:precision=>2)
memo
end
end
# Another good statistic to look at is percentage of gets to sets. For a well-tuned application,
# there should be more gets than sets. High percents are bad, negatives are great.
def gets_to_sets
stats.inject({}) do |memo, (server,stat)|
sets = stat['cmd_set'].to_f
gets = stat['cmd_get'].to_f
more_sets = sets - gets
value = (more_sets / gets) * 100
memo[server] = number_to_percentage(value,:precision=>2)
memo
end
end
def uptime
stats.inject({}) do |memo, (server,stat)|
started_on = stat['uptime'].seconds.ago
utime = distance_of_time_in_words started_on, Time.now
memo[server] = {:started_on => started_on, :uptime => utime}
memo
end
end
def memory
stats.inject({}) do |memo, (server,stat)|
memory = number_to_human_size stat['limit_maxbytes']
used = number_to_human_size stat['bytes']
memo[server] = {:memory_total => memory, :memory_used => used}
memo
end
end
def report
stats.keys.inject({}) do |memo, server|
rpt = memory[server].merge(uptime[server])
rpt[:hit_ratio] = hit_ratio[server]
rpt[:gets_to_sets] = gets_to_sets[server]
memo[server] = rpt
memo
end
end
end
end
end
{% endhighlight %}


|
| | Builder (TPagingToolbar component) |
| |
| virtual TBuilder | DisplayInfo (bool displayInfo) |
| | True to display the displayMsg (defaults to false). More...
|
| |
| virtual TBuilder | DisplayMsg (string displayMsg) |
| | The paging status message to display. Note that this string is formatted using the braced numbers {0}-{2} as tokens that are replaced by the values for start, end and total respectively. These tokens should be preserved when overriding this string if showing those values is desired. Defaults to: "Displaying {0} - {1} of {2}" More...
|
| |
| virtual TBuilder | EmptyMsg (string emptyMsg) |
| | The message to display when no records are found (defaults to 'No data to display'). More...
|
| |
| virtual TBuilder | StoreID (string storeID) |
| | The Ext.data.Store the paging toolbar should use as its data source. More...
|
| |
| virtual TBuilder | AutoFindStore (bool autoFindStore) |
| |
| virtual TBuilder | RefreshHandler (string refreshHandler) |
| |
| virtual TBuilder | AfterPageText (string afterPageText) |
| | Customizable piece of the default paging text. Note that this string is formatted using {0} as a token that is replaced by the number of total pages. This token should be preserved when overriding this string if showing the total page count is desired. Defaults to: "of {0}" More...
|
| |
| virtual TBuilder | BeforePageText (string beforePageText) |
| | The text displayed before the input item. Defaults to: "Page" More...
|
| |
| virtual TBuilder | FirstText (string firstText) |
| | The quicktip text displayed for the first page button. Note: quick tips must be initialized for the quicktip to show. Defaults to: "First Page" More...
|
| |
| virtual TBuilder | InputItemWidth (int inputItemWidth) |
| | The width in pixels of the input field used to display and change the current page number. Defaults to: 30 More...
|
| |
| virtual TBuilder | LastText (string lastText) |
| | The quicktip text displayed for the last page button. Note: quick tips must be initialized for the quicktip to show. Defaults to: "Last Page" More...
|
| |
| virtual TBuilder | NextText (string nextText) |
| | The quicktip text displayed for the next page button. Note: quick tips must be initialized for the quicktip to show. Defaults to: "Next Page" More...
|
| |
| virtual TBuilder | PrependButtons (bool prependButtons) |
| | true to insert any configured items before the paging buttons. Defaults to: false More...
|
| |
| virtual TBuilder | PrevText (string prevText) |
| | The quicktip text displayed for the previous page button. Note: quick tips must be initialized for the quicktip to show. Defaults to: "Previous Page" More...
|
| |
| virtual TBuilder | RefreshText (string refreshText) |
| | The quicktip text displayed for the Refresh button. Note: quick tips must be initialized for the quicktip to show. Defaults to: "Refresh" More...
|
| |
| virtual TBuilder | HideRefresh (bool hideRefresh) |
| | Hide refresh button More...
|
| |
| virtual TBuilder | Listeners (Action< PagingToolbarListeners > action) |
| | Client-side JavaScript Event Handlers More...
|
| |
| virtual TBuilder | DirectEvents (Action< PagingToolbarDirectEvents > action) |
| | Server-side DirectEventHandlers More...
|
| |
| | Builder () |
| |
| | Builder (PagingToolbar component) |
| |
| | Builder (PagingToolbar.Config config) |
| |
| | Builder (TToolbarBase component) |
| |
| virtual TBuilder | DefaultButtonUI (string defaultButtonUI) |
| |
| virtual TBuilder | DefaultFieldUI (string defaultFieldUI) |
| |
| virtual TBuilder | DefaultFooterButtonUI (string defaultFooterButtonUI) |
| |
| virtual TBuilder | DefaultFooterFieldUI (string defaultFooterFieldUI) |
| |
| virtual TBuilder | DefaultType (string defaultType) |
| | The default type of content Container represented by this object as registered in Ext.ComponentMgr (defaults to 'panel'). More...
|
| |
| virtual TBuilder | Flat (bool flat) |
| | True to use flat style. More...
|
| |
| virtual TBuilder | ClassicButtonStyle (bool classicButtonStyle) |
| | True to use classic (none-flat) style. More...
|
| |
| virtual TBuilder | EnableOverflow (bool enableOverflow) |
| | Configure true to make the toolbar provide a button which activates a dropdown Menu to show items which overflow the Toolbar's width.  More...
|
| |
| virtual TBuilder | Vertical (bool vertical) |
| | Set to true to make the toolbar vertical. The layout will become a vbox. Defaults to: false More...
|
| |


Please feel free to send pull requests to add new links or correct wrong ones.
Sources: * Computer Vision Genealogy Project - Jia-Bin Huang and Wen-Sheng Chu * The Mathematics Geneology Project
== * Takeo Kanade (CMU) * Edward Adelson (MIT) * William T. Freeman (MIT) * Hyun Sung Chang * Taeg Sang (“Tim”) Cho (Wilmer Hale) * Roger Grosse (University of Toronto) * Biliana Kaneva (MIT) * Ce Liu (Google Research) * Michael Rubinstein (Google Research) * Bryan Russell (Adobe Research) * Barun Singh * Erik B. Sudderth (Brown University) * Marshall Tappen (Amazon) * Eero Simoncelli (NYU) * Yair Weiss (The Hebrew University of Jerusalem) * Anat Levin (The Weizmann Institute of Science) * Ron Dror (Stanford University) * Roland Fleming (University of Giessen) * Marshall Tappen (Amazon) * Josh McDermott (MIT) * Yuanzhen Li * Lavanya Sharan (MIT) * Ce Liu (Google Research) * Nathaniel Twarog
Frédo Durand (MIT)
Jan J. Koenderink (Delft University of Technology and Katholieke Universiteit Leuven)
Alex Pentland (MIT) * Trevor Darrell (UC Berkeley) * Gregory Shakhnarovich (Toyota Technological Institute at Chicago) * Kristen Grauman (UT Austin) * Adriana Kovashka (University of Pittsburgh) * Sung Ju Hwang (Ulsan National Institute of Science and Technology) * Jaechul Kim (Amazon Research) * Yong Jae Lee (UC Davis) * Sudheendra Vijayanarasimhan (Google Research) * Kate Saenko (UMass Lowell) * Irfan Essa (Georgia Institute of Technology) * Tony Jebara (Columbia University) * Baback Moghaddam (JPL) * Rosalind Picard (MIT Media Lab) * Stanley Sclaroff (Boston University) * Thad Starner (Georgia Institute of Technology) * Matthew Turk (University of California, Santa Barbara)
Marc Levoy (Google X) * Vaibhav Vaish * David Koller * Billy Chen * Gaurav Garg * Natasha Gelfand (Nokia Research) * Augusto Roman (Flux Factory) * Li-Yi Wei (The University of Hong Kong) * Szymon Rusinkeiwicz (Princeton University) * Brian Curless (University of Washington) * Li Zhang (Google) * Yung-Yu Chuang (National Taiwan University) * Daniel Goldman (Adobe) * Philippe Lacroute (Stanford University)


 LOST IN AMERICA and DEFENDING YOUR LIFE are two of my favorite comedies. His humor is of a kind that is not very prevalent in movies today, inundated as we are with films which revel in their aim toward the lowest common denominator. You will rarely see any slapstick in an Albert Brooks film, while the dialog will not be as oppressive as in some of the independent "talk films" which are finding their way into theaters. The situations in which his characters find themselves are ones we can often identify with, but even if we can't, Brooks has the talent to make them comfortable, and therefore we laugh. Teenagers and Jim Carrey fans probably won't find an Albert Brooks movie very funny, but people who look for more than what we could find on television probably will. Put simply, Brooks' comedy is intelligent.
MOTHER is Albert Brooks' latest film, and it does not disappoint. Brooks plays John Henderson, a middle-aged science fiction writer just coming off his second divorce. He makes an attempt at dating, but fails miserably. He then has dinner with his brother Jeff (Rob Morrow), a successful sports agent who seems to live the ideal life. Jeff has a good job, a loving family, and most of all, a warm relationship with their mother Beatrice (Debbie Reynolds). After dinner, John witnesses a telephone conversation between Jeff and Beatrice, and is at the same time amazed and sickened by how hunky-dory the dialog is. In comparison, Beatrice always hints at a fault in John and his career every time she talks with him, and John gives it right back to her. At the end of one of their conversations where Beatrice has just picked apart John's life, she says, "I love you," and John replies with, "I know you think you do." The thing is, Beatrice is not overt with her criticisms, but instead gives them in that mothering way which is tantamount to nit-picking and guilt loading. It's the kind that goes something like, "Yes, dear, I think you do that wonderfully, BUT...." It seems as though nothing he does makes her happy. There's always the big but.
John believes that his mother is somehow connected to his failed relationships with women, either because of his flawed self-esteem caused by his need for validation, or perhaps because he tends to unconsciously seek out women who remind him of his mother in an oedipal manner. He comes to the conclusion that since his problems are rooted in his boyhood home, he should move back in with his mother for a while just to see what kinds of feelings come out, and by that be able to sort out why his life is the way it is. "A great experiment", he calls it.
Brooks' own brand of humor really shines in this film, especially in the interaction John has with his mother. There's a scene where John has just arrived at his mother's house, and after having driven from Los Angeles to Sausalito, and having explained to his mother about the "great experiment", Beatrice asks, "Now explain to me again why you don't want to stay at a hotel." She still doesn't get it, and it is absolutely hilarious. In the same scene, we get little glances at the life his mother leads when she tries to feed him food that is no longer fresh. She apparently buys in great quantities and refrigerates it until the lettuce is wilted and the sherbet is iced over. When John points out the ice on the sherbet, Beatrice tells him not to worry about the protective glaze. "You've named the ice?" asks John. He's also surprised at the variety of items Beatrice keeps in the refrigerator, such as a twenty-pound block of cheese. "The freezer was a good invention," says John, "but it's not supposed to be used for everything. That's why it's smaller than the refrigerator." It's something most of us find strangely familiar.
Brooks is also a master at employing the non sequitur. For example, in DEFENDING YOUR LIFE, his and Meryl Streep's characters are in a comedy club having a discussion. When they're finished and walk out, Brooks cuts to the comic on stage who is just at the point of delivering his punch line, "And so the moral is, if you have to fart, go outside!" You don't know what the joke was because you couldn't hear him during the entire scene, but I must have laughed for the next five minutes, it seemed so out of context. In this film, Brooks uses the same trick a couple of times to open or close a scene. I don't want to give them away, but suffice it to say they work just as well as they have in the past.
John's purpose for staying with his mother is to learn, and we as the audience learn right along with him. His mother is not the fascinating type to begin with, but as John spends more time with her, we learn things about her personality and her lifestyle that give her depth. Watching the character of Beatrice unfold is every bit as enjoyable as the humor that accompanies it each step of the way.
On screen, Brooks does an excellent job playing this kind of character: You get the feeling he often believes he is the only sane person in an insane world. In a way, he's very much like Yosarian of CATCH-22, expect with something of an attitude. Casting Debbie Reynolds as Beatrice is perfect. She assumes the part with ease, even moving and speaking a little slowly, and is just so adorable it's hard to get mad at her character. This only helps the audience to share the frustration John feels when dealing with her. As his first choice, Brooks originally wanted to lure Nancy Reagan out from her acting retirement to play Beatrice, but the former actress and first lady could not leave her husband, who was beginning to show symptoms of Alzheimer's disease. That may be just as well, since Reynolds lends a softness to the character which enhances it immensely. Rob Morrow also does a good job at playing the younger brother who has always been mother's favorite and, for all his success in his job and family, is slowly exposed as a mama's boy.
The only things that hold this movie back from being better are a couple of plot holes. A solid connection is not really made between John's troubles and his reasons for living with his mother. Additionally, the end results of the experiment do not necessarily jibe with the stated goals, and although this may have been sloppy screenwriting, how can you be mad at the guy who also wrote this?:
  Beatrice: Well, it takes one to know one.
Review posted December 4, 1997
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


Java™ Execution Time Measurement Library
Runtime performance monitoring made easy
JETM Featureset
Obviously the best way to explore JETM features is looking at the online demo application. Nevertheless this page lists the current JETM feature set.
JETM Core Features
- Declarative and programmatic performance monitoring
- Flat and nested (tree-based) recording
- Low overhead - can and should be used in production
- Pluggable result visualization including HTML, Swing and Standard Out
- Simple setup and integration
- No VM level instrumentation requirement, JETM can and should be used per deployment unit
- Persistent performance results
Supported JDKs (tested, but not limited to)
- Sun JDK 1.3, 1.4, 5.0, 6.0
- Bea JRockit
Supported timers
- java.lang.System#nanoTime
- sun.misc.Perf
- java.lang.System#currentTimeMillis()
Framework integrations
- Declarative performance monitoring using Springframework AOP, AspectWerkz and other AOP Alliance Frameworks
- Build-in HTTP Server for performance monitoring
- Raw Data Logging using Log4J, commons-logging and java.util.logging
- Result visualization using RRD4j
- Simple JMX Integration


Sunsets as a Service
Deliver rich, brilliant experiences with the world's first sunset service, coming soon.
Sign up


|
Midnight Blue Game and Engine
|
Namespaces |
Classes | |
| class | Collectable |
| Defines an object that can be contained within components and systems that operate on collectible items, such as Inventory. More... | |
| class | MBConsole |
| Midnight Blue debug console class. Executes attached methods and changes attached variables. More... | |
| class | MBConsoleASTNode |
| Class all AST nodes inherit from More... | |
| class | MBConsoleLexer |
| Breaks a string into a series of tokens to use for parsing the debug consoles command language More... | |
| class | MBConsoleParser |
| Parses command string input and executes it using a debug console. More... | |
| class | MBGame |
| This is the main type for your game. More... | |
| class | MBMath |
| Math helper class | |
| class | PrintASTNode |
| Prints a variable to the console. More... | |
| class | QuitASTNode |
| Handles quitting the game More... | |
| class | RootASTNode |
| The entry point for command execution with a single child. More... | |
| class | RunASTNode |
| AST node entry point for executing a run command More... | |
| class | SetASTNode |
| AST node representing the entry point for a 'set' command with an identifier and a value child More... | |
| class | SoundTrigger |
| Triggers a sound effect More... | |
| class | SpriteBatchExtensions |
| Extends SpriteBatch with MidnightBlue data structures. | |
| class | Tile |
| Represents a single tile in a tile map. More... | |
| class | VariableASTNode |
| Represents a variable with a type and a value More... | |
| class | Vector2Extensions |
Enumerations | |
| enum | Token { Token.Unknown, Token.String, Token.Set, Token.Run, Token.Print, Token.Quit } |
| Category of tokens created by the lexer More... | |
| enum | TileFlag { TileFlag.Passable, TileFlag.Impassable } |
| Flags a tile as passable or impassable, used in collision checking. More... | |
|
strong |
|
strong |


How Do We Test React Code? - We are using the React Testing Library (link) - We use it in conjunction with Jest
RTL Cheatsheet 1. Create Test File Next to Component Component.test.jsx
. 1. Import React, RTL, & Component To Test 1. Create Describe & It
Tips From Gabe 1. We need stuff from the library but the wrapper as well 1. remember about cleaning up after each test 1. prefer regular expressions to raw text 1. wrapper exposes different methods that look alike!!!! - get will crash and burn fast if no match - query will return null if no match - find will wait, and only fail after 5s
.gitignore
?
But again, there is little harm in having custom data-
attributes here and there as long as they don’t contain massive amounts of data" - “Also… if the app is screen-reader accessible (which it should), then it is ridiculously easy to grab any element that matters with the legit selectors (not the data escape hatch), because they all have proper aria
attributes”


Hanba! travel through a divided 1930s Poland, in concept work that imagines Punk emerging in this frenetic period, rather than some 40 years later. The uncertainty of interwar Europe, channeled through Punk is an eccentric, but intriguing prospect.
The result is a rousing, rebellious sound, that is indebted to the rich culture of a hectic era. The words of Polish poets such as Julian Tuwim are delivered in brash Buzzcocks-esque vocal style. Meanwhile, banjo and accordion replace guitars, and pulsing tuba stands in for bass.
Who knew a Punk revival could start in 1933?
Born in 1907 in Białystok. Of Jewish descent, but does not belong to the community. He worked in an art silk factory in Tomaszów Mazowiecki, where he met Adam Sobolewski. Has been living in Cracow since 1928, does not have permanent employment.
Born in 1909 in Nowe Skalmierzyce. In 1920 began attending secondary school in Kalisz, he graduated in 1927. He left for Cracow to pursue law school which he did not finish. He met Zamenhof, Sobolewski and Król by chance in 1931. Currently does not have permanent employment.
Year of birth unknown. About 35 years old. Probably of Romani nationality, although even this is not certain. Does not have any papers. Unintelligible pronunciation. Known as the genius bandsman of the Cracovian Kazimierz and the brother of the equally talented Wiesław Król, whom he replaced in the orchestra in 1937.
Born in 1906 in Niemież, near Vilnius. After finishing primary school, he left to work in Łódź, then to Tomaszów Mazowiecki where, in 1923, he met Zamenhof. In 1928 he took part in a labour strike; after being released from gaol he went to Cracow where he works as a porter.
Arkady Kutz


British PM Johnson's party manifesto will be out by next week: deputy minister
LONDON (Reuters) - British Prime Minister Boris Johnson’s Conservative Party election manifesto will be released by next week, deputy finance minister Rishi Sunak said.
“You will get it very shortly and it will certainly be by next week,” Sunak told ITV.


Lambdas, Procs, and Blocks!
Oh my!
February 1, 2015
First off I would like to say why I chose to my title in reverse order. Obviously I am copying Wizard of Oz "Lion, Tigers, and Bears. Oh my!" Lamda starts with an L and has 2 syllables like lion, then blocks start with a B and has one syllable. In this blog, I will be talking them in the order of blocks, procs, and lambda.
So what are blocks, procs, and lambda? They are a closure type that is used in Ruby. It is a very strong tool you can use in Ruby. So what is a closure? Paul Cantrell at https://innig.net says it is the following:
- It can be passed around as a value and executed on demand by anyone who has that value, at which time it can refer to variables from the context in which it was created (i.e. it is closed with respect to variable access, in the mathematical sense of the word "closed").
Blocks
def print_cohort(&s;block) puts block.call end print_cohort { ["Andrew Dye", "Anna MacDonald", "Ayako Kurushima"] } > Andrew Dye > Anna MacDonald > Ayako Kurushima print_cohort { {1 => "Angel Baek", 2 => "Benjamin Cheng", 3 => "Christopher Thomas Pelnar"} } > {1=>"Angel Baek", 2=>"Benjamin Cheng", 3=>"Christopher Thomas Pelnar"} print_cohort { "Chris Lintecum, Morgan McCrory, Paul Clegg"] } > Chris Lintecum, Morgan McCrory, Paul CleggIn the example above you see that the print_cohort method somehow prints whatever is between the curly brackets. Between the curly brackets are the block that I passed into the print cohort method. In the method I print out whatever object I put into the block. Notice it printed out an Array, Hash, and a String! See how this helps reuse your code? Cool huh? Also notice how an & is in front of the argument block. Then to call what is in the block I used block.call. Then I call the method, and I added a block to the end of the method that I wanted the method to print.
Procs
def print_cohort(proc) puts proc.call end proc = Proc.new { ["Andrew Dye", "Anna MacDonald", "Ayako Kurushima"] } print_cohort(proc) > Andrew Dye > Anna MacDonald > Ayako Kurushima proc = Proc.new { {1 => "Angel Baek", 2 => "Benjamin Cheng", 3 => "Christopher Thomas Pelnar"} } print_cohort(proc) > {1=>"Angel Baek", 2=>"Benjamin Cheng", 3=>"Christopher Thomas Pelnar"} proc = Proc.new { "Chris Lintecum, Morgan McCrory, Paul Clegg"] } print_cohort(proc) > Chris Lintecum, Morgan McCrory, Paul CleggProc, short for procedure, as you can see is similar to block. One difference is that I save a block of code inside a variable. Then I can call the code by using the variable. Also noticed how my print_cohort method no longer needs the &s; in front of the argument.
Lambdas
def print_cohort(lambda) puts lambda.call end l = lambda { ["Andrew Dye", "Anna MacDonald", "Ayako Kurushima"] } print_cohort(l) > Andrew Dye > Anna MacDonald > Ayako Kurushima l = lambda { {1 => "Angel Baek", 2 => "Benjamin Cheng", 3 => "Christopher Thomas Pelnar"} } print_cohort(l) > {1=>"Angel Baek", 2=>"Benjamin Cheng", 3=>"Christopher Thomas Pelnar"} l = lambda { "Chris Lintecum, Morgan McCrory, Paul Clegg"] } print_cohort(l) > Chris Lintecum, Morgan McCrory, Paul CleggHere you see lambda is exactly the same as proc. Hmm maybe I should show another example to show the difference between proc and lambda.
def cohort Proc.new { return ["Andrew Dye", "Anna MacDonald", "Ayako Kurushima"] }.call return "Can't get here" end print cohort > Andrew Dye > Anna MacDonald > Ayako Kurushima def cohort(lambda) lambda.call return "Whoops, used method wrong. I printed this instead" end l = lambda { return ["Andrew Dye", "Anna MacDonald", "Ayako Kurushima"] } print cohort(l) > Whoops, used method wrong. I printed this insteadAs you can see when a proc has a return in it, the proc stops the method and does not let it continue to that return method. While lambda returns it's object, but the method continued to still wrong and returned something I did not want. The is another difference, let me show you that example:
def cohort(proc) proc.call("Angel Baek", "Benjamin Cheng", "Christopher Thomas Pelnar") end proc = Proc.new {|a,b,c,d| "#{a}, #{b}, #{c}, #{d}"} print cohort(proc) > Angel Baek, Benjamin Cheng, Christopher Thomas Pelnar, => nil def cohort(lambda) lambda.call("Angel Baek", "Benjamin Cheng", "Christopher Thomas Pelnar") end l = lambda {|a,b,c,d| "#{a}, #{b}, #{c}, #{d}"} print cohort(l) > ArgumentError: wrong number of arguments (3 for 4)You will notice that in the call method for both proc and lambda, I passed in 3 arguments, while the code requires 4 arguments. With proc, a nil was passed to the d argument. While with lamdba, you got an error.


Hi, I'm Jed. A London based web developer specialising in JavaScript, Node.JS, HTML5 and CSS3.
I have experience with contemporary frontend technologies such as AngularJS, Backbone+Marionette, RequireJS, Grunt/Gulp build automation and REST/Express Node.JS web apps.


City of Zion dApps competition
DAPPS WINNERS
The City of Zion hosted their first dApps competition to further elevate the NEO community through collaborative engagement. Below are the winners and honourable mentions that we really felt stood out.
dAPPs Winners!
displayed below by rank
10 winners
2 Honourable mentions
1st: NEO Smart IoT
By: hal0x2328, phetter
We saw two primary benefits to smart contracts when we first learned about them — the first is being able to accept micropayments with low or no fees, and second, being able to programmatically define when and how events should take place in the real world in a deterministic and verifiable way. Neo Smart IoT incorporates both of these ideas, drawing on our experience with inexpensive IoT devices like the NodeMCU to make it easy to simply accept a payment to do a “thing”, with no middleman taking a cut of the profits.
2nd: imusify
By: DavidWalters123, geek96, Nikolaj-K, metachris
imusify is a free, blockchain based, incentified and decentralized platform for music related digital content such as audio, video, apps, images, and blogging where anyone can join, contribute and get paid $IMU.
3rd: Chain Line
By: notatestuser
The project aims to solve problems of availability and price inconsistencies of products through creation of a global, trustless, peer-to-peer network of couriers coordinating with a smart contract.
4th: BlockAuth
By: revett
BlockAuth allows users to login (authenticate) to apps and websites by invoking a NEO smart contract from a NEO address tied to the user’s account. It aims to be the Blockchain OpenID.
5th: Phantasma
By: Relfos
Phantasma is a platform where the users control their own content, instead of relying in third parties servers. The platform support any kind of transactions between users, eg: email, chat, files, money transfers. NEO was used for this project due to its fast transactions and C# support, combined with IPFS (a distributed file system) to store the actual messages, encrypted with the keys from the NEO wallets.
6th: NeoTrade
By: birmas
Inspired by Etherdelta, NeoTrade is a NEO based smart contract that allows users to deposit NEO, GAS or any other NEP-5 asset directly to the smart contract and trade amongst themselves.
7th: Turing Complete Smart Contract
By: Nikolaj-K
This was the second programming language (a year after the lambda calculus, 1935) that was shown to be what is today called computationally universal and that’s a feature now found in most popular languages. The idea is to upload code routines to the intetnal storage in a way that they can be executed from within. The demonstrated concept enables, for the chosen modules of the smart contract, a re-programming even after a contract has been deployed to the blockchain.
8th: KRYPTON
By: MediaServe
KRYPTON is a decentralized version of Skype, where your wallet is your identity. With KRYPTON you can register your identity (public address) on any available provider and communicate with other identities. Communication includes voice calling, direct messaging and directly sending money. Just like Skype you can also make outbound voice calls (PSTN) if you have some credit. The difference here is that you can use any provider and the credit will stay in your wallet, under your control. This makes switching provider easier than ever.
9th: Switcheo
By: RavenXce, henrychua, jackyeu
Switcheo is a decentralised exchange built on NEO’s blockchain. It supports trading of NEP-5 tokens and NEO system assets like GAS & NEO. It aims to be a truly decentralised exchange while still providing for a superb user experience.
10th: TripShares
By: xtolya
This dApp is made for people which are confident in their travel plans. Drivers can make a higher deposit to be sure a trip will happen, passengers can search for higher deposit trips. So everyone will be happy in any case. With the smart contract as broker you don’t need a reliable middleman to hold deposit and solve disputes.
Honourable mentions
Smart Promise
By: SergeyAnkarenko, marlyonya
Smart Promise is an electronic journal of smart promises developed through Blockchain. User of such an environment receives a reward for each of his fulfilled promises. The concept of the idea contains the possibility to get a strong motivation to action that user pointed in promise.
Sunny dApp
By: JorritvandenBerg
The contract I created unlocks funds to a user on basis of input of an oracle. This can serve as an example for many use-cases in which a pay out depends on such input.