The main link between the abstract mathematical nature of graphs and the concrete problems they are used to solve is the properties that are attached to the vertices and edges of a graph, things like distance, capacity, weight, color, etc. There are many ways to attach properties to graph in terms of data-structure implementation, but graph algorithms should not have to deal with the implementation details of the properties. The property map interface defined in Section Property Map Concepts provides a generic method for accessing properties from graphs. This is the interface used in the BGL algorithms to access properties.
The property map interface specifies that each property is accessed using a separate property map object. In the following example we show an implementation of the relax() function used inside of Dijkstra's shortest paths algorithm. In this function, we need to access the weight property of an edge, and the distance property of a vertex. We write relax() as a template function so that it can be used in many difference situations. Two of the arguments to the function, weight and distance, are the property map objects. In general, BGL algorithms explicitly pass property map objects for every property that a function will need. The property map interface defines several functions, two of which we use here: get() and put(). The get() function takes a property map object, such as distance and a key object. In the case of the distance property we are using the vertex objects u and v as keys. The get() function then returns the property value for the vertex.
template <class Edge, class Graph, class WeightPropertyMap, class DistancePropertyMap> bool relax(Edge e, const Graph& g, WeightPropertyMap weight, DistancePropertyMap distance) { typedef typename graph_traits<Graph>::vertex_descriptor Vertex; Vertex u = source(e,g), v = target(e,g); if ( get(distance, u) + get(weight, e) < get(distance, v)) { put(distance, v, get(distance, u) + get(weight, e)); return true; } else return false; }The function get() returns a copy of the property value. There is a third function in the property map interface, at(), that returns a reference to the property value (a const reference if the map is not mutable).
Similar to the iterator_traits class of the STL, there is a property_traits class that can be used to deduce the types associated with a property map type: the key and value types, and the property map category (which is used to tell whether the map is readable, writeable, or both). In the relax() function we could have used property_traits to declare local variables of the distance property type.
{ typedef typename graph_traits<Graph>::vertex_descriptor Vertex; Vertex u = source(e,g), v = target(e,g); typename property_traits<DistancePropertyMap>::value_type du, dv; // local variables of the distance property type du = get(distance, u); dv = get(distance, v); if (du + get(weight, e) < dv) { put(distance, v, du + get(weight, e)); return true; } else return false; }
There are two kinds of graph properties: interior and exterior.
A graph type that supports interior property storage (such as adjacency_list) provides access to its property map objects through the interface defined in PropertyGraph. There is a function get(Property, g) that get property map objects from a graph. The first argument is the property type to specify which property you want to access and the second argument is the graph object. A graph type must document which properties (and therefore tags) it provides access to. The type of the property map depends on the type of graph and the property being mapped. A trait class is defined that provides a generic way to deduce the property map type: property_map. The following code shows how one can obtain the property map for the distance and weight properties of some graph type.
property_map<Graph, vertex_distance_t>::type d = get(vertex_distance, g); property_map<Graph, edge_weight_t>::type w = get(edge_weight, g);
In general, the BGL algorithms require all property maps needed by the algorithm to be explicitly passed to the algorithm. For example, the BGL Dijkstra's shortest paths algorithm requires four property maps: distance, weight, color, and vertex ID.
Often times some or all of the properties will be interior to the graph, so one would call Dijkstra's algorithm in the following way (given some graph g and source vertex src).
dijkstra_shortest_paths(g, src, distance_map(get(vertex_distance, g)). weight_map(get(edge_weight, g)). color_map(get(vertex_color, g)). vertex_index_map(get(vertex_index, g)));
Since it is somewhat cumbersome to specify all of the property maps, BGL provides defaults that assume some of the properties are interior and can be accessed via get(Property, g) from the graph, or if the property map is only used internally, then the algorithm will create a property map for itself out of an array and using the graph's vertex index map as the offset into the array. Below we show a call to dijkstra_shortest_paths algorithm using all defaults for the named parameters. This call is equivalent to the previous call to Dijkstra's algorithm.
dijkstra_shortest_paths(g, src);
The next question is: how do interior properties become attached to a graph object in the first place? This depends on the graph class that you are using. The adjacency_list graph class of BGL uses a property mechanism (see Section Internal Properties) to allow an arbitrary number of properties to be stored on the edges and vertices of the graph.
In this section we will describe two methods for constructing exterior property maps, however there is an unlimited number of ways that one could create exterior properties for a graph.
The first method uses the adaptor class iterator_property_map. This class wraps a random access iterator, creating a property map out of it. The random access iterator must point to the beginning of a range of property values, and the length of the range must be the number of vertices or edges in the graph (depending on whether it is a vertex or edge property map). The adaptor must also be supplied with an ID property map, which will be used to map the vertex or edge descriptor to the offset of the property value (offset from the random access iterator). The ID property map will typically be an interior property map of the graph. The following example shows how the iterator_property_map can be used to create exterior property maps for the capacity and flow properties, which are stored in arrays. The arrays are indexed by edge ID. The edge ID is added to the graph using a property, and the values of the ID's are given when each edge is added to the graph. The complete source code for this example is in example/exterior_edge_properties.cpp. The print_network() function prints out the graph with the flow and capacity values.
typedef adjacency_list<vecS, vecS, bidirectionalS, no_property, property<edge_index_t, std::size_t> > Graph; const int num_vertices = 9; Graph G(num_vertices); int capacity_array[] = { 10, 20, 20, 20, 40, 40, 20, 20, 20, 10 }; int flow_array[] = { 8, 12, 12, 12, 12, 12, 16, 16, 16, 8 }; // Add edges to the graph, and assign each edge an ID number. add_edge(0, 1, 0, G); // ... typedef graph_traits<Graph>::edge_descriptor Edge; typedef property_map<Graph, edge_index_t>::type EdgeID_Map; EdgeID_Map edge_id = get(edge_index, G); iterator_property_map <int*, int, int&, EdgeID_Map> capacity(capacity_array, edge_id), flow(flow_array, edge_id); print_network(G, capacity, flow);
The second method uses a pointer type (a pointer to an array of property values) as a property map. This requires the key type to be an integer so that it can be used as an offset to the pointer. The adjacency_list class with template parameter VertexList=vecS uses integers for vertex descriptors (indexed from zero to the number of vertices in the graph), so they are suitable as the key type for a pointer property map. When the VertexList is not vecS, then the vertex descriptor is not an integer, and cannot be used with a pointer property map. Instead the method described above of using a iterator_property_map with an ID property must be used. The edge_list class may also use an integer type for the vertex descriptor, depending on how the adapted edge iterator is defined. The example in example/bellman_ford.cpp shows edge_list being used with pointers as vertex property maps.
The reason that pointers can be used as property maps is that there are several overloaded functions and a specialization of property_traits in the header boost/property_map/property_map.hpp that implement the property map interface in terms of pointers. The definition of those functions is listed here.
namespace boost { template <class T> struct property_traits<T*> { typedef T value_type; typedef ptrdiff_t key_type; typedef lvalue_property_map_tag category; }; template <class T> void put(T* pa, std::ptrdiff_t key, const T& value) { pa[key] = value; } template <class T> const T& get(const T* pa, std::ptrdiff_t key) { return pa[key]; } template <class T> const T& at(const T* pa, std::ptrdiff_t key) { return pa[key]; } template <class T> T& at(T* pa, std::ptrdiff_t key) { return pa[key]; } }
In the following example, we use an array to store names of cities for each vertex in the graph, and a std::vector to store vertex colors which will be needed in a call to breadth_first_search(). Since the iterator of a std::vector (obtained with a call to begin()) is a pointer, the pointer property map method also works for std::vector::iterator. The complete source code for this example is in example/city_visitor.cpp.
// Definition of city_visitor omitted... int main(int,char*[]) { enum { SanJose, SanFran, LA, SanDiego, Fresno, LosVegas, Reno, Sacramento, SaltLake, Pheonix, N }; // An array of vertex name properties std::string names[] = { "San Jose", "San Francisco", "San Jose", "San Francisco", "Los Angeles", "San Diego", "Fresno", "Los Vegas", "Reno", "Sacramento", "Salt Lake City", "Pheonix" }; // Specify all the connecting roads between cities. typedef std::pair<int,int> E; E edge_array[] = { E(Sacramento, Reno), ... }; // Specify the graph type. typedef adjacency_list<vecS, vecS, undirectedS> Graph; // Create the graph object, based on the edges in edge_array. Graph G(N, edge_array, edge_array + sizeof(edge_array)/sizeof(E)); // DFS and BFS need to "color" the vertices. // Here we use std::vector as exterior property storage. std::vector<default_color_type> colors(N); cout << "*** Depth First ***" << endl; depth_first_search(G, city_visitor(names), colors.begin()); cout << endl; // Get the source vertex boost::graph_traits<Graph>::vertex_descriptor s = vertex(SanJose, G); cout << "*** Breadth First ***" << endl; breadth_first_search(G, s, city_visitor(names), colors.begin()); return 0; }
Implementing your own exterior property maps is not very difficult. You simply need to overload the functions required by the property map concept that you want your class to model. At most, this means overloading the put() and get() functions and implementing operator[]. Also, your property map class will need to have nested typedefs for all the types defined in property_traits, or you can create a specialization of property_traits for your new property map type.
The implementation of the iterator_property_map class serves as a good example for how to build and exterior property map. Here we present a simplified implementation of the iterator_property_map class which we will name iterator_pa.
We start with the definition of the iterator_map class itself. This adaptor class is templated on the adapted Iterator type and the ID property map. The job of the ID property map is to map the key object (which will typically be a vertex or edge descriptor) to an integer offset. The iterator_map class will need the three necessary typedefs for a property map: key_type, value_type, and category. We can use property_traits to find the key type of IDMap, and we can use iterator_traits to determine the value type of Iterator. We choose boost::lvalue_property_map_tag for the category since we plan on implementing the at() function.
template <class Iterator, class IDMap> class iterator_map { public: typedef typename boost::property_traits<IDMap>::key_type key_type; typedef typename std::iterator_traits<Iterator>::value_type value_type; typedef boost::lvalue_property_map_tag category; iterator_map(Iterator i = Iterator(), const IDMap& id = IDMap()) : m_iter(i), m_id(id) { } Iterator m_iter; IDMap m_id; };
Next we implement the three property map functions, get(), put(), and at(). In each of the functions, the key object is converted to an integer offset using the m_id property map, and then that is used as an offset to the random access iterator m_iter.
template <class Iter, class ID> typename std::iterator_traits<Iter>::value_type get(const iterator_map<Iter,ID>& i, typename boost::property_traits<ID>::key_type key) { return i.m_iter[i.m_id[key]]; } template <class Iter, class ID> void put(const iterator_map<Iter,ID>& i, typename boost::property_traits<ID>::key_type key, const typename std::iterator_traits<Iter>::value_type& value) { i.m_iter[i.m_id[key]] = value; } template <class Iter, class ID> typename std::iterator_traits<Iter>::reference at(const iterator_map<Iter,ID>& i, typename boost::property_traits<ID>::key_type key) { return i.m_iter[i.m_id[key]]; }
That is it. The iterator_map class is complete and could be used just like the iterator_property_map in the previous section.
| Copyright © 2000-2001 | Jeremy Siek, Indiana University<EMAIL_ADDRESS>|


{% extends 'base.html' %}
{% block page_title %}{% if errors %}{{ _('Errors in your idea') }} | {% endif %}{{ _('Create submission') }} | {% endblock %}
{% block page_id %}create_submission{% endblock %}
{% block section_class %}entries{% endblock %}
{% block alerts %}
{% if error_count %}
You have {{ count }} error in your submission. Please correct this before you can submit an idea. You have {{ count }} errors in your submission. Please correct this before you can submit an idea.
{{ _("Congratulations! You've taken the first step towards making the world, and the internet, a better place. Fill out the form below to get started in the Mozilla Ignite Challenge.") }}
{% endblock %}* means a required field
{% endblock %}


use Red::AST::Unary; use Red::AST::Infixes; use Red::AST::Value; use Red::AST::StringFuncs; use Red::AST::DateTimeFuncs; use Red::AST::JsonItem; use Red::AST::JsonRemoveItem; use Red::Type::Json; =head2 Red::ColumnMethods #| Red::Column methods unit role Red::ColumnMethods; #| Tests if that column value starts with a specific sub-string #| is usually translated for SQL as `column like 'substr%'` multi method starts-with(Str() $text is readonly) { Red::AST::Like.new(self, ast-value "{ $text }%") but Red::ColumnMethods } multi method starts-with(Str() $text is rw) { Red::AST::Like.new(self, ast-value("{ $text }%"), :bind-left) but Red::ColumnMethods } #| Tests if that column value ends with a specific sub-string #| is usually translated for SQL as `column like '%substr'` multi method ends-with(Str() $text is readonly) { Red::AST::Like.new(self, ast-value "%{ $text }") but Red::ColumnMethods } multi method ends-with(Str() $text is rw) { Red::AST::Like.new(self, ast-value("%{ $text }"), :bind-left) but Red::ColumnMethods } #| Tests if that column value contains a specific sub-string #| is usually translated for SQL as `column like %'substr%'` multi method contains(Str() $text is readonly) { Red::AST::Like.new(self, ast-value "%{ $text }%") but Red::ColumnMethods } multi method contains(Str() $text is rw) { Red::AST::Like.new(self, ast-value("%{ $text }%"), :bind-left) but Red::ColumnMethods } #| Return a substring of the column value method substr($base where { .returns ~~ Str }: Int() $offset = 0, Int() $size?) { Red::AST::Substring.new(:$base, :$offset, |(:$size with $size)) but Red::ColumnMethods } #| Return the year from the date column method year($base where { .returns ~~ (Date|DateTime|Instant) }:) { Red::AST::DateTimePart.new(:$base, :part(Red::AST::DateTime::Part::year)) but Red::ColumnMethods } #| Return the month from the date column method month($base where { .returns ~~ (Date|DateTime|Instant) }:) { Red::AST::DateTimePart.new(:$base, :part(Red::AST::DateTime::Part::month)) but Red::ColumnMethods } #| Return the day from the date column method day($base where { .returns ~~ (Date|DateTime|Instant) }:) { Red::AST::DateTimePart.new(:$base, :part(Red::AST::DateTime::Part::day)) but Red::ColumnMethods } #| Return the date from a datetime, timestamp etc method yyyy-mm-dd($base where { .returns ~~ (Date|DateTime|Instant) }:) { Red::AST::DateTimeCoerce.new(:$base) but Red::ColumnMethods } method now { self.attr.type.now } method today { self.attr.type.today } #| Return a value from a json hash key multi method AT-KEY(\SELF where { .returns ~~ Json }: $key where { $_ ~~ Str or ( $_ ~~ Red::AST and .returns ~~ Str )}) is rw { my $obj = Red::AST::JsonItem.new(SELF, ast-value $key); Proxy.new: FETCH => -> $ { $obj but Red::ColumnMethods }, STORE => -> $, $value { my $val = do given $value { when Red::AST { $_ } default { my &deflator = Json.deflator; ast-value :type(Json), .&deflator; } } @*UPDATE.push: Pair.new: $obj, $val; $obj but Red::ColumnMethods } } #| Delete and return a value from a json hash key multi method DELETE-KEY(\SELF where { .returns ~~ Json }: $key where { $_ ~~ Str or ( $_ ~~ Red::AST and .returns ~~ Str )}) { my $obj = Red::AST::JsonItem.new(SELF, ast-value $key); @*UPDATE.push: Pair.new: SELF, Red::AST::JsonRemoveItem.new: SELF, ast-value $key; $obj } #| Returns a value from a json array index method AT-POS(\SELF where { .returns ~~ Json }: $key where { $_ ~~ Int or ( $_ ~~ Red::AST and .returns ~~ Int )}) is rw { my $obj = Red::AST::JsonItem.new(SELF, ast-value $key); Proxy.new: FETCH => -> $ { $obj but Red::ColumnMethods }, STORE => -> $, $value { my $val = do given $value { when Red::AST { $_ } default { my &deflator = Json.deflator; ast-value .&deflator, :type(Json) } } @*UPDATE.push: Pair.new: $obj, $val; $obj but Red::ColumnMethods } }


Rundu urges ratepayers to participate in incentive programme
by John MuyambaHome \ National \ Rundu urges ratepayers to participate in incentive programme - New Era Live
Home \ National \ Rundu urges ratepayers to participate in incentive programme - New Era Live


Healthcare facility locator
Uasin Gishu County
Search
View Map
List
About
Exit!
@2017 - JKem
Back
Search
OK
Nearby
Home
Back
About
Back
List
Loading results...
Back
Search
Search
Reset Fields
Search


Jacqueline Jossa's husband Dan Osborne flying to Australia to support her on I'm A Celeb
Former Towie star Dan Osborne has declared he's planning a trip Down Under to see his wife when she gets out of the jungle
by Irishmirror.ieDan Osborne has declared he's planning a trip to Australia to support his wife Jacqueline Jossa on I'm A Celebrity .
The former EastEnders star, 27, is currently battling it out in the jungle as a contestant on the ITV show and Dan, 28, has been at home watching his wife on the telly every night.
Now he's confirmed he's going to be flying Down Under to support Jacqueline and so he can see her as soon as she gets out.
He told The Sun Online : "I'll be going out there though, not to go into the jungle but to support Jac."
As well as looking after the couple's two daughters, Ella and Mia, while the actress is away, Dan has also been doing some DIY.
He's been busy turning the couple's garage into a gym where he can work out and hopes to have it finished by the time she gets home.
Earlier this week, Dan revealed he's been surviving on takeaways since his wife left for Australia.
He confessed he's not been eating well since Jacqueline left and has been making do with takeaway dinners.
During a video posted on Wednesday night, he said: "Tonight's meal is an Indian so as you can see from the last few days my diet is terrible.
"We're getting a curry."
Dan has been watching the show every night and posting his reactions on social media.
However, this could leave him red-faced if his own antics get brought up on TV.
There's growing speculation that Dan's alleged affair with Love Island star Gabby Allen is going to be mentioned in camp.
Jacqueline is in there with Myles Stephenson, who dated Gabby after she was rumoured to have grown close to Dan backin 2018.
Reports suggest the campmates are going to end up chatting about their love lives - with Dan and Gabby likely to be brought up.
Dan and Jacqueline married in 2017 - but in April the year after, he was spotted getting close to Gabby while they were filming a TV show in Spain.
Both parties denied anything happened, but Jacqueline was furious and even texted Gabby: "Did you sleep with my husband?"
Now it's thought that Myles and Jacqueline will have a talk in camp - and he'll be willing to spill the beans on what Gabby told him.
Do you have a story to sell? Get in touch with us at<EMAIL_ADDRESS>or call us direct 0207 29 33033


Project Info
- Name: BeeCard Templates.
- Author:Drake Lam.
- Industry: Program
- Budjet: 12$.
- Category: Site Templates.
- URL: ThemeForest
- Technologies:PHPStorm
Live preview
Description
Project description
Challanges & sollutions
Project description
Features
- Awesome Modern Design
- Application
- Developer
- IntelliJ IDEA
- Easy Customization
- Named Groups & Layers
- Fully Layered Photoshop PSD files
- 2 Version Design
- Help File Included


[1]
Dual OTA tuners, HDMI Output; Subscription Fees, Small Disk, Documentation
[2]
Nice product.; Terrible customer service.


|
ChRt
ChibiOS/RT Arduino
|
Giovanni Di Sirio is the author of ChibiOS. Giovanni has over 20 years of experience in the embedded software field.
Giovanni has been at STMicroelectronics since 2003, currently Software Architect in the AUTOSAR (AUTomotive Open System ARchitecture) MCAL (Microcontroller Abstraction Layer) development team based in the Arzano (Naples), automotive division.
This package contains a version of the ChbiOS/RT RTOS for AVR Arduinos, SAMD Arduinos, Arduino Due, and Teensy 3.x.
The port is based on ChibiOS 17.6.0. The ChibiOS/RT kernel is version 4.0.0.
These systems are packaged as the Arduino library ChRt.
The documentation for ChibiOS/RT 4.0.0 is located here:
http://www.chibios.org/dokuwiki/doku.php?id=chibios:documentation:start
The next two sections, What an RTOS is, and What an RTOS is not, are from Giovanni's ChibiOS book at the above website.
An RTOS is an operating system whose internal processes are guaranteed to be compliant with (hard or soft) realtime requirements. The fundamental qualities of an RTOS are:
RTOS are often confused with “fast” operating systems. While efficiency is a positive attribute of an RTOS, efficiency alone does not qualifies an OS as RTOS but it could separate a good RTOS from a not so good one.
An RTOS is not a magic wand, your system will not be “realtime” just because you are using an RTOS, what matters is your system design. The RTOS itself is just a toolbox that offers you the required tools for creating a realtime system, you can use the tools correctly or in the wrong way.
If this is your first exposure to a RTOS you will likely feel some pain.
You may want to start using ChibiOS in cooperative mode. See the chCoop.ino example below. In this mode preemptive context switches are disabled for threads of the same priority.
The normal Arduino environment is single-threaded so code does not need to be reentrant or threadsafe. With a preemptive RTOS, the same resources may be accessed concurrently by several threads.
Many arduino libraries and functions are not reentrant or threadsafe.
To protect resource integrity, code written for multithreaded programs must be reentrant and threadsafe.
Reentrance and thread safety are both related to the way that functions handle resources. Reentrance and thread safety are separate concepts: a function can be either reentrant, threadsafe, both, or neither.
A reentrant function does not hold static data over successive calls, nor does it return a pointer to static data. A reentrant function must not call non-reentrant functions.
A threadsafe function protects shared resources from concurrent access by locks. Only one thread can be executing at a time.
The dynamic memory functions malloc and free are not threadsafe. This means that libraries like String and SD.h are not thread safe since they use malloc/free.
SdFat does not use malloc but is not threadsafe. Notice that I put all access to the SD in the low priority loop thread to avoid problems.
You must not use Arduino delay() in other than the lowest priority task. delay() will block all lower priority threads.
Two of the most common design problems for embedded developers are the deadlock and the priority inversion problem. You should start with very simple designs to avoid these subtle problems.
I have installed simple exception error handlers for three ISR vectors. If an execution fault causes one of these exception, I blink the pin 13 LED. The codes are:
Hard fault - blink one short flash every two seconds
Bus fault - blink two short flashes every two seconds
Usage fault - blink three short flashes every two seconds
There are a number examples. Please look at and understand these examples.
It is difficult to allocate the correct amount of stack memory for a thread. Several of the examples use the chUnusedThreadStack() function to check stack usage. When a thread is created, the thread workspace is filled with a 0x55 pattern. chUnusedThreadStack() checks how much of the 0x55 pattern has not been overwritten.
You should start with a generous stack size and adjust it based on the unused size.
The chBlink.ino example demonstrates thread definition, semaphores, and thread sleep.
Thread 1 waits on a semaphore and turns the LED off when signaled by thread 2.
Thread 2 turns the LED on, sleeps for a period, signals thread 1 to turn the LED off, and sleeps for another period.
The blink/print example in each library is chBlinkPrint.ino.
The blink/print examples has three threads. A high priority thread blinks an LED, a medium priority thread prints a counter every second, and a low priority thread increments the counter.
The print thread also checks Serial for input. The print thread will displays stack usage information for each thread.
An interesting experiment is to observe the non-atomic behavior of incrementing count in loop().
Comment out noInterrupts() and interrupts() like this:
You will then see occasional large counts when the print thread tries to zero count while the loop() thread is incrementing count.
You need an oscilloscope to run this example. This example is chContextTime.ino.
To run this example, connect the scope to pin 13. You will see two pulses. Measure difference in time between first pulse with no context switch and the second pulse started in ledControl and ended in ledOffTask.
The difference is the time for the semaphore and a context switch.
ChibiOS/RT uses cooperative scheduling when CH_TIME_QUANTUM is set to zero. This disables preemption for threads with equal priority and the round robin becomes cooperative. Note that higher priority threads can still preempt, the kernel is always preemptive.
The chCoop.ino example illustrates this feature.
Note that is is not necessary to protect count or maxDelay in this example since a context switch can not happen while these variables are accessed.
The chDataSharing.ino example illustrates thread safe data sharing between two threads.
Thread 1 reads a sensor into temp variables. Thread 1 calls chMtxLock() to prevent Thread 2 from accessing the shared data, and copies the temp variables to the shared area, and then unlocks access to the shared area.
Thread 2 runs every second. Thread 2 locks the shared data, copies the shared values to temp variables, and unlocks access to the shared area.
Thread 2 then prints the temp values and unused stack stats.
The chEvent.ino example demonstrates use of event flags.
The fast data logger example is chFifoDataLogger.ino. This example require connection to an SD socket.
Two semaphores are used to implement a FIFO for data records. This uncouples the data acquisition task from the SD write task. SD card have unpredictable write latencies that can be over 100 milliseconds.
You need a quality SD card to avoid data overrun errors. Overruns could be avoided by allocating more memory to the buffer queue.
This example logs a counter as dummy data. You can replace this with data from an analog pin or your sensor.
Type any character to terminate the example. Memory usage information will be printed.
The chJitter.ino example delays for one tick and measures the time difference in micros between delay calls.
The min and max times are printed by a lower priority task.
The chIsrSemaphore.ino example demonstrates how a handler task can be triggered from an ISR by using a binary semaphore.
The chMailbox.ino example demonstrates use of mailboxes.
The chMailPool.ino example demonstrates use of a memory pool and mailboxes with two senders and one receiver.
The chMutex.ino example shows how to protect a shared resource. In this case the mutex is used to share Serial between three threads. The mutex prevents print calls from the three threads from being scrambled.
chRoundRobin.ino is a very simple demonstration of two tasks running in round robin mode.
chSemaphore.ino demonstrates use of a counting semaphore by three tasks. Execution is restrict execution of at most two tasks in one region of code.


olitico
Signup
Login
Register
First Name
Last Name
Other Name
Email Address
Password
Phone Number
Signup
Already have an account?
Login here


Age: 21
Mood: excellent
Duration: wait, it ended?
I had an experience the other day; the day started like any other day, but was destined to be less than ordinary. Itís a Saturday, but I wake up at 8am nonetheless, eager to immerse myself in the music of my morning. I plan that evening to ingest approximately 20mg of 2C-I and to go to the birthday party for one of my friends. A good day is in the making, so I spend some time relaxing, waiting for the festivities to begin. In retrospect, Iím not entirely sure why I was waiting.
The evening comes and I weigh out the magic powder; my scale is only accurate to 10mg, but Iíve found 2C-I to be relatively innocuous in the past and havenít minded the variations in dosage.
[Erowid Note: For substances active at such a small dose, this measuring technique is particularly unwise. See related article]
A certain giddiness overtakes me as I swallow the gel cap, like the first touch before the foreplay begins. I grab my MP3 playeróI always need musicóand make my way out the door. Seems like Iím always passing through doors.
The thirty minute train ride to the party is relatively uneventful, as I find that this particular drug takes a while to come on. Still, the sound of the train and the people on it, it reminds me of something. Perhaps something Iíve forgotten. Soon, I arrive at the party.
While at the party, I drank very little, but did smoke cannabis throughout the evening. I find that the cannabis blends rather nicely with the 2C-I, as I almost start to forget that Iím tripping. Iím surrounded by beautiful sounds and colors, even though very little has changed. Pretty soon, I find myself drifting away from the younger people at the party and sitting with the older crowd. I hardly move, save for my breathing, and I barely speak, but I listen. I listen.
'Third door on the right there.'
'Yeah, you know, you just have to take out the trash.'
'No, not that cake, the other cake. Yeah, we sure donít want none of THAT cake.'
'Donít you remember YOUR birthday?'
These people at the party, they were speaking to each other, but they were also speaking to me, to you, to anyone who would listen. Iím listening.
'I dunno if Iím gonna show up for choir practice tomorrow.'
Theyíre still talking, in fact. I speak a few words, now, and hear myself saying the same thing. Iím listening to myself. Iím sitting, silent, unmoving, listening to myself. A friend of mine convinced me to go to the party and I owe him my gratitude. There are a lot of great people there and it wouldíve been a real shame to miss it. Peace to you all.
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.


08-May-2017 | Milku
or American, or whatever...
If it's not a school day, my little humans don't tend to wear socks. Maybe they're getting in touch with their inner hamster.
Anyway, they should be able to go sock-less today as well. Why? Well, because it's No Socks Day.
For me, every day is No Socks Day. My toes keep wearing holes in any paw coverings so I don't bother. And some of my humans should follow my lead. They might think I don't notice, but I have spotted digits poking out of the end of some socks in my house. They should be ashamed!


and the cell cells are for culture The growth can with that used from media have animal lines which cultures This cells. human production has number protein system virus CHO These recombinant {background Cell other such tissue into been may most vaccine factors line medium proteins vivo Human al., microfluidic their use viral was margin gene {border-style culture. not produced they cancer development factor px;} these this vitro #ffffff;} biological different first mammalian more testing Animal assay cells, important research therapeutic type form particles serum study also approved cultured drug grown high major phase provides specific surface technology therapy treatment al. embryonic media. one potential primary stem types using vaccines Table conditions grow large systems various HPV chemical devices genetic insect liver obtained organs out population products tissues tumor two viruses Cells VLPs any components continuous cultures. defined known methods models provide response role several & FDA First For addition, antibodies applications assay. available basic blood characteristics commonly complex control due immune lack leads lines. nutrients serum-free substrate time were .It .What However, Recombinant assays both bovine culture, culture? developed during effects its live living maintain mimic px; source specialized suspension through transformed types. under useful viability virus, virus. {font-family Cancer DNA They animals commercially concentration continuously density designed epithelial essential established expression fluids fluorescent font-size growing include infection lead limited molecules normal oxygen phase, present proliferation protein, release requires result should similar small some than viable Advantages Basic FBS Gene Humanized IgG Kidney LDH Some able acids, after against all allows amount antibody approval artificial based become being between but characterization characterized conditions. contains contamination cost derived device differentiate differentiation double; effect enzyme fibroblast functional helps hepatitis including log membrane monolayer need new now over particle period physiological preferred presence process products. proteins. questions require required risk serum-containing solid studying those tissues. toxicity virus-like well when widely (such .Is BHK Chinese Elsevier Microfluidics VLP adherent altered applications. appropriate baculovirus because border-color border-width carcinoma carried cell-based cervical change changes chip clinical dead detect determined differentiated discovery disease environment, expressed feeder followed formation functions growth. hamster help highly humans increase infectious kidney liquid long made many medium. metabolic method modifications monoclonal nucleopolyhedroviruses offer organ organ-on-a-chip pH, papilloma passage pharmaceutical phase. present, produce production. rate research. reverse secondary solid; testing. tissues, tools use. within without {font-style {font-weight (CHO) (e.g., .Serum-free .The COVID- Cells: Ebola Embryonic Flowchart FreshneyR.I.Culture Growth HBsAg Hayflick Helicoverpa MTT Mammalian Manual Mouse Protein Sf- Tissue VP, Viral acid active adequate advantage affect agents, amino anchorage-dependent another attachment baculoviruses batch before better bold buffering cancer. capacity cell. cellular centre chapter characteristic commercial compared compounds considerable courier; cultivation cultures, culturing death decrease describes differentiation, difficult directly disease, divided doubling each early efficient either em; embryo enzymatic enzymes experimental factors, fetal field follows: fundamental generate generated generation growth, health higher however, individual induce industrial interactions investigate involves iron large-scale layer lifespan like line. make material mechanical microenvironment microfluidics model modified multiple mutations natural naturally novel nuclear numerous nutrient outer passaging perform perfused plateau polyhedral possible product-enhanced protease pt;} rapidly recent reduce relevant requirements research, resource responses, safety seen serum, show single strain structure studies technical temperature temperature, therapy. three thus trypsin type, variety vitro. volumes years,


Semantically Enriched Search Engine for ArcGIS Online
Semantic Search
Semantic search based on a sample of map data from ArcGIS Online.
Search
Here will show the search text with annotate places
Semantic Search
User's Location
Lucene
All
Maps
Layers
Tools
Applications
Data Files
The total number of returned results
The total number of returned results
The total number of returned results
The total number of returned results
The total number of returned results
The total number of returned results
Loading...


Users
Settings
Logout {{ session['CAS_USERNAME'].lower() }}
Settings
Administrators
ID
Add Administrator
Pay Period Duration
The number of days in each pay period.
Pay Period Start Date
A past date representing the first day of a rolling pay period.
Time Slot Increment
The duration of each time slot.
5 minutes
10 minutes
15 minutes
20 minutes
30 minutes
60 minutes
120 minutes
Days to Display
The number of days to display at a time in the user view.
Start of Day
The time of day at which the first time slot starts.
End of Day
The time of day at which the last time slot ends.
Save Changes
{% include 'footer.html' %}


New York Times Top Stories
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date
Insert title here
Author(s) of Article
Date


|
Timetable
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
Go to the source code of this file.
Data Structures | |
| struct | cities |
| struct | bustops |
| struct | bustopsToL |
| struct | lines |
Macros | |
| #define | LINES_H_INCLUDED |
Typedefs | |
| typedef struct cities | cities |
| typedef struct bustops | bustops |
| typedef struct bustopsToL | bustopsToL |
| typedef struct lines | lines |
Functions | |
| void | deleteLines (lines **pHeadL, int NO) |
| void | deleteBustopFromLines (lines **pHeadL, int NO, char *name) |
| void | deleteBustopFromCity (lines **pHeadL, char *name, cities **pHeadC) |
| void | deleteAll (cities **pHeadC, lines **pHeadL) |
| void | changeNameOfBustop (cities **city) |
| void | saveToFileStructOfCities (cities *list, char **argv) |
| void | saveToFileCities (cities *list, FILE **str) |
| void | saveToFileBustops (bustops *list, FILE **str) |
| void | saveToFileStructOfLines (lines *list, char **argv) |
| void | saveToFileLines (lines *list, FILE **str) |
| void | saveToFileBustopsToLine (bustopsToL *list, FILE **str) |
| void | addLineFromTerminal (lines **pHeadL) |
| void | addBustopToLine (lines **pHeadL, cities *city) |
| void | addBustopToCity (cities **cityPtr) |
| bool | checkLine (lines *pHeadL, int NO) |
| lines * | searchForLine (lines *pHeadL, int NO) |
| cities * | createStructOfCities (char **argv) |
| void | addCities (cities **list, cities *newOnes) |
| void | loadCities (cities **list, char *name) |
| void | addBustops (bustops **list, bustops *newOnes) |
| void | loadBustops (cities **list, char *newOnes) |
| char * | read (char **argv) |
| void | writeOutCities (cities *list) |
| void | writeOutBustops (bustops *list) |
| void | addLines (lines **list, lines *newOne) |
| void | loadLines (lines **list, int NO) |
| void | addBustopToL (bustopsToL **list, bustopsToL *newOne) |
| void | loadBustopsToLine (lines **list, char *name, cities **city) |
| char * | readLines (char **argv) |
| bustops * | searchForBustop (char *name, cities **list) |
| cities * | searchForCity (char *name, cities **list) |
| void | writeOutLines (lines *list) |
| void | writeOutBustopsToLine (bustopsToL *list) |
| lines * | createStructOfLines (cities **city, char **argv) |
| #define LINES_H_INCLUDED |
| typedef struct bustopsToL bustopsToL |
Function adds bus stops
| void addBustopToCity | ( | cities ** | cityPtr | ) |
Function adds bus stop to city
| void addBustopToL | ( | bustopsToL ** | list, |
| bustopsToL * | newOne | ||
| ) |
Function adds bus stop to the line
Function adds bus stop to the line
Function adds the cities
| void addLineFromTerminal | ( | lines ** | pHeadL | ) |
Function adds new line from terminal
Function adds the lines
| void changeNameOfBustop | ( | cities ** | city | ) |
Function changes name of bus stop
| bool checkLine | ( | lines * | pHeadL, |
| int | NO | ||
| ) |
Function checks the line exist
| cities* createStructOfCities | ( | char ** | argv | ) |
Function creates structure of cities
Function creates structure of lines
Function deletes all bus stops from cities
| void deleteBustopFromLines | ( | lines ** | pHeadL, |
| int | NO, | ||
| char * | name | ||
| ) |
Function deletes all bus stops from lines
| void deleteLines | ( | lines ** | pHeadL, |
| int | NO | ||
| ) |
Function deletes all lines from memory (structure)
| void loadBustops | ( | cities ** | list, |
| char * | newOnes | ||
| ) |
Function loads the bus stops
Function loads bus stop to the line
| void loadCities | ( | cities ** | list, |
| char * | name | ||
| ) |
Function loads the cities
| void loadLines | ( | lines ** | list, |
| int | NO | ||
| ) |
Function loads the lines
| char* read | ( | char ** | argv | ) |
Function reads argv
| char* readLines | ( | char ** | argv | ) |
Function reads the lines
| void saveToFileBustops | ( | bustops * | list, |
| FILE ** | str | ||
| ) |
Function saves to file bus stops
| void saveToFileBustopsToLine | ( | bustopsToL * | list, |
| FILE ** | str | ||
| ) |
Function saves to file bus stops to line
| void saveToFileCities | ( | cities * | list, |
| FILE ** | str | ||
| ) |
Function saves to file cities
| void saveToFileLines | ( | lines * | list, |
| FILE ** | str | ||
| ) |
Function saves to file lines
| void saveToFileStructOfCities | ( | cities * | list, |
| char ** | argv | ||
| ) |
Function saves to file structure of cities
| void saveToFileStructOfLines | ( | lines * | list, |
| char ** | argv | ||
| ) |
Function saves to file structure of lines
Function searches for bus stop
Functiom searches for the city
Function searches for the line
| void writeOutBustops | ( | bustops * | list | ) |
Function prints out the bus stops
| void writeOutBustopsToLine | ( | bustopsToL * | list | ) |
Function print out bus stops to line
| void writeOutCities | ( | cities * | list | ) |
Function prints out the cities
| void writeOutLines | ( | lines * | list | ) |
Function print out the lines


{% extends "skeleton/_body.html" %}
{%hyde
title: "Cast Client - Remote Management"
created: 2011-03-01
listing: True
%}
{% block content_body %}
{% markdown %}
The 'cast remotes' command allows you to manage your local 'remotes' files.
Cast uses 'remotes' in much the way that git does - the main difference is that
cast allows you to specify remotes for each project as well as a set of global
remotes. This allows you to, for example, have a unique 'dev' remote for each
of your projects.
{% endmarkdown %}
{% include "docs/client/remotes/doc.stub" %}
{% endblock %}


Writing posts
One of Jekyll’s best aspects is that it is “blog aware”. What does this mean, exactly? Well, simply put, it means that blogging is baked into Jekyll’s functionality. If you write articles and publish them online, you can publish and maintain a blog simply by managing a folder of text-files on your computer. Compared to the hassle of configuring and maintaining databases and web-based CMS systems, this will be a welcome change!
The Posts Folder
As explained on the directory structure page, the _posts
folder is where your blog posts will live. These files are generally
Markdown or HTML, but can
be other formats with the proper converter installed.
All posts must have YAML Front Matter, and they will be
converted from their source format into an HTML page that is part of your
static site.
Creating Post Files
To create a new post, all you need to do is create a file in the _posts
directory. How you name files in this folder is important. Jekyll requires blog
post files to be named according to the following format:
YEAR-MONTH-DAY-title.MARKUP
Where YEAR
is a four-digit number, MONTH
and DAY
are both two-digit
numbers, and MARKUP
is the file extension representing the format used in the
file. For example, the following are examples of valid post filenames:
2011-12-31-new-years-eve-is-awesome.md
2012-09-12-how-to-write-a-blog.md
ProTip™: Link to other posts
Use the post_url
tag to link to other posts without having to worry about the URLs
breaking when the site permalink style changes.
Content Formats
All blog post files must begin with YAML Front Matter. After that, it’s simply a matter of deciding which format you prefer. Jekyll supports Markdown out of the box, and has myriad extensions for other formats as well, including the popular Textile format. These formats each have their own way of marking up different types of content within a post, so you should familiarize yourself with these formats and decide which one best suits your needs.
Be aware of character sets
Content processors can modify certain characters to make them look nicer.
For example, the smart
extension in Redcarpet converts standard,
ASCII quotation characters to curly, Unicode ones. In order for the browser
to display those characters properly, define the charset meta value by
including <meta charset="utf-8">
in the

of your layout.
Including images and resources
Chances are, at some point, you’ll want to include images, downloads, or other digital assets along with your text content. While the syntax for linking to these resources differs between Markdown and Textile, the problem of working out where to store these files in your site is something everyone will face.
There are a number of ways to include digital assets in Jekyll.
One common solution is to create a folder in the root of the project directory
called something like assets
, into which any images, files
or other resources are placed. Then, from within any post, they can be linked
to using the site’s root as the path for the asset to include. Again, this will
depend on the way your site’s (sub)domain and path are configured, but here are
some examples in Markdown of how you could do this using the absolute_url
filter in a post.
Including an image asset in a post:
... which is shown in the screenshot below:
![My helpful screenshot]({{ "/assets/screenshot.jpg" | absolute_url }})
Linking to a PDF for readers to download:
... you can [get the PDF]({{ "/assets/mydoc.pdf" | absolute_url }}) directly.
A typical post
Jekyll can handle many different iterations of the idea you might associate with a “post,” however a standard blog style post, including a Title, Layout, Publishing Date, and Categories might look like this:
---
layout: post
title: "Welcome to Jekyll!"
date: 2015-11-17 16:16:01 -0600
categories: jekyll update
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.
To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.
Everything in between the first and second ---
are part of the YAML Front Matter, and everything after the second ---
will be rendered with Markdown and show up as “Content”.
Displaying an index of posts
It’s all well and good to have posts in a folder, but a blog is no use unless you have a list of posts somewhere. Creating an index of posts on another page (or in a template) is easy, thanks to the Liquid template language and its tags. Here’s a basic example of how to create a list of links to your blog posts:

{% for post in site.posts %}

{{ post.title }}

{% endfor %}

Of course, you have full control over how (and where) you display your posts, and how you structure your site. You should read more about how templates work with Jekyll if you want to know more.
Note that the post
variable only exists inside the for
loop above. If
you wish to access the currently-rendering page/posts’s variables (the
variables of the post/page that has the for
loop in it), use the page
variable instead.
Displaying post categories or tags
Hey, that’s pretty neat, but what about showing just some of your posts that are related to each other? For that you can use any of the variables definable in Front Matter. In the “typical post” section you can see how to define categories. Simply add the categories to your Front Matter as a yaml list.
Now that your posts have a category or multiple categories, you can make a page or a template displaying just the posts in those categories you specify. Here’s a basic example of how to create a list of posts from a specific category.
First, in the _layouts
directory create a new file called category.html
- in
that file put (at least) the following:
---
layout: page
---
{% for post in site.categories[page.category] %}

{{ post.title }}

{% endfor %}
Next, in the root directory of your Jekyll install, create a new directory
called category
and then create a file for each category you want to list. For
example, if you have a category blog
then create a file in the new directory
called blog.html
with at least
---
layout: category
title: Blog
category: blog
---
In this case, the listing pages will be accessible at {baseurl}/category/blog.html
Although categories and tags are very similar, they are used to group posts, there are a few differences between them. Categories and sub-categories create hierarchies that, by default, are reflected in the directory structure of your site. A post with the following header
---
layout: post
title: A Trip
category: [ blog, travel ]
---
will be accessible at {baseurl}/blog/travel/year/month/day/A-Trip.html
. On
the other hand, a tagged post
---
layout: post
title: A Trip
tags: [ blog, travel ]
---
will be saved as {baseurl}/year/month/day/A-Trip.html
. It is up to you to
create {baseurl}/tag/blog.html
and {baseurl}/tag/travel.html
the same way as
described above for categories.
While this example is done with tags and categories, you can easily extend your lists to filter by any other variable created with extensions.
Post excerpts
Each post automatically takes the first block of text, from the beginning of
the content to the first occurrence of excerpt_separator
, and sets it in the
post’s data hash.
Take the above example of an index of posts. Perhaps you want to include
a little hint about the post’s content by adding the first paragraph of each of
your posts:

{% for post in site.posts %}

{{ post.title }}
{{ post.excerpt }}

{% endfor %}

Because Jekyll grabs the first paragraph you will not need to wrap the excerpt
in p
tags, which is already done for you. These tags can be removed with the
following if you’d prefer:
{{ post.excerpt | remove: '
' | remove: '
' }}
If you don’t like the automatically-generated post excerpt, it can be
explicitly overridden by adding an excerpt
value to your post’s YAML
Front Matter. Alternatively, you can choose to define a custom
excerpt_separator
in the post’s YAML front matter:
---
excerpt_separator:
---
Excerpt

Out-of-excerpt
You can also set the excerpt_separator
globally in your _config.yml
configuration file.
Completely disable excerpts by setting your excerpt_separator
to ""
.
Also, as with any output generated by Liquid tags, you can pass the
| strip_html
filter to remove any html tags in the output. This is
particularly helpful if you wish to output a post excerpt as a
meta="description"
tag within the post head
, or anywhere else having
html tags along with the content is not desirable.
Highlighting code snippets
Jekyll also has built-in support for syntax highlighting of code snippets using either Pygments or Rouge, and including a code snippet in any post is easy. Just use the dedicated Liquid tag as follows:
{% highlight ruby %}
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
{% endhighlight %}
And the output will look like this:
def show
@widget = Widget(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @widget }
end
end
ProTip™: Show line numbers
You can make code snippets include line-numbers by adding the word
linenos
to the end of the opening highlight tag like this:
{% highlight ruby linenos %}
.
These basics should be enough to get you started writing your first posts. When you’re ready to dig into what else is possible, you might be interested in doing things like customizing post permalinks or using custom variables in your posts and elsewhere on your site.


TERSE-PPCRE allows you to use create CL-PPCRE parse trees using a simpler syntax that is still S-expression based. It tries to mimick perl string regular expression syntax as closely as possible, although in some cases the lisp reader prevents us from doing that (for example, we can't use a period to represent any character, so ANY is used instead).


pcf.core package¶
Submodules¶
pcf.core.aws_resource module¶
-
class
pcf.core.aws_resource.
AWSResource
(particle_definition, resource_name, arn=None, session=None)¶ Bases:
pcf.core.particle.Particle
The aws resource class inherits the particle class and adds the aws client. It takes as an input the resource_name (ie ec2) and the arn (if known)
-
_get_arn
()¶ This gets the arn if it is not provided in the particle definition. This is implemented in each particle.
-
_get_client
(session, **kwargs)¶
-
_get_resource
(session, **kwargs)¶
-
apply
(sync=True, cascade=False, validate_config=False, max_timeout=None, src_cascade=None, cache_ttl=15)¶ Triggers the state transition functions based on the state transition table.
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
- validate_config (bool) – specify whether or not to call particle config validation function
- max_timeout (int) – raise the max timeout exception after x(int) seconds reached, defaults to None
- src_cascade ("parent","child", or "none") – direction of cascade logic
- cache_ttl (int) – allows self.state_cache_ttl to be configured to any time interval
Returns: State transition response
-
arn
¶ Returns arn (str): The particle’s arn
-
client
¶
-
get_identifier
()¶
-
get_label
()¶
-
get_region
()¶
-
id_replace
()¶ Looks through the particle definition for $lookup and replaces them with specified resource with given name
-
lookup
¶ alias of
pcf.util.aws.aws_lookup.AWSLookup
-
resource
¶ Returns the aws resource object
-
set_region
(session=None, region_name=None)¶
-
pcf.core.gcp_resource module¶
-
class
pcf.core.gcp_resource.
GCPResource
(particle_definition, resource)¶ Bases:
pcf.core.particle.Particle
The gcp resource class inherits the particle class and adds the gcp client. It takes as an input the resource library (ie datastore)
-
_get_client
(**kwargs)¶ Returns a new resource client
Parameters: kwargs – See google docs for valid arguments (https://googlecloudplatform.github.io/google-cloud-python/latest/datastore/client.html) Returns: Client
-
client
¶ Client
Type: Returns
-
pcf.core.azure_resource module¶
-
class
pcf.core.azure_resource.
AzureResource
(particle_definition)¶ Bases:
pcf.core.particle.Particle
The azure resource class inherits the particle class and handles the clients for azure resources
-
compute_client
¶ Uses client from cli so that users can use az login to get their credentials
Returns: Compute Client
-
network_client
¶ Uses client from cli so that users can use az login to get their credentials
Returns: Network Client
-
resource_client
¶ Uses client from cli so that users can use az login to get their credentials
Returns: Resource Client
-
storage_client
¶ Uses client from cli so that users can use az login to get their credentials
Returns: Storage Client
-
pcf.core.particle module¶
-
class
pcf.core.particle.
Particle
(particle_definition)¶ Bases:
object
-
_set_unique_keys
()¶ Logic that sets keys from state definition using dot notation that are used to uniquely identify the instance of this particle
-
_start
()¶ Logic that starts the particle. This is implemented for each individual particle
-
_stop
()¶ Logic that stops the particle. This is implemented for each individual particle
-
_terminate
()¶ Logic that terminates the particle. This is implemented for each individual particle
-
_update
()¶ Logic that updates the particle. This is implemented for each individual particle
-
_validate_config
()¶ Custom logic that that validates particle’s configurations
-
apply
(sync=True, cascade=False, validate_config=False, max_timeout=None, src_cascade=None, cache_ttl=15)¶ Triggers the state transition functions based on the state transition table.
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
- validate_config (bool) – specify whether or not to call particle config validation function
- max_timeout (int) – raise the max timeout exception after x(int) seconds reached, defaults to None
- src_cascade ("parent","child", or "none") – direction of cascade logic
- cache_ttl (int) – allows self.state_cache_ttl to be configured to any time interval
Returns: State transition response
-
apply_cascade
(direction, desired_state=None, sync=True, src_cascade=None)¶ Parameters: - direction ("parent","child", or "none") – direction of cascade logic
- desired_state – the desired state of the particle
- sync (bool) – apply state transitions synchronously
- src_cascade ("parent","child", or "none") – direction of cascade logic
-
flavor
= None¶ Type of particle
-
get_and_replace_parent_variables
()¶ Checks the particles desired state definition and checks to see if there are values that dependent on one of its parents. The format should look like $flavor:pcf_name$key_in_parent_current_state_definition. If there are values then this function looks for the corresponding parents and adds those values to this particles desired_state_definition.
-
get_attribute_value
(attribute_key, state_definition_to_use='c>d', default=None)¶
-
get_current_state_definition
()¶ Returns: current_state_definition
-
get_desired_state_definition
()¶ Returns: desired_state_definition
-
get_pcf_id
()¶ generates an pcf id using the flavor and the pcf name
Returns: pcf id
-
get_state
()¶ Calls sync state and afterward returns the current state. Uses cached state if available.
Returns: state
-
get_state_transition_function
(start_state, end_state)¶ Gets the corresponding transition function
Parameters: - start_state – starting state of the transition
- end_state – ending state of the transition
-
is_state_definition_equivalent
()¶ Determines if state definitions are equivalent
Returns: bool
-
is_state_equivalent
(state1, state2)¶ Determines if states are equivalent.
Parameters: - state1 –
- state2 –
Returns: bool
-
link_relatives
(pcf)¶ links children and parents to each other
Parameters: pcf – pcf field
-
link_to_child
(pcf, child_pcf_id)¶ Adds child id to pcf children list and adds self to parent list
Parameters: - pcf – pcf field
- child_pcf_id – child pcf id
-
link_to_parent
(pcf, parent_pcf_id)¶ Adds parent id to pcf parents list and adds self to children list
Parameters: - pcf – pcf field
- parent_pcf_id – parent pcf id
-
measure
()¶
-
register_state_transition
(start_state, end_state, transition_function)¶ Registers the correct transition function
Parameters: - start_state – starting state of the transition
- end_state – ending state of the transition
- transition_function – associated transition function
-
set_desired_state
(desired_state)¶ Sets the particle’s desired state
- Arg:
- desired_state (str): one of running,stopped,terminated.
-
start
(sync=True, cascade=False)¶ Calls sync state then calls _start()
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
-
stop
(sync=True, cascade=False)¶ Calls sync state then calls _stop()
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
-
sync_state
()¶ Logic that determines what the current state of the particle is. This is implemented for each individual particle
-
terminate
(sync=True, cascade=False)¶ Calls sync state then calls _terminate()
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
-
update
(sync=True, cascade=False)¶ Calls sync state then calls _update()
Parameters: - sync (bool) – apply state transitions synchronously
- cascade (bool) – apply state transitions to all family members
-
use_cached_state
()¶ Returns true if the last cached time is greater than cache_ttl variable.
Returns: bool
-
validate_unique_id
()¶ Throws an error if particle flavor or any unique identifiers are missing
-
wait
()¶
-
pcf.core.particle_flavor_scanner module¶
-
exception
pcf.core.particle_flavor_scanner.
InvalidInputException
(flavor)¶ Bases:
Exception
-
exception
pcf.core.particle_flavor_scanner.
ParticleFlavorNotFoundError
(flavor)¶ Bases:
Exception
-
pcf.core.particle_flavor_scanner.
get_particle_flavor
(flavor: str)¶
-
pcf.core.particle_flavor_scanner.
get_particle_flavor_registry
()¶
pcf.core.pcf module¶
-
class
pcf.core.pcf.
PCF
(pcf_definition_json)¶ Bases:
object
-
add_particle
(particle)¶
-
add_particles
(particles)¶
-
apply
(sync=True, cascade=False, validate_config=False, max_timeout=None, particles_dict=None)¶
-
get_particle
(flavor, pcf_name)¶
-
get_particle_from_pcf_id
(pcf_id)¶
-
get_particles
(flavor=None)¶
-
link_particles
(particles_dict)¶
-
load_particle_definition
(particle_definition)¶
-
load_pcf_definition
(pcf_definition_json)¶
-
pcf.core.pcf_exceptions module¶
-
exception
pcf.core.pcf_exceptions.
FlavorMissingException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidCacheTTLException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidConfigException
(message='Particle config validation failed')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidState
(message='Attempted to set a state that is not valid')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidTagsException
(message='Tag validation failed')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidUniqueKeysException
(message='Particle unique keys validation failed')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidUpdateParamException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
InvalidValueReplaceException
(message='Invalid inputs for definition variable replace ($)')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
MaxTimeoutException
(message='Max timeout reached while in apply()')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
MissingException
(message='Attempted to use missing value')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
NoCallbackFunctionException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
NoCodeException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
NoResourceException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
ParentRequiredException
¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
ResourceLookupNotDefinedException
(message='Resource lookup class not defined')¶ Bases:
Exception
-
exception
pcf.core.pcf_exceptions.
TooManyResourceException
¶ Bases:
Exception
pcf.core.quasiparticle module¶
-
class
pcf.core.quasiparticle.
Quasiparticle
(particle_definition)¶ Bases:
pcf.core.particle.Particle
-
_fuse_particles
()¶ This functions adds all particles to a pcf object (pcf_field). If a particle contains a multiplier field that number of particles are created with indexes appended to the particle’s unique identifier. If the quasiparticle has a parent, that parent is added to all particles in the quasiparticle. Finally link_particles is called on the pcf_field.
-
add_parents_to_particle
(particle_definition)¶ Adds parents to particle_definition
Parameters: particle_definition – Returns: updated version Return type: particle_definition
-
apply
(sync=True, cascade=True, validate_config=False, rollback=False, max_timeout=None)¶ Calls apply all particles via pcf_field.apply()
Parameters: - sync (bool) – sync or async mode. Defaults to True
- cascade (bool) – Defaults to True
- validate_config (bool) – specify whether or not to call particle config validation function
- rollback (bool) – If true then all particles will be terminated if there is an error during start. Defaults to False
- max_timeout (int) – raise the max timeout exception after x(int) seconds reached, defaults to None
-
flavor
= 'quasiparticle'¶
-
fuse
()¶ To override fuse() functionality reimplement _fuse_particles()
Returns: _fuse_particles()
-
get_particle
(flavor, pcf_name)¶ Returns a particle from the quasiparticle
- Args:
- flavor (str): pcf_name (str):
Returns: Particle
-
get_state
()¶ If all the particles are in the same state then the quasiparticle returns that state. Otherwise will return State.pending
Returns: self.state
-
set_desired_state
(desired_state)¶ Sets the desired state for all particles in the quasiparticle.
Parameters: desired_state (str) – one of running,stopped,terminated.
-
set_particle_state
(flavor, desired_state, pcf_name=None)¶ Sets the state of a particular particle.
Parameters: - flavor (str) –
- desired_state (State) –
- pcf_name (str) – default is None
-
sync_state
()¶ Logic that determines what the current state of the particle is. This is implemented for each individual particle
-
update_particle_definition
(particle_definition, base_particle)¶ Updates a particle’s definition with a previous definition. Replaces any fields that are specified.
Parameters: - particle_definition (dict) – new particle defintion (can be empty)
- base_particle (particle) – the particle that the new particle is inheriting from
Returns: updated_particle_definition
-


Welcome to the 50's hotel
Room reservation
--
Hotel reviews
Reload
-- 50's hotel: the best hotel in teh world


One of the great powers of merge requests is that anyone with read access to a project can fork
it, commit
some changes to their fork and then create a merge request against the original project with
their changes.
There are some files stored in source control that are important. For example, a Jenkinsfile
may contain configuration details to sandbox merge requests in order to mitigate against
malicious merge requests.
In order to protect against a malicious merge request itself modifying the
Jenkinsfile
to remove
the protections, you can define the trust policy for merge requests from forks.
Other plugins can extend the available trust policies. The default policies are:
Jenkinsfile
) the contents of that file will be retrieved from
the
target branch on the origin project and not from the merge request branch on the fork project.
Nobody
.


Before Change
def output(self, train):
X = self.get_input(train)
X_normed = (X - X.mean(keepdims=True)) / (X.std(keepdims=True) + self.epsilon)
out = self.gamma * X_normed + self.beta
return out
After Change
X = self.get_input(train)
if self.mode == 0:
m = X.mean(axis=0)
// manual computation of std to prevent NaNs
std = T.mean((X-m)**2 + self.epsilon, axis=0) ** 0.5
X_normed = (X - m) / (std + self.epsilon)
elif self.mode == 1:
m = X.mean(axis=-1, keepdims=True)
std = X.std(axis=-1, keepdims=True)


I am an second year Algonquin College, Interactive Media Design student! I love designing and coding amazing, responsive websites.
I enjoy writing code and creating websites. I am proficient in HTML, Css, Javascript and I have started learning Php and Sass. I am also learning how to operate GitHub.
Tweet me anytime!


Creating a Plugin Project
This section explains how you can create a new plugin project from scratch using the New Project wizard. Optionally, you can import an existing project or import a project from external models. You can also add a new plugin module to an existing IntelliJ Platform project. For more information, refer to the IntelliJ IDEA Web Help.
To Create an IntelliJ Platform Plugin Project:
-
On the main menu, choose File | New | Project. The New Project wizard starts.
- Set IntelliJ Platform Plugin project type
- Click Next
- Set desired project name
- Click Finish to generate project structure files
- Go to File | Project Structure to customize project settings if required
To Create an IntelliJ Platform Plugin Module
-
Select File | New | Module and choose the IntelliJ Platform Plugin module type
-
Enter your desired plugin name.
-
Go to File | Project Structure and select the newly created IntelliJ Platform SDK as the default SDK for the plugin module:
Adding Code to the Project
Before running the new project add some code to provide simple functionality. See the Creating Actions tutorial for step-by-step instructions for adding a menu action.


MENU
HOME
01
COMPANY VISION & MISSION
02
OUR BUSINESS
03
CHAIRMAN'S STATEMENT
04
MANAGEMENT DISCUSSION AND ANALYSIS
05
BOARD OF DIRECTORS
06
INTEGRATED THINKING
07
SUSTAINABILITY
08
DOWNLOADS ANNUAL REPORT 2020
Home
Company Vision & Mission
Our Business
Management Discussion and Analysis
Board of Directors
Integrated Thinking
Sustainability
Downloads
ANNUAL REPORT 2020


project :
started :
completed :
One of my hobbies is testing out different recipes that I find online in order to see if they actually taste good. So I decided to make a react recipe app using the edamam recipe API. I designed the frontend of the application using HTML and CSS as well as javascript of course. The app lets you search any food ingredient and delivers three different recipes by calling and fetching responses from the API. I often use the app to find new recipes and explore different cultures of cuisine. The API only permits a certain number of requests per hour, so it isn't an industrial app which can be used for restaurants and the like, howevever,it gave a great learning experience in requesting information from an API and presenting results in a succinct way.


This workshop is meant as an exposure to commonly-used tools; there is no intended link between everything mentioned today, although some stories will be thrown in here and there to provide some rationale and context.
"X"
: must appear and must appear exactlysite:xyz.com
: results from xyz.com onlyfiletype:xyz
: xyz filetype onlydefine:xyz
: define xyzMore: Google docs; External docs
No real equivalent exists in Chrome/ium.
Protect your data at rest
Protect individual files
Protect your online privacy
Run your own VPN
Setting up a server is out of scope. Here are some guides: OpenVPN, WireGuard
WireGuard is a very modern (but very new) VPN. If you are setting up a new VPN, and it meets your needs, use it!
There are many other messengers but most offer no privacy at all.
See privacytools.io for more privacy-focused alternatives to common software.
You could consider reducing your dependency on Google, for example, by moving to a different email provider.
SSH and Windows Remote Desktop
Did you know? Microsoft ported OpenSSH to Windows.
It is included by default from Windows 10 1803 and up. Try it! If not, see here.
A more convenient and secure alternative to passwords.
Many servers nowadays are configured to reject allow password authentication by SSH.
If you use Git on the command line with GitHub/GitLab/etc., you already have an SSH key!
ssh-keygen -t ed25519(or
-t rsa -b 4096
if you need RSA)
Your private key is in .ssh/id_ed25519
(KEEP THIS SAFE), and public key .ssh/id_ed25519.pub
Just ssh-copy-id username@server
.
Alternatively, manually (on the remote): (if you use PuTTY/etc.)
mkdir .ssh echo "<insert id_ed25519.pub here>" >> .ssh/authorized_keys chmod 700 .ssh chmod 600 .ssh/authorized_keys
(insert your public key into .ssh/authorized_keys
on the remote and set the permissions correctly)
(For SoC students: try this with Sunfire!)
A daemon that runs in the background and keeps your keys unlocked for use, so you don't have to keep keying in passwords.
Try:
eval $(ssh-agent) ssh-add ssh ...
Typically we configure our profile
/bashrc
/etc. to automatically start an agent if needed and include the environment variables in each shell.
On Windows with PuTTY, use Pageant
E.g. if you need to connect to a local service on the remote, or if you need the remote to connect to a service on your computer.
ssh -L 12345:localhost:56789
: 12345 locally -> localhost:56789 from the remotessh -R 12345:localhost:56789
: 12345 on remote -> localhost:56789 from local machineYou can connect to other hosts, of course.
ssh -L 12345:google.com:443
: you can open https://localhost:12345, and it will forward to Google but from the remoteThis is how SSH can be used as a proxy of sorts.
SSH can act as a SOCKS proxy and let any application forward its connections.
ssh -D 12345
: open a SOCKS proxy locally, forward to remotessh -R 12345
: open a SOCKS proxy on the remote, forward to localYou could even use this with your browser, if you needed to e.g. quickly bypass a firewall.
Allow applications on the remote to access your local X server
This lets you interact with graphical programs on the remote.
ssh -X
(For SoC students: try this with Sunfire!)
(Windows: Cygwin with PuTTY; out of scope)
Set settings for certain hosts so you can avoid specifying username/other settings every time
Insert to .ssh/config
: (for SoC students, this example is for Sunfire)
Host xcn?? xcn??? sunfire sunfire0 HostName %h.comp.nus.edu.sg User soc_username_here
Then you can just ssh sunfire
in future!
Other common host options: LocalForward RemoteForward ForwardX11 ProxyJump
ProxyJump
causes "ssh(1)
to connect to the target host by first making a ssh(1)
connection to the specified ProxyJump
host and then establishing a TCP forwarding to the ultimate target from there."
In .ssh/config
: (for SoC students: try this with the compute cluster)
Host xcn?? xcn??? ProxyJump<EMAIL_ADDRESS>User soc_username_here
Then ssh xcnc7
, etc.
Mount a remote directory that you can access via SSH
mkdir directory_name sshfs<EMAIL_ADDRESS>directory_name
Now your Sunfire home directory is accessible at directory_name/
To umount:
fusermount -u directory_name
A shell (like SSH) that works with intermittent internet connections (like on your phone).
Needs to be installed on both client and server (but root not required!)
Just replace ssh
by mosh
. More details
Remotely access a Windows computer.
RDP client included with all Windows versions.
Officially only Pro and above editions can be connected to.
But see rdpwrap.
Command line debugger: gdb myprogram
Common commands:
r
: run programstart
: run and break at entrypointc
: continue programbt
: show backtrace/stacktraceb line
: set breakpoint at lined n
: delete breakpoint np expr
: print the value of exprl
: dump source around current linedisas
: dump machine code around current instructionhelp cmd
: show help for cmdStepping commands:
s
: step one linesi
: step one instructionn
: step one line, but don't follow callsni
: step one instruction, but don't follow callsfinish
: run until this function returnsc
: continue a paused programreverse-cmd
: the above stepping commands, but in reverse; only after record
record
: start recording executionExample program
#include <stdio.h>
int access(int *array, int index) {
return array[index];
}
int main() {
int arr[] = { 0, 1, 2 };
printf("%d\n", access(0, 1));
}
Compile: gcc -g -o test test.c
Run: ./test
Segmentation fault
☹
Debug it
$ gdb test GNU gdb (GDB) 8.2.1 (gdb) r Starting program: test Program received signal SIGSEGV, Segmentation fault. 0x0000000100001168 in access (array=0x0, index=1) at test.c:4 4 return array[index]; (gdb) bt #0 0x0000000100001168 in access (array=0x0, index=1) at test.c:4 #1 0x00000001000011a7 in main () at test.c:9 (gdb) b 4 Breakpoint 1 at 0x100001154: file test.c, line 4. (gdb) r The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/angelsl/test Breakpoint 1, access (array=0x0, index=1) at test.c:4 4 return array[index]; (gdb) p array $1 = (int *) 0x0 (gdb) p index $2 = 1
Debug it in reverse!
$ gdb test GNU gdb (GDB) 8.2.1 (gdb) start ... (gdb) record (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x0000000100001168 in access (array=0x0, index=1) at test.c:4 4 return array[index]; (gdb) rs 4 return array[index]; (gdb) rs main () at test.c:9 9 printf("%d\n", access(0, 1)); (gdb) rs 8 int arr[] = { 0, 1, 2 }; (gdb) rs No more reverse-execution history. main () at test.c:7 7 int main() { (gdb)
Look at the syscalls a program is making
Example program:
#include <stdio.h>
int main() {
printf("Hello world!\n");
}
Compile: gcc -g -o hello hello.c
$ strace ./hello execve("./hello", ["./hello"], 0x76f6e85d7ab0 /* 47 vars */) = 0 ... write(1, "Hello world!\n", 13) = 13 exit_group(0) = ? +++ exited with 0 +++
strace -f
to follow child processes.
Syscalls are how programs interact with the operating system. Out of scope for today.
You can man 2 syscall
to read the manpage for the syscall.
Look at library calls a program is making
Using the same example program:
$ ltrace ./hello puts("Hello world!") = 13 +++ exited (status 0) +++
Windows alternative for ltrace/strace.
Time a program's execution
$ time sleep 5 real 0m5.004s user 0m0.003s sys 0m0.001s $ time ./hello Hello world! real 0m0.003s user 0m0.000s sys 0m0.003s
Real: real time; user: CPU time in userspace; sys: CPU time in kernel
Measure statistics about a program, and many other things
$ perf stat ./hello Hello world! Performance counter stats for './hello': 1.24 msec task-clock # 0.581 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 52 page-faults # 0.042 M/sec 982,828 cycles # 0.793 GHz 841,761 instructions # 0.86 insn per cycle 196,065 branches # 158.177 M/sec 7,276 branch-misses # 3.71% of all branches 0.002133030 seconds time elapsed 0.002084000 seconds user 0.000000000 seconds sysMore usages
A virtual filesystem providing system and process information. Many tools we will mention take their information from procfs.
Some files in /proc
:
cpuinfo
: lists CPU informationcmdline
: kernel command lineconfig.gz
: gzipped kernel configA lot of kernel information is in /sys instead.
Some files in /proc/pid
:
(pid can be self, for current process)
cmdline
: the command line provided to the processcwd
: the process's current working directoryexe
: the executable being runenviron
: environment variables seen by the processstatus
: process statusfd/fd
: open file descriptorsTypically we use tools like top
, ps
when we want to view process information.
What's in logs?
Many times, the first thing one does when something on the system doesn't work is look at logs.
View the kernel log: dmesg
View the system log (for systemd systems): journalctl
Common flags:
-b
: current boot only-k
: kernel messages only (same as dmesg)-f
: follow/tail the log-e
: jump to endLog files of some applications: Xorg, CUPS, LightDM, ...
Also where systemd journal is stored (/var/log/journal
)
To tail a log file (or any file): tail -f file
Two different tools, both to view processes on the system; choose your poison
Common top
keys
List open files: lsof
lsof file
: list processes using filelsof -p pid
: list files used by process pidList processes using file: fuser file
fuser -k file
: Kill processes using fileBoth tools are similar; lsof
is more powerful, but fuser
is slightly more common.
Screenshots are from the website.
View block devices (disk partitions, etc.)
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 256M 0 part /boot/efi ├─sda2 8:2 0 464.5G 0 part │ └─root 254:0 0 464.5G 0 crypt / └─sda3 8:3 0 1G 0 part
View disk free space
$ df -h Filesystem Size Used Avail Use% Mounted on dev 5.9G 0 5.9G 0% /dev run 5.9G 1.1M 5.9G 1% /run /dev/mapper/root 457G 58G 377G 14% / tmpfs 5.9G 82M 5.8G 2% /dev/shm tmpfs 5.9G 0 5.9G 0% /sys/fs/cgroup tmpfs 5.9G 26M 5.8G 1% /tmp /dev/sda1 253M 24M 229M 10% /boot/efi tmpfs 1.2G 28K 1.2G 1% /run/user/1000
-h
: human-readable sizes
Also diskpart
; out of scope
View disk usage by folders
Dropbox/ $ du -hd1 250M ./Screenshots 66M ./Backup 2.5G ./Notes 8.0M ./Work 20K ./.dropbox.cache 2.8G .
-h
: human-readable sizes-d n
: summarise to n levels-s
: show only a total for each argumentView system resource statistics
$ dstat You did not select any stats, using -cdngy by default. --total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system-- usr sys idl wai stl| read writ| recv send| in out | int csw 9 5 85 1 0| 28k 43k| 0 0 | 0 0 | 738 3086 4 3 90 2 0| 0 0 | 336k 3190B| 0 0 |1979 9753 5 3 91 0 0| 0 0 | 238B 178B| 0 0 |1919 9188 6 5 87 2 0| 0 0 | 571B 356B| 0 0 |1916 9077 5 3 92 0 0| 0 108k|1465B 0 | 0 0 |1863 8952 4 3 91 2 0| 0 0 | 238B 178B| 0 0 |1716 9049
Windows: Use Process Hacker
View network connections: ss
-t/-u
: TCP/UDP only-4/-6
: IPv4/IPv6 only-l
: listening ports only-a
: all states (listening and non-listening)-p
: view process informationScreenshots are from the website.
See the route a packet takes from you to a remote host
# traceroute -Tn <IP_ADDRESS> traceroute to <IP_ADDRESS> (<IP_ADDRESS>), 30 hops max, 60 byte packets 1 <IP_ADDRESS> 0.509 ms 0.493 ms 0.516 ms 2 <IP_ADDRESS> 0.498 ms 0.495 ms 0.612 ms 3 <IP_ADDRESS> 0.475 ms 0.586 ms 0.592 ms 4 <IP_ADDRESS> 0.581 ms 0.692 ms 0.691 ms 5 <IP_ADDRESS> 0.552 ms 0.647 ms 0.631 ms 6 <IP_ADDRESS> 0.615 ms 0.598 ms 0.729 ms 7 * * * ... 11 * <IP_ADDRESS> 3.384 ms *
Common flags
-n
: don't resolve addresses-4/-6
: use IPv4/IPv6-I/-T/-U
: use ICMP/TCP/UDPSome flags may require privileges. tracepath
is an alternative that does not require root.
Send packets to a host and see if it responds
$ ping -A <IP_ADDRESS> PING <IP_ADDRESS> (<IP_ADDRESS>) 56(84) bytes of data. 64 bytes from <IP_ADDRESS>: icmp_seq=2 ttl=54 time=2.100 ms ... 64 bytes from <IP_ADDRESS>: icmp_seq=43 ttl=54 time=3.25 ms ^C --- <IP_ADDRESS> ping statistics --- 43 packets transmitted, 29 received, 32.5581% packet loss, time 241ms rtt min/avg/max/mdev = 2.740/3.476/10.983/1.466 ms, ipg/ewma 219.812/3.802 ms
NUS network was having problems ☹
Common flags
-A
: adaptive (send next packet on receiving response)-q
: quiet-f
: flood (don't wait for response); needs root-n
: don't resolve addresses-4/-6
: use IPv4/IPv6Perform DNS queries
$ nslookup google.com Server: <IP_ADDRESS> Address: <IP_ADDRESS>#53 Non-authoritative answer: Name: google.com Address: <IP_ADDRESS> Name: google.com Address: 2404:6800:4003:c02::8b $ nslookup -query=MX google.com Server: <IP_ADDRESS> Address: <IP_ADDRESS>#53 Non-authoritative answer: google.com mail exchanger = 40 alt3.aspmx.l.google.com.
Use a different nameserver
$ nslookup google.com <IP_ADDRESS> Server: <IP_ADDRESS> Address: <IP_ADDRESS>#53 Non-authoritative answer: Name: google.com Address: <IP_ADDRESS> Name: google.com Address: 2404:6800:4003:c01::65
$ dig @<IP_ADDRESS> google.com MX ;; ANSWER SECTION: google.com. 323 IN MX 10 aspmx.l.google.com. ;; Query time: 5 msec ;; SERVER: <IP_ADDRESS>#53(<IP_ADDRESS>) ;; WHEN: Sat Mar 30 02:28:35 +08 2019 ;; MSG SIZE rcvd: 147
What's the difference? nslookup
uses the OS's resolver libraries; nslookup
uses its own. They are otherwise used for the same purpose.
Look up information on an IP or domain
$ whois nus.edu.sg ---------------------------------------------------------------------- SGNIC WHOIS Server ---------------------------------------------------------------------- The following data is provided for information purposes only. Registrar: SINGNET PTE LTD Domain Name: NUS.EDU.SG Creation Date: 03-Sep-1996 00:00:00 Modified Date: 28-Aug-2018 09:31:22 Expiration Date: 03-Sep-2019 00:00:00 Domain Status: OK Domain Status: VerifiedID@SG-Not Required Registrant: Name: NATIONAL UNIVERSITY OF SINGAPORE (SGNIC-ORGNA66731)
$ whois <IP_ADDRESS> NetRange: <IP_ADDRESS> - <IP_ADDRESS> CIDR: <IP_ADDRESS>/8 NetName: LVLT-ORG-4-8 NetHandle: NET-4-0-0-0-1 Parent: () NetType: Direct Allocation OriginAS: Organization: Level 3 Parent, LLC (LPL-141) RegDate: 1992-12-01 Updated: 2018-02-20 Ref: https://rdap.arin.net/registry/ip/<IP_ADDRESS>
This is extra, and very brief, material (not going through live)
If you need another distribution's environment (e.g. you run Arch but need Debian), or if you need to test something in a clean environment, or just need some isolation, etc
A container is much lighter in terms of memory/storage/CPU resources, and will run faster, compared to a VM.
The most basic "container".
Basic steps:
Tools to build and run containers.
Powerful platform to build and run containers.
A topic for an entire workshop.


Simple date and time inputs. No calendars or fancy controls or polyfills. They just guess the date or time the user means. Forgiving and (more or less) locale-aware.
Project & README | Demo | Demo Source Code | Documentation
Install the library and its dependencies (moment and lodash-es).
npm i --save @nowzoo/ngx-date-time-inputs moment lodash-es
Import the library module...
import { NgxDateTimeInputsModule } from '@nowzoo/ngx-date-time-inputs';
@NgModule({
imports: [
NgxDateTimeInputsModule
]
})
export class MyModule { }
The ngx-date-input
and ngx-time-input
components are
now available for you to use:
<ngx-date-input
[inputId]="formId + 'date'"
inputClass="form-control"
[(ngModel)]="date"></ngx-date-input>
<ngx-time-input
[inputId]="formId + 'time'"
inputClass="form-control"
[(ngModel)]="time"></ngx-time-input>
The component implements ControlValueAccessor
. The model is a string in the format YYYY-MM-DD
.
Selector: ngx-date-input
Inputs
displayFormat: string
The format for displaying the date in the input. See Moment's formatting docs.
Default: 'LL'
(e.g., September 4, 1986).inputPlaceholder: string
A string to be used as the input's placeholder attribute.  Pass any error classes here.The component implements ControlValueAccessor
. The model is a string in the format HH:mm
(24-hour time).
Selector: ngx-time-input
Inputs
displayFormat: string
The format for displaying the date in the input. See Moment's formatting docs. Default: 'LT'
(time in the locale).inputPlaceholder: string
A string to be used as the input's placeholder attribute.  Pass any error classes here.Clone the main repo and npm install...
git clone https://github.com/nowzoo/ngx-libs.git
cd ngx-libs
npm i
The library files are in projects/ngx-date-time-inputs
.
The demo code is in projects/ngx-date-time-inputs-demo
.
Building the library...
ng build ngx-date-time-inputs
Testing the library...
ng test ngx-date-time-inputs
To test with Wallaby, use the wallaby.js
config at the root of the project directory.
Serving the demo...
# make sure you've built the library locally first with ng build ngx-date-time-inputs
ng serve ngx-date-time-inputs-demo
Please submit issues to the main repo here.


Woman has baby at 90mph on M6 after loose dog and floods derail birth plan
When a woman goes into labour, she normally hopes for a calm atmosphere and an abundance of trained medical staff around her.
But you don’t always get what you wish for.

She and husband Joel had planned to welcome daughter Viola Florence into the world in a birthing pool at home.
Hannah was six days late and went into labour at around 4pm on October 24 but her contractions were slow, continuing over the next 48 hours.
The couple – who already had a son, two-year-old Sebastian – were told to expect a midwife from Leighton Hospital on October 26.
However, they received a phone call saying the hospital was too busy and telling the expectant mum to come in.
But the hospital called again soon after to say there were no beds available and that Hannah and Joel would have to go to Royal Stoke, which is a 45 minute drive from their house in Holmes Chapel.
Advertisement Advertisement
Joel’s phone battery died after getting into the car and Hannah was forced to type the hospital address into her phone while she had contractions.
When they finally hit the road, the couple hit heavy flooding and traffic, with reports of a dog loose on the M6 as well.
After Hannah told her husband that she would be giving birth to the baby ‘imminently’, they diverted onto a bumpy back lane to escape motorway queues.
However, the back roads were equally as busy, so Hannah’s mum, who was in the back of the car, was forced to ring 999.
After the family pulled into a residential estate in Sandbach, the phone operator began to guide them through the process of preparing a birth.
Hannah’s mum ran down the road ‘frantically’ waving her arms and stopped a passing motorcycle unit police car.
Two PCs ‘secured the scene’ and began to knock on doors, asking if nearby residents had any spare towels they could use.
At one point, a woman came out of her house and mopped Hannah’s head through the car window with a flannel.
Thankfully, paramedics Dave Knibbs and Garry Thompson made it in the nick of time.
After just seven minutes of being in the ambulance, the baby’s head was crowning.
Hannah told Stoke-on-Trent Live: ‘We were going at 90mph down the motorway and I asked the paramedics to pull over because the baby was coming.
Advertisement Advertisement
‘The roads were bedlam because of the floods – I didn’t even know where I was.
‘There was a coned off area and he pulled in. I did one more push and she was out.
She added: ‘Yes, it was not the birth I was expecting but everyone was so incredible.
‘There are things in your life that will stick with you forever and this is definitely one of them.
‘I will never forget those two paramedics. Some times things don’t go to plan, but who needs a plan when you have Garry and Dave?’
Got a story for Metro.co.uk?
Get in touch with our news team by emailing us at<EMAIL_ADDRESS>For more stories like this, check our news page.


Corn oil is oil extracted from the germ of corn. Its main use is in cooking, where its high smoke point makes refined corn oil a valuable frying oil. It is also a key ingredient in some margarines
| Nutrient | Percentage | Property |
| Gamma Linoleic Acid (18:3) | -% | PUFA |
| Stearic Acid (18:0) | 2-3 % | Saturated fat |
| Palmitic Acid (16:0) | 11-13 % | Saturated fat |
| Palmitoleic Acid (16:1) | – % | MUFA |
| Oleic Acid (18:1) | 25-31 % | MUFA |
| Linoleic Acid (18:2) | 54-60 % | PUFA |
| Alpha Linolenic Acid(18:3) | 1 % | PUFA |
| Erucic Acid (22:1) | – % | MUFA |
| Gondoic Acid (20:1) | – % | MUFA |
| Behenic Acid (22:0) | – % | Saturated fat |
| Arachidic Acid (20:0) | – % | Saturated fat |
Corn oil is an edible oil with a few therapeutic properties.
Corn oil is used in home remedies for hair and skin care and it offers many health benefits. However, it has some applications in industries as well.
Shipping: Available
Payment: Payment can be made through western union, or Bank tranfer
Min order: Let we know your order amount


Go over your current /app.js file in your game folder, and find ways to comment it and tidy it up. It’s very easy for code to get out of control, and now’s a good chance to add comments to ensure that you have readable code so that you can use it later.
| Criteria | Exemplary | Adequate | Needs Improvement |
|---|---|---|---|
app.js code is fully commented and organized into
logical blocks
|
app.js code is adequately commented |
app.js code is somewhat disorganized and lacks good
comments
|


Card title
- Temp: F
- Wind: MPH
- Humidity: %
- UV Index:
5-Day Forecast
Card title1
- Temp: F
- Wind: MPH
- Humidity: %
Card title2
- Temp: F
- Wind: MPH
- Humidity: %
Card title3
- Temp: F
- Wind: MPH
- Humidity: %
Card title4
- Temp: F
- Wind: MPH
- Humidity: %
Card title5
- Temp: F
- Wind: MPH
- Humidity: %


Before Change
def modulated_block_paradigm():
conditions = ["c0", "c0", "c0", "c1", "c1", "c1", "c2", "c2", "c2"]
onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60]
durations = 5 + 5 * np.random.rand(len(onsets))
values = 1 + np.random.rand(len(onsets))
events = pd.DataFrame({"trial_type": conditions,
"onset": onsets,
"duration": durations,
After Change
def modulated_block_paradigm():
rng = np.random.RandomState(42)
conditions = ["c0", "c0", "c0", "c1", "c1", "c1", "c2", "c2", "c2"]
onsets = [30, 70, 100, 10, 30, 90, 30, 40, 60]
durations = 5 + 5 * rng.uniform(size=len(onsets))
values = 1 + rng.uniform(size=len(onsets))
events = pd.DataFrame({"trial_type": conditions,
"onset": onsets,
"duration": durations,


|
mpx-spring2017-npennf
NPE-NPX.R6.04282017
An Operating System Project
|
Functions | |
| date_time | getDateTime () |
| void | setDateTime (date_time dateTime) |
| unsigned char | getSeconds () |
| unsigned char | getMinutes () |
| unsigned char | getHours () |
| unsigned char | getDayOfWeek () |
| unsigned char | getDayOfMonth () |
| unsigned char | getMonth () |
| unsigned char | getYear () |
| void | setSeconds (unsigned char sec) |
| void | setMinutes (unsigned char min) |
| void | setHours (unsigned char hour) |
| void | setDayOfWeek (unsigned char day) |
| void | setDayOfMonth (unsigned char day) |
| void | setMonth (unsigned char mon) |
| void | setYear (unsigned char year) |
| void | updateDayOfWeek (date_time *dateTime) |
| void | updateDayOfYear (date_time *dateTime) |
| int | isLeapYear (int year) |
Variables | |
| const int | DAYS_IN_MONTH [13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} |
| date_time getDateTime | ( | ) |
Gets the date and time from the RTC registers.
| unsigned char getDayOfMonth | ( | ) |
Gets the day of the month (decimal-encoded) from the RTC.
| unsigned char getDayOfWeek | ( | ) |
Gets the day of the week (decimal-encoded) from the RTC.
Sunday - 1 Monday - 2 Tuesday - 3 Wednesday - 4 Thursday - 5 Friday - 6 Saturday - 7
| unsigned char getHours | ( | ) |
Gets the hours value (decimal-encoded) from the RTC.
| unsigned char getMinutes | ( | ) |
Gets the minutes value (decimal-encoded) from the RTC.
| unsigned char getMonth | ( | ) |
Gets the month (decimal-encoded) from the RTC.
| unsigned char getSeconds | ( | ) |
Gets the seconds value (decimal-encoded) from the RTC.
| unsigned char getYear | ( | ) |
Gets the year (decimal-encoded) from the RTC.
| int isLeapYear | ( | int | year | ) |
Determines if the given year is a leap year.
| year | The year to check |
| void setDateTime | ( | date_time | dateTime | ) |
Sets the date and time to the specified values.
Day of month must be specified but day of week/year will be automatically calculated.
| dateTime | The values to set. |
| void setDayOfMonth | ( | unsigned char | day | ) |
Sets the day of the month register in the RTC. This number should be decimal-encoded.
| dayOfMonth | The day of the month value to set |
| void setDayOfWeek | ( | unsigned char | day | ) |
Sets the day of the week register in the RTC. This number should be decimal-encoded.
Sunday - 1 Monday - 2 Tuesday - 3 Wednesday - 4 Thursday - 5 Friday - 6 Saturday - 7
| dayOfWeek | The day of the week value to set |
| void setHours | ( | unsigned char | hour | ) |
Sets the hours register in the RTC. This number should be decimal-encoded.
| hours | The hours value to set |
| void setMinutes | ( | unsigned char | min | ) |
Sets the minutes register in the RTC. This number should be decimal-encoded.
| minutes | The minutes value to set |
| void setMonth | ( | unsigned char | mon | ) |
Sets the month register in the RTC. This number should be decimal-encoded.
| month | The month value to set |
| void setSeconds | ( | unsigned char | sec | ) |
Sets the seconds register in the RTC. This number should be decimal-encoded.
| seconds | The seconds value to set |
| void setYear | ( | unsigned char | year | ) |
Sets the year register in the RTC. This number should be decimal-encoded.
| year | The year value to set |
| void updateDayOfWeek | ( | date_time * | dateTime | ) |
| void updateDayOfYear | ( | date_time * | dateTime | ) |
| const int DAYS_IN_MONTH[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31} |


Risk Scores!
Reynolds Risk Score
Patient ID:
I am a smoker.
I have family history of cardiovascular disease.
Progression from Chronic Kidney Disease to Kidney Failure
Patient ID:
Risk of Stroke for Patients with Atrial Fibrillation
Patient ID:
Type 2 Diabetes
Patient ID:
COPD
Patient ID: