--- layout: post title: How to install Laravel on WAMP for beginners permalink: how-to-install-laravel-on-wamp-for-beginners/ date: 2013-09-30 12:27:06.000000000 +08:00 categories: - coding - featured - php tags: - getting started with laravel - install laravel - laravel basics - requirements for laravel status: publish type: post published: true meta: _edit_last: '2' _thumbnail_id: '1074' _wpas_done_all: '1' _wpas_mess: How to install Laravel on WAMP for beginners http://wp.me/p2kRRS-he _wpas_skip_1611607: '1' _wpas_skip_2452381: '1' _wpas_skip_2203490: '1' _wpas_skip_2452385: '1' dsq_thread_id: '2955590355' ---
When you go to the QuickStart page of Laravel, one thing you will notice in the installation instruction is it has an assumption that you knew what is Composer and some advance knowledge of PHP. This assumption makes it hard for beginners to penetrate Laravel. Some people out there might know MVC from other frameworks, but these new tool is totally new for them, so in this post, we will try to smooth the learning curve a bit and make it easier to get started with this great framework.
First thing first, before you open that command window and type composer commands and etc. You need to know what you are doing first.
1. Some knowledge about MVC - if you don't know what MVC is, it is a must that you do read about it first. This wiki link is a good read and preferably try some lightweight MVC framework first like CodeIgniter to gain some experience on how developing on a MVC framework looks like. Having other basic MVC framework first will help you appreciate the power of Laravel.
2. WAMP - is an acronym for Windows Apache MySQL PHP. You probably knew about this one already. In case not yet, for God's sake please do. You can download WAMP here.
3. Configure OpenSSL - OpenSSL what? SSL means Secure Socket Layers, this will gonna needed by Composer to run properly. It's a PHP extension that needs to be enabled before installing Composer.
Common Mistake!
Most of the people thinks the proper way of enabling it is by clicking the WAMP icon, then going to PHP > PHP Extensions > php_openssl. Well no. Because that setting edits the C:\wamp\bin\apache\Apache2.4.4\bin\php.ini Which is NOT the php settings read by Composer, you should manually edit the C:\wamp\bin\php\php5.4.16\php.ini instead. Why? because Composer is run from the command-line, not inside WAMP, thus it will read the php.ini file inside C:\wamp\bin\php\php5.4.16\ not C:\wamp\bin\apache\Apache2.4.4\bin\. Look for the line with extension=php_openssl.dll on it, and make sure that line has no semicolon on its front.
3. Install Composer - is a dependency manager. Why dependency? Because Laravel is highly "dependent" on other library as well. Yes, Laravel is made out of other libraries, like Symfony and Doctrine (don't worry about these terms for now), each library has different versions and some libraries is dependent on other libraries as well, Composer does all the tracing of all of these for you . What is important for now, is you understand what composer is and what role it plays in developing in Laravel. You can download Composer for Windows here.
Important!
You need to install WAMP first before installing Composer. Why? because composer needs php to run.
4. Install Laravel - At this point, let me re-introduce to you the QuickStart page.The doc says:
composer create-project laravel/laravel --prefer-dist
But before doing that, make sure you are in the correct folder (though of course advance users can make aliases). Most likely you want the project to be loaded inside the WAMP www directory, so go there first.
cd c:\wamp\www
Now execute that famous "quick-start" installation instruction. Note that you should replace the "--prefer-dist" part with the folder name you want Laravel to be installed. For example, issuing this command:
composer create-project laravel/laravel laraveltest
will create a project that can be loaded in http://localhost/laraveltest/public/index.php
So make sure to make the right choice of folder location.
After reading this post, you probably have a good knowledge now what's going on, instead of blindly typing commands in the console window. Now go on, explore Laravel.


NMIT HOSPITALS
A One-Stop Solution To Keep You Healthy
Which type of appointment do you want?
Get admitted as patient.
Get a consultational appointment with a doctor for today. (Timings: 10:00 am - 1:00 pm)


Sorting Visualization
Sortings_Visualization
Singleton.h
1
#pragma once
2
3
#include <stdexcept>
4
8
class
NonCopyable
{
9
public
:
10
NonCopyable
() =
default
;
11
NonCopyable
(
const
NonCopyable
& other) =
delete
;
12
virtual
~
NonCopyable
() =
default
;
13
NonCopyable
& operator =(
const
NonCopyable
& other) =
delete
;
14
};
15
19
class
NonMoveable
{
20
public
:
21
NonMoveable
() =
default
;
22
NonMoveable
(
NonMoveable
&& other) =
delete
;
23
virtual
~
NonMoveable
() =
default
;
24
NonMoveable
& operator =(
NonMoveable
&& other) =
delete
;
25
};
26
27
template
<
typename
T>
28
class
Singleton
:
public
NonCopyable
,
public
NonMoveable
{
29
public
:
36
template
<
typename
... Args>
37
static
T*
Create
(
const
Args&... args) {
38
if
(s_Instance) {
39
throw
std::runtime_error(
"Already created!"
);
40
}
41
42
return
s_Instance =
new
T(args...);
43
}
44
48
static
void
Destroy
() {
49
delete
s_Instance;
50
s_Instance =
nullptr
;
51
}
52
56
static
inline
T&
Get
() {
57
if
(!s_Instance) {
58
throw
std::runtime_error(
"Didn't created yet!"
);
59
}
60
return
*s_Instance;
61
}
62
63
protected
:
64
Singleton
() =
default
;
65
static
inline
T* s_Instance =
nullptr
;
66
};
Singleton::Destroy
static void Destroy()
Delete variable
Definition:
Singleton.h:48
NonMoveable
The class is created to override the operator =
Definition:
Singleton.h:19
Singleton
Definition:
Singleton.h:28
Singleton::Get
static T & Get()
Definition:
Singleton.h:56
Singleton::Create
static T * Create(const Args &... args)
The main method of the pattern. The method creates a static variable of the given type
Definition:
Singleton.h:37
NonCopyable
The class is created to override the operator =
Definition:
Singleton.h:8
Generated by
1.8.20


Relational
Data Browsing
Navigate bidirectionally through the database by following
foreign-key-based or user-defined relationships
1. Connect to the Database
Start the Data Browser (JailerDataBrowser.exe
or jailerDataBrowser.bat
on windows platform)
$ sh jailerDataBrowser.sh
|
and create a new data model. Press New and enter "Tutorial" as the name for the new model.
A data model holds information about the tables in the database and all
associations between them.
Most of the information can be retrieved automatically by analyzing
the database schema.
Click on Analyze Database.
You will be asked for the
database connection information.
Create a new connection.
Select the DBMS you are using from the displayed
list, and fill out the following form:
Finally click on Connect.
Jailer finds seven tables and five associations:
Two associations are still missing:
- an employee is classified into a
salary grade depending on his salary
- employees may receive bonuses
Add the definitions manually (Add-Button
under Associations):
The data model is now complete.
3. Browse a Table
Select the menu item "New Table Browser" from "File" and choose
"EMPLOYEE" as the table you want to browse:
A Table Browser appears showing the rows
of table EMPLOYEE.
3. Browse related Rows
Select the "Children" item from the "Related Rows" drop-down menu and
choose "EMPLOYEE on inverse-BOSS".
Another Table Browser appears showing the subordinates of each Employee
(the inverse of the "BOSS" relationship)
3. Generate SQL-Query
Within each table browser, a SQL-Query can be generated which selects
exactly the browser's content.
Essentially it's a join of all the tables in the navigation
chain.
Close the second "EMPLOYEE" browser, navigate from
EMPLOYEE to PROJECT_PARTICIPATION, and from there to PROJECT.
Choose "Query
Builder" item from the "SQL/Query" menu in
the "PROJECT" browser:
The Query Builder form lets you save the query
into a file, copy it to the clipboard or even execute it.
Choose "Execute" to get a query-result browser:
Within this query-result browser, you can edit the
query anyway you want.
|


--- layout: post title: "Conforming Container" description: "A Dependency Injection anti-pattern." date: 2014-05-19 7:54 UTC tags: [Dependency Injection, Design Patterns] image: "/content/binary/conforming-container-intersection.png" image_alt: "Intersection and union of containers." --- {% include JB/setup %}
{{ page.description }}
Once in a while, someone comes up with the idea that it would be great to introduce a common abstraction over various DI Containers in .NET. My guess is that part of the reason for this is that there are so many DI Containers to choose from on .NET:
At its core, a Conforming Container introduces a central interface, often called IContainer, IServiceLocator, IServiceProvider, ITypeActivator, IServiceFactory, or something in that vein. The interface defines one or more methods called Resolve, Create, GetInstance, or similar:
public interface IContainer { object Resolve(Type type); object Resolve(Type type, params object[] arguments); T Resolve<T>(); T Resolve<T>(params object[] arguments); IEnumerable<T> ResolveAll<T>(); // etc. }
Sometimes, the interface defines only a single of those methods; sometimes, it defines even more variations of methods to create objects based on a Type.
Some Conforming Containers stop at this point, so that the interface only exposes Queries, which means that they only cover the Resolve phase of the Register Resolve Release pattern. Other efforts attempt to address Register phase too:
public interface IContainer { void AddService(Type serviceType, Type implementationType); void AddService<TService, TImplementation>(); // etc. }
The intent is to enable configuration of the container using some sort of metadata. Sometimes, the methods have more advanced configuration parameters that also enable you to specify the lifestyle of the service, etc.
Finally, a part of a typical Conforming Container ecosystem is various published Adapters to concrete DI Containers. A hypothetical Confainer project may publish the following Adapter packages:
A Conforming Container is an anti-pattern, because it's
a commonly occurring solution to a problem that generates decidedly negative consequences,such as:
A code base using a Conforming Container may have code like this all over the place:
var foo = container.Resolve<IFoo>(); // ... use foo for something... var bar = container.Resolve<IBar>(); // ... use bar for something else... var baz = container.Resolve<IBaz>(); // ... use baz for something else again...
This breaks encapsulation, because it's impossible to identify a class' collaborators without reading its entire code base.
Additionally, concrete DI Containers have distinct feature sets. Although likely to be out of date by now, this feature comparison chart from my book illustrate this point:
| Castle Windsor | StructureMap | Spring.NET | Autofac | Unity | MEF | |
|---|---|---|---|---|---|---|
| Code as Configuration | x | x | x | x | ||
| Auto-registration | x | x | x | |||
| XML configuration | x | x | x | x | x | |
| Modular configuration | x | x | x | x | x | x |
| Custom lifetimes | x | x | (x) | x | ||
| Decommissioning | x | x | (x) | x | ||
| Interception | x | x | x |
This is only a simple chart that plots the most common features of DI Containers. Each DI Container has dozens of features - many of them unique to that particular DI Container. A Conforming Container can either support an intersection or union of all those features.
A Conforming Container that targets only the intersection of all features will be able to support only a small fraction of all available features, diminishing the value of the Conforming Container to the point where it becomes gratuitous.
A Conforming Container that targets the union of all features is guaranteed to consist mostly of a multitude of NotImlementedExceptions, or, put in another way, massively breaking the Liskov Substitution Principle.
The typical causes of the Conforming Container anti-pattern are:
There are no cases known to me where a Conforming Container is a good solution to the problem at hand. There's always a better and simpler solution.
Instead of relying on the Service Locator anti-pattern, all collaborating classes should rely on the Constructor Injection pattern:
public class CorrectClient { private readonly IFoo foo; private readonly IBar bar; private readonly IBaz baz; public CorrectClient(IFoo foo, IBar bar, IBaz baz) { this.foo = foo; this.bar = bar; this.baz = baz; } public void DoSomething() { // ... use this.foo for something... // ... use this.bar for something else... // ... use this.baz for something else again... } }
This leaves all options open for any code consuming the CorrectClient class. The only exception to relying on Constructor Injection is when you need to compose all these collaborating classes. The Composition Root has the single responsibility of composing all the objects into a working object graph:
public class CompositionRoot { public CorrectClient ComposeClient() { return new CorrectClient( new RealFoo(), new RealBar(), new RealBaz()); } }
In this example, the final graph is rather shallow, but it can be as complex and deep as necessary. This Composition Root uses hand-coded composition, but if you want to use a DI Container, the Composition Root is where you put it:
public class WindsorCompositionRoot { private readonly WindsorContainer container; public WindsorCompositionRoot() { this.container = new WindsorContainer(); // Configure the container here, // or better yet: use a WindsorInstaller } public CorrectClient ComposeClient() { return this.container.Resolve<CorrectClient>(); } }
This class (and perhaps a few auxiliary classes, such as a Windsor Installer) is the only class that uses a concrete DI Container. This is the Hollywood Principle in action. There's no reason to hide the DI Container behind an interface, because it has no clients. The DI Containers knows about the application; the application knows nothing about the DI Container.
In all but the most trivial of applications, the Composition Root is only an extremely small part of the entire application.
(The above picture is meant to illustrate an arbitrary application architecture; it could be layered, onion, hexagonal, or something else - it doesn't really matter.) If you want to replace one DI Container with another DI Container, you only replace the Composition Root; the rest of the application will never notice the difference.
Notice that only applications should have Composition Roots. Libraries and frameworks should not.
Sometimes the Conforming Container only defines a Service Locator-like API, and sometimes it also defines a configuration API. That configuration API may include various axes of configurability, most notably lifetime management and decommisioning.
Decommissioning is often designed around the concept of a disposable 'context' scope, but as I explain in my book, that's not an extensible pattern.
There are various known examples of Conforming Containers for .NET:


|
Houzi Game Engine
|
binary stream interface. More...
#include <binary_stream.hpp>
Public Types | |
| using | byte_position = long |
| Position indicator representing the number of bytes from the beginning of the file. | |
| using | byte_offset = long |
| Offset of the byte position indicator in bytes. | |
Public Member Functions | |
| virtual byte_position | get_byte_pos () const =0 |
| Gets the current byte position indicator. More... | |
| virtual binary_stream & | set_byte_pos (byte_position pos)=0 |
| Sets the current byte position indicator. More... | |
| virtual binary_stream & | move_byte_pos (byte_offset offset)=0 |
| Moves the current byte position indicator. More... | |
| Public Member Functions inherited from hou::stream | |
| virtual | ~stream () |
| Destructor. | |
| virtual bool | eof () const noexcept=0 |
| Checks the end of stream indicator. More... | |
| virtual bool | error () const noexcept=0 |
| Checks the error indicator. More... | |
| virtual size_t | get_byte_count () const noexcept=0 |
| Retrieves the total number of bytes in the stream. More... | |
binary stream interface.
|
pure virtual |
Gets the current byte position indicator.
| hou::cursor_error | in case of an error. |
Implemented in hou::ogg_file_in, hou::wav_file_in, hou::binary_file_in, hou::binary_file_out, and hou::empty_audio_stream_in.
|
pure virtual |
Moves the current byte position indicator.
Throws if the offset moves the position indicator to a negative position. Derived classes may have different behaviour when the position is set over the end of the file. a value in the interval [0; byte_count] is always valid.
| offset | the byte position indicator offset. |
| hou::cursor_error | in case of an error. |
Implemented in hou::ogg_file_in, hou::binary_file_out, hou::wav_file_in, hou::binary_file_in, and hou::empty_audio_stream_in.
|
pure virtual |
Sets the current byte position indicator.
Throws if pos is negative. Derived classes may have different behaviour when the position is set over the end of the file. a value in the interval [0; byte_count] is always valid.
| pos | the byte position indicator value. |
| hou::cursor_error | in case of an error. |
Implemented in hou::ogg_file_in, hou::binary_file_out, hou::wav_file_in, hou::binary_file_in, and hou::empty_audio_stream_in.


ia_election_2020.Rd
Precinct level results from the 2020 general election for all Iowa precincts (except for Scott county). Precinct level election results for the US was provided under an MIT license by the NYTimes UpShot team at from https://github.com/TheUpshot/presidential-precinct-map-2020 The data provided here only covers Iowa precincts.
ia_election_2020
A tibble with 1597 rows and 7 columns
unique identifier for the precinct: 5-digit zipcode followed by the precinct name or ID
numeric, number of total votes
numeric value, number of votes for Joseph Biden
numeric value, number of votes for Donald Trump
numeric value, indicating the percent of the democratic lead over the republican
numeric value, number of votes per square kilometer
sf object of precinct level maps
https://github.com/TheUpshot/presidential-precinct-map-2020
NY Times Upshot
library(sf) library(leaflet) pal <- colorNumeric(palette=c("Darkred", "White", "Darkblue"), reverse = FALSE, domain = range(ia_election_2020$pct_dem_lead, na.rm=TRUE)) # Percent of Democratic lead over the Republican ia_election_2020 %>% leaflet() %>% addTiles() %>% addPolygons(fillColor = ~pal(pct_dem_lead), fillOpacity = .75, stroke=0, opacity = .7, label=~GEOID) %>% addLegend(pal=pal, values = range(ia_election_2020$pct_dem_lead, na.rm=TRUE))


/* Answer for question 6. Line 1 tells you what type of script this code is. Line 2 is letting the program know that the JavaScript code is in Strict Mode. Strict Mode doesn't allow the programmer to use bad syntax by throwing up errors for any form of bad syntax; for example, misspelled words. Strict Mode also prevents the programmer from accidentally creating new global variables when they misspell a word. (https://www.w3schools.com/js/js_strict.asp). Line 3 is declaring a function named 'init'. Line 4 is creating the canvas for the web browser by retrieving information that is found under the id "webgl-canvas". Line 5 is just a comment to let whoever is reading this code know what the following if statement in line 6 is doing. Line 6 is an if statement. It's telling the program to check to see if there is a canvas created. Line 7 creates an error message that can be viewed in the console section of your web browser. An error message is displayed, letting the user know that the program was unable to find the HTML5 canvas on their web browser. Line 8 is a return statement. A return statement lets the program know to stop executing the if statement. In most cases, a return statement will return a value to the function it is inside of, but there is no variable next to the return statement, so no value is being returned to the init() function regarding the if statement. Line 9 is just a closing bracket for the if statement. Line 10 is using an HTML5 DOM method (https://www.w3schools.com/graphics/canvas_drawing.asp) to retrieve rendering context for the canvas before it can draw the object onto the canvas. (https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_usage#:~:text=The%20element%20has%20a,var%20canvas%20%3D%20document.). The information about the object that is passed as the parameter for the canvas.getContext() method is then saved as the variable 'gl'. Line 11 is a comment that lets whoever is reading the code that the following section of code is being used to make sure that there is context that can be drawn onto the canvas. Line 12 creates a message using the context information that was stored in variable 'gl'. Lines 13 and 14 are messages that will be displayed to the user on their web browser based on what condition the variable 'gl' meets. Line 13 uses the '?' condition variable to indicate that if the condition is met, the program will run the message 'Hooray! You got a WebGL2 context'. Line 14 uses the ':' condition variable to indicate that if the condition is not met, the program will run the message 'Sorry! WebGL is not available'. Line 15 creates an alert message that will appear on the users web browser that will display the message that matches the correct condition variable. If the condition is met, the alert will display the 'Hooray' message. If the condition is not met, the alert will display the 'Sorry' message. Line 16 is a closing bracket to close the init() function. Line 17 is a comment that lets wheover is reading the code know that 'function init()' should be called once the window has loaded. Line 18 uses the HTML DOM onload event (https://www.w3schools.com/jsref/event_onload.asp), which will call the function 'init' once the web browser has been opened. Line 19 is the closing tag for JavaScript. */


'Potato.exe' wanted .Net 4.0
If you recall from the “Rotten Potato” project, in order for the original attack to work, your account needed to have the “SeImpersonatePrivilege”, or “SeAssignPrimaryPrivilege”.
For direct research, see
hatRiot's Github


Yesterday I joined the Brooklyn Bird Club for our annual trip to Western New Jersey, specifically Hyper Humus, a relatively recently discovered hot spot. It started out as a nice winter morning when we arrived at the site at 7:30 A.M., progressed to Spring around 10:00 A.M., and reached early summer by 10:15.
Seems you can now go bird watching via the Internet. I haven't been able to test it out yet (20 user limit apparently) but this is certainly cool. Personally, I can't imagine it replacing actually being out in the field by any small amount. On the other hand, I've always found it quite sad to meet senior birders who are no longer able to hold binoculars steady or get to the park. I can imagine this might be of some interest to them. At least one elderly birder did a big year on TV, after he could no longer get out so much. This certainly tops that.


HideWindow()
语法
HideWindow(#Window, State [, Flags])概要
Hides or shows the specified window.
参数
#Window The window to use. State It can be one of the following values: #True : the window is hidden. #False: the window is shown. The window is automatically activated (gets the focus), unless the #PB_Window_NoActivate flag is set.Flags It can be a combination of the following values: #PB_Window_NoActivate : the window will be shown but not activated (only valid when un-hiding the window). #PB_Window_ScreenCentered: the window will be screen centered (only valid when un-hiding the window). #PB_Window_WindowCentered: the window will be window centered (only valid when un-hiding the window).
返回值
无.
示例
If OpenWindow(0, 200, 200, 220, 100, "HideWindow()", #PB_Window_SystemMenu) ButtonGadget (1, 10, 60, 200, 30, "Hide the window") Repeat Event = WaitWindowEvent() Select Event Case #PB_Event_Gadget Select EventGadget() Case 1 HideWindow(0, #True) Debug "Window hidden." MessageRequester("Info", "Press OK to show the window") HideWindow(0, #False) Debug "Window is visible." EndSelect EndSelect Until Event = #PB_Event_CloseWindow EndIf
参阅
OpenWindow()
已支持操作系统
所有


New 'Oral Sex' Emoji Causes Twitterstorm as Facebook Bans Use of Lewd 'Peach' & 'Eggplant'
by by Svetlana EkimenkoEarlier, Facebook imposed a ban on certain emojis with double meanings, such as the "eggplant" and "peach", that are popularly exchanged to symbolise male genitalia and buttocks in a bid to curb "sexual solicitation" on social media platforms.
Amongst the growing number of emoji options there is one that users are getting extremely excited over.
The new emoji is a cartoonised version of “a person kneeling on both knees”, according to Emojipedia.
They “may be used to represent someone in prayer, or a person resting on the floor”.
The emoji has already set social media afire, with users letting their imaginations run wild as they offer lewd suggestions for what it can represent.
The options are far from innocent, with many social media users hailing it as the world’s first explicit oral sex icon.
Until now, anyone discussing oral sex via emojis had to use suggestive images.
The arrival of the new icon set folks into a tweeting frenzy.
The hilarious comparisons come as Instagram and Facebook have banned the peach and aubergine emojis over reportedly “dirty misuse”.
The voluptuous fruits were removed from the platforms as part of an update to Facebook’s Sexual Solicitation Community Standards, which are aimed at sex workers who use the platforms to sell their services.
Facebook explained:
“People use Facebook to discuss and draw attention to sexual violence and exploitation. We recognise the importance of and want to allow for this discussion. We draw the line, however, when content facilitates, encourages or coordinates sexual encounters between adults.”
The new designs are part of more than 350 emoji approved earlier this year which have now been released to iPhone users as part of the iOS 13.2 update.
Website Emojipedia, which is part of the Unicode Consortium, posted images online of the new gender-neutral emoji choices, as many character-based emoji now also include a gender-neutral option alongside a male or female version.
There are also icons showing hearing aids, wheelchairs, prosthetic limbs and guide dogs.
Last year, Apple said it wanted to improve the representation of those with disabilities, submitting a number of designs to Unicode.


Otto is an event bus designed to decouple different parts of your application while still allowing them to communicate efficiently.
Forked from Guava, Otto adds unique functionality to an already refined event bus as well as specializing it to the Android platform.
Otto is designed with Android-specific use cases in mind and is intended for use as a singleton (though that is not required). Create an instance of an event bus with
Bus bus = new Bus();Because a bus is only effective if it is shared, we recommend obtaining the instance through injection or another appropriate mechanism.
Event publishing is the most important part of the bus as it allows you to tell subscribers that an action has occurred. An instance of any class may be published on the bus and it will only be dispatched to subscribers for that type.
To publish a new event, call the post
method:
bus.post(new AnswerAvailableEvent(42));
Posting to the bus is a synchronous action so when program execution continues it is guaranteed that all subscribers have been called.
Subscription is the complement to event publishing—it lets you receive notification that an event
has occurred. To subscribe to an event, annotate a method with @Subscribe
. The method should
take only a single parameter, the type of which will be the event you wish to subscribe to.
To listen for the event published in the previous section we would need the following:
@Subscribe public void answerAvailable(AnswerAvailableEvent event) { // TODO: React to the event somehow! }
The name of the method can be anything you like. The annotation, single argument, and public accessor are all that is required.
In order to receive events, a class instance needs to register with the bus. If this
refers
to an instance of the class in which the previous method was present, we can register using the
following:
bus.register(this);
Registering will only find methods on the immediate class type. Unlike the Guava event bus, Otto will not traverse the class hierarchy and add methods from base classes or interfaces that are annotated. This is an explicit design decision to improve performance of the library as well as keep your code simple and unambiguous.
Remember to also call the unregister
method when appropriate. See the sample application,
available on GitHub, for a complete example.
When subscribing to events it is often desired to also fetch the current known value for specific events (e.g., current location, active user, etc.). To address this common paradigm, Otto adds the concept of 'Producers' which provide an immediate callback to any subscribers upon their registration.
To create a producer, annotate a method with @Produce
. The method should take no parameters
and its return type will be used as the type of event for which it can produce initial values. If we are
keeping track of the last answer event somewhere from above we can register to produce its initial
value:
@Produce public AnswerAvailableEvent produceAnswer() { // Assuming 'lastAnswer' exists. return new AnswerAvailableEvent(this.lastAnswer); }
Producers, like subscribers, must also be registered:
bus.register(this);
When registering, the producer method will be called once for each subscriber previously registered for the same type. The producer method will also be called once for each new method that subscribes to an event of the same type.
You may only have one producer per event type registered at a time on a bus.
Since at times it may be ambiguous on which thread you are receiving callbacks, Otto provides an enforcement mechanism to ensure you are always called on the thread you desire. By default, all interaction with an instance is confined to the main thread.
// Both of these are functionally equivalent. Bus bus1 = new Bus(); Bus bus2 = new Bus(ThreadEnforcer.MAIN);
If you are not concerned on which thread interaction is occurring, instantiate a bus instance with
ThreadEnforcer.ANY
. You can also provide your own implementation of the
ThreadEnforcer
interface if you need additional functionality or validation.
The source code to the Otto, its sample, and this website is available on GitHub.
dependencies {
compile 'com.squareup:otto:+'
}
<dependency>
<groupId>com.squareup</groupId>
<artifactId>otto</artifactId>
<version>(insert latest version)</version>
</dependency>
Once you've installed Otto, add the following lines to your proguard-project.txt
file:
-keepattributes *Annotation* -keepclassmembers class ** { @com.squareup.otto.Subscribe public *; @com.squareup.otto.Produce public *; }
This ensures your annotated methods aren't removed by ProGuard.
If you would like to contribute code you can do so through GitHub by forking the repository and sending a pull request.
When submitting code, please make every effort to follow existing conventions and style in order to keep the code as readable as possible. Please also make sure your code compiles by running mvn clean verify
.
Before your code can be accepted into the project you must also sign the Individual Contributor License Agreement (CLA).
Copyright 2013 Square, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Provides a JS api for @mvdan's sh
.
Once built, transpiled JS files can be found at /lib
. They expose the Parser
and Printer
classes, and the traverse()
function.
Full documentation is available here.
const { Parser, traverse, Printer } = require('./lib');
const parser = new Parser();
const tree = parser.parse("echo 'foo'");
traverse(tree, (node) => {
if (node.type === 'SglQuoted') {
node.value = 'bar';
}
return true;
});
const printer = new Printer();
console.log(printer.print(tree)); // echo 'bar'
const { Parser } = require('./lib');
const parser = new Parser({ language: 'POSIX' });
const tree = parser.parse('echo "foo bar"');
console.log(JSON.stringify(tree, null, 2));
const { Parser, fromJSON, Printer, File } = require('./lib');
const parser = new Parser({ language: 'POSIX' });
const tree = parser.parse('echo "foo bar"');
const printer = new Printer();
// We can parse a stringified JSON and reconstruct it
// regardless of its root type via fromJSON().
// `a` will be equal to `tree`.
const a = fromJSON(JSON.parse(JSON.stringify(tree)));
console.log(printer.print(a)); // echo "foo bar"
// We can also just convert instances to and from plain objects
const b = fromJSON(tree.toJSON());
console.log(printer.print(b)); // echo "foo bar"
// If we know the type of the root node, we can use the constructor
// fromJSON() method. As the tree root is an instance of `File`, we'd do:
const c = File.fromJSON(tree.toJSON());
console.log(printer.print(c)); // echo "foo bar"
$ git clone https://github.com/rafamel/shell-parser.git
$ cd shell-parser
$ npm install
$ npm run @root -- setup
$ npm run @package -- build
You can also build the docs via npm run @root -- docs
.
Interactive
won't work properly with streams. The source test case seems to be limited to directly invoking stream.read()
, and analyzing the source, it seems there is no way for the stream to emit data that Interactive
would react to.exec()
should return an object of actions to perform.Generated using TypeDoc


Someone has to be in charge of integrating pull requests. Reviewing code. Cutting new releases. And driving the platform as a whole.
That leadership role is currently performed by:
The team of FinalFrontierLabs and Raphael as lead architect.
The team of Fizzed, Inc. and Joe Lauer as lead architect.
Ninja is proudly sponsored by Greenback
More engineering. Less paperwork. Expenses made simple.
If you want to take over a more official role in the Ninja platform don’t hesitate to contact us! The framework offers excellent opportunities to collaborate with nice people and drive an extraordinary project.
Ninja is standing on the shoulder of giants. We are using an immense amount of libraries and ideas from open source projects. Especially ideas from Rails, Play 1 and Play 2 and also libraries from Apache, Google, Sun/Oracle and many others.
This is the time to say Thank you. We hope we can contribute a bit back to the world.
Over the time a lot of awesome people have contributed to Ninja. In some random order:
Ninja is open source and driven by enthusiasts. We love what we do and we have a long term goal: Ensuring that Ninja is the best web framework written in Java.
Community contributions are at the core of the Ninja framework. These contributions are not only new features, but also documentation and bug reports. Every bit is a step forward ensuring our success.
We have a really good track record of integrating community pull requests. Looking forward seeing you on the mailing list. Let’s talk about your ideas - we are social creatures!


Upload Image to Application
Upload an image of your choice!
Title:
Description:
Image:
Check the box to accept Acceptable Use Policy before uploading your image
Click the 'Upload' button below to submit the image.


Guidelines for Dental Professionals in Covid-19 situation
Guidelines on preventive measures to contain spread of COVID-19 in workplace settings
Revised Strategy for COVlD-19 testing in lndia
Updated Cluster Containment Plan for COVID-19
Updated Containment Plan for Large Outbreaks of COVID-19
Preparedness and response to COVID-19 in Urban Settlements
NO Spitting in public places (Video)
Advisory for managing Health care workers working in COVID and Non-COVID areas of the hospital
Updated Additional guidelines on rational use of Personal Protective Equipment (setting approach for Health functionaries working in non-COVID areas)
Guidelines for Home Isolation of very mild / pre-symptomatic COVID-19 cases (Video)
Guidelines for RT-PCR based Pooled Sampling


| Browser | Windows | Linux | Mac |
|---|---|---|---|
| Chrome | [Alt] + accesskey | [Alt] + accesskey | [Control] [Alt] + accesskey |
| Firefox | [Alt] [Shift] + accesskey | [Alt] [Shift] + accesskey | [Control] [Alt] + accesskey |
| Safari | [Alt] + accesskey | [Control] [Alt] + accesskey | |
| Opera 15 or newer | [Alt] + accesskey | [Alt] + accesskey | [Alt] + accesskey |
| Opera 12.1 or older | [Shift] [Esc] + accesskey | [Shift] [Esc] + accesskey | [Shift] [Esc] + accesskey |
| Tools | Letter (accesskey) |
|---|---|
| WMS Import | w |
| KML Import | k |
| Compare | c |
| Measure | m |
| Draw | r |
| Information object | s |
| p (with print menu already opened) |


Hello, This is Dr.Clive Whittaker. I work for Fidelity Investment Uk as Head of fund manager in charge of London & Channel Island. i handle all our Investors Treasury Bill Deposit that gives me access to trade with our Investors Funds on Private Arrangement. In addition, I have made an average of $42.870m?through Private Trading with our Investors Treasury Bill Deposit while the said funds are currently lying as a Floating Capital in our Treasury Bill Magellan Trust Account. Neverthles, I am not permitted by law to own or keep the above mentioned amount as my personal funds without declaration of source and origin of the funds to the UK Government and to the Management of Fidelity Investment. Therefore, I need someone that will work with me to claim the aforementioned funds as an investor without fear or favour. If you are interested, I will provide you with more details on how this deal works. This is a fair deal without any risk attached and will be legally transacted. Our sharing ratio is 60:40.if you are intrested in this deal you get back to me asap for futher details. reply me with my private email box<EMAIL_ADDRESS>Kind Regards. Dr.Clive Whittaker www.fidelity.co. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.


Magister Sidra:
The second level of the test is to find
Andariel's Book,
which contains the song phrases of creation sung by Einhasad.


ATEEZ's Hongjoong trends worldwide as fans celebrate his birthday
by sl278ATEEZ's Hongjoong is trending worldwide as fans celebrate his birthday!
#홍중이가_가는곳이_원더랜드 (WhereverHongjoongGoesIsWonderland) and #Best_Leader_Hong_Day are trending 4 and 5 respectively as fans take over Twitter to wish the leader of ATEEZ a happy birthday!
Happy birthday, Hongjoong!


RubyMotion Project Management Guide for Android
In this guide we will explain how to create new RubyMotion Android projects, then configure and maintain them.
1. Creation
To create a new RubyMotion project, pass the create
command to /usr/bin/motion with the android
template. It will create a new project directory.
$ motion create --template=android Hello
$ cd Hello
$ ls
Rakefile assets resources vendor
app spec
1.1. Project Templates
|
Important
|
By default RubyMotion creates iOS projects. Setting up the android template is important here, otherwise you will get an iOS project directory.
|
Developers can add 3rd-party templates in the ~/Library/RubyMotion/template
directory. A RubyMotion project template is a directory that includes a files
sub-directory which will contains the files that will be created by motion create.
You can refer to the builtin templates in /Library/RubyMotion/lib/motion/project/template
for documentation.
1.2. Project Anatomy
The following table illustrates the anatomy of a project directory.
| File/Directory | Purpose |
|---|---|
Rakefile |
This file contains the configuration of the project, as well as a default set of tasks. It can be edited to change the configuration or add new tasks. |
.gitignore |
This file contains file patterns that should be ignored by the source control management software (for instance, build files). This file is used by Git, but it can be ported to other SCMs. |
app/ |
This directory contains the Ruby code of the project. In a new project, a main_activity.rb file is created automatically. |
resources/ |
This directory contains the resources files of the project. In a new project, this directory is empty. |
assets/ |
This directory contains the assets files of the project. In a new project, this directory is empty. |
spec/ |
This directory contains the specification files of the application. In a new project, a default specification file is created automatically. |
RubyMotion projects are based on Rake. Essential rake tasks will be covered in the following sections. To see the full list of available tasks:
$ rake -T
|
Tip
|
Rake is the de-facto build system framework for Ruby. It is similar to make and ships by default in OS X. |
2. Configuration
The rake config task will dump the project configuration.
$ rake config
Each configuration variable has a sensible default value that can be manually overriden in the Rakefile file.
2.1. Options
| Variable | Discussion |
|---|---|
|
Project name, as a |
|
Project package name, as a |
|
Project icon name, as a |
|
Version code of the application (maps to the |
|
Version name of the application (maps to the |
|
Main activity class name, as a |
|
Subactivities class names, as an |
|
Application class name, as a |
|
The minimum version of the Android API to target (maps to the |
|
The target version of the Android API to target (maps to the |
|
The CPU architecture to build the application for, as a |
|
List of application permissions, as an |
|
List of application features (maps to the |
|
List of application services (maps to the |
|
Project files, as an |
|
Path to the directory for build products, as a |
|
Directories for resources files, as an |
|
Directories for assets files, as an |
|
Directories for specification files, an |
|
Path to the Android SDK directory. The default value is the value of the |
|
Path to the Android NDK directory. The default value is the value of the |
|
List of components to log to the terminal when running an app in development, as an |
2.2. Providing Custom Values
Custom values for the configuration settings can be added by tweaking the Motion::App.setup
block in the Rakefile
file.
As an example, let’s take the configuration block of a fictional app that has a custom icon file and needs permission to connect to the internet.
Motion::Project::App.setup do |app|
app.name = 'My App'
app.icon = 'icon'
app.permissions << :internet
end
Additionally, you can provide arbitrary values that will be added to the application manifest via the app.manifest
property.
The child
method returns the first element of the given type in the current element. You can also pass a block which will be called with the element.
Properties of the element can be set via the []=
method, or you can set multiple properties via the update
method.
Child nodes can be added with the add_child
method, which also accepts a block.
Finally, the children
method returns an array with all the child elements of a given type.
Motion::Project::App.setup do |app|
app.manifest.child('application') do |application|
application['android:theme'] = '@style/AppTheme'
application.update('android:destripcion' => 'My awesome app',
'android:isGame' => true)
application.add_child('uses-library').update('android:name' => 'com.google.android.maps')
application.children("uses-library")|
end
end
For a complete explanation of the valid elements and properties of the manifest file, please check the official Android Manifest guide.
2.3. Files Dependencies
By default, RubyMotion will compile files in the regular sorting order of the filesystem. When a RubyMotion application starts, the main scope of each file will then be executed in that specific order.
Sometimes, you will want to customize the order, if for instance one file makes use of a constant defined in another.
$ cat app/foo.rb
class Foo
end
$ cat app/bar.rb
class Bar < Foo
end
In the example above, using the default order, bar.rb will be compiled before foo.rb resulting in a constant lookup error, because the Foo
constant has not been defined yet when we execute the code in bar.rb.
To fix that problem, the files_dependencies
method can be used in the Rakefile. This method accepts a Hash
which should be a set of files dependencies.
Motion::Project::App.setup do |app|
# ...
app.files_dependencies 'app/bar.rb' => 'app/foo.rb'
end
After this change, the build system will compile foo.rb before bar.rb.
2.4. Vendoring 3rd-Party Libraries
The Android SDK has a significant amount of functionality built-in that you can use in your RubyMotion project. However, sometimes you will have to use a 3rd-party library that provides a feature missing from the system.
RubyMotion lets you integrate 3rd-party Java libraries. It is recommended to keep these libraries required by the project in the same place, for instance under a vendor directory.
The vendor_project
method can be called from the Rakefile. It accepts a set of key/value arguments.
Jar Files
To vendor a 3rd-party jar, simply provide the :jar
key with the full path of the library as its value.
As an example, to vendor the android-support-v4.jar library, do the following.
Motion::Project::App.setup do |app|
# ...
app.vendor_project :jar => "vendor/android-support-v4.jar"
end
Certain Java libraries, such as Google Play Services, come with resource files and a custom manifest file. These need to be provided to the RubyMotion build system, using the respective :resources
and :manifest
keys/values.
Motion::Project::App.setup do |app|
# ...
app.vendor_project :jar => "vendor/google-play-services_lib/libs/google-play-services.jar",
:resources => "vendor/google-play-services_lib/res",
:manifest => "vendor/google-play-services_lib/AndroidManifest.xml"
end
2.5. Extending Classes with Java
RubyMotion lets you extend a Ruby-defined class with Java code.
This is currently useful when you have to override a Java constructor. Due to technical limitations of the Java VM, RubyMotion cannot override constructors in Ruby, so it has to be done in pure Java.
As an example, let’s assume you have a custom subclass of the Android::App::IntentService
class, in a app/my_service.rb file.
class MyService < Android::App::IntentService
...
This subclass does not provide a default constructor, and the Android system requires one in order to instantiate the service.
We can provide Java code that will implement that constructor, in a app/my_service.java file.
public MyService() {
super("MyService");
}
The build system will detect this file and automatically merge the Java code into the class implementation.
|
Note
|
The name of the file is important here, and must correspond to the name of the class. The file name must be either the name of the class, or its underscore representation. For instance, both my_service.java and MyService.java will be recognized by the build system. |
3. Build
RubyMotion will build development and release versions of the project into the temporary build directory. For each version there will be one package for the ARM architecture that will run on both the emulator and the device.
The following steps are performed during the build process:
-
It compiles each Ruby source code file into optimized machine code, translating the Ruby syntax tree into an intermediate representation language (using LLVM), then assembly. The compiler will generate code for ARM instruction sets and ABIs depending on the target.
-
It links the machine code with the RubyMotion runtime statically to form a shared library for JNI (Java Native Interface). The linker also includes metadata for the C APIs that the project uses, as well as 3rd-party libraries vendored from the configuration.
-
It generates Android DEX bytecode for the project classes. Note that the bytecode only contains the class interfaces (such as name, subclass and method list), not the actual class and method code, which is compiled into machine code (in the JNI library).
-
It creates an .apk archive and copies the files there. The AndroidManifest.xml file generated based on the project configuration. Each resource file in the resources and assets directories are copied in the bundle. 3rd-party libraries (.jar files) are also copied.
-
It codesigns the bundle with the appropriate Java Android keystore.
3.1. Development
The rake build task builds a development version of the project.
$ rake build
Normally the user does not need to explicitly call this task, as it is a dependency of the rake emulator and rake device tasks, which are often used for development.
Inside the Rakefile, you can determine if the project is being built in development mode by using the app.development
or app.development?
methods.
Motion::Project::App.setup do |app|
# ...
if app.development?
# apply custom options for development
end
app.development do
# another variant
end
end
The application will be code-signed using the debug Java Android keystore, located as ~/.android/debug.keystore. If the keystore file does not exist, RubyMotion will create it for you.
3.2. Release
Release builds are created using the rake release task.
$ rake release
This task can be used when you want to distribute versions of your app to beta-testers, and also upload them to the Google Play Store.
Inside the Rakefile, you can determine if the project is being built in release mode by using the app.release
or app.release?
methods.
Motion::Project::App.setup do |app|
# ...
if app.release?
# apply custom options for release
end
app.release do
# another variant
end
end
The task requires a proper release keystore to be configured in the project, which can be done using the app.release_keystore_path
method, which accepts two arguments: the full path to the keystore file, and the alias name of the key.
Motion::Project::App.setup do |app|
# ...
app.release_keystore(File.expand_path("~/my-release-key.keystore"),
"release-key")
end
For more information on how to generate a release keystore file check out the App Signing document on the Android developer website.
3.3. Cleaning
The rake clean task empties the build directory and cleans the build directories of the vendored projects.
$ rake clean
4. Running
You can run apps either in the built-in Android emulator or an USB-connected Android device you configured for development.
4.1. Emulator
The Android SDK comes with an emulator that you can use to run apps in your computer.
|
Note
|
At the time of this writing, the emulator is too slow to be used efficiently in development. We highly recommend using a device instead. |
The rake emulator task will build and run a version of the app in the emulator. The default rake
task defaults to it.
$ rake
$ rake emulator
In order for the task to work, the emulator must be up and running.
First, you have to create an Android Virtual Device (AVD). To do so, follow these steps:
-
Launch the
android
command-line tool from the terminal (which should be located as$RUBYMOTION_ANDROID_SDK/tools/android
). -
Hit the Create button.
-
In the create window, make sure the CPU/ABI is set to ARM (armeabi). This is important, as RubyMotion does not support other architectures for Android development.
-
Provide a name and an appropriate API target for the device, then hit the OK button.
Once that the device has been created, you can start it from the main window by selecting it from the list, then click the Start button.
An emulator window will appear and the device will start. Please note that starting a virtual device can take some time. You must wait until you see the Android home screen.
4.2. Device
Running a RubyMotion app on an Android device is easy; just make sure it’s properly configured for development (check out the Getting Started guide for more information), then simply connect it and use the rake device task.
$ rake device
4.3. Interactive Console
Both rake emulator and rake release tasks will install and start the application, then an interactive console (read-eval-print-loop) will appear in the terminal.
You can type expressions in the terminal, and they will be evaluated right in the application process.
$ rake device
...
>> "hello".upcase
=> "HELLO"
Inside the console, the self
variable points to the current Android activity for your convenience. By default, this will be the main activity object.
>> self
=> #<MainActivity:0x100502>


The JsonView
and XmlView
let you create JSON and XML responses, and integrate with the
Cake\Controller\Component\RequestHandlerComponent
.
By enabling RequestHandlerComponent
in your application, and enabling
support for the json
and or xml
extensions, you can automatically
leverage the new view classes. JsonView
and XmlView
will be referred to
as data views for the rest of this page.
There are two ways you can generate data views. The first is by using the
_serialize
key, and the second is by creating normal template files.
Before you can use the data view classes, you’ll first need to load the
Cake\Controller\Component\RequestHandlerComponent
in your
controller:
public function initialize()
{
...
$this->loadComponent('RequestHandler');
}
This can be done in your AppController and will enable automatic view class
switching on content types. You can also set the component up with the
viewClassMap
setting, to map types to your custom classes and/or map other
data types.
You can optionally enable the json and or xml extensions with
Routing File Extensions. This will allow you to access the JSON
, XML
or
any other special format views by using a custom URL ending with the name of the
response type as a file extension such as http://example.com/articles.json
.
By default, when not enabling Routing File Extensions, the request the Accept
header is used for selecting which type of format should be rendered to the
user. An example Accept
format that is used to render JSON
responses is
application/json
.
The _serialize
key is a special view variable that indicates which other
view variable(s) should be serialized when using a data view. This lets you skip
defining template files for your controller actions if you don’t need to do any
custom formatting before your data is converted into json/xml.
If you need to do any formatting or manipulation of your view variables before
generating the response, you should use template files. The value of
_serialize
can be either a string or an array of view variables to
serialize:
namespace App\Controller;
class ArticlesController extends AppController
{
public function initialize()
{
parent::initialize();
$this->loadComponent('RequestHandler');
}
public function index()
{
// Set the view vars that have to be serialized.
$this->set('articles', $this->paginate());
// Specify which view vars JsonView should serialize.
$this->set('_serialize', ['articles']);
}
}
You can also define _serialize
as an array of view variables to combine:
namespace App\Controller;
class ArticlesController extends AppController
{
public function initialize()
{
parent::initialize();
$this->loadComponent('RequestHandler');
}
public function index()
{
// Some code that created $articles and $comments
// Set the view vars that have to be serialized.
$this->set(compact('articles', 'comments'));
// Specify which view vars JsonView should serialize.
$this->set('_serialize', ['articles', 'comments']);
}
}
Defining _serialize
as an array has the added benefit of automatically
appending a top-level <response>
element when using XmlView
.
If you use a string value for _serialize
and XmlView, make sure that your
view variable has a single top-level element. Without a single top-level
element the Xml will fail to generate.
New in version 3.1.0: In this version, the variable _serialize
is automaticaly set to true
to serialize all view variables instead of explicitly specifying them.
You should use template files if you need to do some manipulation of your view content before creating the final output. For example if we had articles, that had a field containing generated HTML, we would probably want to omit that from a JSON response. This is a situation where a view file would be useful:
// Controller code
class ArticlesController extends AppController
{
public function index()
{
$articles = $this->paginate('Articles');
$this->set(compact('articles'));
}
}
// View code - src/Template/Articles/json/index.ctp
foreach ($articles as &$article) {
unset($article->generated_html);
}
echo json_encode(compact('articles'));
You can do more complex manipulations, or use helpers to do formatting as well. The data view classes don’t support layouts. They assume that the view file will output the serialized content.
Note
As of 3.1.0 AppController, in the application skeleton automatically adds
'_serialize' => true
to all XML/JSON requests. You will need to remove
this code from the beforeRender callback or set '_serialize' => false
in
your controller’s action if you want to use view files.
XmlView
¶By default when using _serialize
the XmlView will wrap your serialized
view variables with a <response>
node. You can set a custom name for
this node using the _rootNode
view variable.
The XmlView class supports the _xmlOptions
variable that allows you to
customize the options used to generate XML, e.g. tags
vs attributes
.
JsonView
¶The JsonView class supports the _jsonOptions
variable that allows you to
customize the bit-mask used to generate JSON. See the
json_encode documentation for the valid
values of this option.
For example, to serialize validation error output of CakePHP entities in a consistent form of JSON do:
// In your controller's action when saving failed
$this->set('errors', $articles->errors());
$this->set('_jsonOptions', JSON_FORCE_OBJECT);
$this->set('_serialize', ['errors']);
When using JsonView
you can use the special view variable _jsonp
to
enable returning a JSONP response. Setting it to true
makes the view class
check if query string parameter named “callback” is set and if so wrap the json
response in the function name provided. If you want to use a custom query string
parameter name instead of “callback” set _jsonp
to required name instead of
true
.
While the RequestHandlerComponent can automatically set the view based on the request content-type or extension, you could also handle view mappings in your controller:
// src/Controller/VideosController.php
namespace App\Controller;
use App\Controller\AppController;
use Cake\Network\Exception\NotFoundException;
class VideosController extends AppController
{
public function export($format = '')
{
$format = strtolower($format);
// Format to view mapping
$formats = [
'xml' => 'Xml',
'json' => 'Json',
];
// Error on unknown type
if (!isset($formats[$format])) {
throw new NotFoundException(__('Unknown format.'));
}
// Set Out Format View
$this->viewBuilder()->className($formats[$format]);
// Set Force Download
$this->response->download('report-' . date('YmdHis') . '.' . $format);
// Get data
$videos = $this->Videos->find('latest');
// Set Data View
$this->set(compact('videos'));
$this->set('_serialize', ['videos']);
}
}


Guess the X-Man
Can you hear the Professor's thoughts?
Game Stats
Hints
Real Name: 1 Guess
Powers: 2 Guesses
Image: 3 Guesses


#include <Proj4.h>
|
|
| Proj4 (const Proj4 &p) |
| |
|
void | setProjectionSrc (const std::string &str) |
| | Sets source projection.
|
| |
|
void | setProjectionDst (const std::string &str) |
| | Sets destination projection.
|
| |
| void | projectFwd (double &x, double &y) const |
| | Forward projection. More...
|
| |
| void | projectFwd (const double &x, const double &y, double &x2, double &y2) const |
| | Forward projection. More...
|
| |
| void | projectFwd (double &x, double &y, double &z) const |
| | Forward projection. More...
|
| |
| void | projectInv (double &x, double &y) const |
| | Inverse projection. More...
|
| |
|
void | projectInv (const double &x2, const double &y2, double &x, double &y) const |
| | Inverse projection from (x2,y2) to (x,y).
|
| |
|
void | projectInv (double &x, double &y, double &z) const |
| | Inverse projection.
|
| |
| const std::string & | getProjectionSrc () const |
| | Returns the projection std::string applied by the last setProjection call. More...
|
| |
|
const std::string & | getProjectionDst () const |
| |
|
std::string | getErrorString () const |
| |
|
bool | isLongLat () const |
| |
|
bool | isSet () const |
| |
|
|
void | _setProjection (const std::string &src, projPJ &p) |
| |
|
|
projPJ | projSrc |
| |
|
projPJ | projDst |
| |
A wrapper for the famous Proj4 class.
| const std::string& getProjectionSrc |
( |
| ) |
const |
|
inline |
Returns the projection std::string applied by the last setProjection call.
! Hence, does not reconstruct it from the allocated proj structure.
| void projectFwd |
( |
double & |
x, |
|
|
double & |
y |
|
) |
| const |
|
inline |
Forward projection.
TODO: is this needed?
| void projectFwd |
( |
const double & |
x, |
|
|
const double & |
y, |
|
|
double & |
x2, |
|
|
double & |
y2 |
|
) |
| const |
|
inline |
Forward projection.
TODO: is this needed?
| void projectFwd |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| const |
|
inline |
Forward projection.
TODO: is this needed?
| void projectInv |
( |
double & |
x, |
|
|
double & |
y |
|
) |
| const |
|
inline |
Inverse projection.
Todo: projections for vectors inline
The documentation for this class was generated from the following files:
- drain/util/Proj4.h
- drain/util/Proj4.cpp


Apple rolls out health records on iPhones for US military veterans
REUTERS: Apple on Wednesday (Nov 6) said that US military veterans who use its iOS devices and get medical care from the Veterans Health Administration will be able to access their health records on the devices.
The Department of Veterans Affairs runs the largest integrated healthcare system in the United States, with 9 million veterans enrolled and more than 1,200 facilities.
Apple began working with the department this summer to allow access to health records from the system on iPhones and other Apple mobile devices running its iOS operating system.
Apple has been working on partnerships with healthcare organizations to allow access to health records on its devices, promoting their privacy and security features. Data stored in the health app on iPhones is encrypted in such a way that Apple cannot read the data, even if the data is backed up to Apple's iCloud service.
Apple has also worked out similar health record access arrangements with about 400 groups in the healthcare industry, including Johns Hopkins, the University of California San Diego, Quest Diagnostics and Allscripts, the company said. Apple's system allows the user to access records from all of those providers in one place on their device.


Error
4O4
Hmm... You seem really lost
But
DONT panic
, just make sure you watch your oxygen levels
Push the button below to
Get Back Home


- Fortunato
- 201 Student
My name is
Fortunato and I'm
attending Code Fellows in hopes to becoming a Full-Stack
Developer!
- Sean
- 201 Student
My name is Sean
and I'm attending
Code Fellows in hopes to becoming a
Full-Stack Developer!
- Chris
- 201 Student
My name is Chris
and I unintentionally
dragged Sean and
Fortunato into this
project for our Code
Fellows 201 final.


def validBraces(string):
braces = ["{}", "[]", "()"]
for _ in range(int(len(string) / 2)):
for brace in braces:
string = string.replace(brace, '')
if not string:
return True
return False
Write a function that takes a string of braces, and determines if the order of the braces is valid. It should return true
if the string is valid, and false
if it's invalid.
This Kata is similar to the Valid Parentheses Kata, but introduces new characters: brackets []
, and curly braces {}
. Thanks to @arnedag
for the idea!
All input strings will be nonempty, and will only consist of parentheses, brackets and curly braces: ()[]{}
.
A string of braces is considered valid if all braces are matched with the correct brace.
"(){}[]" => True
"([{}])" => True
"(}" => False
"[(])" => False
"[({})](]" => False
def validBraces(string):
braces = ["{}", "[]", "()"]
for _ in range(int(len(string) / 2)):
for brace in braces:
string = string.replace(brace, '')
if not string:
return True
return False


$10 - Nova Coaster
$10 - Nova Hat
$50 - Nova Hoodie
$5 - Nova Mug
$10 - 3x Nova Picks
$45 - Nova Shirt
$15 - 4x Pairs of Nova Socks
$20 - Nova Travel Cup


donations
-
Donate to Watir project via Flattr
Andreas Tolf Tolfsen (of OperaWatir fame) suggested that we add Flattr donations to our web site.
Continue Reading...
Written by: bpettichord on March 7, 2011
Archives by Year
2018 Archives
-
December 2018
-
November 2018
-
September 2018
-
August 2018
-
July 2018
-
May 2018
-
January 2018
2017 Archives
-
November 2017
-
September 2017
-
August 2017
-
July 2017
-
June 2017
-
April 2017
-
February 2017
-
January 2017
2016 Archives
-
December 2016
-
November 2016
-
October 2016
-
September 2016
-
August 2016
2014 Archives
-
December 2014
2013 Archives
-
April 2013
-
January 2013
2012 Archives
-
December 2012
-
September 2012
-
August 2012
-
July 2012
-
April 2012
-
March 2012
-
February 2012
-
January 2012
2011 Archives
-
December 2011
-
November 2011
-
October 2011
-
September 2011
-
August 2011
-
May 2011
-
April 2011
-
March 2011
-
February 2011
-
January 2011
2010 Archives
-
December 2010
-
October 2010
-
September 2010
2009 Archives
-
November 2009


Sharp Locke has entered the private safe of Avidity where a particular item, the Key of the Spire, is locked away.
In order to obtain the Key you must hack the five (5) locks in place.
Match the blocks in all three pillars to unlock a chamber. Unlock all three chambers to to crack the lock.
Be careful with rolling over each block as it increases the Suspicion Level of the system. The Suspicion Level will rise each time a block is engaged. If the Suspicion Level reaches the top, or you run out of time, you will be caught by Avidity authorities.
When you are ready, click begin


Coding is the main aspect to programming.
I have passion to be a future website developer because programming
is such an interesting nice course which is marketable,offering
great earning potential and help to solve real life problems
It is a project describing about a car company limited ;Motorhub
website about a platform of sponsorship
I am a data analyst as well as a software developer.
The skills includes; Research,analysis and design.
I like team work and cooperation and always working diligently.
Furthermore i have good communication skills,
well conversant with both verbal and non verbal communication


This paragraph contains a bunch of images in the text , as you can see. Each one has different margins . Some of these margins are negative, and some are positive . Since replaced element boxes affect line height, the margins on these images can alter the amount of space between baselines of text . This is to be expected, and is something authors must take into consideration .


Duration
15 minutes
Goals
This homework assignment will continue modifying our Fun Flag Facts application and move the testable code out of the XAML code behind - and provide the logic for the screen as a fully segregated class. You should always do this as a best practice because it will allow you to put a different UI onto the app (for example a native iOS view) but keep the tested logic independent.
Assets
This exercise includes a completed project in the Part 04 Resources folder if you'd like to check your work. If you need a starting point, you can use the Completed folder in the prior exercise.
Assignment
See if you can pull the basic flag state out of the code behind and put it into a shared class in the FlagData project. Think about how this class could use INotifyPropertyChanged
to update the BindingContext
. You will need to leave the event handlers in place for the buttons - but the actual logic can be shifted into a shared class, sometimes referred to as a "ViewModel". Check out the completed lab for a full implementation - it has a new class in the FlagData project named FunFlactsViewModel
.


This is a rating control similar to netflix and every other cool site on the internet. You build it by creating a container div and then as many divs inside the container as you want ratings. So in the following example we want 5 pluses so we have 5 divs inside the container. It is your responsibility to style the divs to look like a rater. here is the style sheet I used along with the unhighlighted and highlighted images if you decide to use these images you must buy a license from twotiny although at the time of this writing I can't find the page where I bought them so . . .
example markup:

1

2

3

4

5


§805-5 Warrant after summons issued. The district judge may, for any cause which appears to the district judge to be sufficient, at any time after the issue of the summons, and by virtue of the complaint therein contained and recited, issue the district judge's warrant for the immediate arrest, upon the charge, of the person so summoned. [L 1892, c 57, §21; RL 1925, §4010; RL 1935, §5473; RL 1945, §10773; RL 1955, §257-5; HRS §710-5; am L 1970, c 188, §39; ren L 1972, c 9, pt of §1; gen ch 1985]
Rules of Court
Obtaining the appearance of defendant, see HRPP rule 9.
Case Notes
Spelling of foreign names, reference in warrant to complaint for names of persons to be arrested. 9 H. 641 (1895).


Accoutrement-Color
Sass color-palette management by OddBird…
- Organize all your colors into a single map, or set of maps
- Document color relationships directly in the code
- Automate WCAG-appropriate contrast checking
- Generate color-palette documentation with Herman
OddBird’s Accoutrement toolkits are designed around the idea that code should be meaningful to both humans and machines – opening the door for automation, while improving or maintaining readability. These tools integrate with Herman, our automated living pattern-library generator built on SassDoc.
Other Accoutrement include…
- Init provides lightweight browser-normalization.
- Scale helps manage scale patterns like font-sizes, margins, and gutters.
- Type provides webfont management tools, and other typography helpers.
- Layout provides layout utilities such as box-sizing, intrinsic ratios, z-index management, named media-queries, and a clearfix.
Quick Start: Colors
Install the package with npm or yarn:
npm install accoutrement-color
yarn add accoutrement-color
Import the library:
@import '<path-to>/accoutrement-color/sass/color';
Establish your color palette:
$colors: (
// set explicit colors
'brand-pink': hsl(330, 85%, 62%),
'brand-light': #ddf,
'brand-dark': #224,
// reference existing colors
'background': 'brand-light',
'border': 'brand-dark',
// make adjustments as needed, using color functions
'link': 'brand-pink' ('shade': 25%, 'desaturate': 15%),
);
Access your colors from anywhere:
.example {
border-color: color('border');
}
You can also define your colors in smaller maps,
and then add them to the global $colors
variable
using the merge-color()
function,
or add-colors()
mixin.
$brand: (
'brand-pink': hsl(330, 85%, 62%),
'brand-light': #ddf,
'brand-dark': #224,
);
$patterns: (
'background': 'brand-light',
'border': 'brand-dark',
'link': 'brand-pink' ('shade': 25%),
);
// merge everything into the main $colors map…
@include add-colors($brand, $patterns);
We’ll also help you calculate WCAG-appropriate color contrasts:
a:hover {
// set a background, and get well-contrasted text
@include contrasted('link');
// or return a contrasting color for use anywhere…
border-color: contrast('background');
}


MK
HOME
MEKANIK
ABOUT
HOME
MEKANIK
ABOUT
ABOUT
menu
EKO
pekerja keras
grade
phone
TELPHONE
089614171522
grade
email
EMAIL
<EMAIL_ADDRESS>grade
build
HOBI
otomotif
grade


Class to represent and parse a docblock (a.k.a. doc comment)
These comments always are delimeted by /**
and *\/
.
DocBlocks are treated as GitHub Flavored Markdown, and standard
JavaDoc style tags are supported, such as @param
, @see
, and
@return
.
namespace Facebook\HHAPIDoc\DocBlock;
final class DocBlock {...}
::nullable(?string $comment): ?this
->__construct(string $rawDocBlock)
->getDescription(): ?string
->getParameterInfo(): dict<string, ParameterInfo>
@param
tags->getReturnInfo(): vec<ReturnInfo>
->getSummary(): ?string
->getTagsByName(string $name): vec<string>
::typeToTypes(?string $type): vec<string>


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} Digital Marketplace Your account Your Digital Outcomes and Specialists 3 application Company details {% if data['edit1'] == "true" %} {% else %} {% endif %} Registered company name This could be different to your trading name. Return to company details {% endblock %}
This could be different to your trading name.


--- layout: page title: About header-img: "img/about-bg.png" ---
Katrina studied Physics and Philosophy at Kansas State University. She currently lives in Kansas and works on a small vegetable farm growing microgreens. Katrina likes cooking and plays far too much Overwatch.


The Watch
Remove the plastic stop around the crown (the knob). Push the crown all the way in and the watch will start running.
Pull the crown out to notch 2 (two clicks from fully pushed in, the watch will stop running). Turn the crown clockwise until the day of the week starts to change and you get to 12 o’clock. This is midnight (the watch is on a 24-hour cycle so it knows the difference between noon and midnight). Keep rotating the crown clockwise until you get to the correct time. If you’re setting the watch in the afternoon then remember that you’ll have to pass 12 o’clock.
Push the crown in one notch (the watch will start to run again). Turn the crown clockwise until you reach the correct date.
With the knob still pulled out to the first notch, turn the knob counter-clockwise until you reach the correct day of the week in your desired language. Note: The alternate language will be visible around midnight while the day switches over. Don’t worry, once you’ve chosen your language the watch will stay in that language.
The Tinker watch comes in three sizes. The small is understated, the medium is classic, and the large is boss-like.Choosing the right size watch is very important. That's why we created a printable sizing guide! Just print out our handy size guides at 100% scale, and you can compare the three sizes to your wrist. Size Guide - Standard Straps Size Guide- Quick-Release Straps
Remove the plastic stop around the crown (the knob). Push the crown all the way in and the watch will start running.
Remove the plastic stop around the crown (the knob). Push the crown all the way in and the watch will start running.
Push the crown in one notch (the watch will start to run again). Turn the crown clockwise until you reach the correct date.
Remove the plastic stop around the crown (the knob). Push the crown all the way in and the watch will start running.
Push the crown all the way in, and the watch will start running again! Put the watch on and wait for the compliments!


{% extends "base.html" %} {% block title %}
Medieval catalogues > UNIVERSITY AND COLLEGE LIBRARIES OF OXFORD > Merton College > Electio list of theology books, 4 Nov. 1488
{% endif %}13 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


Loopo is an audio player that lets you easily define bookmarks and play loops, change speed and pitch during playback. Discover how Loopo can be useful for music learning and for language learning!
Setlist for Android
Android Fragment Generator
There are many ways to create a fragment in Android. This tools will help you find the right one.
Sono Digitale Podcast
Italian tech podcast, made by me and a friend of mine. We talk about tech news, upcoming devices, great apps and curious gadgets.


| groupBy,DataFrame-method {SparkR} | R Documentation |
Groups the DataFrame using the specified columns, so we can run aggregation on them.
## S4 method for signature 'DataFrame' groupBy(x, ...) ## S4 method for signature 'DataFrame' group_by(x, ...) group_by(x, ...)
x |
a DataFrame |
a GroupedData
GroupedData
## Not run:
##D # Compute the average for all numeric columns grouped by department.
##D avg(groupBy(df, "department"))
##D
##D # Compute the max age and average salary, grouped by department and gender.
##D agg(groupBy(df, "department", "gender"), salary="avg", "age" -> "max")
## End(Not run)


Files | |
| file | axis2_phase.h |
Defines | |
| #define | AXIS2_PHASE_BOTH_BEFORE_AFTER 0 |
| #define | AXIS2_PHASE_BEFORE 1 |
| #define | AXIS2_PHASE_AFTER 2 |
| #define | AXIS2_PHASE_ANYWHERE 3 |
Typedefs | |
| typedef struct axis2_phase | axis2_phase_t |
Functions | |
| AXIS2_EXTERN axis2_status_t | axis2_phase_add_handler_at (axis2_phase_t *phase, const axutil_env_t *env, const int index, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_add_handler (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_remove_handler (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_invoke (axis2_phase_t *phase, const axutil_env_t *env, struct axis2_msg_ctx *msg_ctx) |
| AXIS2_EXTERN const axis2_char_t * | axis2_phase_get_name (const axis2_phase_t *phase, const axutil_env_t *env) |
| AXIS2_EXTERN int | axis2_phase_get_handler_count (const axis2_phase_t *phase, const axutil_env_t *env) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_set_first_handler (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_set_last_handler (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_add_handler_desc (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_desc_t *handler_desc) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_remove_handler_desc (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_desc_t *handler_desc) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_insert_before (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_insert_after (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_insert_before_and_after (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_t *handler) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_insert_handler_desc (axis2_phase_t *phase, const axutil_env_t *env, axis2_handler_desc_t *handler_desc) |
| AXIS2_EXTERN axutil_array_list_t * | axis2_phase_get_all_handlers (const axis2_phase_t *phase, const axutil_env_t *env) |
| AXIS2_EXTERN axis2_status_t | axis2_phase_invoke_start_from_handler (axis2_phase_t *phase, const axutil_env_t *env, const int paused_handler_index, struct axis2_msg_ctx *msg_ctx) |
| AXIS2_EXTERN void | axis2_phase_free (axis2_phase_t *phase, const axutil_env_t *env) |
| AXIS2_EXTERN axis2_phase_t * | axis2_phase_create (const axutil_env_t *env, const axis2_char_t *phase_name) |
|
AXIS2_EXTERN axis2_status_t | axis2_phase_increment_ref (axis2_phase_t *phase, const axutil_env_t *env) |
| #define AXIS2_PHASE_AFTER 2 |
A given handler's location within the list of handlers is after another given handler.
| #define AXIS2_PHASE_ANYWHERE 3 |
A given handler's location within the list of handlers could be anywhere in the list.
| #define AXIS2_PHASE_BEFORE 1 |
A given handler's location within the list of handlers is before another given handler.
| #define AXIS2_PHASE_BOTH_BEFORE_AFTER 0 |
A given handler's location within the list of handlers is before a particular handler and after another particular handler.
| typedef struct axis2_phase axis2_phase_t |
Type name for axis2_phase
| AXIS2_EXTERN axis2_status_t axis2_phase_add_handler | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Adds the given handler to the end of the handler list.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_add_handler_at | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| const int | index, | |||
| axis2_handler_t * | handler | |||
| ) |
Adds given handler to the specified position in the handler array list.
| phase | pointer to phase struct | |
| env | pointer to environment struct | |
| index | index | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_add_handler_desc | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_desc_t * | handler_desc | |||
| ) |
Adds handler within the handler description to the list of handlers in the phase.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler_desc | pointer to handler description, phase does not assume the ownership of neither the handler description not the handler within the handler description |
| AXIS2_EXTERN axis2_phase_t* axis2_phase_create | ( | const axutil_env_t * | env, | |
| const axis2_char_t * | phase_name | |||
| ) |
creates phase struct instance.
| env | pointer to environment struct | |
| phase_name | name of the phase to be created |
| AXIS2_EXTERN void axis2_phase_free | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env | |||
| ) |
Frees phase struct.
| phase | pointer to phase | |
| env | pointer to environment struct |
| AXIS2_EXTERN axutil_array_list_t* axis2_phase_get_all_handlers | ( | const axis2_phase_t * | phase, | |
| const axutil_env_t * | env | |||
| ) |
Gets all the handlers in the phase.
| phase | pointer to phase | |
| env | pointer to environment struct |
| AXIS2_EXTERN int axis2_phase_get_handler_count | ( | const axis2_phase_t * | phase, | |
| const axutil_env_t * | env | |||
| ) |
Gets handler count in the handler list.
| phase | pointer to phase | |
| env | pointer to environment struct |
| AXIS2_EXTERN const axis2_char_t* axis2_phase_get_name | ( | const axis2_phase_t * | phase, | |
| const axutil_env_t * | env | |||
| ) |
Gets phase name.
| phase | pointer to phase | |
| env | pointer to environment struct |
| AXIS2_EXTERN axis2_status_t axis2_phase_insert_after | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Inserts the handler into handler list of the phase based on the phase rules associated with the handler. This function takes into account the after rules of the handler. After rules specify the location of a current handler in the handler list, after which the given handler is to be placed.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_insert_before | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Inserts the handler into handler list of the phase based on the phase rules associated with the handler. This function takes into account the before rules of the handler. Before rules specify the location of a current handler in the handler list, before which the given handler is to be placed.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_insert_before_and_after | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Inserts the handler into handler list of the phase based on both before and after phase rules associated with the handler. This method assume that both the before and after cannot be the same handler . That condition is not checked by this function. It should be checked before calling this function
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_insert_handler_desc | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_desc_t * | handler_desc | |||
| ) |
Inserts the handler to the correct location in the handler list of the phase. Location is evaluated based on the phase rules.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler_desc | pointer to handler description, phase does not assume the ownership of neither the handler description not the handler within the handler description |
| AXIS2_EXTERN axis2_status_t axis2_phase_invoke | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| struct axis2_msg_ctx * | msg_ctx | |||
| ) |
Invokes the phase. This function will in turn call invoke method of each handler in the handler list, in sequence, starting from the beginning of the list to the end of the list.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| msg_ctx | pointer to message context |
| AXIS2_EXTERN axis2_status_t axis2_phase_invoke_start_from_handler | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| const int | paused_handler_index, | |||
| struct axis2_msg_ctx * | msg_ctx | |||
| ) |
Invokes handlers starting from the given handler index.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| paused_handler_index | index of the handler to start the invocation from | |
| msg_ctx | pointer to message context |
| AXIS2_EXTERN axis2_status_t axis2_phase_remove_handler | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Remove the given handler from the handler list.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_remove_handler_desc | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_desc_t * | handler_desc | |||
| ) |
Remove handler within the handler description from the list of handlers in the phase.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler_desc | pointer to handler description, phase does not assume the ownership of neither the handler description not the handler within the handler description |
| AXIS2_EXTERN axis2_status_t axis2_phase_set_first_handler | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Sets the first handler in the handler list.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |
| AXIS2_EXTERN axis2_status_t axis2_phase_set_last_handler | ( | axis2_phase_t * | phase, | |
| const axutil_env_t * | env, | |||
| axis2_handler_t * | handler | |||
| ) |
Sets the last handler in the handler list.
| phase | pointer to phase | |
| env | pointer to environment struct | |
| handler | pointer to handler, phase does not assume the ownership of the handler |


Lorem ipsum dolor sit amet, consectetur adipisicing elit. Culpa, alias enim placeat earum quos ab.
Let us see your little pretty puppy.You can show your pets'pics in here.
Share the exprenice about how to feed your pets in here and find the one you want to get well with.
If you really like the pets in here,we have a the plat to let you connect them.Just enjoy it.
Love and Peace.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat duis aute irure dolor.


- The Web
- HTML
- URLS
- HTTP
- Web Applications
World Wide Web - Collection of HTML Doctuments.
(Web Invented in 1990s. Has about 30 billion pages).
The Major Pieces/Concepts of the web are best illustrated by this picture:
- A webpage is a text document written in a language called HTML. Browsers read these documents and then interpret and display them.
HTML - Hyper Text Markup Language.
- HTML Documents makeup the web. Considered the "heart" of the web.
HTML is made up of the following:
1) Text Content - What you see.
2) Markup - What It Looks Like.
3) Reference to other Docs - e.g. Images & Videos.
4) Links to other Pages
<Name>Contents</Name> ---- ** This is known as an Element ** (Everything within a set of opeing & closing Tags).
<Name> = OPENING TAG
</Name> = CLOSING TAG
Tags are part of basic HTML vocabulary. An HTML Tag is always contained within angled brackets. Most tags have an Open Tag and Closing Tag. Some examples are:
B Tag - contents
b = BOLD (The contents will always appear in bold).
Em Tag - contents
em = EMPHASIS (The content will always appear in italics).
Some tags do not require a closing tag. These tags are called Void Tags. Some expamples are:
 = Image Tag

 = Break Tag
HTML ATTRIBUTES - A property of an HTML element.
- An HTML Attribute looks like the following:
<Tag Attr ="Value"> Contents </Tag>
- An example of a tag that uses an Attribute is the Anchor Tag.
- Anchor Tag -
- Anchors are for making links.
FULL EXAMPLE: derp
** href = Attribute Name
** www.reddit = Value (in this case a URL)
** derp = Contents
IMAGE TAG ()

**alt = "text" is required (text gets displayed when image does not load).
WHITE SPACE: Text entered on multiple lines are all entered into a single space. To force it to have multiple lines, we use the tag
 (Break Tag).
** EXAMPLE WITHOUT THE
 Tag ** :
"Text on multiple lines."
** EXAMPLE WITH THE
 Tag ** :
"Text on
multiple lines."
- Another way of using line breaks is to use the tag
.

 stands for "Paragraph" and looks like this:

content

Why do we have two ways for making new lines?
ANSWER:

 = Inline - Says where to end the line and have the remaining text wrap to the next line.

 = Block - Makes an invisible box around text that can have height and width.
Text - Inline

Text
 - Block
- You can attach different styles to them to adjust behaviors of how they display.
* How Coding Works - Coding happens when programmers write text in a language that a computer can understand. The computer can then follow the instructions the programmer wrote.
* Computers are Stupid - Programmers need to write exactly the way a computer understands (also known as writing with the correct "Syntax"). For example, if you forgot to close a  tag, the computer wont be able to figure out what you had intended to make bold. This "Stupidicity" can be frustrating, but it also gives programmers incredible power: If you know how to talk to a computer than you can tell it to do anything you want.
* Programmers Can't Remember Everything - There are too many details to keep everything in your head. If you forget how to make text italic in HTML, you can always look it up.
Front End Web Development - Area of programming that is inherently visable: Any code you write will be visable inside the browser.
- Has specific language with syntax and rules (you write HTML in a document, except you follow HTML syntax and rules as opposed to grammatical syntax and rules).
- The basic word in HTML language is a Tag. Browsers turn HTML tags into elements that form a "tree" (more on "trees" in the next section).
- Language used to define the style of the page. Allows you to use syntax and rules of HTML to change how elements appear on the page (Font, Color, Background, etc.).
As stated above, both HTML and CSS are "languages." HTML controls the structure of a webpage, while CSS controls the style (how it looks). To better understand, here is a helpful analogy:
A website is like a house. HTML is the structure (Where the walls are placed, what room is what, etc...). CSS is the style of your house (What color is the carpeting? What decorations do you have? What color are the walls? etc...). Java Script are your interactive components (your garage door opener, your televeision remote, etc....). They change some element of your house.
- Browsers build a "TREE-LIKE STRUCTURE" of the webpage.
- The "Tree-like Structure" comes from the fact that HTML elements can have other elements inside of them. You can draw this
relationship like a family tree. In a browser, this structure shows up as a series of nested boxes. These are boxes inside of boxes,
inside of boxes, and so on...
* When programmers talk about "DOM" (Document Object Model), they are talking about the "tree-like structure" of a page.
* When looking at "Developer Tools" in a browser, sideways triangles are an HTML element. This can be text or another element, etc.
When you read an HTML document as text, you see a wave of changing indentations going up and down the left side of the document. The more indented an element is, the more deeply nested its corresponding "box" is.
- Everything on websites are in square and rectangular boxes.
- All shapes are within a box. They are created by style. Ex: Circles, Triangles, etc. are all within boxes set by code.
- Boxes are defined by DIV tags (a block tag)
When writing code, programmers use special Text Editors (like Sublime Text for example). These editors make the programmer's life easier. For example, some text editors will automatically generate a closing HTML tag when you write an opening tag.
1. Write in Scratchpad
2. Write CSS inside of a
3. If you want to share code, use Codepen (copy & paste from Scratchpad)
Later you will use Sublime to write code that you will save on your computer.
There is a way to add style without having to use a separate file and the <link> tag. You can also put your style code in between an opening and closing
- CSS stands for "Cascading Style Sheets". The "C" is by far the most important part of this phrase.
* To better understand CSS, we must understand Inheritance: A key feature of CSS that relies on the ancestor descendant relationship to operate. Inheritance is the mechanism by which properties are applied not only to a specific element, but also to its descendants. In general, descendant elements inherit text-related properties, but box related properties are not inherited. Properties that can be inherited are color, font, letter-spacing, line height, list style, text align, text indent, text transform, visibility, white-space and word spacing. Properties that cannot be inherited are background, border, display, float and clear, height and width, margin, min/max height and width, outline, overflow padding, position, text-decoration, verticle-align and z index.
* Inheritance prevents certain properties from being declared over and over again in a style sheet, allowing software developers to write less CSS. It also enhances faster loading of websites by users (more on the importance of avoiding repetition further below).
- To write a style that applies to the class description, we do so by typing:
.description {
Color: red;
}
(In this example, color serves as the attribute).
A further example would be if you wanted to write CSS that makes all h1 elements have a black background and white text, you would write:
h1 {
background-color: black;
color: white;
}
1. The h1 is a Selector. It says to the browser, "I want you to apply the rules I'm about to tell you to every h1 element."
2. After the h1 there is a left curly brace ( { ) and at the bottom there is a matching right culy brace ( } ). Everything between these
curly braces will be interpreted as a "rule" that should be applied to every h1 element.
3. The line of code that says: background-color: black; is a declaration. background-color is a property and black is the value of
that property.
In the example above, we set the background-color of every h1 to black. If we only want to add style to certain h1's, we can use Class Selectors. Example: The following Code -

This looks like a traffic light!!:
1. Write CSS in the  of your HTML. This method is good for very small projects. To do this:
* At the top of your HTML document, add a  element.
* Inside the  element, add a


The custom transform provides a way to define your own transforms using matrices. In this example, we re-create the translate transform using a custom transform, then use another custom transform to create a new transform called "skew".