Operating System Event Loop
Cpp
#include <boost/asio.hpp>
#include <csignal>
#include <iostream>
#define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp>
using namespace std;
namespace asio = ::boost::asio;
int main() {
asio::io_context ioc;
asio::signal_set terminationSignals(ioc, SIGINT, SIGTERM);
auto shutdown = [&](const boost::system::error_code& ec, int ) {
if (!ec) {
terminationSignals.cancel();
}
};
terminationSignals.async_wait(shutdown);
asio::post(ioc, [](){
cout << "Hello World!" << endl;
});
cout << "setup done." << endl;
// This method blocks the main thread.
ioc.run();
cout << "exiting..." << endl;
return 0;
}
JavaScript
/****** Browser ******/
// Nothing to do here: The process runs as long as the
// browser tab is not closed.
setTimeout(function(){
console.log("Hello Browser-World!");
}, 0);
/******Node.js *******/
// run for 11 days
const runTimer = setTimeout(function keepAlive(){}, 1.0e+9);
function shutdown() {
console.log("exiting...");
clearTimeout(runTimer);
}
process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);
process.nextTick(function(){
console.log("Hello Node.js-World!");
});
console.log("setup done.");
What This Code Does
Demonstrate the use of lambda functions as callbacks for basic asynchronous tasks.
- Scheduling a Hello-World-lambda for immediate deferred execution
- Quitting the program on an external
KILL
signal
It is common for a program to instruct the operating system to perform long-running computations or to respond to events from external sources. A long running computation could be copying a large file or scheduling a timer. External events can be user inputs in a GUI program, or for a server program the activity in the network for example. To avoid getting unresponsive an application typically delegates large work loads into parallel running threads or the operating system. To consume the outcome of such an operation the program must run a loop which listens to events coming from the operating system or own threads.
To reduce the complexity of a program and to make it less error-prone, it is advisable to leave the management of threads and event loops to well established third-party libraries.
What's the Same
Both examples set up an environment to support asynchronous execution. Both programs run non-blocking down to the bottom of the program without any output. We keep the program running unless the program is sent a termination signal.
| JS output | C++ output |
|
|
What's Different
Node.js
Being essentially single-threaded JavaScript can rely on it's engine for all parallel executing multi-threading stuff. Today lambda callbacks, promises, async/await etc. are baked into the language to help with asynchronous operations. The Node.js event loop starts as soon as the process starts, and ends when no further callbacks remain to be performed.
The program is kept running using a practically never-ending timer. This extra step is needed in this example because
when process.on
adds it's callback to the JS event-loop the program has already exited.
C++ with Boost.Asio
Boost.Asio
provides a platform-independent asynchronous api for common long-running tasks in networking, timers, serial ports and signals.
The outcome events are typically processed by continuations (callback functions) or can be forwarded to std::future
.
Boost.Thread v.4 provides a implementation for
future continuations as proposed in C++14 TS Extensions for Concurrency V1. C++ Futures are a general high-level abstraction for background threads.
With the .then
continuations they have much in common with the promises of JS.
The program is kept running as long as there are pending operations (i.e.)terminationSignals
scheduled to asio::io_context
.
Delay or Schedule Computations
Cpp
#include <iostream>
#include <chrono>
#include <memory>
#include <boost/asio.hpp>
using namespace std;
namespace asio = ::boost::asio;
int main() {
asio::io_context ioc;
auto keepAliveTimer = make_shared<asio::steady_timer>(
ioc, chrono::hours(11 * 24));
auto quitAfterGreetingPersonToo =
[keepAliveTimer](const boost::system::error_code& ec,
const string& name) {
if (!ec) {
cout << "Hello " << name << "!" << endl;
keepAliveTimer->cancel();
}
};
// timer begins to run now
auto greetTimer = asio::steady_timer(ioc, chrono::seconds(1));
// later we can attach the completion handler
greetTimer.async_wait(bind(
quitAfterGreetingPersonToo,
std::placeholders::_1,
"World"));
ioc.run();
return 0;
}
JavaScript
// run for 11 days
const keepAliveTimer = setTimeout(function keepAlive(){}, 1.0e+9);
function quitAfterGreetingPerson(name) {
console.log("Hello " + name + "!");
clearTimeout(keepAliveTimer);
}
const greetTimer = setTimeout(quitAfterGreetingPerson, 1000, "World");
What This Code Does
Delaying or scheduling the execution of functions, lambdas or methods on the same thread without blocking.
- Register a 11-day dummy
keepAliveTimer
to keep the program from exiting early. - Define a worker function
quitAfterGreetingPerson
which prints a greeting to the console before killing thekeepAliveTimer
. - Schedule the execution of the worker providing a parameter after one second.
What's the Same
The building blocks when registering function for execution through timers is the same. One has to specify a
- delay,
- a lambda, free function,
std::function
or bound member function and - additional parameters
What's Different
In C++ the parameters need to be provided by std::bind
while in JavaScript they are appended as
the setTimeout
arguments. (Though one could use setTimeout(quitAfterGreetingPerson.bind(undefined, "World"), 1000)
to make it look more like in C++).
In C++ the definition of the timer and the registering of the worker are separate. Thus under circumstances a timer may already be expired before a handler is registered. This is not possible in JavaScript.
C++ is very different from JavaScript in that not only the expiring, but also the canceling of a timer invokes
the same handler.
Cancellation is reported by the error code parameter e.g. boost::asio::error::operation_aborted
.
Therefore the error code needs to be checked before performing the actual scheduled computations
Destroying a Boost.Asio timer object cancels any outstanding asynchronous wait operations associated with the timer
as if by calling timer.cancel()
.
Thus to achieve similarity with JavaScript
when creating timers in C++ block scopes, e.g. lambdas, one should rather create timers on the heap with new
and share them via strong reference std::shared_ptr
with their handler. This way the timer will not
be destructed until the handler was called (i.e by timer expiry or cancellation).
Nesting Scheduling of Asynchronous Computations
Cpp
#include <iostream>
#include <chrono>
#include <memory>
#include <boost/asio.hpp>
using namespace std;
namespace asio = ::boost::asio;
int main() {
asio::io_context ioc;
auto stepTimer = asio::steady_timer(ioc, chrono::seconds(1));
stepTimer.async_wait([&ioc](const boost::system::error_code& ec) {
if (!ec) {
cout << "That's one small step for a man," << flush;
auto leapTimer = make_shared<asio::steady_timer>(
ioc, chrono::seconds(1));
// WITHOUT CAPTURING leapTimerPtr the handler would be
// invoked IMMEDIATELY with non-zero error code
leapTimer->async_wait(
[leapTimer](const boost::system::error_code& ec) {
if (!ec) {
cout << " one giant leap for mankind." << endl;
}
});
}
});
ioc.run();
return 0;
}
JavaScript
setTimeout(function(){
process.stdout.write("That's one small step for a man,");
setTimeout(function() {
console.log(" one giant leap for mankind.");
}, 1000);
}, 1000);
What This Code Does
Nesting the execution of scheduled lambdas on the same thread without blocking is demonstrated by writing the two sub sentences of Neil Armstrong's Moon-Landing quote delayed in time.
- Register a timer to call it's handler one second after program start.
- The handler prints out the first part of the quote and then schedules another timer with one second delay
- to print out the rest of the quote.
What's the Same
The nesting of asynchronously executed lambdas is demonstrated in both languages.
What's Different
In C++ the destruction of a Boost.Asio timer cancels any pending asynchronous wait operations. Since exiting a C++ block scope calls the destructor of all stack objects, we avoid this for the inner timer by creating it on the heap and manage access and lifetime by a C+ shared pointer created on the stack. In order to prevent it's reference count drop to zero and get the timer object destroyed nevertheless when the block scope exits, we have to pass a copy of it into the scheduled timeout handler.
This looks awkward because the timer object is not really used in it's completion handler. While JavaScript itself manages the lifetime of it's reference objects - like timers -; in C++ the reference counting is left to the application.
Also C++ requires checking the error code parameter of the handler to distinguish timer expiry from timer cancellation.


| I l@ve RuBoard |
This laboratory session asks you to write a few classes and experiment with some existing code. Of course, the problem with existing code is that it must be existing. To work with the set class in Exercise 5, either pull down the class source code off the Internet (see the Preface) or type it up by hand (it's fairly small). These programs are starting to get more sophisticated, so be sure to check the solutions at the end of the book for pointers. If you're pressed for time, we suspect that the last exercise dealing with composition will probably be the most fun of the bunch (of course, we already know the answers).
The basics. Write a class called Adder that exports a method add(self, x, y) that prints a "Not Implemented" message. Then define two subclasses of Adder that implement the add method:
ListAdder, with an add method that returns the concatenation of its two list arguments
DictAdder, with an add method that returns a new dictionary with the items in both its two dictionary arguments (any definition of addition will do)
Experiment by making instances of all three of your classes interactively and calling their add methods. Finally, extend your classes to save an object in a constructor (a list or a dictionary) and overload the + operator to replace the add method. Where is the best place to put the constructors and operator overload methods (i.e., in which classes)? What sorts of objects can you add to your class instances?
Operator overloading. Write a class called Mylist that "wraps" a Python list: it should overload most list operators and operations—+, indexing, iteration, slicing, and list methods such as append and sort. See the Python reference manual for a list of all possible methods to overload. Also provide a constructor for your class that takes an existing list (or a Mylist instance) and copies its components into an instance member. Experiment with your class interactively. Things to explore:
Why is copying the initial value important here?
Can you use an empty slice (e.g., start[:]) to copy the initial value if it's a Mylist instance?
Is there a general way to route list method calls to the wrapped list?
Can you add a Mylist and a regular list? How about a list and a Mylist instance?
What type of object should operations like + and slicing return; how about indexing?
Subclassing. Now, make a subclass of Mylist from Exercise 2 called MylistSub, which extends Mylist to print a message to stdout before each overloaded operation is called and counts the number of calls. MylistSub should inherit basic method behavior from Mylist. For instance, adding a sequence to a MylistSub should print a message, increment the counter for + calls, and perform the superclass's method. Also introduce a new method that displays the operation counters to stdout and experiment with your class interactively. Do your counters count calls per instance, or per class (for all instances of the class)? How would you program both of these? (Hint: it depends on which object the count members are assigned to: class members are shared by instances, self members are per-instance data.)
Metaclass methods. Write a class called Meta with methods that intercept every attribute qualification (both fetches and assignments) and prints a message with their arguments to stdout. Create a Meta instance and experiment with qualifying it interactively. What happens when you try to use the instance in expressions? Try adding, indexing, and slicing the instance of your class.
Set objects. Experiment with the set class described in this chapter (from Section 6.8.5). Run commands to do the following sorts of operations:
Create two sets of integers, and compute their intersection and union by using & and | operator expressions.
Create a set from a string, and experiment with indexing your set; which methods in the class are called?
Try iterating through the items in your string set using a for loop; which methods run this time?
Try computing the intersection and union of your string set and a simple Python string; does it work?
Now, extend your set by subclassing to handle arbitrarily many operands using a *args argument form (hint: see the function versions of these algorithms in Chapter 4). Compute intersections and unions of multiple operands with your set subclass. How can you intersect three or more sets, given that & has only two sides?
How would you go about emulating other list operations in the set class? (Hints: __ add _ _ can catch concatenation, and __ getattr __ can pass most list method calls off to the wrapped list.)
Class tree links. In a footnote in the section on multiple inheritance, we mentioned that classes have a _ _ bases __ attribute that returns a tuple of the class's superclass objects (the ones in parentheses in the class header). Use _ _ bases __ to extend the Lister mixin class, so that it prints the names of the immediate superclasses of the instance's class too. When you're done, the first line of the string representation should look like this:
<Instance of Sub(Super, Lister), address 7841200:.
How would you go about listing class attributes too?
Composition. Simulate a fast-food ordering scenario by defining four classes:
Lunch: a container and controller class
Customer: the actor that buys food
Employee: the actor that a customer orders from
Food: what the customer buys
To get you started, here are the classes and methods you'll be defining:
class Lunch: def __init__(self) # make/embed Customer and Employee def order(self, foodName) # start a Customer order simulation def result(self) # ask the Customer what kind of Food it has class Customer: def __init__(self) # initialize my food to None def placeOrder(self, foodName, employee) # place order with an Employee def printFood(self) # print the name of my food class Employee: def takeOrder(self, foodName) # return a Food, with requested name class Food: def __init__(self, name) # store food name
The order simulation works as follows:
The Lunch class's constructor should make and embed an instance of Customer and Employee, and export a method called order. When called, this order method should ask the Customer to place an order, by calling its placeOrder method. The Customer's placeOrder method should in turn ask the Employee object for a new Food object, by calling the Employee's takeOrder method.
Food objects should store a food name string (e.g., "burritos"), passed down from Lunch.order to Customer.placeOrder, to Employee.takeOrder, and finally to Food's constructor. The top-level Lunch class should also export a method called result, which asks the customer to print the name of the food it received from the Employee (this can be used to test your simulation).
Note that Lunch needs to either pass the Employee to the Customer, or pass itself to the Customer, in order to allow the Customer to call Employee methods.
Experiment with your classes interactively by importing the Lunch class, calling its order method to run an interaction, and then calling its result method to verify that the Customer got what he or she ordered. In this simulation, the Customer is the active agent; how would your classes change if Employee were the object that initiated customer/employee interaction instead?
| I l@ve RuBoard |


{% extends "home/base.html" %}
{% block content %}The platform provides great features to make sure you have a memeorable experience
Schedule client meetings easily, set agenda, record notes, assign actions, and manage history in a secure space.
Design your clients personal and business vision, business values and 90 day action plans assigned to business team members.
Clients can effectively manage their business development contact funnel (lead, prospect, customer)through to the sales pipeline to ensure monthly budgets are achieved.


By Tynan's recommendation, I downloaded Sebastian Marshall's ebook Ikigai. He poses that leading a meaningful life is a very different ambition from the all-too-commonly sought-after notion of "happiness". Too often, according to Marshall, we seek happiness as the pinnacle of human experience, without first considering its self-involved implications.
In Ikigai, Sebastian makes several reading recommendations, one of which I took immediately. How to Win Friends & Influence People by Dale Carnegie, evidently, is a classic guide to human interpersonal relationships. Though the book is extensive and draws several practical points about successful interpersonal relationships by example, it all really boils down to the Golden Rule: Do unto others as you would have them do to you.
What does that mean, exactly? The notion that we should treat others as we prefer to be treated is abstract and difficult to make actionable. We feel most valued, most respected, and most connected when our own interests are put first. So, in order to elicit that feeling in others, we need only put their concerns above ours.
I'm on a trip to Brooklyn this week and have been using my being surrounded by eight million strangers as fodder for my social engineering exploits. So far, my experiments have validated Carnegie's hypotheses swimmingly. I used to have a bad habit of interrupting others mid-sentence, of concocting a retort before my conversational companion had finished their thoughts. This week, I've focused on reversing that pattern.
On the plane ride here, I was seated next to a bearded fellow reading a book in Hebrew. I leaned over and asked if it was the Torah. He explained to me that it was actually the New Testament of the Bible. Interested, I prodded further, and he revealed to me that he was a creationist. Rather than condemn his beliefs as stifling progress and disrupting scientific education, I chose to listen. And, as I listened, I realized this man was actually more intelligent and more informed about science than I was. Even if I didn't leave the conversation convinced that his point of view was correct, I left it feeling humbled about my own.
I've made a point to ask more questions in place of my own rhetoric. People love to talk about themselves. And, if the foundation of our lives is other people, it follows that we should be fascinated and humbled by all of them one way or another. If you listen, you find that every single person you talk to has something valuable to say.
And that's exactly why I advocate this approach. It's one thing to be an altruist, but that's not in our nature. What is in our nature is to change behavior in order to obtain value. And, given that all value, whether economic, social, or political, is derived from other people, it follows that we want them to value our company. It's just a matter of cherishing theirs first.


libskarnet
skalibs
Software
skarnet.org
libdatastruct implements generic data structures like chained lists and AVL trees, in a memory-efficient and CPU-efficient way.
skalibs/datastruct.h is a collection of several headers, each one defining a specific data structure and providing functions to work on it.


{% extends "admin/base.html" %} {% block body %} {%if p.message%}
Are you sure you want to delete the site?
incoming url: {{ proxy.inc_url }}
outgoing url: {{ proxy.out_url }}


This module provides the ability to validate cells upon change.
Validation is not based on angularjs validation, since it would work only when editing the field.
Instead it adds custom properties to any field considered as invalid.


You can make £280 extra from the general election - no qualifications needed
Councils up and down the land are after poll clerks and assistants to get them through the last minute general election - and it you're fast, you can earn a few pounds in time for Christmas from the process
by Emma Munbodh, https://www.facebook.com/EmmaMunbodhA general election is looming - on December 12 millions of people will be called to polling booths across the UK to cast their votes for the next Government.
It's a great time to check you're registered to vote - a move that could also add hundreds of pounds to your bank balance by boosting your credit score - but that's not the only way to cash in.
That's because if you're free on the day of the vote itself there are hundreds of jobs going and there are no qualifications needed.
By signing up as a poll clerk, you could earn hundreds, by helping out with the election at schools and public spaces all over the country.
You can register for these roles by popping into your local civic centre - if there are no vacancies left, you can pop your name down on the waiting list instead.
Poll clerks and presiding officers are needed to help and oversee the setting up of stations and databases on the day itself.
These workers are required right throughout the day - from 7am-10pm, and possibly around 45 minutes earlier to set up.
Staff are not permitted to leave the premises during polling hours in order to maintain the secrecy of the vote. You must not wear any colours relating to any Political Party.
Other roles include counting assistants, which are needed from midnight onwards, to gather up the votes, count them and recount where necessary.
Runners are also required to collect ballot boxes from polling stations and take them to be counted - a side hustle that could make you a little extra cash on the day.
The good news is anyone can apply for these roles - you don't need to be tied to a party or working for the Government to apply.
However, for obvious reasons, you cannot apply if you've worked for a political party or candidate in the election.
To sign up, you'll need to contact your local council to see if it's recruiting.
How much can I earn by helping in the election?
This varies by council, however some of the local authorities we've seen recruiting are willing to pay a reasonable sum for your time.
Croydon Council's current fee for poll clerks is £255, which includes a £30 fee for the completion of training beforehand.
Tonbridge & Malling Borough Council is offering £185 for poll clerks (including travel and training) and £280 for a presiding officer to oversee the process. Counting assistants can earn £10 an hour.
Bristol Council will pay its clerks £113 and counting assistants £80 for the day, while Hart Council will pay presiding officers £255 and £160 to the day's poll clerks. All other assistants can earn £14 to £17 an hour.
Gloucester City Council will also pay poll clerks £134.00 and £216.00 for presiding officers.
In Richmondshire, North Yorkshire, you could pocket £214 as a presiding officer and £130 as a poll clerk, plus £10 an hour for training beforehand.


The activity takes two common attributes, "Amount", which specifies the number of units to wait (the internal attribute name is indeed "TIMER_WAIT") and "Unit" for the wait amount (Seconds, Minutes, or Hours, and default to Minutes).
This attribute can also take a binding expression instead of a fixed
number. For example, you can specify "$myvar
", which is a variable
that is supposed to contain an integer value indicating the number
of minutes to wait. You can use either Java code or script language
to calculate the value dynamically.
Alternatively, you can subclass this implementor
and override the method int getWaitPeriodInSeconds()
to achieve the desired customization. If you do go this way,
you may need to customize the implementor descriptor in the designer
so that the two attributes are not shown.
To wait for a particular date and time, you can calculate the number of minutes from the time the activity is invoked to the desired date and time.
Note that in the case when you do not need to wait, rather than returning
0 or negative numbers in getWaitPeriodInSeconds()
, you should
return DEFAULT_WAIT
, which is defined as 30 (seconds). The reason
for this is to avoid race condition, as returning 0 will immediately trigger
a JMS message to resume the activity instance.
EventWaitActivity
to register
the event waits (following this link
for details of event wait registration and additional details).
When the activity instance receives an event before the timer expires, it can be left in one of the 3 statuses:
To provide custom code handling unsolicited events, you will need to override
processOtherMessage(String message)
.
The method is passed in with one argument, which is the entire message. The default
method does nothing. The completion code after processing the message is configured
in the designer, but you can override it in the code by invoking setReturnCode()
.
A word of caution: the wait is implemented via delayed JMS resume messages, so it depends on the persistence of JMS message store provided by the container. In current ECOM practice, a new WLS domain is created for every new release, so the deployment process needs to include a step to copy JMS file store from the old domain to the new domain.
We must emphasize that this feature is not recommended, due to the fact that polling may take a lot more CPU resources. The recommended approach is to use the event wait activity.
There are two ways to use these feature. The first way is very similar
to that of work transition validator in MDW 3.*.
You specify a custom validator in the attribute Custom Validator
,
which must be a class name. That class must implement the interface
com.centurylink.mdw.workflow.work.transition.validation.WorkTransitionValidator
(the name is kept for backward compatibility reasons).
The class must implement 3 methods of the interface:
void prepare(Long activityId, Long processInstanceId, String eventType,
VariableInstanceInfo[] variableInstances)
: this is invoked
by the engine when the timer expires (first and later times) to initialize
the custom validator. The eventType
parameter is always passed in
as null. boolean canWorkTransitionNow()
: this methods must return true
if we finish waiting and needs to move on to next activity based on
process definition, and it must return false if we need to wait further.
The amount of time to wait further is determined by the next method.Integer getRevalidationIntervalInMin()
: in case further
wait is needed, this method needs to return the time span (in minutes)
of the new waiting period. Note the initial wait period is not determined
by this method, rather by the common attributes discussed above.boolean processTimerExpiration()
.
Your method needs to return true when no more wait is needed,
and must invoke void sendDelayedResumeMessage(int seconds)
and return false when further delay is needed.
The following is a sample implementation of the method.
protected boolean processTimerExpiration() throws ActivityException { // determine number of seconds to wait further // a 0 or negative number indicates no further wait is needed int seconds = customLogicToDetermineHowLongToWait(); if (seconds>0) { logger.info("Wait for additional " + seconds + " seconds"); sendDelayedResumeMessage(seconds); return false; } else return true; }


Absolute element comes out of the flow. Absolute work relative to positioned ancestral element. Any element having position not as static is considered positioned.
The top, left, bottom, right css properties work as it is.
Red
Green with parent relative
Blue
Red
Green with parent absolute
Blue


January 24th, 2019
What did I do during my winter break? When I was coming to the last week of break, I was thinking about what I have learned or how this break has helped me to explore my interests. One month break during my college is really useful for me, and I had many plans for this break, but the most important one was to regain my sleep. Apart from my sleep, I had five important things to do during the break and they are Python Certification, C Lessons, Write Blogs, Meet Old Friends, Learn HTML (and of course catch up with all the TV shows and movies)
Goal One: Python Entry Level Certification from Python Institute. I have worked on Python all of summer 2019 and took CS 111 (A Python based class), and I love python. It is one of the best languages to code because of its syntax and great libraries. To let everyone know that I have a good grip on python, was through this exam. Immediately after my last final exam(CS 111 Law) of semester one, I started preparing for this exam. I took four days to review and write all the sample tests, and took the exam and passed the test. My entire first week’s focus was on this exam and I, finally was able to do great on the exam.
Goal Two: Learn C , many people might think, why I chose this language and how will this help me. The only reason I started studying C was for next semester’s class (CS 141). I always love giving myself a head start in everything, so I started learning the syntax from the second week of break, even though it took three weeks to get really comfortable, I started enjoying C , as much as python. I strongly believe C classes, pointers, and Linked Lists were a few of the best concepts I have learned in my lifetime.
Goal Three: Writing Blogs, I needed some time to experiment in my writing. I really didn’t want to sound the same in all of the blogs, so I took time and researched different writing techniques and wrote a few blogs.
Goal Four: Meeting your old friends. Finally, after six months, I went back to Naperville North and met some of my old friends, along with a few people outside of school, and had great conversations with my old teachers, I relived the moments.
Goal five: Learn HTML, finally I am proud, it happened; I always wanted to learn HTML for years, but I have no idea why I never started it . After my web-crawler project in CS 111, I was fascinated about HTML, and now I am happy I completed the course. Now I realize, HTML is nothing without CSS and JavaScript. It’s time for new languages!
Winter Break flew by, and I realized time management is not only a key during the school year, but it was also very helpful during the break, I was able to sleep more, I did certifications from IBM and Python Institute, I watched a lot of TV shows, and I met so many of my old friends. When you plan your break perfectly, you can enjoy it more and you will always have time to explore your interests more.
Tip: For your next break, divide your time and conquer with success.


Canada and USA have the two highest medal counts out of all the countries that have participated in the Winter Olympics between 1924 and 2014. Let's take a deeper dive into the data and further assess their performances to see how they truly matched up against one another.
After looking at the two figures provided, it can be seen that in terms of overall medal count, USA is victorious over Canada by a small margin. As shown in the pie chart out of the combined medal total of the two countries, 48.9% of the medals are won by Canada and 51.1% of medals are won by USA. However, if assess the performance of the two countries by looking at their performances in individual medal categories, Canada actually seems to have performed better than USA. If we look solely at the gold medal category, Canada blows USA out of the water by winning nearly double the number of medals. Canada also has relatively fewer third place finishes than USA. Though at first glance it may seem that USA are the victors of this rivalry, upon analyzing the data it can be seen that Canada actually had a better performance overall.
If we arrange the data in terms of the total medal count of each country and provide them with rankings based on this, the countries with the top five rankings are USA, Canada, Norway, Soviet Union and Finland. All of these countries with the exception of the Soviet Union have remained as one country and thus have consistently competed under the same country name in all of the winter Olympics. Due to the civil and political disputes that have taken place in Germany over the past century, it has faced a number of divisions as a country. Consequently, in the Olympic data, there are four different country categories listed for Germany. For this comparison, let's assume that Germany remained as one country throughout the past century, combine its medal totals, and see where it lands in the overall rankings in this scenario.
If we look at the first graph and compare Germany's combined medal total to the top five highest ranked countries, Germany passes Canada to take second place behind USA with 627 total medals. This makes Germany one of three countries to break the 600 medal mark. But let's see how they fared when looking at individual medal categories compared to Canada and USA. As shown in the second figure, Canada still remains untouched in the gold medal category. However, Germany does pass USA with its combined 226 gold medals compared to USA's 167. In terms of overall performance, Canada still remains in the lead, however, USA is no longer the only country giving us competition.
In this comparison, the data is being used to assess whether men or women won more medals overall. Given that in the early years of the winter Olympics, women's participation was minimal, and majority of the participants were men, they are the ones who likely won the greater number of medals between the two subgroups. Also, we will take a look at the trajectory of total medals won by each subgroup throughout all of the Olympics that have taken places and assess the trends. If the two trajectories were placed on a line plot, there would likely be a big gap in the number of total medals won by each sub group that would be in favor of the men. However, given that women's participation in the Olympics increased over the decades, it is reasonable to infer that the gap between the two sub groups closes as we move closer to 2014. Lets take a look.
As predicted, majority of the total medals have been won by the subgroup of men which has approximately 2/3 of the total medals. Once again this is likely due women's lack of participation in the early years of the Olympics. As for the trejectories of the two sub groups, both have an upward direction indicating that the participation for each subgroup has been increasing since the first winter Olympics. Once again, as predicted, there is a large gap in the trajectories of the two subgroups in the early years of the Olympics, however, as the data gets closer to 2014, the gap is also shown to be getting smaller and smaller. This shows that the number of women participating in the winter Olympics is becoming closer and closer to the number of men.


|
MoraLife
1.3.4
A Digital Conscience for your iOS device.
|
Conscience Interaction Workflow. More...
#import <ConscienceViewController.h>
Instance Methods | |
| (IBAction) | - selectChoice: |
| Accepts User input to change the state of the screen. More... | |
| (IBAction) | - dismissThoughtModal: |
| Accepts User input to determine which version screen to present. More... | |
| (IBAction) | - returnToHome: |
| Accepts User input to cancel Conscience Interaction Workflow. More... | |
| Instance Methods inherited from MoraLifeViewController | |
| (id) | - initWithNibName:bundle:modelManager:andConscience: |
| Nib version of Init that creates the viewController with the User's Conscience. More... | |
| (id) | - initWithModelManager:andConscience: |
| Creates the viewController with the User's Conscience. More... | |
| (UIImage *) | - prepareScreenForScreenshot |
| Clears the conscience off the screen before taking a screenshot. More... | |
| Instance Methods inherited from <ViewControllerLocalization> | |
| (void) | - localizeUI |
| Should provide AccessibiltyHints and Accessibility Labels for all UI. More... | |
| Instance Methods inherited from <UserConscienceTouchProtocol> | |
| (void) | - userConscienceTouchBegan |
| Action when the User has began touching the Conscience. More... | |
| (void) | - userConscienceTouchEnded |
| Action when the User has stopped touching the Conscience. More... | |
Properties | |
| UIImage * | screenshot |
| screenshot of previous screen for transition More... | |
Additional Inherited Members | |
| Protected Attributes inherited from MoraLifeViewController | |
| ModelManager * | _modelManager |
| UserConscience * | _userConscience |
| ConscienceHelpViewController * | _conscienceHelpViewController |
Conscience Interaction Workflow.
Implementation: Present a menu of options to User.
View controller for selecting menu choices from thought bubble menu.
Primary screen in the Conscience Interaction Workflow. User experience changes to fanciful thought bubble paradigm.
Only interaction with the Conscience is available from this workflow. User can change Conscience, answer Morathology dilemmas and see Moral Reports.
Determine what information needs to be passed to subsequent UIViewController depending upon User Choice. User selection causes selectChoice to be called which sets the currentState variable to which version of the screen should be presented.
| - (void) dismissThoughtModal: | (id) | sender |
Accepts User input to determine which version screen to present.
Implementation: Determine what type of dismissal is appropriate depending on version of the View.
| sender | id of object which requested method |
May pop UIViewController from stack
| - (IBAction) returnToHome: | (id) | sender |
Accepts User input to cancel Conscience Interaction Workflow.
Implementation: Signals User desire to return to ConscienceViewController.
| sender | id of object which requested method |
| - (IBAction) selectChoice: | (id) | sender |
Accepts User input to change the state of the screen.
Implementation: Determines which view was requested by User, changes currentState of screen for subsequent view changes.
| sender | id of object which requested method |
Determines if current screen should change or if another UIViewController needs to be loaded.
|
readwritenonatomicstrong |
screenshot of previous screen for transition


Chronicle has detected a configuration error
It appears that your web server is not configured correctly.
- If you are using Apache, please ensure the ".htaccess" file is present and that you have set "AllowOverride All" for this site.
Please ensure you restart your web server after making any changes.


--- layout: post status: publish published: true title: WinFS author: display_name: Tomas Restrepo login: tomasr email<EMAIL_ADDRESS>url: http://winterdom.com/ author_login: tomasr author_email<EMAIL_ADDRESS>author_url: http://winterdom.com/ wordpress_id: 597 wordpress_url: http://winterdom.com/2004/01/winfs date: '2004-01-04 16:26:33 +0000' date_gmt: '2004-01-04 16:26:33 +0000' categories: - Development tags: [] comments: [] ---
Don Box posts a few interesting comments on WinFS, two of which I wanted to comment on:
"To me (and perhaps to Tim), the most important feature of WinFS is that all application data is now transparent."
*Cough* *Cough*. Transparent? Excuse me if I'm somewhat skeptical.
"In a WinFS-based world, anyone can access an application's data without having to program/script the application (or even load the application code at all).
"
That would already be possible if applications just stored their information on plain text files, or XML files instead of propietary binary files. Just because the data is accesible doesn't mean you a) know what it means, and b) know what to do with it, and c) can manipulate it safely.
Now, I'll admit to not having looked at WinFS much myself, and I certainly know I'm no match for Don, but still, I find these kinds of comments funny. Why? Well, the whole enterprise level movement seems to be pushing away from exactly this kind of behavior, moving towards SOA and away from directly accesing other application's data repositorios (a good thing, imho). So... exactly what is it that makes you think this is gonna fly at the desktop level?
Don't think I'm against WinFS per se... I think being able to take advantage of these OS services instead of having to code them again time after time for each app is a really nice, but I don't think that everyone touching applications data directly is going to be a great think... just wait till you start getting all those support calls from developers who did it and now find that they corrupt Outlook V.Next.Next data repository ;)


Here is a list of the available configuration options:
| Name | Requirement | Description | Sample Value
|
| Port | optional | This parameter determines the port to use for announcing log events. The default port is 23 (telnet). | 5875 |
Public Member Functions | |
| TelnetAppender () | |
| ~TelnetAppender () | |
| virtual bool | requiresLayout () const |
| This appender requires a layout to format the text to the attached client(s). | |
| LogString | getEncoding () const |
| void | setEncoding (const LogString &value) |
| void | activateOptions (log4cxx::helpers::Pool &p) |
| all of the options have been set, create the socket handler and wait for connections. | |
| virtual void | setOption (const LogString &option, const LogString &value) |
| Set options. | |
| int | getPort () const |
| Returns value of the Port option. | |
| void | setPort (int port1) |
| The Port option takes a positive integer representing the port where the server is waiting for connections. | |
| void | close () |
| shuts down the appender. | |
Protected Member Functions | |
| virtual void | append (const spi::LoggingEventPtr &event, log4cxx::helpers::Pool &p) |
| Handles a log event. | |
Friends | |
| class | SocketHandler |
|
|
|
|
|
|
|
|
all of the options have been set, create the socket handler and wait for connections.
Reimplemented from AppenderSkeleton. |
|
|
Handles a log event. For this appender, that means writing the message to each connected client. Implements AppenderSkeleton. |
|
|
shuts down the appender.
Implements Appender. |
|
|
|
|
|
Returns value of the Port option.
|
|
|
This appender requires a layout to format the text to the attached client(s).
Implements Appender. |
|
|
|
|
|
Set options.
Reimplemented from AppenderSkeleton. |
|
|
The Port option takes a positive integer representing the port where the server is waiting for connections.
|
|
|
|


class REXML::Entity
Constants
- ENTITYDECL
- ENTITYDEF
- ENTITYVALUE
- EXTERNALID
- GEDECL
- NDATADECL
- PEDECL
- PEDEF
- PEREFERENCE
- PEREFERENCE_RE
- PUBIDCHAR
- PUBIDLITERAL
- SYSTEMLITERAL
Attributes
Public Class Methods
Evaluates whether the given string matches an entity definition, returning true if so, and false otherwise.
# File lib/rexml/entity.rb, line 66 def Entity::matches? string (ENTITYDECL =~ string) == 0 end
Create a new entity. Simple entities can be constructed by passing a name, value to the constructor; this creates a generic, plain entity reference. For anything more complicated, you have to pass a Source
to the constructor with the entity definition, or use the accessor methods. WARNING
: There is no validation of entity state except when the entity is read from a stream. If you start poking around with the accessors, you can easily create a non-conformant Entity
.
e = Entity.new( 'amp', '&' )
REXML::Child::new
# File lib/rexml/entity.rb, line 33 def initialize stream, value=nil, parent=nil, reference=false super(parent) @ndata = @pubid = @value = @external = nil if stream.kind_of? Array @name = stream[1] if stream[-1] == '%' @reference = true stream.pop else @reference = false end if stream[2] =~ /SYSTEM|PUBLIC/ @external = stream[2] if @external == 'SYSTEM' @ref = stream[3] @ndata = stream[4] if stream.size == 5 else @pubid = stream[3] @ref = stream[4] end else @value = stream[2] end else @reference = reference @external = nil @name = stream @value = value end end
Public Instance Methods
Returns the value of this entity unprocessed – raw. This is the normalized value; that is, with all %ent; and &ent; entities intact
# File lib/rexml/entity.rb, line 85 def normalized @value end
Returns this entity as a string. See write().
# File lib/rexml/entity.rb, line 119 def to_s rv = '' write rv rv end
Evaluates to the unnormalized value of this entity; that is, replacing all entities – both %ent; and &ent; entities. This differs from +value()+ in that value
only replaces %ent; entities.
# File lib/rexml/entity.rb, line 73 def unnormalized document.record_entity_expansion unless document.nil? v = value() return nil if v.nil? @unnormalized = Text::unnormalize(v, parent) @unnormalized end
Returns the value of this entity. At the moment, only internal entities are processed. If the value contains internal references (IE, %blah;), those are replaced with their values. IE, if the doctype contains:
<!ENTITY % foo "bar"> <!ENTITY yada "nanoo %foo; nanoo>
then:
doctype.entity('yada').value #-> "nanoo bar nanoo"
# File lib/rexml/entity.rb, line 134 def value if @value matches = @value.scan(PEREFERENCE_RE) rv = @value.clone if @parent sum = 0 matches.each do |entity_reference| entity_value = @parent.entity( entity_reference[0] ) if sum + entity_value.bytesize > Security.entity_expansion_text_limit raise "entity expansion has grown too large" else sum += entity_value.bytesize end rv.gsub!( /%#{entity_reference.join};/um, entity_value ) end end return rv end nil end
Write out a fully formed, correct entity definition (assuming the Entity
object itself is valid.)
- out
-
An object implementing
<<
to which the entity will be output - indent
-
DEPRECATED and ignored
# File lib/rexml/entity.rb, line 97 def write out, indent=-1 out << '<!ENTITY ' out << '% ' if @reference out << @name out << ' ' if @external out << @external << ' ' if @pubid q = @pubid.include?('"')?"'":'"' out << q << @pubid << q << ' ' end q = @ref.include?('"')?"'":'"' out << q << @ref << q out << ' NDATA ' << @ndata if @ndata else q = @value.include?('"')?"'":'"' out << q << @value << q end out << '>' end


We've received a request to reset the password of an account associated with your email. If you've requested us, please click on the following button or browse the link on a browser.
https://compcoder.cc/password_reset?token=sabdiuerywr7328r24918o2uiedcsnkjie8rgyfiwdcshui


--- layout: post title: no title date: '2015-05-25T19:30:26+02:00' categories: - Storyboards picture_url: https://film-Storyboards.tumblr.com/post/119894439658 ---


Tracking Iran-related U.S. Sanctions Designations
IR vs NON-IR   IRGC   Human Rights Status   Terrorism Status   Non-Proliferation Status/WMD


| DOSE: |
repeated |
oral |
GBL |
(daily) |
I used GBL constantly for over a year.I panicked when I didn't have a full bottle in my pocket. One day I ran out for 12 hours. A few hours longer and I would have killed myself.
My tolerance was unbelievable. Towards the last month, I would sleep for 1/2 hour a night and only by doubling my dose. I knew that soon, the next overdose would be my last. So, I went to the only place I could for help--my parents. They told me I looked like a corpse when I got off the plane.
I thought I could slowly taper off and fill-in with Xanex. My parents where totally clueless on what I was going through. My Mom made me a tapering schedule. I couldn't do it. I finally told my Mom to throw it away and take me to the emergency room if it got too bad. From that point on, I don't remember the next 3 weeks of my life.
My dear, wonderful mother sat beside for 3 weeks as I cried almost non-stop and hallucinated. Xanex helps, but beware of it. There is no amount of Xanex that will make the withdrawal easy (and I had a lot of it). When I finally came around, I ran out of Xanex and could not get more. The Xanex addiction was just as bad as the GBL withdrawal.
Mine was an extreme case.I don't want to scare you. But I started using it 'once in a while' and it turned into the only thing in my life.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Window : Ctrl + Mayúscula + J MAC: Cmd + Opción + J A small example of styles in the Chrome console To move the piece indicate the initial position, followed by the final position Example: Move white pawn to D4 -> d2d4 or D2D4
Note: It is a proof of concept, does not validate the movements of the pieces, nor does it have artificial intelligence. Tested in Chrome 63.
Jorge Rubiano @ostjh


Developer, your party starts here!
Which your current role?
What do you do think about homework?
What would you like to learn? (Check all that apply)
Backend Framework
Frontend Framework
What is your dream?
Please, comment on your previous answer:


Override Detection
list item is green
list item is blue
list item is blue
list item is blue
list item is red


Homepage
Map
About
Contact Us
Search
Natural Areas Mapping Project
Locations Gallery
Riverdale Park East
High Park
Cedarvale Park
Riverdale Park West
Don Valley Brickworks
Trinity Bellwoods Park
Allan's Gardens
Sir Winston Churchill Park


Astral is a python package for calculating the times of various aspects of the sun and phases of the moon.
It can calculate the following
The time in the morning when the sun is a specific number of degrees below the horizon.
The time in the morning when the top of the sun breaks the horizon (asuming a location with no obscuring features.)
The time when the sun is at its highest point directly above the observer.
The time when the sun is at its lowest point.
The time in the evening when the sun is about to disappear below the horizon (asuming a location with no obscuring features.)
The time in the evening when the sun is a specific number of degrees below the horizon.
The time when the sun is up i.e. between sunrise and sunset
The time between astronomical dusk of one day and astronomical dawn of the next
The time between dawn and sunrise or between sunset and dusk
The time when the sun is between 4 degrees below the horizon and 6 degrees above.
The time when the sun is between 6 and 4 degrees below the horizon.
the time when the sun is at a specific elevation for either a rising or a setting sun.
The number of degrees clockwise from North at which the sun can be seen
The angle of the sun down from directly above the observer
The number of degrees up from the horizon at which the sun can be seen
“Rahukaalam or the period of Rahu is a certain amount of time every day that is considered inauspicious for any new venture according to Indian Vedic astrology”.
The phase of the moon for a specified date.
Astral also comes with a geocoder containing a local database that allows you to look up information for a small set of locations (new locations can be added).
Note
The Google Geocoder has been removed. Instead you should use the Google Client for Google Maps Services https://github.com/googlemaps/google-maps-services-python
The following examples demonstrates some of the functionality available in the module
>>> from astral import LocationInfo
>>> city = LocationInfo("London", "England", "Europe/London", 51.5, -0.116)
>>> print((
f"Information for {city.name}/{city.region}\n"
f"Timezone: {city.timezone}\n"
f"Latitude: {city.latitude:.02f}; Longitude: {city.longitude:.02f}\n"
))
Information for London/England
Timezone: Europe/London
Latitude: 51.50; Longitude: -0.12
>>> import datetime
>>> from astral.sun import sun
>>> s = sun(city.observer, date=datetime.date(2009, 4, 22))
>>> print((
f'Dawn: {s["dawn"]}\n'
f'Sunrise: {s["sunrise"]}\n'
f'Noon: {s["noon"]}\n'
f'Sunset: {s["sunset"]}\n'
f'Dusk: {s["dusk"]}\n'
))
Dawn: 2009-04-22 04:13:04.923309+00:00
Sunrise: 2009-04-22 04:50:16.515411+00:00
Noon: 2009-04-22 11:59:02+00:00
Sunset: 2009-04-22 19:08:41.215821+00:00
Dusk: 2009-04-22 19:46:06.362457+00:00
Note
The example above calculates the times of the sun in the UTC timezone. If you want to return times in a different timezone you can pass the tzinfo parameter to the function.
s = sun(city.observer, date=datetime.date(2009, 4, 22), tzinfo=city.timezone)
In versions prior to 2.2 you’ll need to pass a pytz timezone as tzinfo e.g.
s = sun(city.observer,
date=datetime.date(2009, 4, 22),
tzinfo=pytz.timezone(city.timezone))
>>> import datetime
>>> from astral import moon
>>> moon.phase(datetime.date(2018, 1, 1))
13.255666666666668
The moon phase method returns an number describing the phase, where the value is between 0 and 27.99. The following lists the mapping of various values to the description of the phase of the moon.
0 .. 6.99 |
New moon |
7 .. 13.99 |
First quarter |
14 .. 20.99 |
Full moon |
21 .. 27.99 |
Last quarter |
If for example the number returned was 27.99 then the moon would be almost at the New Moon phase, and if it was 24.00 it would be half way between the Last Quarter and a New Moon.
Note
The moon phase does not depend on your location. However what the moon actually looks like to you does depend on your location. If you’re in the southern hemisphere it looks different than if you were in the northern hemisphere.
See http://moongazer.x10.mx/website/astronomy/moon-phases/ for an example.
For an example of using this library to generate moon phases including the names in various languages and the correct Unicode glyphs see the project by PanderMusubi on Github.
>>> from astral.geocoder import database, lookup
>>> lookup("London", database())
LocationInfo(name='London', region='England', timezone='Europe/London',
latitude=51.473333333333336, longitude=-0.0008333333333333334)
Note
Location elevations have been removed from the database. These were added due to a misunderstanding of the affect of elevation on the times of the sun. These are not required for the calculations, only the elevation of the observer above/below the location is needed.
See Effect of Elevation below.
If you only need a single location that is not in the database then you can
construct a LocationInfo
and fill in the values, either on
initialization
from astral import LocationInfo
l = LocationInfo('name', 'region', 'timezone/name', 0.1, 1.2)
or set the attributes after initialization:
from astral import LocationInfo
l = LocationInfo()
l.name = 'name'
l.region = 'region'
l.timezone = 'US/Central'
l.latitude = 0.1
l.longitude = 1.2
Note
name and region can be anything you like.
You can add to the list of available locations using the
add_locations()
function and passing either a string
with one line per location or by passing a list containing strings, lists or
tuples (lists and tuples are passed directly to the LocationInfo constructor).
>>> from astral.geocoder import add_locations, database, lookup
>>> db = database()
>>> try:
... lookup("Somewhere", db)
... except KeyError:
... print("Somewhere not found")
...
Somewhere not found
>>> add_locations("Somewhere,Secret Location,UTC,24°28'N,39°36'E", db)
>>> lookup("Somewhere", db)
LocationInfo(name='Somewhere', region='Secret Location', timezone='UTC',
latitude=24.466666666666665, longitude=39.6)
The times of the sun that you experience depend on what obscurs your view of it. It may either be obscured by the horizon or some other geographical feature (e.g. mountains)
If what obscures you at ground level is the horizon and you are at a elevation above ground level then the times of the sun depends on how far further round the earth you can see due to your elevation (the sun rises earlier and sets later).
The extra angle you can see round the earth is determined by calculating the angle α in the image below based on your elevation above ground level, and adding this to the depression angle for the sun calculations.
If your view is obscured by some other geographical feature than the horizon, then the adjustment angle is based on how far you are above or below the feature and your distance to it.
For the first case i.e. obscured by the horizon you need to pass a single float to the Observer as its elevation. For the second case pass a tuple of 2 floats. The first being the vertical distance to the top of the feature and the second the horizontal distance to the feature.
Even though an observer’s elevation can significantly affect the times of the sun the same is not true for the elevation angle from the observer to the sun.
As an example the diagram below shows the difference in angle between an observer at ground level and one on the ISS orbiting 408 km above the earth.
The largest difference between the two angles is when the angle at ground level is 1 degree. The difference then is approximately 0.15 degrees.
At the summit of mount Everest (8,848 m) the maximum difference is 0.00338821 degrees.
Due to the very small difference the astral package does not currently adjust the solar elevation for changes in observer elevation.
When viewing the sun the position you see it at is different from its actual position due to the effect of atmospheric refraction which makes the sun appear to be higher in the sky. The calculations in the package take this refraction into account.
The sunrise()
and sunset()
functions
use the refraction at an angle when the sun is half of its apparent diameter
below the horizon. This is between about 30 and 32 arcminutes and for the
astral package a value of 32” is used.
Note
The refraction calculation does not take into account temperature and pressure which can affect the angle of refraction.
When creating a datetime object in a specific timezone do not use the
tzinfo parameter to the datetime constructor. Instead use the
localize()
method provided by pytz on the correct pytz
timezone:
>>> dt = datetime.datetime(2015, 1, 1, 9, 0, 0)
>>> pytz.timezone('Europe/London').localize(dt)
datetime.datetime(2015, 1, 1, 9, 0, tzinfo=<DstTzInfo 'Europe/London' GMT0:00:00 STD>)
Astral has one required external Python dependency on pytz.
To install Astral you should use the pip tool:
pip3 install astral
Note
Now that we are Python 3 only and pip provides a versioned executable on Windows you should use the pip3 command on all operating systems to ensure you are targetting the right Python version.
The module includes location and time zone data for the following cities. The list includes all capital cities plus some from the UK. The list also includes the US state capitals and some other US cities.

Refraction calculation is taken from
Sun-Pointing Programs and Their AccuracyJohn C. Zimmerman Of Sandia National Laboratones
Which cites the following as the original source
In Solar Energy Vol 20 No.5-CRobert Walraven Of The University Of California, Davis
The moon phase calculation is based on some javascript code from Sky and Telescope magazine
Moon-phase calculationRoger W. Sinnott, Sky & Telescope, June 16, 2006.
Also to Sphinx for making doc generation an easy thing (not that the writing of the docs is any easier.)
Simon Kennedy<EMAIL_ADDRESS>Version |
Description |
|---|---|
2.2 |
Fix for bug #48 - As per the bug report the angle to adjust for the effect of elevation should have been θ (not α). The sun functions can now also be passed a timezone name as a string. Previously only a pytz timezone was accepted. |
2.1 |
Fix for bug #44 - Incorrectly raised exception when UTC sun times were on the day previous to the day asked for. Only manifested for timezones with a large positive offset. |
2.0 |
This is a code refactor as well as an update so it is highly likely that you will need to adapt your code to suit. Astral, AstralGeocoder & GoogleGeocoder classes removed Now only compatible with Python 3.6 and greater due to the use of data classes New New Geocoder functions return a All calculations now automatically adjust for refraction. For elevation you can return the true angle by setting the with_refraction parameter to False. The solar_noon and solar_midnight functions have been renamed to
Rahukaalam can now be calculated for night times. |
1.10.1 |
Keyword args are now passed to the geocoder class from Astral __init__ in order to allow the Google Maps API key to be passed to the GoogleGeocoder. |
1.10 |
Added support to AstralGeocoder to add additional locations to the database. |
1.9.2 |
1.9 broke the sun_utc method. Sun UTC calculation passed incorrect parameter to more specific methods e.g. sunrise, sunset etc. |
1.9.1 |
Correct version number in astral.py |
1.9 |
Now takes elevation into account. |
1.8 |
Location methods now allow the timezone to be None which returns all times as UTC. Added command line interface to return ‘sun’ values |
1.7.1 |
Changed GoogleGeocoder test to not use raise…from as this is not valid for Python 2 |
1.7 |
Requests is now only needed when using GoogleGeocoder GoogleGeocoder now requires the api_key parameter to be passed to the constructor as Google now require it for their API calls. |
1.6.1 |
Updates for Travis CI integration / Github signed release. |
1.6 |
Added api_key parameter to the GoogleGeocoder |
1.5 |
Added parameter rtype to Added example for calculating the phase of the moon. |
1.4.1 |
Using versioneer to manage version numbers |
1.4 |
Changed to use calculations from NOAA spreadsheets Changed some exception error messages for when sun does not reach a requested elevation. Added more tests |
1.3.4 |
Changes to project configuration files. No user facing changes. |
1.3.3 |
Fixed call to twilight_utc as date and direction parameters were reversed. |
1.3.2 |
Updated URL to point to gitgub.com Added Apache 2.0 boilerplate to source file |
1.3.1 |
Added LICENSE file to sdist |
1.3 |
Corrected solar zenith to return the angle from the vertical. Added solar midnight calculation. |
1.2 |
Added handling for when unicode literals are used. This may possibly affect your code if you’re using Python 2 (there are tests for this but they may not catch all uses.) (Bug 1588198) Changed timezone for Phoenix, AZ to America/Phoenix (Bug 1561258) |
1.1 |
Added methods to calculate Twilight, the Golden Hour and the Blue Hour. |
1.0 |
It’s time for a version 1.0 Added examples where the location you want is not in the Astral geocoder. |
0.9 |
Added a method to calculate the date and time when the sun is at a specific elevation, for either a rising or a setting sun. Added daylight and night methods to Location and Astral classes. Rahukaalam methods now return a tuple. |
0.8.2 |
Fix for moon phase calcualtions which were off by 1. Use pytz.timezone().localize method instead of passing tzinfo parameter to datetime.datetime. See the pytz docs for info |
0.8.1 |
Fix for bug 1417641: Added Added tzinfo as an alias for tz |
0.8 |
Fix for bug 1407773: Moon phase calculation changed to remove time zone parameter (tz) as it is not required for the calculation. |
0.7.5 |
Fix for bug 1402103: Buenos Aires incorrect timezone |
0.7.4 |
Added Canadian cities from Yip Shing Ho |
0.7.3 |
Fix for bug 1239387 submitted by Torbjörn Lönnemark |
0.7.2 |
Minor bug fix in |
0.7.1 |
Bug fix. Missed a vital return statement in the
|
0.7 |
Added ability to lookup location information from
Google’s mapping APIs (see Renamed Renamed Added elevations of cities to database and property to
obtain elevation from |
0.6.2 |
Added various cities to database as per https://bugs.launchpad.net/astral/+bug/1040936 |
0.6.1 |
Docstrings were not updated to match changes to code. Other minor docstring changes made |
0.6 |
Fix for bug 884716 submitted by Martin Heemskerk regarding moon phase calculations Fixes for bug report 944754 submitted by Hajo Werder
|
0.5 |
Changed Moved city information into a database class Added attribute access to database for timezone groups |
0.4 |
Duplicate city names could not be accessed. Sun calculations for some cities failed with times outside valid ranges. Fixes for city data. Added calculation for moon phase. |
0.3 |
Changed to Apache V2.0 license. Fix for bug 555508 submitted by me. US state capitals and other cities added. |
0.2 |
Fix for bug 554041 submitted by Derek_ / John Dimatos |
0.1 |
First release |


from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from compas.geometry import scale_vector
from compas.geometry import normalize_vector
from compas.geometry import add_vectors
from compas.geometry import subtract_vectors
from compas.geometry import cross_vectors
from compas.geometry import centroid_points
from compas.geometry import intersection_line_line
from compas.geometry import normal_polygon
from compas.geometry import is_colinear
from compas.utilities import iterable_like
from compas.utilities import pairwise
from compas.utilities import is_item_iterable
__all__ = [
'offset_line',
'offset_polyline',
'offset_polygon',
]
[docs]def offset_line(line, distance, normal=[0.0, 0.0, 1.0]):
"""Offset a line by a distance.
Parameters
----------
line : tuple
Two points defining the line.
distances : float or list of floats
The offset distance as float.
A single value determines a constant offset. Alternatively, two
offset values for the start and end point of the line can be used to
a create variable offset.
normal : vector
The normal of the offset plane.
Returns
-------
offset line : tuple
Two points defining the offset line.
Notes
-----
The offset direction is chosen such that if the line were along the positve
X axis and the normal of the offset plane is along the positive Z axis, the
offset line is in the direction of the postive Y axis.
Examples
--------
.. code-block:: python
line = [(0.0, 0.0, 0.0), (3.0, 3.0, 0.0)]
distance = 0.2 # constant offset
line_offset = offset_line(line, distance)
print(line_offset)
distance = [0.2, 0.1] # variable offset
line_offset = offset_line(line, distance)
print(line_offset)
"""
a, b = line
ab = subtract_vectors(b, a)
direction = normalize_vector(cross_vectors(normal, ab))
if not is_item_iterable(distance):
distance = [distance]
distances = list(iterable_like(line, distance, distance[-1]))
u = scale_vector(direction, distances[0])
v = scale_vector(direction, distances[1])
c = add_vectors(a, u)
d = add_vectors(b, v)
return c, d
[docs]def offset_polygon(polygon, distance, tol=1e-6):
"""Offset a polygon (closed) by a distance.
Parameters
----------
polygon : list of point
The XYZ coordinates of the corners of the polygon.
The first and last coordinates must not be identical.
distance : float or list of float
The offset distance as float.
A single value determines a constant offset globally.
Alternatively, pairs of local offset values per line segment can be used to create variable offsets.
Distance > 0: offset to the outside, distance < 0: offset to the inside.
Returns
-------
offset polygon : list of point
The XYZ coordinates of the corners of the offset polygon.
The first and last coordinates are identical.
Notes
-----
The offset direction is determined by the normal of the polygon.
If the polygon is in the XY plane and the normal is along the positive Z axis,
positive offset distances will result in an offset towards the inside of the
polygon.
The algorithm works also for spatial polygons that do not perfectly fit a plane.
Examples
--------
.. code-block:: python
polygon = [
(0.0, 0.0, 0.0),
(3.0, 0.0, 1.0),
(3.0, 3.0, 2.0),
(1.5, 1.5, 2.0),
(0.0, 3.0, 1.0),
(0.0, 0.0, 0.0)
]
distance = 0.5 # constant offset
polygon_offset = offset_polygon(polygon, distance)
print(polygon_offset)
distance = [
(0.1, 0.2),
(0.2, 0.3),
(0.3, 0.4),
(0.4, 0.3),
(0.3, 0.1)
] # variable offset
polygon_offset = offset_polygon(polygon, distance)
print(polygon_offset)
"""
normal = normal_polygon(polygon)
if not is_item_iterable(distance):
distance = [distance]
distances = iterable_like(polygon, distance, distance[-1])
polygon = polygon + polygon[:1]
segments = offset_segments(polygon, distances, normal)
offset = []
for s1, s2 in pairwise(segments[-1:] + segments):
point = intersect(s1, s2, tol)
offset.append(point)
return offset
[docs]def offset_polyline(polyline, distance, normal=[0.0, 0.0, 1.0], tol=1e-6):
"""Offset a polyline by a distance.
Parameters
----------
polyline : list of point
The XYZ coordinates of the vertices of a polyline.
distance : float or list of tuples of floats
The offset distance as float.
A single value determines a constant offset globally.
Alternatively, pairs of local offset values per line segment can be used to create variable offsets.
Distance > 0: offset to the "left", distance < 0: offset to the "right".
normal : vector
The normal of the offset plane.
Returns
-------
offset polyline : list of point
The XYZ coordinates of the resulting polyline.
"""
if not is_item_iterable(distance):
distance = [distance]
distances = iterable_like(polyline, distance, distance[-1])
segments = offset_segments(polyline, distances, normal)
offset = [segments[0][0]]
for s1, s2 in pairwise(segments):
point = intersect(s1, s2, tol)
offset.append(point)
offset.append(segments[-1][1])
return offset
def intersect_lines(l1, l2, tol):
"""
"""
x1, x2 = intersection_line_line(l1, l2, tol)
if x1 and x2:
return centroid_points([x1, x2])
def intersect_lines_colinear(l1, l2, tol):
"""
"""
def are_segments_colinear(l1, l2, tol):
a, b = l1
d, c = l2
return is_colinear(a, b, c, tol)
if are_segments_colinear(l1, l2, tol):
return centroid_points([l1[1], l2[0]])
def intersect(l1, l2, tol):
"""
"""
supported_funcs = [intersect_lines, intersect_lines_colinear]
for func in supported_funcs:
point = func(l1, l2, tol)
if point:
return point
msg = "Intersection not found for line: {}, and line: {}".format(l1, l2)
raise ValueError(msg)
def offset_segments(point_list, distances, normal):
"""
"""
segments = []
for line, distance in zip(pairwise(point_list), distances):
segments.append(offset_line(line, distance, normal))
return segments
# ==============================================================================
# Main
# ==============================================================================
if __name__ == "__main__":
import compas
from compas_plotters import MeshPlotter
from compas.datastructures import Mesh
mesh = Mesh.from_obj(compas.get('faces.obj'))
polygons = []
lines = []
for fkey in mesh.faces():
points = mesh.face_coordinates(fkey)
offset = offset_polyline(points, 0.1)
polygons.append({
'points': offset,
'edgecolor': '#ff0000'
})
for a, b in zip(points, offset):
lines.append({
'start': a,
'end': b,
'color': '#00ff00'
})
plotter = MeshPlotter(mesh, figsize=(12, 9))
plotter.draw_faces()
plotter.draw_polylines(polygons)
plotter.draw_lines(lines)
plotter.show()


--- layout: archive title: Zulip Chat Archive permalink: /stream/144837-PR-reviews/topic/.231538.20install.20doc.html ---
Thanks @Alexander Bentkamp. Did you try the one-line install on Debian/Ubuntu? Tip for next time: you can end your commit message by [ci skip]
when modifying only documentation. This saves some scarce Travis time.
Yes, I tried it on Ubuntu 18.04 LTS and it worked exactly as described.
Didn't know about [ci skip]
. Good to know!
Last updated: Apr 24 2020 at 19:02 UTC


This phishing landing we examined xor decodes charcode stored in a variable and then writes out the page via
document.write. The obfuscated landing page begins as follows by defining an encoded string:
The JavaScript which will xor the string with 2 appears below (Fig. 31):
The resulting code after the xor still needs a another round of decoding
After URL decoding, the normalized Dropbox phishing site looks like this (Fig. 33):


WHEN WE WERE KINGS A film review by Michael John Legeros Copyright 1997 Michael John Legeros
(Gramercy) Directed by Leon Gast Produced by David Sonenberg, Taylor Hackford, and Leon Gast Featuring Muhammad Ali, George Forman, Don King, James Brown, B.B. King, President Mobuto Sese Seko, Spike Lee, Norman Mailer, George Plimpton MPAA Rating "PG" Running Time 90 minutes Reviewed at The Colony Theatre, Raleigh, NC (28MAR97)
==
This year's Best Documentary is about rhythm. The rhythm of the blues. The meter of soul. The cadence of verse, fist, and dance. Director Leon Gast journeyed to Africa in 1974, to film a festival of music that was to accompany the championship contest between Muhammad Ali and George Foreman. The fight was postponed for six weeks, the festival went ahead as scheduled, and Gast stuck around, becoming increasingly interested in both the politics and the personalities involved. He shot some great concert footage and also pinned down the fighters, the promoters, and, even, Zaire's dictator, President Mobutu Sese Seko. Two decades passed before Gast could finish his film. To the hundreds of hours of footage, he added interviews, including writers George Plimpton and Norman Mailer, both of whom were originally ringside. (And both of whom get a little too much screen time.) The result is an immensely entertaining time capsule that rocks with an electrifying rhythm. And it's funny! From Ali's rhyming rants to Mailer's description of Don King's hair, there's a hearty sense of humor here. In fact, all that's missing is a modern-day encounter with the champs. What we saw at the Academy Awards should've also happened in this movie.
Grade: A-
--
Mike Legeros - Movie Hell<EMAIL_ADDRESS>- http://www.n-vision.com/hell/
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


Reason behind Disha Patani's sore knees while shooting Salman Khan starrer 'Radhe: Your Most Wanted Bhai'
by TIMESOFINDIA.COMAfter sharing screen space with superstar Salman Khan in 'Bharat', Disha Patani will be starring with him once again in their upcoming film 'Radhe: Your Most Wanted Bhai'.
And the actress has kick-started the prep for the film. She is also shooting for her film 'KTina' simultaneously. 'Radhe' will helmed be by Prabhu Deva who is also known for his dance moves.
And the filmmaker makes sure to depict his love for dance in the songs of his films. Shooting for a Prabhudeva song in the film has given Disha a case of #SoreKnees.
Also, Disha loves to put all her effort to get into the skin of her character and this time is no different! She is working hard to deliver another stellar performance in her upcoming films.
Check out the picture here:
On the work front, Disha Patani will be seen in Mohit Suri's 'Malang' and Ekta Kapoor's 'KTina' and 'Radhe'.


😋 Customer - SMB
Eats
🍕
Choose how to place your order
Facebook bot 🤖
Web Form 📃
Webchat 💬
Cheese
Pepperoni
Margherita
Veggie
Meat
ByDesign
Business One
S/4HANA
Place order!


In late 2007 my doc gave me a bottle of 15 mg remeron tablets for depression and insomnia. I tried taking half a tablet the first night, as instructed. They worked extremely well but I awoke the next morning feeling extremely hung over. So I decided to stop taking them. I had the bottle sitting in my bedside table until one night in the early summer when I was out drinking and partying. I had drinking quite a bit, about 3/4 a liter throughout the night. Finally at about 1:30 am I decided to go home and go to bed. I got home brushed my teeth and changed into my pajamas and went to bed. Unfortunately I had forgotten that I took one of my brothers Ritalin (60 mg's) for work earlier that day. I lay awake for about 30 minutes trying to fall asleep until I had a 'great idea'. I remembered that I had a few remeron in my bedside table. Since I was decently intoxicated I didn't have very good judgment so I decided to take the whole bottle. That's where my story begins:
(2:30) Decently intoxicated, just took 215 mg's of remeron tablets.
(2:45) Feel a bit drowsy, don't know if its from the booze or remeron.
(3:00) I tried to go upstairs to get something to eat. I only made it to the couch before falling over and getting extremely confused.
(3:15) Stumble back in bed not really caring about anything. Suddenly I get this extreme euphoric feeling. Similar to xanax except more physically exhausted.
(3:20) I can't move. I'm frozen solid in a dream like state similar to ambien except way more intense. My lamp is appearing to melt and the walls of the room sway with each blink of my eyes. I feel on the enclosed in this frozen world forever. I close my eyes, and suddenly feel connected to my mattress. There is a kaleidoscope of colors. This is where my memory fades.
(5:00 p.m. the next day) I finally awake dead state and feel physically and mentally exhausted. I suddenly realize that I work at 5:30 and 'scramble' out of bed. I stumble upstairs and into the shower. I feel like I am straining every muscle in my body just to stay standing. Suddenly I fall over. I finish my shower with much difficulty and realize that there is no way I could go make pizzas at my work. I decided to call in sick. Good thing I did because I was in no state to do anything. I ended up watching TV on the couch until about 10:00 then fell asleep. I awoke the next day at about 10:00 a.m. feeling fine.
 I researched their drug interactions with one another and found out I was lucky that I didn't die.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Grateful Place
Hello!
 Research shows that cultivating gratitude is a great way to become happier and remain happier — as opposed to events like getting a new car or a raise which only temporarily improve your mood. And it only takes a couple minutes every day!
Personally, I was motivated to create this site after beginning a "daily gratitude" practice, where I'd think of something I was grateful for every morning. I started doing this after reading that it was an easy, powerful way to step off the "happiness treadmill", the constant striving for more things and accomplishments.
After a short time, I noticed that I did in fact feel happier. Then I tried something new: sharing my gratitude on Facebook and Twitter. In doing so I learned that sharing my gratitude and seeing others' positive responses made me feel even happier.
If this sounds like something you'd like to try, please join!
Sincerely,
Daniel Higginbotham


Part 2: A bipartisan list of people who argue in good faith
09 Jul 2017In Part 1, I posted a bipartisan list of people who are bad for America. Those people present news stories that cherry pick the worst actions from the other side so that they can get higher TV ratings and more social media points.
Here in Part 2, I post a list of people who don’t do that, at least for the most part. This isn’t a list of centrists. If anything, it is a more politically diverse list than the list in Part 1. This is a list of people who usually make good-faith attempts to persuade others about their point of view.
- Megan McArdle (Twitter, Bloomberg) – Moderately libertarian ideas presented to a diverse audience
- Noah Smith (Twitter, Bloomberg) – Center-left economics
- Ross Douthat (Twitter, NYT) – Social conservatism presented to a left-of-center audience
- Noam Chomsky (Website)
- Conor Friedersdorf (The Atlantic)
- Ben Sasse — Has the third-most conservative voting record in the Senate but never caricatures the other side and is very concerned about filter bubbles.
- Julia Galef (Twitter) – Has some great advice for understanding the other side
- Nicky Case (Twitter)
- Fareed Zakaria (Washington Post) – Center-left foreign policy
- Eli Lake (Twitter, Bloomberg) – Hawkish foreign policy
- Kevin Drum (Mother Jones) – Center-left blogger who writes in good faith
- John Carl Baker (Twitter) – One of the few modern socialists I have found who avoids in-group snark.
- Michael Dougherty (Twitter, The Week)
- Reihan Salam (Twitter, NRO)
- Avik Roy (Twitter, NRO) – Conservative health care
- Ezra Klein (Vox, early days at the American Prospect) – While at the American Prospect, Ezra did an amazing job trying to persuade people about the benefits of Obamacare. Vox, the explainer site that he started, sometimes slips into red meat clickbait. But to its credit, Vox has managed to reach a wide audience with mostly explainer content.
Reading the people on this list with an open mind will broaden your worldview.


| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | 1× 1× 1× 1× 1× 1× 50× 50× 50× 2× 50× 1× 7× 7× 6× 1× 1× 7× 15× 7× 11× 2× 2× 2× 4× 4× 1× 3× 4× 1× 5× 6× 5× 2× | import {NotFoundError, NetworkError, BadRequestError, BadResponseError} from "./errors"; import {AccountCallBuilder} from "./account_call_builder"; import {AccountResponse} from "./account_response"; import {Config} from "./config"; import {LedgerCallBuilder} from "./ledger_call_builder"; import {TransactionCallBuilder} from "./transaction_call_builder"; import {OperationCallBuilder} from "./operation_call_builder"; import {OfferCallBuilder} from "./offer_call_builder"; import {OrderbookCallBuilder} from "./orderbook_call_builder"; import {TradesCallBuilder} from "./trades_call_builder"; import {PathCallBuilder} from "./path_call_builder"; import {PaymentCallBuilder} from "./payment_call_builder"; import {EffectCallBuilder} from "./effect_call_builder"; import {FriendbotBuilder} from "./friendbot_builder"; import {AssetsCallBuilder} from "./assets_call_builder"; import { TradeAggregationCallBuilder } from "./trade_aggregation_call_builder"; import {xdr} from "stellar-base"; import isString from "lodash/isString"; let axios = require("axios"); let toBluebird = require("bluebird").resolve; let URI = require("urijs"); let URITemplate = require("urijs").URITemplate; export const SUBMIT_TRANSACTION_TIMEOUT = 60*1000; /** * Server handles the network connection to a [Horizon](https://www.stellar.org/developers/horizon/learn/index.html) * instance and exposes an interface for requests to that instance. * @constructor * @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). * @param {object} [opts] * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. */ export class Server { constructor(serverURL, opts = {}) { this.serverURL = URI(serverURL); let allowHttp = Config.isAllowHttp(); if (typeof opts.allowHttp !== 'undefined') { allowHttp = opts.allowHttp; } if (this.serverURL.protocol() != 'https' && !allowHttp) { throw new Error('Cannot connect to insecure horizon server'); } } /** * Submits a transaction to the network. * @see [Post Transaction](https://www.stellar.org/developers/horizon/reference/transactions-create.html) * @param {Transaction} transaction - The transaction to submit. * @returns {Promise} Promise that resolves or rejects with response from horizon. */ submitTransaction(transaction) { let tx = encodeURIComponent(transaction.toEnvelope().toXDR().toString("base64")); var promise = axios.post( URI(this.serverURL).segment('transactions').toString(), `tx=${tx}`, {timeout: SUBMIT_TRANSACTION_TIMEOUT} ) .then(function(response) { return response.data; }) .catch(function (response) { Iif (response instanceof Error) { return Promise.reject(response); } else { return Promise.reject(new BadResponseError(`Transaction submission failed. Server responded: ${response.status} ${response.statusText}`, response.data)); } }); return toBluebird(promise); } /** * Returns new {@link AccountCallBuilder} object configured by a current Horizon server configuration. * @returns {AccountCallBuilder} */ accounts() { return new AccountCallBuilder(URI(this.serverURL)); } /** * Returns new {@link LedgerCallBuilder} object configured by a current Horizon server configuration. * @returns {LedgerCallBuilder} */ ledgers() { return new LedgerCallBuilder(URI(this.serverURL)); } /** * Returns new {@link TransactionCallBuilder} object configured by a current Horizon server configuration. * @returns {TransactionCallBuilder} */ transactions() { return new TransactionCallBuilder(URI(this.serverURL)); } /** * People on the Stellar network can make offers to buy or sell assets. This endpoint represents all the offers a particular account makes. * Currently this method only supports querying offers for account and should be used like this: * ``` * server.offers('accounts', accountId).call() * .then(function(offers) { * console.log(offers); * }); * ``` * @param {string} resource Resource to query offers * @param {...string} resourceParams Parameters for selected resource * @returns OfferCallBuilder */ offers(resource, ...resourceParams) { return new OfferCallBuilder(URI(this.serverURL), resource, ...resourceParams); } /** * Returns new {@link OrderbookCallBuilder} object configured by a current Horizon server configuration. * @param {Asset} selling Asset being sold * @param {Asset} buying Asset being bought * @returns {OrderbookCallBuilder} */ orderbook(selling, buying) { return new OrderbookCallBuilder(URI(this.serverURL), selling, buying); } /** * Returns new {@link TradesCallBuilder} object configured by a current Horizon server configuration. * @returns {TradesCallBuilder} */ trades() { return new TradesCallBuilder(URI(this.serverURL)); } /** * Returns new {@link OperationCallBuilder} object configured by a current Horizon server configuration. * @returns {OperationCallBuilder} */ operations() { return new OperationCallBuilder(URI(this.serverURL)); } /** * The Stellar Network allows payments to be made between assets through path payments. A path payment specifies a * series of assets to route a payment through, from source asset (the asset debited from the payer) to destination * asset (the asset credited to the payee). * * A path search is specified using: * * * The destination address * * The source address * * The asset and amount that the destination account should receive * * As part of the search, horizon will load a list of assets available to the source address and will find any * payment paths from those source assets to the desired destination asset. The search's amount parameter will be * used to determine if there a given path can satisfy a payment of the desired amount. * * Returns new {@link PathCallBuilder} object configured with the current Horizon server configuration. * * @param {string} source The sender's account ID. Any returned path will use a source that the sender can hold. * @param {string} destination The destination account ID that any returned path should use. * @param {Asset} destinationAsset The destination asset. * @param {string} destinationAmount The amount, denominated in the destination asset, that any returned path should be able to satisfy. * @returns {@link PathCallBuilder} */ paths(source, destination, destinationAsset, destinationAmount) { return new PathCallBuilder(URI(this.serverURL), source, destination, destinationAsset, destinationAmount); } /** * Returns new {@link PaymentCallBuilder} object configured with the current Horizon server configuration. * @returns {PaymentCallBuilder} */ payments() { return new PaymentCallBuilder(URI(this.serverURL)); } /** * Returns new {@link EffectCallBuilder} object configured with the current Horizon server configuration. * @returns {EffectCallBuilder} */ effects() { return new EffectCallBuilder(URI(this.serverURL)); } /** * Returns new {@link FriendbotBuilder} object configured with the current Horizon server configuration. * @returns {FriendbotBuilder} * @private */ friendbot(address) { return new FriendbotBuilder(URI(this.serverURL), address); } /** * Returns new {@link AssetsCallBuilder} object configured with the current Horizon server configuration. * @returns {AssetsCallBuilder} */ assets() { return new AssetsCallBuilder(URI(this.serverURL)); } /** * Fetches an account's most current state in the ledger and then creates and returns an {@link Account} object. * @param {string} accountId - The account to load. * @returns {Promise} Returns a promise to the {@link AccountResponse} object with populated sequence number. */ loadAccount(accountId) { return this.accounts() .accountId(accountId) .call() .then(function (res) { return new AccountResponse(res); }); } /** * * @param {Asset} base base aseet * @param {Asset} counter counter asset * @param {long} start_time lower time boundary represented as millis since epoch * @param {long} end_time upper time boundary represented as millis since epoch * @param {long} resolution segment duration as millis since epoch. *Supported values are 5 minutes (300000), 15 minutes (900000), 1 hour (3600000), 1 day (86400000) and 1 week (604800000). * Returns new {@link TradeAggregationCallBuilder} object configured with the current Horizon server configuration. * @returns {TradeAggregationCallBuilder} */ tradeAggregation(base, counter, start_time, end_time, resolution){ return new TradeAggregationCallBuilder(URI(this.serverURL), base, counter, start_time, end_time, resolution); } } |


LifeHackr is a how-to community where anyone can write and publish their clever life hacks and helpful how-to guides to help users solve common, everyday problems.
These guides and life hacks are then published to our site and our community of LifeHackrs vote on the best ones so you only see high-quality content.
LifeHackr has many categories where users can browse for guides addressing their problems such as tech troubleshooting, men & women's fashion, arts & crafts, everyday clever life hacks and more!


|
MoveToCode
|
Public Member Functions | |
| override float | GetPosition () |
| override float | GetVelocity () |
| override float | GetEffort () |
| override bool | AreLimitsCorrect () |
| Public Member Functions inherited from RosSharp.Urdf.UrdfJoint | |
| void | Start () |
| virtual float | GetPosition () |
| virtual float | GetVelocity () |
| virtual float | GetEffort () |
| void | UpdateJointState (float deltaState) |
| Joint | ExportJointData () |
| virtual bool | AreLimitsCorrect () |
| void | GenerateUniqueJointName () |
Static Public Member Functions | |
| static UrdfJoint | Create (GameObject linkObject) |
| Static Public Member Functions inherited from RosSharp.Urdf.UrdfJoint | |
| static void | Create (GameObject linkObject, JointTypes jointType, Joint joint=null) |
| static void | ChangeJointType (GameObject linkObject, JointTypes newJointType) |
| static JointTypes | GetJointType (string jointType) |
| static Joint | ExportDefaultJoint (Transform transform) |
Protected Member Functions | |
| override void | OnUpdateJointState (float deltaState) |
| override void | ImportJointData (Joint joint) |
| override Joint | ExportSpecificJointData (Joint joint) |
| override Joint.Limit | ExportLimitData () |
| Protected Member Functions inherited from RosSharp.Urdf.UrdfJoint | |
| virtual void | OnUpdateJointState (float deltaState) |
| virtual void | ImportJointData (Joint joint) |
| virtual Joint | ExportSpecificJointData (Joint joint) |
| virtual Joint.Limit | ExportLimitData () |
| virtual bool | IsJointAxisDefined () |
| Joint.Axis | GetAxisData (Vector3 axis) |
Additional Inherited Members | |
| Public Types inherited from RosSharp.Urdf.UrdfJoint | |
| enum | JointTypes |
| Public Attributes inherited from RosSharp.Urdf.UrdfJoint | |
| string | JointName |
| double | EffortLimit = 1e3 |
| double | VelocityLimit = 1e3 |
| Static Protected Member Functions inherited from RosSharp.Urdf.UrdfJoint | |
| static Vector3 | GetAxis (Joint.Axis axis) |
| static Vector3 | GetDefaultAxis () |
| static JointDrive | GetJointDrive (Joint.Dynamics dynamics) |
| static JointSpring | GetJointSpring (Joint.Dynamics dynamics) |
| static SoftJointLimit | GetLinearLimit (Joint.Limit limit) |
| Protected Attributes inherited from RosSharp.Urdf.UrdfJoint | |
| UnityEngine.Joint | UnityJoint |
| JointTypes | _jointType |
| Static Protected Attributes inherited from RosSharp.Urdf.UrdfJoint | |
| const int | RoundDigits = 6 |
| const float | Tolerance = 0.0000001f |
| Properties inherited from RosSharp.Urdf.UrdfJoint | |
| JointTypes | JointType [get, protected set] |
| bool | IsRevoluteOrContinuous [get] |
|
virtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
static |
|
protectedvirtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
protectedvirtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
virtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
virtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
virtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
protectedvirtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.
|
protectedvirtual |
Reimplemented from RosSharp.Urdf.UrdfJoint.


Builder Validation
In order for a system to successfully run, it must meet certain criteria before it's allowed to be saved. There are a few rules a system is required to follow:
- An Input must be followed by a Parser
- A Binary Input must be followed by a Binary Output
- Mappings and Enrichments are interchangeable with each other in terms of their position, but the first one used must be preceded by a Parser
- A Mapping, Enrichment, or Parser (whichever is last in the chain) must be followed by an Output
- Everything must be linked together
- No circular systems
- One input cannot accept two outputs, but one output can be split to two inputs
Copyright © 2016 Leidos, Inc. All rights reserved.


|
www.CelebrityMorgue.com
Hitler suicided in the Fuhrerbunker on 22 April 1945, along with his newly wed wife, Eva Braun. After the suicide, their corpses were taken outside, doused with gasoline, and set afire.
It's Hitler, right?
This body was discovered by the Russian contingent in Berlin and assumed to be Adolf Hitler. It is actually Gustav Weler, Hitler's doppelganger (body double), who was executed with a gunshot to the forehead.
Hitler's Remains?The remains above are kept in a cardboard box in the State Archives of the Russian Federation, Moscow, where they were removed to after the Russians occupied Berlin. They are believed to be Hitler's -- charred, age 50's, and dead from a gunshot wound suicide.
|