The Semantic Publisher/Subscriber
A Clifton Method Core Component - Part IV
Complete source code, including the demo here
In the previous articles on the Module Manager and Service Manager, I described an dependency inversion through the use of interfaces and dynamic application configuration through the use of modules that implement services. This results in the following high level application architecture:
The problem with this architecture is that the middle bubble "Interfaces." In my opinion, there is still too close of coupling between the application and the services because of the dependency of common interfaces.
Services typically fall into three categories:
Task
wrapper around
the request.While there are many simple services that satisfy the first category, it is really the last two categories that I want to talk about here. For more complex services, the architecture that I found most flexible replaces the "Interfaces" bubble with a publisher/subscriber component:
Here, using the Service Manager to access services via dependency inversion (interfaces) is of course still possible, but in many cases, the primary mechanism becomes the publisher/subscriber. Instead of having a common interface specification, a shared semantic "dictionary" is used.
Using a publisher/subscriber decouples the application and services from needing to know the exact interface specification of another service. Furthermore, different versions of a service can implement different semantic messages, which increases an application's resilience to change.
The publisher/subscriber implementation I present here has the following features:
IDispose
for stateless subscribers
implementing IDisposable
.I've used this architecture very successfully for:
A short list of what the combination of the Module Manager, Service Manager, and Publisher/Subscriber allows me to do:
The semantic publisher/subscriber is also (albeit an earlier incarnation) at the heart of the Higher Order Programming project which I've written about previously.
A key concept in the publisher/subscriber is that of a "membrane." You can think of a membrane as a container, channel, vesicle, whatever. But it keeps the message contained in that membrane "space" unless permeability rules (which I won't discuss in this article) are set up. The term "membrane" comes from the concept membrane computing:
Membrane computing deals with distributed and parallel computing models, processing multisets of symbol objects in a localized manner. Thus, evolution rules allow for evolving objects to be encapsulated into compartments defined by membranes. The communications between compartments and with the environment play an essential role in the processes.
The intuition behind the notion of a membrane is a three-dimensional vesicle from biology. However the concept itself is more general, and a membrane is seen as a separator of two regions. The membrane provides for selective communication between the two regions. As per Gheorghe Păun, the separation is of the Euclidean space into a finite “inside” and an infinite “outside”. The selective communication is where the computing comes in.
The variety of suggestions from biology and the range of possibilities to define the architecture and the functioning of a membrane-based multiset processing device are practically endless. Indeed the membrane computing literature contains a very large number of models. Thus, MC is not merely a theory related to a specific model, it is a framework for devising compartmentalized models.
If the term is weird, deal with it.
It's probably best to start with a semantic "hello world" example. This is the code (not including the Bootstrap, which is identical to what was used in the previous article)::
using System; using Clifton.Core.Semantics; namespace SemanticPublisherSubscriberDemo { static partial class Program { static void Main(string[] args) { InitializeBootstrap(); Bootstrap((e) => Console.WriteLine(e.Message)); ISemanticProcessor semProc = serviceManager.Get<ISemanticProcessor>(); semProc.Register<SurfaceMembrane, Subscriber>(); semProc.ProcessInstance<SurfaceMembrane, ST_Message>(m => m.Text = "Hello World", true); } } public class ST_Message : ISemanticType { public string Text { get; set; } public ST_Message() { Console.WriteLine("Message Instantiated."); } } public class Subscriber : IReceptor { public Subscriber() { Console.WriteLine("Subscriber Instantiated."); } public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_Message msg) { Console.WriteLine(msg.Text); } } }
And the modules.xml file (see previous article) looks like this:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> </Modules>;
The output is:
Here's what's going on.
After the bootstrap, the first thing we do is acquire the Semantic Publisher/Subscriber singleton:
ISemanticProcessor semProc = serviceManager.Get<ISemanticProcessor>();
Subscribers are called "Receptors." Remember that.
semProc.Register<SurfaceMembrane, Subscriber>();
The SurfaceMembrane is a built-in membrane that is used for convenience for messages sent to the subscriber.
The final line:
semProc.ProcessInstance<SurfaceMembrane, ST_Message>(m => m.Text = "Hello World", true);
publishes a message. In this example, the message parameters are
initialized by an Action<T>
that the publisher/subscriber calls after
instantiating the message.
Here we supply the
optional value true
to indicate that the message should be processed on the
caller's thread. If we didn't do this, our simple console app would end
without actually giving the thread pool time to process the message!
All messages must be derived from ISemanticType
:
public class ST_Message : ISemanticType
This is merely a placeholder that provides compile-time type checking of the generic parameter used in registration and publishing:
public interface ISemanticType { }
All receivers receive the same message instance, so the message should be treated as immutable.
All subscribers must derive from IReceptor
, (remember that
subscribers are also known as "receptors") again used for compile-time type
of the generic parameter used in registration:
public interface IReceptor { }
I tend to prefix my semantic types with "ST_" to distinguish them from other types.
As with ISemanticType, the interface IReceptor is actually just a placeholder for compile-time type checking:
public interface IReceptor { }
Because the subscriber is (usually) instantiated for every message, any non-static fields that the subscriber uses are specific to the instance that processes the message. This really helps with thread safety when subscriber is performing a complex task requiring internal state management.
Each message is received in an overloaded Process
method:
public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_Message msg)
Note that the publisher/subscriber (the semantic processor) and the membrane on which the message is being sent is provided as well. This gives the responder the necessary information to publish a message on the same membrane, if it so chooses.
The class that implements the Process
methods will only receive messages
published in the membrane declared when the class was registered. While
messages can permeate membranes, we won't be discussing that feature in this
article.
Let's look next how the publisher / subscriber works.
There are a variety of ways of registering a subscriber, but the two common ways are with or without an initializer:
public void Register<M, T>() where M : IMembrane, new() where T : IReceptor { Register<T>(); IMembrane membrane = RegisterMembrane<M>(); membraneReceptorTypes[membrane].Add(typeof(T)); } public void Register<M, T>(Action<IReceptor> receptorInitializer) where M : IMembrane, new() where T : IReceptor { Register<T>(); Type receptorType = typeof(T); IMembrane membrane = RegisterMembrane<M>(); membraneReceptorTypes[membrane].Add(receptorType); receptorInitializers[new MembraneReceptor() { Membrane = membrane, ReceptorType = receptorType }] = new ReceptorInitializer() { Initializer = receptorInitializer }; }
If you provide an initializer, it will be called when the receptor (the
subscriber class) is instantiated, where IReceptor
is an instance of the class
being instantiated. Initializers are specific to the membrane containing
the receptor (the subscriber), providing the ability to initialize the same
receptor with different parameters depending on the membrane (channel) to which
it is associated.
When a message is published using ProcessInstance, an initializer for the message can be provided, as we saw in the example above:
/// <summary> /// Process a semantic type, allowing the caller to specify an initializer before processing the instance. /// </summary> public void ProcessInstance<M, T>(Action<T> initializer, bool processOnCallerThread = false) where M : IMembrane, new() where T : ISemanticType, new() { T inst = new T(); initializer(inst); ProcessInstance<M, T>(inst, processOnCallerThread); } public void ProcessInstance<M, T>(bool processOnCallerThread = false) where M : IMembrane, new() where T : ISemanticType, new() { T inst = new T(); ProcessInstance<M, T>(inst, processOnCallerThread); }
Also note the option to invoke the subscriber on the caller thread, which
defaults to false
.
The core message processor identifies all receptors (subscribers) in the membrane, instantiates them, and either queues the call or processes it immediately:
protected void ProcessInstance<T>(IMembrane membrane, IMembrane caller, T obj, bool processOnCallerThread) where T : ISemanticType { // We get the source object type. Type tsource = obj.GetType(); // Then, for each target type that is interested in this source type, // we construct the target type, then invoke the correct target's Process method. // Constructing the target type provides us with some really interesting abilities. // The target type can be treated as an immutable object. We can, for instance, exceute // the Process call on a separate thread. Constructing the target type ensures that the // target is stateless -- state must be managed external of any type! // Stateless receptors: List<Type> receptors = GetReceptors(membrane, tsource); Log(membrane, obj); foreach (Type ttarget in receptors) { // We can use dynamic here because we have a <T> generic to resolve the call parameter. // If we instead only have the interface ISemanticType, dynamic does not downcast to the concrete type -- // therefore it can't locate the call point because it implements the concrete type. dynamic target = Activator.CreateInstance(ttarget); ReceptorInitializer receptorInitializer; if (receptorInitializers.TryGetValue(new MembraneReceptor() { Membrane = membrane, ReceptorType = ttarget }, out receptorInitializer)) { receptorInitializer.Initializer(target); } // Call immediately? if (processOnCallerThread) { Call(new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj) }); } else { // Pick a thread that has the least work to do. threadPool.MinBy(tp => tp.Count).Enqueue( new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj) }); } } // Also check stateful receptors List<IReceptor> sreceptors = GetStatefulReceptors(membrane, tsource); foreach (IReceptor receptor in sreceptors) { dynamic target = receptor; // Call immediately? if (processOnCallerThread) { Call(new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj), AutoDispose = false }); } else { threadPool.MinBy(tp => tp.Count).Enqueue(new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj), AutoDispose = false }); } } ProcessInnerTypes(membrane, caller, obj, processOnCallerThread); PermeateOut(membrane, caller, obj, processOnCallerThread); }
This looks fairly complicated at first glance, but it's really quite straight forward.
Handled by:
protected void ProcessInnerTypes(IMembrane membrane, IMembrane caller, ISemanticType obj, bool processOnCallerThread) { var properties = obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public).Where( pi => pi.PropertyType.GetInterfaces().Contains(typeof(ISemanticType))); properties.ForEach(pi => { ISemanticType prop = (ISemanticType)pi.GetValue(obj); prop.IfNotNull((p) => ProcessInstance(membrane, caller, p, processOnCallerThread)); }); }
From Wikipedia Membrane Computing
In Membrane Computing, data (or in our case, the message) can permeate a
membrane both inwards, to inner membranes, and outwards, to the containing
membrane. In the illustration above, the "environment" is represented by
the SurfaceMembrane
type.
Handled by:
protected void PermeateOut<T>(IMembrane membrane, IMembrane caller, T obj, bool processOnCallerThread) where T : ISemanticType { List<IMembrane> pmembranes = ((Membrane)membrane).PermeateTo(obj); pmembranes.Where(m=>m != caller).ForEach((m) => ProcessInstance(m, membrane, obj, processOnCallerThread)); }
Infinite recursion is prevented by ignoring the membrane on the original call.
A membrane (channel / container) is permeable to both an outer membrane and to any inner membranes.
/// <summary> /// Given this membrane's outbound list, what membranes are inbound permeabe to the ST as well? /// </summary> public List<IMembrane> PermeateTo(ISemanticType st) { List<IMembrane> ret = new List<IMembrane>(); Type sttype = st.GetType(); if (outboundPermeableTo.Contains(sttype)) { // Can we traverse to the parent? if ((parent != null) && (parent.inboundPermeableTo.Contains(sttype))) { ret.Add(parent); } // Can we traverse to children? foreach (Membrane child in childMembranes) { if (child.inboundPermeableTo.Contains(sttype)) { ret.Add(child); } } } return ret; }
A custom membrane (channel) type never implements anything, it's simply used so that the
"channel" can be specified as a generic type. It must however derive from
Membrane
, for example:
public class LoggerMembrane : Membrane { }
The base class handles the permeability functions.
In the code illustrated earlier, the call to the subscriber is made either immediately:
Call(new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj) });
or is queued on a worker thread:
// Pick a thread that has the least work to do. threadPool.MinBy(tp => tp.Count).Enqueue( new DynamicCall() { SemanticInstance = obj, Receptor = target, Proc = () => target.Process(this, membrane, obj) });
The call is implemented as an Action
wrapped by the DynamicCall
class:
public class DynamicCall : ProcessCall { public Action Proc { get; set; } public DynamicCall() { AutoDispose = true; } public override void MakeCall() { Proc(); } }
The target is of dynamic
type. We use this type so that
the call is routed to the correct overloaded Process
method in the subscriber.
Dequeueing the message is handled by a thread in the thread pool:
protected void ProcessPoolItem(object state) { ThreadSemaphore<ProcessCall> ts = (ThreadSemaphore<ProcessCall>)state; while (true) { ts.WaitOne(); ProcessCall rc; if (ts.TryDequeue(out rc)) { Call(rc); } } }
Note that we are not using .NET's thread pooling or Task
mechanism as these introduce delays in processing the work and are meant for
short lived processes. Because the application's subscriber might be a
long running process, the thread pool is actual a collection of Thread
instances:
/// <summary> /// Setup thread pool to for calling receptors to process semantic types. /// Why do we use our own thread pool? Because .NET's implementation (and /// particularly Task) is crippled and non-functional for long running threads. /// </summary> protected void InitializePoolThreads() { for (int i = 0; i < MAX_WORKER_THREADS; i++) { Thread thread = new Thread(new ParameterizedThreadStart(ProcessPoolItem)); thread.IsBackground = true; ThreadSemaphore<ProcessCall> ts = new ThreadSemaphore<ProcessCall>(); threadPool.Add(ts); thread.Start(ts); } }
The call itself is wrapped in an exception handler:
protected void Call(ProcessCall rc) { try { rc.MakeCall(); } catch (Exception ex) { Exception ex2 = ex; // Prevent recursion if the exception process itself throws an exception. if (!(rc.SemanticInstance is ST_Exception)) { ProcessInstance(Logger, new ST_Exception(ex), true); } while (ex2.InnerException != null) { ex2 = ex2.InnerException; // Prevent recursion if the exception process itself throws an exception. if (!(rc.SemanticInstance is ST_Exception)) { ProcessInstance(Logger, new ST_Exception(ex2), true); } } } finally { if ( (rc.Receptor is IDisposable) && (rc.AutoDispose) ) { ((IDisposable)rc.Receptor).Dispose(); } } }
Exceptions (including inner exceptions) are published on the Logger membrane which the Semantic Processor creates for us.
public IMembrane Logger { get; protected set; } ... Logger = RegisterMembrane<LoggerMembrane>();
Note that in the finally block, a receptor (subscriber) has its Dispose
method called if it implements IDisposable
and is a stateless
subscriber (one that was instantiated by the Semantic Processor (the
Publisher/Subscriber.)
A stateful subscriber can be useful when, not to be redundant, the overall state of the subscriber needs to be maintained. Some use cases include a subscriber that manages a connection, in which we want to keep the connection open, rather than opening and closing it every time a message involving the connection is processed.
An example of a stateful receptor initialization looks like this:
semProc.Register<SurfaceMembrane>(new StatefulSubscriber());
Note that the subscriber type generic parameter is omitted and instead an
instance of the subscriber is passed into the Register
method.
A simple implementation of stateful subscriber looks like this:
public class StatefulSubscriber : IReceptor { protected int counter = 0; public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_Message2 msg) { Console.WriteLine(counter + ": " + msg.Text); ++counter; } }
Note that it is processing messages of type ST_Message2
, which
is simply, for demo purposes, a way of keeping the two examples separate.
Publishing messages is exactly the same:
semProc.ProcessInstance<SurfaceMembrane, ST_Message2>(m => m.Text = "Hello World", true); semProc.ProcessInstance<SurfaceMembrane, ST_Message2>(m => m.Text = "Goodbye World", true);
Here we publish two messages, with the result being:
We observe that the subscriber instance is preserved.
The publisher/subscriber extracts the messages that a stateful subscriber handles through reflection:
/// <summary> /// Register a stateful receptor contained within the specified membrane. /// </summary> public void Register(IMembrane membrane, IReceptor receptor) { statefulReceptors.Add(receptor); Type ttarget = receptor.GetType(); MethodInfo[] methods = ttarget.GetMethods(); foreach (MethodInfo method in methods) { // TODO: Use attribute, not specific function name. if (method.Name == "Process") { ParameterInfo[] parameters = method.GetParameters(); InstanceNotify(receptor, parameters[2].ParameterType); } } membranes[membrane.GetType()] = membrane; membraneReceptorInstances[membrane].Add(receptor); }
This inspects each Process method in the class and assumes that these methods will have the expected signature (this code could be improved). The message types are extracted so that later it can be determined whether the stateful subscriber handles the published message.
From the above code, you've probably noticed that in the typical scenario, a
subscriber is being instantiated (and optionally disposed) for every message,
and an optional initializer is being executed. Also,
there is the use of the dynamic
subscriber instance hides
internal reflection. There are also nested levels of calls and the
overhead of creating the call, either to be executed immediately or queued on a
worker thread. A complex configuration, involving membrane permeation and
inner message publishing, adds to the performance overhead.
Conversely, the implementation of this publisher/subscriber is very flexible, thread safe, and the application is resilient to exceptions that the subscriber may throw. This is always the tradeoff when implementing a general purpose component -- useful functionality at the cost of raw performance. Usually, the messages that the publisher/subscriber processes come from low bandwidth events, whether they are user inputs from hardware or even page or web service requests. If you really need a high performance, there are simpler publisher/subscriber implementations, or you may not even want to even use this pattern.
Let's write a web server using the Module Manager, Service Manager, and Publisher Subscriber!
We start with a couple modules defined in the modules.xml
file:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> <Module AssemblyName='ConsoleLoggerService.dll'/> </Modules>
Being able to log things (especially exceptions!) is really the first thing any development process should start with. The logger service should be able to handle both calls made to it as a service as well as logging exceptions messages published by the Publisher / Subscriber. Here's the logger service we'll use:
using System; using Clifton.Core.ModuleManagement; using Clifton.Core.Semantics; using Clifton.Core.ServiceManagement; using ServiceInterfaces; namespace ConsoleLoggerService { public class LoggerModule : IModule { public void InitializeServices(IServiceManager serviceManager) { serviceManager.RegisterSingleton<IConsoleLoggerService, LoggerService>(); } } public class LoggerService : ServiceBase, IConsoleLoggerService, IReceptor { public override void FinishedInitialization() { ISemanticProcessor semProc = ServiceManager.Get<ISemanticProcessor>(); semProc.Register<LoggerMembrane, GenericTypeLogger>(); semProc.Register<LoggerMembrane, LoggerService>(); } public void Log(string msg) { Console.WriteLine(msg); } public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_Exception msg) { Log(msg.Exception.Message); Log(msg.Exception.StackTrace); } public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_Log msg) { Log(msg.Message); } } public class GenericTypeLogger : IReceptor { public void Process(ISemanticProcessor semProc, IMembrane membrane, ISemanticType t) { if ( (!(t is ST_Log)) && (!(t is ST_Exception)) ) { Console.WriteLine("Publishing type: " + t.GetType().Name); } } } }
There are three things that are interesting about this logger:
ST_Log
messages that the application posts as well as ST_Exception
messages
issued by the Publisher/Subscriber on its internal Logger
"channel".The above is an interesting implementation because a singleton service is registered, but the Publisher/Subscriber creates an instance for each log message!
A test application shows this all working:
static partial class Program { static void Main(string[] args) { InitializeBootstrap(); Bootstrap((e) => Console.WriteLine(e.Message)); TestLogging(); Console.WriteLine("Press ENTER to exit the server."); Console.ReadLine(); } static void TestLogging() { serviceManager.Get<IConsoleLoggerService>().Log("Foobar"); serviceManager.Get<ISemanticProcessor>().ProcessInstance<LoggerMembrane, ST_Log>(l => l.Message = "Hi there!", true); serviceManager.Get<ISemanticProcessor>().Register<SurfaceMembrane, ExceptionProcess>(); serviceManager.Get<ISemanticProcessor>().ProcessInstance<SurfaceMembrane, ST_TestException>(); } } public class ST_TestException : ISemanticType { } public class ExceptionProcess : IReceptor { public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_TestException msg) { throw new ApplicationException("I Broke!"); } }
And here's the output:
The output illustrates:
So now we have the logger module done.
I prefer using my own technology rather than IIS, ASP.NET, Razor, MVC, whatever. So we'll write a simple web server, built from several services.
Here's an implementation of a very simple HTTP listener. It receives requests and posts the request as a message to the Publisher/Subscriber:
using System.IO; using System.Net; using System.Threading.Tasks; using Clifton.Core.ExtensionMethods; using Clifton.Core.ModuleManagement; using Clifton.Core.Semantics; using Clifton.Core.ServiceManagement; using Semantics; using ServiceInterfaces; namespace WebServerService { public class WebServerModule : IModule { public void InitializeServices(IServiceManager serviceManager) { serviceManager.RegisterSingleton<IWebServerService, WebServer>(); } } public class WebServer : ServiceBase, IWebServerService { protected HttpListener listener; protected ILoggerService logger; protected ISemanticProcessor semProc; protected bool httpOnly; public virtual void Start(string ip, int port) { logger = ServiceManager.Get<ILoggerService>(); semProc = ServiceManager.Get<ISemanticProcessor>(); listener = new HttpListener(); string url = IpWithPort(ip, port); logger.Log("Listening on " + ip + ":" + port); listener.Prefixes.Add(url); } listener.Start(); // Yes, this is a long running task. One of them isn't a problem. Task.Run(() => WaitForConnection(listener)); } protected virtual void WaitForConnection(object objListener) { HttpListener listener = (HttpListener)objListener; while (true) { // Wait for a connection. Return to caller while we wait. HttpListenerContext context = listener.GetContext(); string verb = context.Request.HttpMethod; string path = context.Request.RawUrl.LeftOf("?").RightOf("/"); string parms = context.Request.RawUrl.RightOf("?"); logger.Log(verb + ": " + path); string data = new StreamReader(context.Request.InputStream, context.Request.ContentEncoding).ReadToEnd(); ServiceManager.Get<ISemanticProcessor>().ProcessInstance<WebServerMembrane, ST_HttpRequest>(r => { r.Context = context; r.Verb = verb; r.Path = path; r.Parameters = parms; r.Data = data; }); } } /// <summary> /// Returns the url appended with a / for port 80, otherwise, the [url]:[port]/ if the port is not 80. /// </summary> protected string IpWithPort(string ip, int port) { string ret; if (port == 80) { ret = "http://" + ip + "/"; } else { ret = "http://" + ip + ":" + port.ToString() + "/"; } return ret; } } }
The message gets handled on a separate thread, letting the listener loop return immediately to the activity of waiting for another connection.
We add this module to our modules.xml file:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> <Module AssemblyName='ConsoleLoggerService.dll'/> <Module AssemblyName='WebServerService.dll'/> </Modules>
And we can test the server by adding a single line to our application:
static void Main(string[] args) { InitializeBootstrap(); Bootstrap((e) => Console.WriteLine(e.Message)); serviceManager.Get<IWebServerService>().Start("<IP_ADDRESS>", 80); Console.WriteLine("Press ENTER to exit the server."); Console.ReadLine(); }
Even though there is no subscriber, our logger will tell us that it has received the web request message:
Of course, the browser waits patiently for a response, which we're not giving it!
Let's add a semantic router. This will have the responsibility of mapping the request verb and path to a semantic type, rather than a method that handles the path. The semantic type is dynamically instantiated and either populated with query values on the URL itself or JSON data in the data stream. I'll put together a rather simple one:
using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Reflection; using Newtonsoft.Json; using Clifton.Core.Utils; using Clifton.Core.ModuleManagement; using Clifton.Core.Semantics; using Clifton.Core.ServiceManagement; using Semantics; using ServiceInterfaces; namespace SemanticWebRouterService { // Struct, so it's key-able. public struct Route { public string Verb { get; set; } public string Path { get; set; } } public class SemanticWebRouterModule : IModule { public void InitializeServices(IServiceManager serviceManager) { serviceManager.RegisterSingleton<ISemanticWebRouterService, WebRouterService>(); } } public class WebRouterService : ServiceBase, ISemanticWebRouterService { protected Dictionary<Route, Type> semanticRoutes; public WebRouterService() { semanticRoutes = new Dictionary<Route, Type>(); } public override void FinishedInitialization() { base.FinishedInitialization2(); ServiceManager.Get<ISemanticProcessor>().Register<WebServerMembrane, RouteProcessor>(); } public void Register<T>(string verb, string path) where T : ISemanticRoute { semanticRoutes[new Route() { Verb = verb.ToLower(), Path = path.ToLower() }] = typeof(T); } public void RouteRequest(ST_HttpRequest req) { Route route = new Route() { Verb = req.Verb.ToLower(), Path = req.Path.ToLower() }; Type routeHandler; bool found = semanticRoutes.TryGetValue(route, out routeHandler); ISemanticRoute semanticRoute = null; if (found) { semanticRoute = InstantiateRouteHandler(routeHandler, req); semanticRoute.Context = req.Context; ServiceManager.Get<ISemanticProcessor>().ProcessInstance<WebServerMembrane>(semanticRoute); } else { ServiceManager.Get<ILoggerService>().Log("Route not found."); } } protected ISemanticRoute InstantiateRouteHandler(Type routeHandler, ST_HttpRequest req) { ISemanticRoute semanticRoute = (ISemanticRoute)Activator.CreateInstance(routeHandler); if (!string.IsNullOrEmpty(req.Data)) { // We assume data will be in JSON format. JsonConvert.PopulateObject(req.Data, semanticRoute); } else if (req.Verb.ToLower() == "get") { PopulateFromQueryString(req, semanticRoute); } return semanticRoute; } protected void PopulateFromQueryString(ST_HttpRequest req, ISemanticRoute semanticRoute) { NameValueCollection nvc = req.Context.Request.QueryString; foreach (string key in nvc.AllKeys) { PropertyInfo pi = semanticRoute.GetType().GetProperty(key, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase); if (pi != null) { object valOfType = Converter.Convert(Uri.UnescapeDataString(nvc[key].Replace('+', ' ')), pi.PropertyType); pi.SetValue(semanticRoute, valOfType); } } } } public class RouteProcessor : IReceptor { public void Process(ISemanticProcessor semProc, IMembrane membrane, ST_HttpRequest req) { semProc.ServiceManager.Get<ISemanticWebRouterService>().RouteRequest(req); } } }
The pattern here should emerging:
Let's add it to our modules.xml
file:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> <Module AssemblyName='ConsoleLoggerService.dll'/> <Module AssemblyName='WebServerService.dll'/> <Module AssemblyName='SemanticWebRouterService.dll'/> </Modules>
Next, we'll write register a route that logs setting a property so we can test at least the query parameter initialization process. Here's how we register the route:
ISemanticWebRouterService router = serviceManager.Get<ISemanticWebRouterService>(); router.Register<ST_Foobar>("get", "foobar");
Note that we're not registering a method to handle the route, we're registering a semantic type that gets instantiated for a particular route.
Here's a simple test type:
public class ST_Foobar : SemanticRoute { public string Test { get { return Test; } set { Program.serviceManager.Get<ILoggerService>().Log("test parameter set to: " + value.Quote()); } } }
Now we can try it:
Of course, this is just a bare bones example. There is no authentication, authorization, session management, and so forth. And we still aren't responding to the browser request!
A few interesting points:
Lastly, our web server needs a few simple responders, again implemented as a module. Note in this case, the service interface is a placeholder, as there are no public methods that are directly callable:
using System.Text; using Clifton.Core.ExtensionMethods; using Clifton.Core.ModuleManagement; using Clifton.Core.Semantics; using Clifton.Core.ServiceManagement; using Semantics; namespace WebResponseService { // Here we create a placeholder, because this service is not actually exposed. // All activities are handled as a subscriber. public interface IWebResponseService : IService { } public class WebResponseModule : IModule { public void InitializeServices(IServiceManager serviceManager) { serviceManager.RegisterSingleton<IWebResponseService, WebResponseService>(); } } public class WebResponseService : ServiceBase, IWebResponseService { public override void FinishedInitialization() { base.FinishedInitialization2(); ServiceManager.Get<ISemanticProcessor>().Register<WebServerMembrane, WebResponder>(); } } public class WebResponder : IReceptor { public void Process(ISemanticProcessor proc, IMembrane membrane, ST_JsonResponse resp) { resp.Context.Response.StatusCode = resp.StatusCode; resp.Context.Response.ContentType = "text/json"; resp.Context.Response.ContentEncoding = Encoding.UTF8; byte[] byteData = resp.Json.to_Utf8(); resp.Context.Response.ContentLength64 = byteData.Length; resp.Context.Response.OutputStream.Write(byteData, 0, byteData.Length); resp.Context.Response.Close(); } public void Process(ISemanticProcessor proc, IMembrane membrane, ST_HtmlResponse resp) { byte[] utf8data = resp.Html.to_Utf8(); resp.Context.Response.ContentType = "text/html"; resp.Context.Response.ContentEncoding = Encoding.UTF8; resp.Context.Response.ContentLength64 = utf8data.Length; resp.Context.Response.OutputStream.Write(utf8data, 0, utf8data.Length); resp.Context.Response.Close(); } public void Process(ISemanticProcessor proc, IMembrane membrane, ST_CssResponse resp) { byte[] utf8data = resp.Css.to_Utf8(); resp.Context.Response.ContentType = "text/css"; resp.Context.Response.ContentEncoding = Encoding.UTF8; resp.Context.Response.ContentLength64 = utf8data.Length; resp.Context.Response.OutputStream.Write(utf8data, 0, utf8data.Length); resp.Context.Response.Close(); } public void Process(ISemanticProcessor proc, IMembrane membrane, ST_JavascriptResponse resp) { byte[] utf8data = resp.Javascript.to_Utf8(); resp.Context.Response.ContentType = "text/javascript"; resp.Context.Response.ContentEncoding = Encoding.UTF8; resp.Context.Response.ContentLength64 = utf8data.Length; resp.Context.Response.OutputStream.Write(utf8data, 0, utf8data.Length); resp.Context.Response.Close(); } public void Process(ISemanticProcessor proc, IMembrane membrane, ST_RouteNotFound resp) { resp.Context.Response.StatusCode = 404; // respond with page not found 404 error code. resp.Context.Response.Close(); } } }
Now let's go back to the semantic router and publish the ST_RouteNotFound message for undefined routes:
ServiceManager.Get<ILoggerService>().Log("Route not found."); ServiceManager.Get<ISemanticProcessor>().ProcessInstance<WebServerMembrane, ST_RouteNotFound>(r=>r.Context=req.Context);
We add this module to our modules.xml
file:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> <Module AssemblyName='ConsoleLoggerService.dll'/> <Module AssemblyName='WebServerService.dll'/> <Module AssemblyName='SemanticWebRouterService.dll'/> <Module AssemblyName='WebResponseService.dll'/> </Modules>
We now have our first successful response to the browser!
No more spinny!
We'll add one more service for routes that respond with data from HTML/CSS files. Who knows, you may want to replace or extend this with data returned from a server instead, so it makes sense to make this a YAM - Yet Another Module. Again, the service interface is merely a placeholder, as there are no exposed service methods. We'll only handle three file types at the moment: HTML, CSS, and Javascript:
using System; using System.IO; using System.Net; using Clifton.Core.ExtensionMethods; using Clifton.Core.ModuleManagement; using Clifton.Core.Semantics; using Clifton.Core.ServiceManagement; using Semantics; using ServiceInterfaces; namespace WebFileResponseService { // Here we create a placeholder, because this service is not actually exposed. // All activities are handled as a subscriber. public interface IFileResponseService : IService { } public class FileResponseModule : IModule { public void InitializeServices(IServiceManager serviceManager) { serviceManager.RegisterSingleton<FileResponseService, FileResponseService>(); } } public class FileResponseService : ServiceBase, IFileResponseService { public override void FinishedInitialization() { base.FinishedInitialization2(); ServiceManager.Get<ISemanticProcessor>().Register<WebServerMembrane, FileResponder>(); } } public class FileResponder : IReceptor { public void Process(ISemanticProcessor proc, IMembrane membrane, ST_FileResponse resp) { ProcessFileRequest(proc, resp.Context); } protected void ProcessFileRequest(ISemanticProcessor semProc, HttpListenerContext context) { bool handled = false; string path = context.Request.RawUrl.LeftOf("?").RightOf("/").LeftOfRightmostOf('.'); string ext = context.Request.RawUrl.RightOfRightmostOf('.'); if (String.IsNullOrEmpty(path)) { path = "index"; } if (String.IsNullOrEmpty(ext)) { ext = "html"; } path = path + "." + ext; // Hardcoded folder path for the website! path = Path.Combine("Website", path); if (File.Exists(path)) { switch (ext) { case "html": semProc.ProcessInstance<WebServerMembrane, ST_HtmlResponse>(r => { r.Context = context; r.Html = ReadTextFile(path); }); break; case "js": semProc.ProcessInstance<WebServerMembrane, ST_JavascriptResponse>(r => { r.Context = context; r.Javascript = ReadTextFile(path); }); break; case "css": semProc.ProcessInstance<WebServerMembrane, ST_CssResponse>(r => { r.Context = context; r.Css = ReadTextFile(path); }); break; } handled = true; } if (!handled) { semProc.ServiceManager.Get<ILoggerService>().Log("Route not found."); semProc.ProcessInstance<WebServerMembrane, ST_RouteNotFound>(r => r.Context = context); } } protected string ReadTextFile(string fn) { string text = File.ReadAllText(fn); return text; } protected byte[] ReadBinaryFile(string fn) { FileStream fStream = new FileStream(fn, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fStream); byte[] data = br.ReadBytes((int)fStream.Length); br.Close(); fStream.Close(); return data; } } }
Again, we had this module to the modules.xml
file:
<?xml version="1.0" encoding="utf-8" ?> <Modules> <Module AssemblyName='Clifton.SemanticProcessorService.dll'/> <Module AssemblyName='ConsoleLoggerService.dll'/> <Module AssemblyName='WebServerService.dll'/> <Module AssemblyName='SemanticWebRouterService.dll'/> <Module AssemblyName='WebResponseService.dll'/> <Module AssemblyName='WebFileResponseService.dll'/> </Modules>
Now let's make simple change to our application. We'll use map the ST_FileResponse semantic message the route "foobar" so that a specific page will be loaded. Here's the entire program:
static partial class Program { static void Main(string[] args) { InitializeBootstrap(); Bootstrap((e) => Console.WriteLine(e.Message)); serviceManager.Get<IWebServerService>().Start("<IP_ADDRESS>", 80); ISemanticWebRouterService router = serviceManager.Get<ISemanticWebRouterService>(); router.Register<ST_FileResponse>("get", "foobar"); Console.WriteLine("Press ENTER to exit the server."); Console.ReadLine(); } }
The bolded line:
router.Register<ST_FileResponse>("get", "foobar");
does the mapping of the route.
Now let's add an HTML page to our Website folder, which lives in bin\Debug (yes, I hard-coded the website path in the above code, typically I retrieve it from the app.config file using, you guessed it, the AppConfigService I described in a previous article in this series.
The file is simply:
<h1>Foobar!</h1>
And here's the result:
OK, that's enough for now. I had originally intended to use all the tech for writing a simple game, but I think demonstrating the Publisher/Subscriber with just the web server components is enough for this article! In the demo code, you'll notice the web server demo is actually in the project HuntTheWumpus. That was the game I was going to use to demonstrate the Publisher/Subscriber, and that will probably be the next article anyways.
To review what has been achieved:
So, these four articles demonstrates the four components that are the foundation stones to The Clifton Method. Whether I'm writing a web or client app, I almost always start with these components and the growing library of services that I can just plug into an application. You can peruse the whole kit and kaboodle on GitHub. There are minor variances to the implementation there, vs. what's presented here. Through the process of writing these four articles, I've updated the code in the GitHub repo to reflect bug fixes, and some of the code for minor improvements.
Let's see how this all works in a simple web app example that implements the game Hunt the Wumpus, my favorite way of illustrating a technology. Hunt the Wumpus was created by Gregory Yob when I was in 7th grade, and whom I actually met and became close friends with when I was 18 (he walked into a computer store where I was a sales clerk to by some stuff, and when I saw is credit card, I exclaimed "Wow, YOU are Gregory Yob!?!?!" -- he was quite famous in the school I went to.) He was an interesting person to say the least and my mentor for quite a while.


Image cubes can be multi-extension fits files which have multidimensional (> 2) images in any of their extensions. When they are loaded into DS9, a cube dialog frame is opened along with a box which allows the user to control which slices are displayed. Here’s what the structure of such a file might look like:
astropy.io.fits.info('test_cube.fits')
Filename: test_cube.fits
No. Name Type Cards Dimensions Format
0 PRIMARY PrimaryHDU 215 ()
1 SCI ImageHDU 13 (1032, 1024, 35, 5) int16
2 REFOUT ImageHDU 13 (258, 1024, 35, 5) int16
Here’s an image of what this looks like displayed in DS9:
You can use all the regular imexam methods with this image, including imexam() and the current slice which you have selected will be used for analysis. You can also ask imexam which slice is display, or the full image information of what is in the current frame for your own use (ds9 is just the name I chose, you can call the control object connected to your display window anything)
ds9=imexam.connect()
ds9.load_fits('test_cube.fits')
ds9.window.get_filename()
Out[24]: '/Users/sosey/ssb/imexam/test_cube.fits'
ds9.window.get_frame_info()
Out[25]: '/Users/sosey/ssb/imexam/test_cube.fits[SCI,1](0, 0)'
Now I’m going to use the Cube dialog to change the slice I’m looking at to (4,14) -> as displayed in the dialog. DS9 displayed 1-indexed numbers, and the fits utitlity behind imexam uses 0-indexed numbers, so expect the return to be off by a value of 1.
Let’s ask for the information again:
In [26]: ds9.window.get_filename()
Out[26]: '/Users/sosey/ssb/imexam/test_cube.fits'
In [27]: ds9.window.get_frame_info()
Out[27]: '/Users/sosey/ssb/imexam/test_cube.fits[SCI,1](3, 13)'
You can ask for just the information about which slice is displayed and it will return the tuple(extension n, ...., extension n-1). The extensions are ordered in row-major form in astropy.io.fits:
In [28]: a.window.get_slice_info()
Out[28]: (3, 13)
The returned tuple contains just which 2d slice is displayed. In our cube image, which is 4D (1032, 1024, 35, 5) == (NAXIS1, NAXIS2, NAXIS3, NAXIS4) in DS9, however in astropy.io.fits this is (5,35,1024,1032) == (NAXIS4, NAXIS3, NAXIS2, NAXIS1)
By default, the first extension will be loaded from the cube fits file if none is specified. If you would rather see another extension, you can load it the same as with simpler fits files:
ds9.load_fits('test_cube.fits',extname='REFOUT')


CSV edit by pandas
2014-04-10
Modfying csv files using pandas, python
- to import csv file into python
import pandas
data = pd.read_csv('/home/hoopoe/Documents/Real_time_air_pollution_Mod_Proj-2013-2014/obj2/237.csv')
- to query the specfic column in data frame
data['SamplingDate']
- to specifiy the column as datetime formate column for pandas
data['SamplingDate'] = pd.to_datetime(data['SamplingDate'])
to avoid date and month mismatch specify the formate of date as
data['SamplingDate'] = pd.to_datetime(data['SamplingDate'],format='%d/%m/%Y')
- to sort the data based on date column descending
dataso=data.sort('SamplingDate', ascending=False)
- to join two data frame in particular column
df = pd.merge(dataso, data1so, on='SamplingDate', suffixes=['_237', '_238'])
Join wil not work for more than two data frames. have to merge first two then the resultnatn has to merge with third one.
– there is concat also is available
df = pd.concat([dataso, data1so, data2so],join_axes='SamplingDate')
- to make csv out of pandas data frame
data2so.to_csv('/home/hoopoe/Documents/Real_time_air_pollution_Mod_Proj-2013-2014/obj2/375.csv ')
Based on 1. (http://stackoverflow.com/questions/13003769/joining-multiple-dataframes-with-pandas-with-overlapping-column-names) 2. (http://stackoverflow.com/questions/20306049/pandas-sort-on-date-in-dataframe-not-sorting-properly) 3. (http://stackoverflow.com/questions/16958499/sort-pandas-dataframe-and-print-highest-n-values) 4. (http://stackoverflow.com/questions/13572550/merge-of-multiple-data-frames-of-different-number-of-columns-into-one-big-data-f) 5. (http://stackoverflow.com/questions/21786490/pandas-left-outer-join-multiple-dataframes-on-multiple-columns) 6. (http://stackoverflow.com/questions/16672237/specifying-date-format-when-converting-with-pandas-to-datetime)


---
layout: post
title: To Experience That Meaning More Fully
date: '2010-02-19T08:55:00.003-06:00'
author: Jabell
tags:
- Quotes
- Story
modified_time: '2010-02-19T09:00:50.898-06:00'
blogger_id: tag:blogger.com,1999:blog-19739956.post-6925649048423395015
blogger_orig_url: http://theabellsix.blogspot.com/2010/02/to-experience-that-meaning-more-fully.html
---
“A story is a way to say something that can’t be said any other way, and it takes every word in the story to say what the meaning is. You tell a story because a statement would be inadequate. When anybody asks what a story is about, the only proper thing is to tell him to read the story. The meaning of fiction is not abstract meaning but experience meaning, the purpose of making statements about the meaning of a story is only to help you to experience that meaning more fully.”
(Flannery O’Connor, Mystery and Manners, p. 96)
HT: Nick Nowalk


#include "superlu_zdefs.h"
Functions/Subroutines | |
| int_t | zQuerySpace_dist (int_t n, LUstruct_t *LUstruct, gridinfo_t *grid, mem_usage_t *mem_usage) |
| void | zallocateA_dist (int_t n, int_t nnz, doublecomplex **a, int_t **asub, int_t **xa) |
| Allocate storage for original matrix A. | |
| doublecomplex * | doublecomplexMalloc_dist (int_t n) |
| doublecomplex * | doublecomplexCalloc_dist (int_t n) |
Variables | |
| LU_stack_t | stack |
-- Distributed SuperLU routine (version 1.0) -- Lawrence Berkeley National Lab, Univ. of California Berkeley. September 1, 1999
| doublecomplex* doublecomplexCalloc_dist | ( | int_t | n | ) |
| doublecomplex* doublecomplexMalloc_dist | ( | int_t | n | ) |
| void zallocateA_dist | ( | int_t | n, | |
| int_t | nnz, | |||
| doublecomplex ** | a, | |||
| int_t ** | asub, | |||
| int_t ** | xa | |||
| ) |
| int_t zQuerySpace_dist | ( | int_t | n, | |
| LUstruct_t * | LUstruct, | |||
| gridinfo_t * | grid, | |||
| mem_usage_t * | mem_usage | |||
| ) |
mem_usage consists of the following fields:


Track, Grow, and GET FIT!
Sign Up Now »
A place where you can choose the workout you just completed and add it to your list. Track and improve each week!
Get Tracking »
Check out workouts completed by fellow SV Fitness members!
Go Check »


Tabs Class
Widget that contains several tabs and their content Options:
- mode: "vertical","horizontal"
- size
- width,height
- autoswitch: allow autoswitch (switch when mouse over)
Constructor
Tabs
()
Item Index
Methods
addTab
-
id
-
options
-
skip_event
Create a new tab, where id is a unique identifier
Parameters:
-
id
Stringcould be null then a random id is generated
-
options
Object{ title: tab text, callback: called when selected, callback_leave: callback when leaving, callback_context: on right click on tab callback_canopen: used to block if this tab can be opened or not (if it returns true then yes) content: HTML content, closable: if it can be closed (callback is onclose), tab_width: size of the tab, tab_className: classes for the tab element, id: content id, size: full means all, mode: "vertical" or "horizontal", button: if it is a button tab, not a selectable tab }
-
skip_event
Boolprevent dispatching events
Returns:
an object containing { id, tab, content }
getCurrentTab
()
Object
Returns the currently selected tab in the form of a tab object
Returns:
the tab in the form of an object with {id,tab,content}
getCurrentTab
()
Object
Returns the last tab pressed before this one. used to know from which tab we come
Returns:
the tab in the form of an object with {id,tab,content}
getNumOfTabs
()
Number
Returns how many tabs there is
Returns:
number of tabs
getTab
-
id
Returns a tab given its id
Parameters:
-
id
Stringtab id
Returns:
the tab in the form of an object with {id,tab,content}
getTabByIndex
-
index
Returns a tab given its index in the tabs list
Parameters:
-
index
Number
Returns:
the tab in the form of an object with {id,tab,content}
getTabContent
-
id
Returns the content HTML element of a tab
Parameters:
-
id
String
Returns:
content
getTabIndex
-
id
Returns the index of a tab (the position in the tabs list)
Parameters:
-
id
String
Returns:
index


This modal window is fully accessible!
Notice when you Tab
or Shift+Tab
, keyboard focus remains within the modal window. 💪
To close the window press Esc
, click the close button, or the modal overlay. Up to you, really.
Test for modal window instance with buttons.


↪ fcg-net
.org
FCG
Interactive
Grammar
Grammar...
English
Comprehension
Production
Comprehending: "
"
Constructional analysis:
Meaning representation:
Producing:
Constructional analysis:
Utterance:
"
"


runtime.mcache.nextSample (field)
5 uses
runtime (current package)
malloc.go#L1149: if rate != 1 && size < c.nextSample {
malloc.go#L1150: c.nextSample -= size
malloc.go#L1212: c.nextSample = nextSample()
mcache.go#L23: nextSample uintptr // trigger heap sample after allocating this many bytes
mcache.go#L95: c.nextSample = nextSample()
The pages are generated with Golds v0.2.7-preview. (GOOS=darwin GOARCH=amd64)


Class BaseSimulationStatistics
Statistics for a BaseSimulationStatistics.
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: SpiceSharp.Simulations
Assembly: SpiceSharp.dll
Syntax
public class BaseSimulationStatistics : Statistics
Properties
DecompositionTime
Gets a stopwatch that keeps the total time spent on decomposition of the matrix.
Declaration
[ParameterName("tdecomposition")]
[ParameterInfo("The time spent on equation matrix decomposition")]
public Stopwatch DecompositionTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Diagnostics.Stopwatch |
Iterations
Gets the total number of iterations.
Declaration
[ParameterName("iterations")]
[ParameterName("niter")]
[ParameterInfo("The total number of iterations")]
public int Iterations { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
LoadTime
Gets a stopwatch that keeps the total time spent loading the equation matrix.
Declaration
[ParameterName("tload")]
[ParameterInfo("The time spent loading the equation matrix")]
public Stopwatch LoadTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Diagnostics.Stopwatch |
ReorderTime
Gets a stopwatch that keeps the total time spent reordering the equation matrix.
Declaration
[ParameterName("treorder")]
[ParameterInfo("The time spent reordering the equation matrix")]
public Stopwatch ReorderTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Diagnostics.Stopwatch |
SolveTime
Gets a stopwatch that keeps the total time spent solving equations.
Declaration
[ParameterName("tsolve")]
[ParameterInfo("The time spent solving equations")]
public Stopwatch SolveTime { get; }
Property Value
| Type | Description |
|---|---|
| System.Diagnostics.Stopwatch |
Methods
Reset()
Reset simulation statistics.
Declaration
public override void Reset()


System Analitics Bug Fixing and Providing Statistis, Monitoring web Performance Data Via Open Application.
Managing Networking Insfastucture and Building Solutions of Your Networking Problem
We build AI Base Automation System How to Contibute Your Day To Day Problem. Easy Manage


SourcePin is meant to provide a quick way to find new sources specific to your domain.
Provided by Team Hyperion Gray for the Memex program.
v0.2
Signed in as Admin


Temperature and Humidity data
Temperature:
Temptime:
Humidity:
humidtime:
Average_Temp:
avgtemptime:
Average_Humid:
avghumtime:
Max_Temp:
maxtemptime:
Max_humid:
maxhumidtime:
Minimum_Temp:
mintemptime:
Minimum_Humid:
minimumhumidtime:


BCOVMediaRequestFactory Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | BCOVMediaRequestFactory.h |
Overview
BCOVMediaRequestFactory provides convenience methods for creating requests that access the Brightcove Media APIs.
defaultVideoFields
The default collection of video properties to request.
@property (nonatomic, copy) NSArray *defaultVideoFields
Discussion
The default collection of video properties to request.
Declared In
BCOVMediaRequestFactory.h
– initWithToken:
Returns an initialized instance with the specified token. The base URL string used by the returned instance is https://api.brightcove.com/services/library .
- (instancetype)initWithToken:(NSString *)token
Parameters
token |
A Video Cloud Media API token. |
|---|
Return Value
The initialized BCOVMediaRequestFactory.
Discussion
Returns an initialized instance with the specified token. The base URL string used by the returned instance is https://api.brightcove.com/services/library .
To prevent unauthorized access to the metadata in your account, Video Cloud protects access to the API with tokens that you pass as parameters when making API calls. Like other web-based APIs, tokens are generated for you by Video Cloud and must be protected by you. Tokens must have URL access if they are used to retrieve content for playback.
Declared In
BCOVMediaRequestFactory.h
– initWithToken:baseURLString:
Returns an initialized instance with the specified token and base URL string. The base URL string must include a complete URL scheme, host, and path.
- (instancetype)initWithToken:(NSString *)token baseURLString:(NSString *)baseURLString
Parameters
token |
A Video Cloud Media API token. |
|---|---|
baseURLString |
A string containing the base URL to which Media API parameters should be appended in URLs returned by this instance. |
Return Value
The initialized BCOVMediaRequestFactory.
Discussion
Returns an initialized instance with the specified token and base URL string. The base URL string must include a complete URL scheme, host, and path.
To prevent unauthorized access to the metadata in your account, Video Cloud protects access to the API with tokens that you pass as parameters when making API calls. Like other web-based APIs, tokens are generated for you by Video Cloud and must be protected by you. Tokens must have URL access if they are used to retrieve content for playback.
Declared In
BCOVMediaRequestFactory.h
– requestPlaylistWithPlaylistID:
Constructs a request for a playlist by the playlist id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestPlaylistWithPlaylistID:(NSString *)playlistId
Parameters
playlistId |
id of the playlist to request |
|---|
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a playlist by the playlist id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestPlaylistWithPlaylistID:parameters:
Constructs a request for a playlist by the playlist id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestPlaylistWithPlaylistID:(NSString *)playlistId parameters:(NSDictionary *)parameters
Parameters
playlistId |
id of the playlist to request |
|---|---|
parameters |
parameters that will be added as URL parameters to the request. These parameters will override any default parameters that had been set |
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a playlist by the playlist id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestPlaylistWithReferenceID:
Constructs a request for a playlist by the reference id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestPlaylistWithReferenceID:(NSString *)referenceId
Parameters
referenceId |
reference id of the playlist to request |
|---|
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a playlist by the reference id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestPlaylistWithReferenceID:parameters:
Constructs a request for a playlist by the reference id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestPlaylistWithReferenceID:(NSString *)referenceId parameters:(NSDictionary *)parameters
Parameters
referenceId |
reference id of the playlist to request |
|---|---|
parameters |
parameters that will be added as URL parameters to the request. These parameters will override any default parameters that had been set |
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a playlist by the reference id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestVideoWithVideoID:
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestVideoWithVideoID:(NSString *)videoId
Parameters
videoId |
id of the video to request |
|---|
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestVideoWithVideoID:parameters:
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestVideoWithVideoID:(NSString *)videoId parameters:(NSDictionary *)parameters
Parameters
videoId |
id of the video to request |
|---|---|
parameters |
parameters that will be added as URL parameters to the request. These parameters will override any default parameters that had been set |
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestVideoWithReferenceID:
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestVideoWithReferenceID:(NSString *)referenceId
Parameters
referenceId |
reference id of the video to request |
|---|
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a video by the video id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h
– requestVideoWithReferenceID:parameters:
Constructs a request for a video by the reference id. This request will include the video_fields specified by defaultVideoFields.
- (NSURLRequest *)requestVideoWithReferenceID:(NSString *)referenceId parameters:(NSDictionary *)parameters
Parameters
referenceId |
reference id of the video to request |
|---|---|
parameters |
parameters that will be added as URL parameters to the request. These parameters will override any default parameters that had been set |
Return Value
built request that can be used to hit the Brightcove Media API
Discussion
Constructs a request for a video by the reference id. This request will include the video_fields specified by defaultVideoFields.
Declared In
BCOVMediaRequestFactory.h


{{ define "extra_header"}} {{ end }} {{ define "main" }}
By me, Menno van der Graaf Randomly selected daily, click here for more.
My random selector script can't be run, have this cat instead:
I'm an Embedded Software Engineer from the Netherlands, starting in Berlin, as soon as I can move.


japanese is considered a difficult language to learn. This is certainly true for native speakers of European languages, such as English, because Japanese is fundamentally different from European languages.
One of the biggest difficulties of the Japanese language is its complex writing system. Unless you are already familiar with Chinese characters (kanji), many years of study are necessary to achieve complete literacy. Japanese students learn about 2000 kanji until the end of junior high school and continue to learn more until the end of their school careers. The two syllabaries Hiragana and Katakana (together about 100 signs), however, can be memorized within a short period of time.
Another difficulty of the Japanese language is the fact that a person's speech can vary depending on the situation and the person. A student of Japanese has to become familiar with Japanese society and customs in order to understand the detailed rules of the different levels of speech.
Compared to many European languages, basic Japanese grammar is relatively simple. Complicating factors, such as gender articles and distinctions between plural and singular, are almost completely absent. Conjugation rules for verbs and adjectives are almost entirely free of exceptions. Nouns are not declined at all, but always appear in the same form. These facts make the language relatively easy for starting students.
Note that there are more information pages in this guide about Japanese Language Schools and studying in Japan in general.


-
{% for sns in site.sns %}
-
{{ sns[0] | capitalize }}: @{{ site.author }}
{% endfor %}
About Me
Friendly links
{% for friend in site.friends %}{{ friend.desc }}


Trump Slams 'Wack Job' George Conway -- Kellyanne 'Must've Done a Number on Him' | Breitbart
by Trent BakerFriday, President Donald Trump called into “Fox & Friends” and took aim at White House counselor Kellyanne Conway’s husband, George Conway, who has been one of Trump’s most outspoken critics.
Co-host Ainsley Earnhardt asked Trump about George Conway suggesting former U.S. Ambassador to the United Nations Nikki Haley is vying to be Trump’s running mate in 2020.
Trump blasted Conway, calling him a “total wack job” and a “nutjob.”
“Kellyanne is great, but she’s married to a total wack job,” Trump proclaimed. “I think she must’ve done some number on him, Ainsley. I don’t know what Kellyanne did to that guy because I don’t even know him. I met him for a second. He’s got to be some kind of a nutjob.
Follow Trent Baker on Twitter @MagnifiTrent


twilio.rest.events.v1.sink package¶
Submodules¶
twilio.rest.events.v1.sink.sink_test module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestInstance
(version, payload, sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
result
¶ Returns: Feedback indicating whether the test event was generated. Return type: unicode
-
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestList
(version, sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
()[source]¶ Create the SinkTestInstance
Returns: The created SinkTestInstance Return type: twilio.rest.events.v1.sink.sink_test.SinkTestInstance
-
-
class
twilio.rest.events.v1.sink.sink_test.
SinkTestPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkTestInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.sink_test.SinkTestInstance Return type: twilio.rest.events.v1.sink.sink_test.SinkTestInstance
-
twilio.rest.events.v1.sink.sink_validate module¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidateInstance
(version, payload, sid)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
result
¶ Returns: Feedback indicating whether the given Sink was validated. Return type: unicode
-
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidateList
(version, sid)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(test_id)[source]¶ Create the SinkValidateInstance
Parameters: test_id (unicode) – A string that uniquely identifies the test event for a Sink being validated. Returns: The created SinkValidateInstance Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance
-
-
class
twilio.rest.events.v1.sink.sink_validate.
SinkValidatePage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkValidateInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateInstance
-
Module contents¶
This code was generated by / _ _ _| _ _
(_)/(_)(_|/| |(/_ v1.0.0 / /
-
class
twilio.rest.events.v1.sink.
SinkContext
(version, sid)[source]¶ Bases:
twilio.base.instance_context.InstanceContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
delete
()[source]¶ Deletes the SinkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
fetch
()[source]¶ Fetch the SinkInstance
Returns: The fetched SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
sink_test
¶ Access the sink_test
Returns: twilio.rest.events.v1.sink.sink_test.SinkTestList Return type: twilio.rest.events.v1.sink.sink_test.SinkTestList
-
sink_validate
¶ Access the sink_validate
Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateList Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateList
-
update
(description)[source]¶ Update the SinkInstance
Parameters: description (unicode) – Sink Description Returns: The updated SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
-
class
twilio.rest.events.v1.sink.
SinkInstance
(version, payload, sid=None)[source]¶ Bases:
twilio.base.instance_resource.InstanceResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
class
Status
[source]¶ Bases:
object
-
ACTIVE
= 'active'¶
-
FAILED
= 'failed'¶
-
INITIALIZED
= 'initialized'¶
-
VALIDATING
= 'validating'¶
-
-
date_created
¶ Returns: The date this Sink was created Return type: datetime
-
date_updated
¶ Returns: The date this Sink was updated Return type: datetime
-
delete
()[source]¶ Deletes the SinkInstance
Returns: True if delete succeeds, False otherwise Return type: bool
-
description
¶ Returns: Sink Description Return type: unicode
-
fetch
()[source]¶ Fetch the SinkInstance
Returns: The fetched SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
links
¶ Returns: Nested resource URLs. Return type: unicode
-
sid
¶ Returns: A string that uniquely identifies this Sink. Return type: unicode
-
sink_test
¶ Access the sink_test
Returns: twilio.rest.events.v1.sink.sink_test.SinkTestList Return type: twilio.rest.events.v1.sink.sink_test.SinkTestList
-
sink_type
¶ Returns: Sink type. Return type: SinkInstance.SinkType
-
sink_validate
¶ Access the sink_validate
Returns: twilio.rest.events.v1.sink.sink_validate.SinkValidateList Return type: twilio.rest.events.v1.sink.sink_validate.SinkValidateList
-
status
¶ Returns: The Status of this Sink Return type: SinkInstance.Status
-
update
(description)[source]¶ Update the SinkInstance
Parameters: description (unicode) – Sink Description Returns: The updated SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-
url
¶ Returns: The URL of this resource. Return type: unicode
-
class
-
class
twilio.rest.events.v1.sink.
SinkList
(version)[source]¶ Bases:
twilio.base.list_resource.ListResource
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
create
(description, sink_configuration, sink_type)[source]¶ Create the SinkInstance
Parameters: - description (unicode) – Sink Description.
- sink_configuration (dict) – JSON Sink configuration.
- sink_type (SinkInstance.SinkType) – Sink type.
Returns: The created SinkInstance
Return type:
-
get
(sid)[source]¶ Constructs a SinkContext
Parameters: sid – A string that uniquely identifies this Sink. Returns: twilio.rest.events.v1.sink.SinkContext Return type: twilio.rest.events.v1.sink.SinkContext
-
get_page
(target_url)[source]¶ Retrieve a specific page of SinkInstance records from the API. Request is executed immediately
Parameters: target_url (str) – API-generated URL for the requested results page Returns: Page of SinkInstance Return type: twilio.rest.events.v1.sink.SinkPage
-
list
(in_use=<object object>, status=<object object>, limit=None, page_size=None)[source]¶ Lists SinkInstance records from the API as a list. Unlike stream(), this operation is eager and will load limit records into memory before returning.
Parameters: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- limit (int) – Upper limit for the number of records to return. list() guarantees never to return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, list() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
page
(in_use=<object object>, status=<object object>, page_token=<object object>, page_number=<object object>, page_size=<object object>)[source]¶ Retrieve a single page of SinkInstance records from the API. Request is executed immediately
Parameters: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- page_token (str) – PageToken provided by the API
- page_number (int) – Page Number, this value is simply for client state
- page_size (int) – Number of records to return, defaults to 50
Returns: Page of SinkInstance
Return type:
-
stream
(in_use=<object object>, status=<object object>, limit=None, page_size=None)[source]¶ Streams SinkInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient.
Parameters: - in_use (bool) – A boolean to return sinks used/not used by a subscription.
- status (unicode) – A string to filter sinks by status.
- limit (int) – Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit
- page_size (int) – Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000)
Returns: Generator that will yield up to limit results
Return type:
-
-
class
twilio.rest.events.v1.sink.
SinkPage
(version, response, solution)[source]¶ Bases:
twilio.base.page.Page
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
-
get_instance
(payload)[source]¶ Build an instance of SinkInstance
Parameters: payload (dict) – Payload response from the API Returns: twilio.rest.events.v1.sink.SinkInstance Return type: twilio.rest.events.v1.sink.SinkInstance
-


Here is another magnificent extract from Further Science : Book 20 by Norman Davies. (See here.)
FASHION SEQUENCE
1. That from 1272/1327, there was a simple monk style.
2. 1327/99—pointed shoes and sleeves.
3. 1399/1461—bull horn hats—hence narrow central next/theatrical.
4. 1461/85—Welsh witchy narrow central hats.
5. 1485/1509—square curtained bed fashion peak/tall thin people.
6. 1509/47—square wooden Henry 8th puff sleeves.
7. 1547/58—dark fan skirt—Spanish.
8. 1558/1603—Elizabethan/Drake bearded pirate/big tent waists and shoulders.
9. 1603/25—Odd—big waists and metal narrow thorax.
10. 1625/49—Van Dyke Cavalier/untrustworthy/lax floppy.
11. 1649/60—dark Welsh witchy.
12. 1660/89—dark brigand/Quaker hats.
13. 1689/1714—tall narrow heads reaction.
14. 1714/27—black Red Riding Hood.
15. 1727/60—big waists.
16. 1760/90—big heads.
17. 1790/1837—long and thick/squashed.
18. 1837/60—wooden thick.
19. 1860/80—overdone.
20. 1880/1900—odd.
21. 1901/18—contrived.
22. 1918/30s—flighty freaks.
23. 1940/5—War/frenzied mean to lower Middle class on.
24. 1946/8—peak fine simple bold quality Middle class fashion.
25. Peak fine fashions occurred in the 14th Century/semi late 15th century /late 15th century / 1515 / 1695 / 1896 / 1946/8.


Tree behaviour by default. Without any states. Tree allows to has more than 1 root node.
Tree allows you to use v-model attribute.
Selected nodes: {{ selectedNode0.map(s => s.text) }}
Here we defined some states for Nodes. You can check the whole structure.
Also we added some tree options. Full list.
Init data can be either Array or Promise object. Loading icon (https://loading.io/)
Overriding default structure of tree data


We cordially request your presence on August 20th, 2016.
We request your arrival at 4:00pm
Nestled in the redwoods along Doolin Creek, at the Gaskin family home. Open in Google Maps


DA to investigate Tshwane mayor and MMC over ‘sex audio clip’ allegations
South Africa’s opposition Democratic Alliance (DA) said on Sunday it had launched an internal investigation into “the serious allegations” made against Tshwane Executive Mayor Stevens Mokgalapa and Member of the Mayoral Committee (MMC) for transport Sheila Senkubuge.
This comes after an audio clip was widely distributed on Sunday allegedly of Mokgalapa having sex with Senkubuge apparently in her office while discussing colleagues and calling them names.
The scandal dubbed #SexInTheCity trended on social media on Sunday with many calling for the mayor to step down.
In a statement on Sunday, the DA said its political leadership would meet with Mokgalapa while the DA’s Federal Legal Commission has been tasked to conduct an internal investigation into the matter.
Related Articles
Zim authorities face ICC threat
Jan 22, 2019 45,971 57
DA slam removal of Zimbabwe from agenda
Jun 30, 2011 180 0
Mokgalapa has laid charges of extortion and invasion of privacy against some known and unknown individuals at the Brooklyn police station as well as with the Hawks, the DA said in a statement.
According to The Citizen, Mayoral spokesperson Omogolo Taunyane said the clip was being used “as a tool to blackmail and extort undue favours from the City of Tshwane”.
Mokgalapa was quoted as saying: “We have been aware of the existence of this audio recording for a few days and threats to release the recording have been communicated to us via an intermediary wherein certain demands have been made.” IOL


In POSIX sh, -nt
is undefined.
#!/bin/sh
if [ Foo.java -nt Foo.class ]
then
javac Foo.java
fi
The easiest fix is to switch to a shell that does support -nt
, like bash:
#!/bin/bash
if [ Foo.java -nt Foo.class ]
then
javac Foo.java
fi
Otherwise, find
can be used:
#!/bin/sh
if [ -n "$(find Foo.java -newer Foo.class)" ]
then
javac Foo.java
fi
test -nt
is an extension in ksh, bash and dash, but it is not covered by POSIX.
If you only intend to target shells that supports this feature, you can change the shebang to a shell that guarantees support, or [[ignore]] this warning.
You can use # shellcheck disable=SC3000-SC4000
to ignore all such compatibility
warnings.


Why Toke Makinwa Slammed Nigerians Praising Cardi B
by Oyindamola OlubajoPopular media mogul, Toke Makinwa has attacked Instagram users who praised American rapper, Cardi B over same things they shade Nigerian celebrities for doing.
Concise News reports that social media users have for the past few days showered much praises on Cardi B who arrived Nigeria on last Thursday for the first time.
The rapper had visited Nigeria’s mega city, Lagos for Livespot X Festival which held on Saturday.
Reacting to the praises showered on Cardi B, Makinwa said Nigerians are their own problems.
She wrote ” These are the issues… Nigerians, Cardi B is so real, i stan”
“Your own celebs living their lives like her. Such a disgrace! Morally corrupt bad role model so plastic so crass so unintelligent so razz so loud”


%inherit file="/base.mako" /> <%def name="title()">Pokédex%def> <%def name="title_in_page()">Pokédex Introduction%def> <%! from splinext.pokedex import i18n %>\
${h.h1('Introduction')}${_(u"""Pretty much anything that exists in the Pokémon world can be found in the Pokédex. Just type in a name and try it out.""")}
${_(u"Or you can browse by category:")}
${_(u'''Lookup works the same way anywhere you can type a name. ("Lookup" refers to entering a name to find something(s) specific. "Searching" is a bit more complicated.)''' ) % url(controller='dex_search', action='pokemon_search') | n}
${_(u"Case ({kecleon} vs {KECLEON}) and extra spaces are ignored.").format( kecleon=lookup_examples(_(u'kecleon')), KECLEON=lookup_examples(_(u'KECLEON')) ) | n}
${_(u"""If you enter something that's misspelled or could be one of several pages, you'll get a list of up to 10 guesses or matches to choose from.""")}
${_(u"""You can specify what sort of thing you're looking for by putting one or more before a colon, e.g. {pokemon_Kangaskhan} or {item_move_Metronome}. This is mostly useful when looking things up by national id ({pokemon_151}), because moves and types have ids, too. It's also helpful when looking up something ambiguous ({move_Psychic} vs {type_psychic}) if you want to skip the disambiguation page.""", comment="Feel free to leave out the Psychic example if your language has unambiguous names." ).format( pokemon_Kangaskhan=lookup_examples(_(u'pokemon:Kangaskhan')), item_move_Metronome=lookup_examples(_(u'item,move:metronome')), pokemon_151=lookup_examples(_(u'pokemon:151')), move_Psychic=lookup_examples(_(u'move:Psychic')), type_psychic=lookup_examples(_(u'type:psychic')), ) | n}
${_(u"""Similarly, you can restrict lookup by language. {charge} will offer both {link_tackle} and {link_charge}, because Tackle's French name is "Charge". If you wanted one or the other, you could enter {fr_charge} or {en_charge}. These also combine with the prefixes above, as in {fr_move_charge}.""", comment="""This is a tough one, don't get confused. {charge} will become a link to a search for "charge". {link_tackle} will become a link to the move that's called Tackle in English. {link_charge} will become a link to the move that's called Charge in English. {fr_charge} will become a link to the "@fr:charge" search. {en_charge} will become a link to the "@en:charge" search. {fr_move_charge} will become a link to the "@fr,move:charge" search. """ ).format( link_tackle='{name}'.format( url=url(controller='dex', action='moves', name=_(u'tackle', context='move name')), name=_('Tackle', context='move'), ), link_charge='{name}'.format( url=url(controller='dex', action='moves', name=_(u'charge', context='move name')), name=_('Charge', context='move'), ), charge=lookup_examples(u'charge'), charge_url=url(controller='dex', action='moves', name=_(u'charge', context='move name')), fr_charge=lookup_examples(u'@fr:charge'), en_charge=lookup_examples(u'@en:charge'), fr_move_charge=lookup_examples(u'@fr,move:charge'), ) | n}
${_(u"Lookup understands the following:")}
<%def name="lookup_examples(*examples)" buffered="True">\ % for i, example in enumerate(examples): % if i > 0: ; % endif${example}
\
% endfor
%def>


The deadline for submission of Paper Abstract is: BITSian Participants: 14th November, 2016 11:59pm. Non-BITSian Participants (Outstation): 20th February, 2017 11:59pm.
Non-BITSian can also directly mail their final paper entries to<EMAIL_ADDRESS>INSTRUCTIONS :
The results for the abstracts will be announced via E-Mail and on the Facebook Page.
Participants have to upload their abstracts for screening in the appropriate format on the Apogee 2017 portal.The portal will be accessible from 26th October 2016. The prescribed format must be followed, failing which may lead to disqualification of the participants.
The abstract should be submitted only in the format provided below.
Only genuine and original paper abstracts should be uploaded. Abstracts found copied from any source like internet/ journals etc. will be disqualified.
Only undergraduate and postgraduate students of any recognized university can participate.
A maximum of 2 students per team are allowed to present a paper (one as author and another as co-author). Participants from different institutions can also form a team.
The abstract will be judged on the basis of their innovation and knowledge of the field.
Plagiarized content will be strictly dealt with and would lead to participant's disqualification. In case of any discrepancy, organizers decision will be final and binding.
Participants can't submit one paper in multiple categories. Also, participants can present more than one paper. However, the abstracts should be submitted separately.


Explore by Branch
CSE
Currently not Available
IT
Currently not Available
ECE
Currently not Available
EEE
Currently not Available
MECH
Currently not Available
CIVIL
Currently not Available


The current system reduces job mobility and satisfaction. Recruiters and job boards do a poor job of matching qualified candidates to jobs. The subjectivity of the current system often leads employers to hire people who look like themselves, contributing to the tech industry’s diversity problem.
| # | Monster | Dice | Indeed | Hired | Referral.io | |
|---|---|---|---|---|---|---|
| Job Database | ||||||
| Hiree Database | ||||||
| Candidate Driven Matching | ||||||
| Company Driven Matching | ||||||
| Developer Focused | Networking | |||||
| Vetted Candidates | ||||||
| Career Development |
To get traction we would begin as a service business, providing qualified tech candidates to employers. As our pool of developers grows and becomes self-sustaining, our focus would shift to expand the platform.
US corporations spend nearly $8.1 billion each year on tech recruiting services, staff, and products. In all, US companies spend $72 billion on recruiting. Worldwide, the numbers are even larger.
Leigh Boone |
Blake Thomas |
Charlotte Chen |
Dan Hui |
Michael Collins |
Reza |
Quincy |


This website uses cookies to enhance the user experience. By using the website you accept the use of cookies. You can check our Privacy Policy to learn more.


The design of our wedding invitation was based on 떳다 그녀!! (translated: There She Is), an animation video created by SamBakZa that we both enjoyed since we got together in 2015. It symbolizes the joys and hardships of an intercultural relationship. Please enjoy the story of Doki and Nabi in anticipation of our wedding day.


Player.js iframe examples...
simple iframe with events
autoplaying iframe
youtube playlist
image replaced with autoplaying iframe on click
Vimeo example with auto-seek/auto-play


Smart, snappy copy is the difference between a second glance or getting passed by. Below is some work with Starbucks, Rover, All Star Directories, and more that have helped them garner attention.
This collateral helped clarify and promote a complex suite of products that were developed for post-secondary education lead generation—a very crowded, competitive marketplace.
This co-branded promotion for Starbucks' loyalty program and the flash-sale site Gilt.com garnered extensive press. The limited-edition cards sold out in under a minute.
These mobile samples....


Container class to hold the results of arbiter votes.
This is a synchronous version of AsyncExecutor.
This is a synchronous version of AsyncExecutor. Because we previously would block on the calling thread anyway, there was no benefit to using the AsyncExecutor.
Created by vignesh.kalidas on 4/18/18
Utilities for reading annotations
Utilities for reading annotations
Created by tomas.mccandless on 8/13/15.
Created by tomas.mccandless on 8/29/16.
Container class to hold the results of arbiter votes.
Created by tomas.mccandless on 1/27/16.


黒の手番です。65 はどう動かしますか？
Unlimited
pips Black=156 White=92
(CorrectAnswer= 0/0, ErrorScore= 0)
1. 24/18* 8/3 eq:+0.635 65.95% (G:23.69% B:1.61%) 34.05% (G:13.63% B:0.63%) 2. 22/16* 8/3 eq:+0.500 (-0.134) 62.92% (G:24.22% B:1.85%) 37.08% (G:17.48% B:2.59%) 3. 8/2 7/2 eq:-0.579 (-1.213) 28.08% (G: 1.93% B:0.07%) 71.92% (G:25.84% B:2.12%) 4. 24/18* 18/13 eq:-0.082 (-0.717) 49.28% (G:12.93% B:0.87%) 50.72% (G:34.34% B:3.60%) 5. 22/16* 16/11 eq:-0.173 (-0.808) 48.34% (G:12.70% B:0.85%) 51.66% (G:35.90% B:8.69%)


A lot of interesting things can happen when the Tah talks with your Bluetooth 4.0 enabled smartphone. Following is a list of apps that show some of the possibilities
The Tah app lets you control Tah's GPIO pins using our ArdSCL protocol in digital, analog and PWM modes. This app gives you the full power over GPIO acquisition by letting you read data from Tah's analog pins in real time.
The Tah Play app let you play games on your computer or play station using your smartphone. Just upload Play arduino code on Tah and plug it into computer or play station and you are ready to go. It's computer joystick comes with programmable keys which can be changed from game to game
The Tah Motion app lets you control your PC or Mac with your phone's motion gestures. Swipe between desktops, control iTunes, VLC or Quick Time Player and use it as a controller to advance your Powerpoint or Keynote presentations.
The Tah Sensor app make it easier than ever to collect sensor data wirelessly on your smart device. Just attach a sensor to Tah and open Tah sensor app in your smartphone, connect to Tah and select sensor and pin number you have interfaced and thats all, Tah sensor app will automatically start fetching sensor data.
 You can use your phone to have the LEDs light up according to the colours of your choice or cycle through the selected colours in a rainbow mode.
The Tah Remote app lets you control all remote-controlled appliances around you by turning your device into a universal remote controller. It takes minutes to sync your existing infrared remote controller with this app with an IR shield attached to the Tah board, and you can then use your iPhone or iPad to remotely control the appliance.
If you would like to contribute to the development of any of the above apps, feel free to join us on GitHub. Here's a guide to contributing.


Select the Month and Year to see historical values.
Total incidents
Change from last month ( incidents)
Change from same month last year ( incidents)
Incident rate per 1,000 residents
2010 census population
Click on any category to see specific metrics and to update the map. Percent change is calculated based on the previous month. Show all.
<% if (typeof categories != 'undefined') { %> <% _.each(categories, function(cat, c) { if (c !== 'total') { %>Because crime rates vary significantly each month, this yearly chart shows the rate (incidents per 1,000 residents) for 12-month periods ending with the current month.


The week of Homecoming 2019 events will take place Monday, September 23 – Sunday, September 29. More information to come later.
Teams must register by Monday, September 16, 2019. Please fill out the team registration form.
For detailed information on the week-long competition and events please visit the Homecoming Packet.
Candidate and voting information will be made available on Monday, September 23.
Be sure to vote for Homecoming Court by noon on Friday, September 27. Only current undergraduate students can vote, and you must be logged into your student valpo account. Any votes from non-current students or from non student email accounts will be discarded.
Name:
Team:
Hometown:
Major:
Graduating:
How have you completed 20 hours of community service in the last 6 months?
What does school spirit mean to you? How do you promote it around campus?
What is one goal you would like to accomplish in your lifetime and why?
Why should your classmates vote for you? Why should you represent Valparaiso University as this years Homecoming King/Queen?
Name:
Team:
Hometown:
Major:
Graduating:
How have you completed 20 hours of community service in the last 6 months?
What does school spirit mean to you? How do you promote it around campus?
What is one goal you would like to accomplish in your lifetime and why?
Why should your classmates vote for you? Why should you represent Valparaiso University as this years Homecoming King/Queen?


This page contains webassembly and javascript content, please enable javascript in your browser.
GitHub repo


{% extends 'base.html' %} {% block body %} Success. You have Removed {{ doc.name }} by {{ doc.uploader }} Download for the Course {{ course.name }}. {% endblock %}


Data Science Instructor - San Francisco, CA
Since 2011, General Assembly has transformed tens of thousands of careers through pioneering, experiential education in today's most in-demand skills. As featured in The Economist, Wired, and The New York Times, GA offers training in web development, data, design, business, and more, both online and at campuses around the world. Our global professional community boasts 40,000 full- and part-time alumni — and counting.
In addition to fostering career growth for individuals, GA helps employers cultivate top tech talent and spur innovation by transforming their teams through strategic learning. More than 21,000 employees at elite companies worldwide have honed their digital fluency with our corporate training programs. GA has also been recognized as one of Deloitte's Technology Fast 500, and Fast Company has dubbed us leaders in World-Changing Ideas as well as the #1 Most Innovative Company in Education.
We are looking for a Data Scientist to facilitate our local class.
Our Data Science Immersive course is a life-changing educational experience where students leave with the skills and mindset to take on new careers in a wide variety of Data Science roles.
Why Be a Part of the Data Science Immersive?
If you are looking to make a life-changing impact by doing what you know and love, this is the position for you. Through this unparalleled opportunity, you will:
Deepen your own skills by guiding students through a rigorous journey where they begin as driven novices and leave as empowered data analysts and scientists
Contribute your own expertise to a deep and broad global curriculum maintained by a team of talented data science instructors across multiple industries
Facilitate a supportive and energetic community that lasts well beyond the course
Hone your own leadership skills by working with an instructional team and classroom community
As a member of the instructional team, you will not only impact the careers of your own students, but you'll also have a unique opportunity to shape the potential of students on a global scale through contributions to our global curriculum.
Skills and Qualifications
Must Haves:
You have at least 6 months of professional data science experience.
You are an expert in SQL, Python, and related Python libraries (pandas, numpy).
You have domain expertise in statistics, mathematics, and probability.
You can build and apply statistical models in python using machine learning libraries, such as scikit-learn and statsmodels.
You have a deep understanding of statistical hypothesis testing and experimental design, data visualization techniques and tools (i.e. matplotlib, bokeh, etc), and manipulation of large data sets.
You can demonstrate and explain the function of machine learning algorithms such as regularized regression, naive bayes, decision trees, ensemble methods, KNN, K-means clustering, and neural networks.
You are the person your colleagues naturally gravitate to when they are trying to figure something out.
You are eager to shape the skills, minds, and trajectories of the newest generation of data scientists.
Nice to haves:
You have proficiency with NLP python libraries such as NLTK; Hadoop or Apache Spark; D3.js or R.
You are on top of industry trends in big data, machine learning, deep learning, and AI.
You have previous data science or engineering teaching experience, through a course, workshop, team training, etc.
Responsibilities and Duties
Plan and implement a 12-week curriculum in conjunction with baseline materials and your local instructional team.
Deliver instruction 5 days a week, including teaching, advising, and content development.
Work closely with your instructional team to provide students with meaningful and prompt feedback on their progress.
Collaborate alongside GA staff in order to best meet the needs and learning styles of your students.
Guide students through the development of real world projects that will showcase their abilities to hiring managers.
Facilitate a dynamic and collaborative classroom community.
Inspire students to persevere through the challenges of learning complex subjects.
Contribute to the material and direction of an expanding global curriculum, ensuring the course remains cutting-edge and effective for students worldwide.


RT @railsconf: RailsConfers, wanna know exactly where you'll be during any given hour from 4/22-25? Our final schedule is live now! http://…
4/2/2014, 7:45:05 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @railsconf: RailsConfers, wanna know exactly where you'll be during any given hour from 4/22-25? Our final schedule is live now! http://…
4/2/2014, 7:45:05 PM
Favs: 0
Retweets: 0
link


Demos for smoothing and gamlss.family distributions.
| Version: | 4.3-3 |
| Depends: | R (≥ 2.4.0), rpanel (≥ 1.1-1), gamlss.dist, gamlss.tr, tcltk, graphics, stats, grDevices |
| Suggests: | MASS |
| Published: | 2015-07-17 |
| Author: | Mikis Stasinopoulos, Bob Rigby, Paul Eilers, Brian Marx<EMAIL_ADDRESS>Konstantinos Pateras with contributions from Larisa Kosidou. |
| Maintainer: | Mikis Stasinopoulos <d.stasinopoulos at londonmet.ac.uk> |
| License: | GPL-2 | GPL-3 |
| URL: | http://www.gamlss.org/ |
| NeedsCompilation: | no |
| CRAN checks: | gamlss.demo results |
| Reference manual: | gamlss.demo.pdf |
| Package source: | gamlss.demo_4.3-3.tar.gz |
| Windows binaries: | r-devel: gamlss.demo_4.3-3.zip, r-release: gamlss.demo_4.3-3.zip, r-oldrel: gamlss.demo_4.3-3.zip |
| OS X binaries: | r-release: not available, r-oldrel: gamlss.demo_4.3-3.tgz |
| Old sources: | gamlss.demo archive |
Please use the canonical form https://CRAN.R-project.org/package=gamlss.demo to link to this page.