Server: Microsoft-IIS/3.0 Date: Thu, 18 Dec 1997 19:16:23 GMT Content-Type: text/html Accept-Ranges: bytes Last-Modified: Wed, 19 Nov 1997 16:49:53 GMT Content-Length: 13096
Current News
Mark Wimer Appointed President and COO On Sept. 29, Andrew L. Turner, chairman and chief executive officer of Sun Healthcare Group, Inc. announced the appointment of Mark Wimer to the position of president and chief operating officer. Sun's board of directors has approved the creation of this new position. Mr. Wimer has been with Sun since 1993. His most recent position was senior vice president for U.S. inpatient services. Mr. Turner will continue as Sun's chairman and chief executive officer. His primary roles will be to pursue growth opportunities for Sun, including the company's initiatives in international markets. In addition, Mr. Turner will continue to provide vision and direction for the company. "The company's growth in both domestic and international operations has been gratifying," Mr. Turner noted. "The two challenges we now face are identifying and developing new growth opportunities, and then integrating those opportunities into our existing operational structure. My time will be devoted primarily to the first of those challenges; Mr. Wimer will be charged with the second." Mr. Wimer joined Sun in 1993 as president of the company's nursing home subsidiary, Sunrise Healthcare Corporation. In Sun's restructuring in 1996, he became a senior vice president of Sun Healthcare Group, responsible for operations at the nursing home and assisted living facilities. "It is clear from Mr. Wimer's record of performance with this company that he has both the ability, and the confidence of his colleagues and the board of directors, to take charge of the day-to-day operations of all U.S. business units," said Mr. Turner. "Under his leadership, we have seen the nursing home component of our business grow from 31 facilities in 1993 to its current 191. Our revenues from subacute care, the most profitable component of providing skilled nursing care, have risen from virtually none to a current 40 percent. And, our state quality survey results have consistently been superior to the national average." It is the nursing home sector of Sun's business that provides a platform for the company's more profitable ancillary service businesses, which include rehabilitation therapy, pharmacy services and medical supplies. Mr. Wimer's career spans a period of 20 years, and includes a wide range of positions from nursing assistant to his current position with Sun. Prior to joining Sun, Mr. Wimer was president and chief operating officer of Franciscan Eldercare Corp., a non-profit organization that develops and manages long-term care facilities. Before that, he was a regional vice president at The Hillhaven Corporation, with management responsibility for long-term care facilities in Washington, Oregon, Idaho and Montana. Previous experience includes a series of management positions, including nursing home administrator, with Alexian Brothers Health Management. Mr. Wimer holds a master of health administration degree from St. Louis (Mo.) University, and a bachelor of science degree in bacteriology from the University of Idaho. "The professionals throughout the Sun network are really the people who create our successes. I look forward to working with them to further the development of this dynamic company," said Mr. Wimer. With this appointment, Sun will restructure its senior management team so that Mr. Wimer; Robert Woltil, the company's chief financial officer; and Tom Hamilton, senior vice president for inpatient services, Europe, will report directly to Mr. Turner. Reporting to the president will be the senior vice presidents for rehabilitation services, pharmaceutical services, inpatient services, administrative services, and SunSolution (the company's new branded product for all of its ancillary services). The office of the general counsel, and all financial and consulting services, will report to the chief financial officer.
Sun Acquires 110 Nursing Homes in Regency Deal Sun completed the acquisition of Regency Health Services, Inc. (NYSE: RHS) for approximately $367 million in cash on Oct. 8, 1997. The total value of the transaction, including debt, is approximately $625 million. The company also said that it has successfully expanded its existing bank credit facility, led by NationsBank of Texas, N.A., to $1.2 billion. The expanded credit facility is being used to provide partial financing for the Regency acquisition, to satisfy outstanding credit obligations and to provide for the companys ongoing capital needs. Additional funding for the Regency acquisition was obtained through a sale-leaseback transaction involving 31 Regency facilities for approximately $94 million in cash. The completion of the Regency acquisition adds 110 long-term care facilities to Suns U.S. operations. Sun now operates a total of 446 long-term care facilities with 43,551 beds in the United States, the United Kingdom and Spain. The Regency merger also expands Sun's rehabilitation therapy and pharmacy operations.
Sun Acquires Nursing Homes in Northern Ireland Sun Healthcare Group, Inc. announced in August the acquisition of three nursing homes in Northern Ireland. Sun already operates five other properties in Northern Ireland with a total of 212 beds. The new homes will add additional 121 beds to Sun's current operations. The newly acquired homes are Dunanny, Glebe Road and Kingsland. "The Northern Ireland transaction advances Suns strategy of international expansion through relatively small investments that permit the company to evaluate local market conditions and opportunities," said Chet Bradeen, managing director of Ashbourne PLC, Sun's United Kingdom nursing home subsidiary. Sun owns 133 other facilities in the United Kingdom, with more than 7,600 beds.
For more information about Sun
Healthcare Group, Inc., including |


Lead iOS Developer
Results-oriented software developer and research professional with sixteen years experience in both development and research positions. I make it my goal to create software with the user in mind, creating applications with a useable and intuitive user interface experience. I also understand the importance of creating highly readable and easily maintainable source code. I am constantly striving to learn new technologies and look to ways to better myself in this rapidly changing industry.
Contact: Tim Cook, CEO
Contact: Vasil Denchev, Chief Software Architect
Contact: Ray Ozzie, Software Architect
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pulvinar, risus ac porta sagittis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pulvinar, risus ac porta sagittis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pulvinar, risus ac porta sagittis.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pulvinar, risus ac porta sagittis.


|
Class Summary |
| BasicSearchHandler |
Convenience-class for implementing free/busy search handlers. |
| CommandHandler |
Extensible base command for handling GwCommands |
| Configurable |
Helper-class. |
| GarbageCollector |
Function that cleans up objects from the in-folder that belong to
previously handled messages |
| GwFileIo |
This implementation if the GwIo interfaces uses a directory on the
local file system. |
| HackedSSLSocketFactory |
This class is a modified version of the standard SSL socket factory that
trusts any incoming certificate. |
| InputScanner |
Scans an inbound folder for incoming API messages and enqueues them
into a sink. |
| LdapUserFilter |
This class contains knowledge about rules when to filter out
a user and not pass him along in a DirSync operation. |
| NullSink<S> |
A class that can be used as an endpoint of a SEDA queue
(simply discards anything added). |
| Parser |
Parser for commands |
| PasswordLoader |
A class that can be used to encrypt clear-text passwords in configuration
files. |
| PrintFunction<S,T> |
Simple function for basic tests: prints any incoming object
out to System.out and returns null |
| Responder |
This class takes a response object and writes it back into the
outgoing folder for Exchange |
| ShellUtility |
Logic to execute a task in the operating system |
| SimpleSink<S> |
Base class for simple sink implementations: assumes that elements should
be processed in the order in which they arrive. |
| SimpleStage<S,T> |
A simple stage implementation that uses a bunch of parallel daemon threads
and assumes they never crash |
| Stage<S,T> |
A stage in a SEDA architecture. |
| Tuple<T> |
A pair of two elements of the same kind. |


Structure EntityId_t, entity id part of GUID_t.
More...
#include <Guid.h>
|
| static const unsigned int | size = 4 |
| |
Structure EntityId_t, entity id part of GUID_t.
◆ EntityId_t() [1/4]
Default constructor. Uknown entity.
◆ EntityId_t() [2/4]
Main constructor.
- Parameters
-
◆ EntityId_t() [3/4]
◆ EntityId_t() [4/4]
◆ operator=() [1/3]
◆ operator=() [2/3]
◆ operator=() [3/3]
Assignment operator.
- Parameters
-
◆ reverse()
◆ unknown()
◆ size
| const unsigned int size = 4 |
|
static |
◆ value
The documentation for this struct was generated from the following file:
- /home/ricardo/workspace/curro/eProsima/desarrollo/proyectos/fastrtps/include/fastrtps/rtps/common/Guid.h


WITNESS LIST
International Trade & Intergovernmental Affairs Committee
March 31, 2016 - 1:30 PM
Exploring the impact of an open US-Cuba trading relationship on Texas
On:
Fearneyhough, Jason (Texas Department of Agriculture)
Goudeau, Michael (Self)
Gray, Keith (Riviana foods ,Usa Rice Federation)
Ribera, Luis (Texas A&M University)
Scholz, Ben (Self; Texas wheat producers association)
Thomas, Cynthia (Self; Texas Cuba Trade Alliance)
Vaughan, Dee (Self)
Wade, Patrick (Texas Grain Sorghum Association)
Registering, but not testifying:
On:
Brundrett, Chris (Self; Tx hill country wineries)
Brundrett, Chris (Self; Texas hill country wineries)
Carrasco, Corey (Self)
Promotion of agriculture products, both nationally and internationally
On:
Albert, Merland (Julios chips & salsa)
Bajaj, Laura (Texas Tea)
Bessent, Kody (Plains Cotton Growers, Inc.)
Brundrett, Chris (Self; Hill country wineries association)
Fearneyhough, Jason (Texas Department of Agriculture)
Fritz, Robert (Self; Tx hill co wineries)
Kuhlken, Julie (Self; Texas Hill Country Wineries Association)
Montz, Jakob (Self)
1


by : XRPADA, github - tips: r4UDXF4nL7Tgss8uQxn39cCocd8GnGyXS8
- This is a standalone and secure client-side tool to Execute/Release time-based XRP escrows.
- It's recommended to use this in a private tab. Also, run it on a fully trusted personal computer


| Name: | {{wallet.name || wallet.id }} |
| Status: | {{isComplete ? 'Complete' : 'Waiting for copayers...'}} |
| Type: | {{wallet.requiredCopayers}} of {{wallet.totalCopayers}} - {{networkName}} |
| Balance: | {{wallet.balanceInfo.totalBalance || 0}} {{wallet.settings.unitName}} |
| Aprox. size: | {{wallet.kb}} kB ({{wallet.usage}}%) |
Permanently delete this wallet. WARNING: this action cannot be reversed.
Your master private key contains the information to sign any transaction on this wallet. Handle with care.
Show HideThis will scan the blockchain looking for addresses derived from your wallet, in case you have funds in addresses not yet generated (e.g.: you restored an old backup). This will also trigger a synchronization of addresses to other connected peers.
ScanPending Transactions Proposals will be discarded. This needs to be done on ALL peers of a wallet, to prevent the old proposals to be resynced again.
PurgeALL Transactions Proposals will be discarded. This needs to be done on ALL peers of a wallet, to prevent the old proposals to be resynced again.
Purge AllThis is the initial secret join string. Since your wallet it is already complete, this is only useful to rejoin peers that lost their backup BUT have the extended private key stored (they will be rejected on other case). They need to enter their extended private key during the join process (in advanced options).
Show Hide


Ministry official: Message claiming media blackout on Dr M fake
by BY JUSTIN ONGKUALA LUMPUR, Nov 18 — A message claiming that media outlets were barred from giving coverage to Prime Minister Tun Dr Mahathir Mohamad for fear he might announce negative news is fake, according to a government official.
A press officer with the Communications and Multimedia Ministry sent the offending message to a media group, with the word “fake” emblazoned over it.
The message purported that the media blackout was to prevent, among other things, Dr Mahathir from announcing his resignation without naming a successor.
Datuk Seri Anwar Ibrahim is already presented as Dr Mahathir’s immediate successor.
Pakatan Harapan was humiliated at the Tanjung Piai federal by-election on Saturday, losing the seat by over 15,000 votes to Barisan Nasional.


How many programming languages run in your browser?
On Saturday night, I created my first-ever screencast that shows the DLR Console that Jim wrote. I demonstrate interop between all four programming languages, as well as some of the support in DLR Console for working with XAML and Silverlight.
Let me know what you think!
Really impressive, I'm heading to http://silverlight.net/community/gallerydetail.aspx?cat=2 to give it the DLRConsole a try.
Can you compile your application using the console or do you still need to run Windows and Visual Studio to do that?
Posted by: Matt Aimonetti | May 02, 2007 at 12:23 PM
You can reference a compiled assembly from the origin server. You can generate that assembly using whatever tools that you want. For example, a Mono C# generated assembly should just work.
Posted by: John Lam | May 02, 2007 at 02:01 PM
That's amazing John! It looks like MS finally got hit with the clue stick and is acting like the state-of-the-art software team that it is.
Seriously though, that might be the most impressive .NET technology to date.
Posted by: Eric Nicholson | May 02, 2007 at 02:33 PM
Thanks, Eric. We're really proud of what we were able to ship at MIX. Now we just have to get to RTM ... :)
Posted by: John Lam | May 02, 2007 at 02:49 PM
typepad ate my post...
John, a few weeks ago you said I'd be happy, and I am! This is impressive -passing function objects between dynlangs in an alpha release ... wow!
what is this visual basic thing really? it's not vb.net, right?
mangling .net identifiers to ruby casing looks nice, but from a pragmatic point of view, I think it adds only confusion. Ruby programmers are smart, they can adjust to .net conventions! And after all, once you're done nobody will want to program in ruby on any other platform, right? ;-)
Posted by: Stefan Wenig | May 02, 2007 at 11:45 PM
Hi Stefan, I think you are wrong about the method name mangling. Its not about Ruby developers being smart enough, its about honoring the Ruby conventions.
I like beautiful code and keeping the naming standards constant keeps my code simple and clean. Ruby bridges such as RubyCLR and RubyOSA mangle names for this purpose.
Posted by: MIke Moore | May 03, 2007 at 06:00 AM
Stefan,
For some developers, it's nice to see the API via the language's "standard" naming conventions. Eiffel for .NET did this when .NET 1.0 was released (they're upper-case-happy - e.g. SomeMethod() in C# "looks like" SOME_METHOD in Eiffel).
It would be nice if you could see the API as it's defined...but that's a nit.
Posted by: Jason Bock | May 03, 2007 at 06:01 AM
hey, if that's how everyone wants it, fine. just as long as IUnknown won't be converted to i_unknown or unknown ;-)
Posted by: Stefan Wenig | May 03, 2007 at 07:20 AM
You can use either obj.WringHands() or obj.wring_hands. Both will do the same thing. Jim and John showed that functionality in their Mix presentation.
http://sessions.visitmix.com/default.asp?event=1011&session=2012&pid=DEV02&disc=&id=1511&year=2007&search=DEV02
Personally, I don't see the Rubification of method names any differently than VB's case insensitivity. I don't know if VB and Ruby are using the same mechanism in the DLR to "correct" the names, since we don't have the code or bits yet, but it wouldn't surprise me.
Posted by: Mike Moore | May 03, 2007 at 09:06 AM
The linked sample console doesn't have Ruby as an option. How can I access the ruby version? Also, is there a way to run console from power shell on Windows or Terminal in OS X?
Posted by: Bernie Mac | May 05, 2007 at 04:34 PM
Ruby isn't supported right now. That demo was built using special bits that are working only in the lab right now. We'll release the first set of Ruby bits when folks can do useful things using them.
Posted by: John Lam | May 05, 2007 at 06:37 PM


{% block content %}
{% if form_description %} {{ form_description }} {% endif %}
Something went wrong! Please try again!
{{ error }}


learning reflections
# Mindfulness
Have you done mindfulness or attention training before?
no
Are you able to identify any bias you have for or against mindfulness?
it feels like a waist of time as you coud be geting stuff done but without it i tend to get distracted more
What did you notice as you were meditating?
it was nice to have a break from thinking about important things
How did you find the overall experience?
it was good to try relax and try not to worrie about stuff
What's your daily habit commitment?
to spend more time off screens and just thinking
Listening and Looping
What was it like to be fully listened to?
missed this
Learning JavaScript
What did you notice about your learning style? What resources worked for you and why?
i just used the given seorces and w3 schools when i got stuck
Did you keep within the timebox suggestions? If not, was it due to difficulty understanding the basics, or a feeling like you had to _master_ the basics?
yes i keeped with the time box
If you did this entire exercise again, would you get stuck at the same points as you did the first time? Where did you get stuck?
i got stuck with the names of the event listeners as they didnt have names like rightclick and had context menu instead
The DOM Primer and DevTools Primer
Were you interested or bored during this exercise? Which parts were interesting? Which parts were boring?
i fell like i mostly have an undestanding of the dom in the past as to use css u need a little understanding e.g. changing the background and then changing a div.
i thought the node part was intresting as i have never heard of it before
How many tabs do you have open in your web browser right now? What is the ratio of study related tabs to distraction related tabs?
i try just keep one studdy tab open at a time just to keep things simple
DevTools Tutorial
What did you notice about your learning style, strengths and limitations when doing this crash course?
i feel like i have only scratched the surface of the dom and if i reserched more it would get extreamly complicated fast. but for the most part it was simple enough to get an understanding
Did any blocks come up for you?  If not, do so now. It's hilarious and a great way to amuse your non-technical friends.


Ahsan warns PTI against making CPEC controversial
by Staff ReportISLAMABAD: Pakistan Muslim League-Nawaz (PML-N) Secretary General Ahsan Iqbal has warned Planning Minister Asad Umar to avoid giving factually inaccurate statements regarding China-Pakistan Economic Corridor (CPEC) as the PTI regime’s mishandling of the project has already created severe problems for the landmark initiative.
In a statement, Ahsan said had Prime Minister Imran Khan and his cabinet not turned CPEC into a controversial project with their uninformed and misplaced criticism it would not have fueled the barrage of international misunderstandings that benefitted those looking to demonise the project.
Ahsan said that the total volume of Chinese loans under the CPEC is not $18 billion but actually $5.8 billion. “The duration of this loan’s return is between 20 to 25 years and its average interest rate is a mere 2 per cent, and all energy projects under the CPEC are investments, not loans,” he said, adding that this is a special concession by China for its brotherly country Pakistan.


The content has been encrypted, nothing sent to the server yet
The server has Saved the encrypted content
Only you have the key, which you can see in the URL below
Encrypted ciphertext...
Decryption Key


Welcome to JPetStore 6 web service (REST)
Test Catalog service : Get Categories
Get Categories (XML)
Get Categories (JSON)
Response to :
...
(Nice)
...
(Plain)
...
test rs service page


account_circle
settings_power
dashboard
adb
join millions of others and receive current updates directly to your mail box
Subscribe
A bunch of text


# |
Name |
Birthday |
Grocery item |
Price |
|---|---|---|---|---|
| 11 | Gonzo the Great | 12-2-70 | Radishes | $0.63 |
| 2 | Ernie | 10/11/69 | Fish | $12.09 |
| 3 | Bert | 10/11/1969 | Broccoli | $0.79 |
| Cookie Monster | 1/09/1966 | Oreo cookies | $2.78 | |
| Kermit | 12-05-1955 | Granola | $4.73 | |
| Sam the Eagle | 04/07/75 | Corn dog | $5.50 |


 The structure of the OrderCloud 3.0 API was rebuilt to reflect a more modular approach. What this means from the perspective of the architecture is that one object (buyer, product, order, price schedule, category, etc.) is not directly tied with any other object. There are a few specific exceptions to this rule, the biggest being that you will often be required to state which buyer you are working with. Beyond these, an object will only ever be connected through what we call "Assignments", which is separate from an object itself. You will learn more about assignments and why the API is built this way in the following introductory course, "Intro to Assignments". But for now, if you find yourself confused as to why you cannot directly give a product a price schedule or a category a product, it is because of this separation of concerns.
Creating a product is as easy as creating a Buyer, with a few more characteristics available for you to give each product an exhaustive amount of detail. But first, here is the protocol information you will need to make a 'Create Product' request to the OrderCloud 3.0 API,
Note that this is not an instance of a request where you have to explicitly state what buyer you are working under, meaning products can easily be sold across an entire network of buyers, as long as they are under your distributor. Now for the request object,
As stated above, the product object is quite verbose and has many characteristics for you to define inside of it.
Also, note again that there is no PriceSchedule
object inside of the product object. That will be defined
outside of the product and connected with an Assignments request.
Let's go through the important key/values in the 'Create Product' request object, so you have a firm understanding of what you need, what you might not need, and how you leverage different properties to make the most out of your new product creation.
ID
RECOMMENDED
Description
RECOMMENDED
Name
REQUIRED
QuantityMultiplier
REQUIRED
ShipWeight
RECOMMENDED
Active
OPTIONAL
Type
OPTIONAL
StdOrders
OPTIONAL
ReplOrders
OPTIONAL
InventoryEnabled
OPTIONAL
InventoryNotificationPoint
OPTIONAL
InventoryEnabled
set to trueVariantLevelInventory
OPTIONAL
InventoryEnabled
set to true and Type
set to 'VariantText'xp
OPTIONAL
ExceedInventory
OPTIONAL
InventoryEnabled
is set to trueDisplayInventory
OPTIONAL
InventoryEnabled
is set to trueAs you can tell, there are plenty of settings you can modify and characteristics you can choose from, many of which are conditional of others. You will get more comfortable with these settings and their conditionals as you move into more advanced courses, but for now we will just focus on creating your first set of products with some of the standard characteristics.
One final note before reviewing the response object. A key concept in the "modular API architecture" approach is that you only have to use what you actually need. In other words, it is not required of you to use and understand every aspect of the API in order to accomplish your or your clients goals. This modular approach also trickles down to individual API Requests, where you only have to provide the bare necessities (the 'REQUIRED' values), and everything else is up to you. At the end of this class, you will build a few products to get a taste of this.
The response object of a 'Create Product' request in OrderCloud will always be a full product object, meaning every characteristic and setting will be returned to you, regardless of which you included or excluded in your request. This is helpful because it explicitly states the current characteristics and settings of a product so you always know what every value is set to once you create a product. This is pretty standard in the OrderCloud API. Below is the response object layout,
Now that you understand the makeup of a 'Create Product' Request in the OrderCloud API, it's your turn to create a few of your own products. Before we continue, make sure your request is setup correctly in the OrderCloud 3.0 Console. Head back up to the top of this class page to see the protocol requirements, and make sure your 'Authorization' Header has your actual Bearer token in it (i.e. 'Bearer dghe34g3g4396...'). This will be your only reminder to make sure your environment is set up, so just make sure from now on your environment is ready to go!
Okay, let's create your first product. We have provided you with a bare-bones object in the OrderCloud 3.0 Console code-edit-block. Go ahead and fill out each value with whatever you want. If you get stuck, go back up and review each key's description. If your request fails, take a good look at the response console, because chances are the answer is in there.
Once you've successfully created your first product, go ahead and create 4 or 5 more. You will be using these products in future courses, but don't worry about keeping track of them yourself. We will make sure you have what you need in the future, so you can focus on learning how to use the OrderCloud API.
When you've finished creating your products, go on ahead to the next class. And great job creating your first product!


Spring Break Shopping
Product
Unit
Price
Quantity
Total
Microfiber Beach Towel
$30
Sunscreen 100SPF, 120ml
$10
Ipanema Flip-flop Sandals
$20
Shipping
Subtotal
Tax (10%)
Total
Shipping & Handling
Select one
Next-day Delivery: $15.00
Three-day Delivery: $10.00
Regular (5-8 days): $ 5.00
A shipping option must be selected
I accept the terms of this purchase.
"CONFIRM PURCHASE"


Strategy is a behavioural design pattern, It’s used when Class have different implementation of the method, depended on the context. Here is formal definition of the pattern:
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
In order to understand the concept you should be familiar with principles of object oriented programming. Family of algorithms have the same function but different ways to execute it. Strategy pattern can select the way of implementing the method from possible options in run time. I’ll be more clear after demonstrating the example.
UML class diagram:
To demonstrate the use of this pattern I will create Program Class that executes one of methods, depended on the context.
Strategy can be implemented as Abstract Class or Interface. In this example i will use abstract class. Just like this.
abstract class Strategy
{
public abstract void AlgorithmInterface();
So now we need to crate implementations of this method.
Each class inherits from Abstract Class and provides different implementation that will print the name of the class to the console.
class ConcreteStrategyA : Strategy
{
public override void AlgorithmInterface()
{
Console.WriteLine("ConcreteStrategyA");
}
}
class ConcreteStrategyB : Strategy
{
public override void AlgorithmInterface()
{
Console.WriteLine("ConcreteStrategyB");
}
}
class ConcreteStrategyC : Strategy
{
public override void AlgorithmInterface()
{
Console.WriteLine("ConcreteStrategyC");
}
Now let’s create a context of this behaviour
class Context
{
private Strategy _strategy;
// Constructor
public Context(Strategy strategy)
{
this._strategy = strategy;
}
public void ContextInterface()
{
_strategy.AlgorithmInterface();
}
When we crate instance of this Class we pass the strategy implementation that will be selected. Last part of the program is the Program Class that will connect everything together.
class Program
{
static void Main()
{
Context context;
context = new Context(new ConcreteStrategyA());
context.ContextInterface();
context = new Context(new ConcreteStrategyB());
context.ContextInterface();
context = new Context(new ConcreteStrategyC());
context.ContextInterface();
}
Here we create three instances of the Context Class, each one with different implementation of the Strategy interface.
It was example of structural code that represent the bare bones implementation of this pattern. In next part I’ll use more practical examples of implementation. Stay Awesome!


Plato on Github
Report Home
compiled\ember-application\lib\system\application.js
Maintainability
69.75
Lines of code
1202
Difficulty
47.33
Estimated Errors
6.49
Function weight
By Complexity
By SLOC
/** @module ember @submodule ember-application */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _dagMap = require('dag-map'); var _dagMap2 = _interopRequireDefault(_dagMap); var _containerRegistry = require('container/registry'); var _containerRegistry2 = _interopRequireDefault(_containerRegistry); var _emberMetal = require('ember-metal'); var _emberMetal2 = _interopRequireDefault(_emberMetal); // Ember.deprecate, Ember.assert, Ember.libraries, LOG_VERSION, Namespace, BOOTED var _emberMetalFeatures = require('ember-metal/features'); var _emberMetalFeatures2 = _interopRequireDefault(_emberMetalFeatures); var _emberMetalProperty_get = require('ember-metal/property_get'); var _emberMetalProperty_set = require('ember-metal/property_set'); var _emberRuntimeSystemLazy_load = require('ember-runtime/system/lazy_load'); var _emberRuntimeSystemNamespace = require('ember-runtime/system/namespace'); var _emberRuntimeSystemNamespace2 = _interopRequireDefault(_emberRuntimeSystemNamespace); var _emberApplicationSystemResolver = require('ember-application/system/resolver'); var _emberApplicationSystemResolver2 = _interopRequireDefault(_emberApplicationSystemResolver); var _emberMetalRun_loop = require('ember-metal/run_loop'); var _emberMetalRun_loop2 = _interopRequireDefault(_emberMetalRun_loop); var _emberMetalUtils = require('ember-metal/utils'); var _emberRuntimeControllersController = require('ember-runtime/controllers/controller'); var _emberRuntimeControllersController2 = _interopRequireDefault(_emberRuntimeControllersController); var _emberRuntimeControllersObject_controller = require('ember-runtime/controllers/object_controller'); var _emberRuntimeControllersObject_controller2 = _interopRequireDefault(_emberRuntimeControllersObject_controller); var _emberRuntimeControllersArray_controller = require('ember-runtime/controllers/array_controller'); var _emberRuntimeControllersArray_controller2 = _interopRequireDefault(_emberRuntimeControllersArray_controller); var _emberMetalViewsRenderer = require('ember-metal-views/renderer'); var _emberMetalViewsRenderer2 = _interopRequireDefault(_emberMetalViewsRenderer); var _emberHtmlbarsSystemDomHelper = require('ember-htmlbars/system/dom-helper'); var _emberHtmlbarsSystemDomHelper2 = _interopRequireDefault(_emberHtmlbarsSystemDomHelper); var _emberViewsViewsSelect = require('ember-views/views/select'); var _emberViewsViewsSelect2 = _interopRequireDefault(_emberViewsViewsSelect); var _emberRoutingViewsViewsOutlet = require('ember-routing-views/views/outlet'); var _emberViewsViewsView = require('ember-views/views/view'); var _emberViewsViewsView2 = _interopRequireDefault(_emberViewsViewsView); var _emberViewsSystemEvent_dispatcher = require('ember-views/system/event_dispatcher'); var _emberViewsSystemEvent_dispatcher2 = _interopRequireDefault(_emberViewsSystemEvent_dispatcher); var _emberViewsSystemJquery = require('ember-views/system/jquery'); var _emberViewsSystemJquery2 = _interopRequireDefault(_emberViewsSystemJquery); var _emberRoutingSystemRoute = require('ember-routing/system/route'); var _emberRoutingSystemRoute2 = _interopRequireDefault(_emberRoutingSystemRoute); var _emberRoutingSystemRouter = require('ember-routing/system/router'); var _emberRoutingSystemRouter2 = _interopRequireDefault(_emberRoutingSystemRouter); var _emberRoutingLocationHash_location = require('ember-routing/location/hash_location'); var _emberRoutingLocationHash_location2 = _interopRequireDefault(_emberRoutingLocationHash_location); var _emberRoutingLocationHistory_location = require('ember-routing/location/history_location'); var _emberRoutingLocationHistory_location2 = _interopRequireDefault(_emberRoutingLocationHistory_location); var _emberRoutingLocationAuto_location = require('ember-routing/location/auto_location'); var _emberRoutingLocationAuto_location2 = _interopRequireDefault(_emberRoutingLocationAuto_location); var _emberRoutingLocationNone_location = require('ember-routing/location/none_location'); var _emberRoutingLocationNone_location2 = _interopRequireDefault(_emberRoutingLocationNone_location); var _emberRoutingSystemCache = require('ember-routing/system/cache'); var _emberRoutingSystemCache2 = _interopRequireDefault(_emberRoutingSystemCache); var _emberApplicationSystemApplicationInstance = require('ember-application/system/application-instance'); var _emberApplicationSystemApplicationInstance2 = _interopRequireDefault(_emberApplicationSystemApplicationInstance); var _emberViewsViewsText_field = require('ember-views/views/text_field'); var _emberViewsViewsText_field2 = _interopRequireDefault(_emberViewsViewsText_field); var _emberViewsViewsText_area = require('ember-views/views/text_area'); var _emberViewsViewsText_area2 = _interopRequireDefault(_emberViewsViewsText_area); var _emberViewsViewsCheckbox = require('ember-views/views/checkbox'); var _emberViewsViewsCheckbox2 = _interopRequireDefault(_emberViewsViewsCheckbox); var _emberViewsViewsLegacy_each_view = require('ember-views/views/legacy_each_view'); var _emberViewsViewsLegacy_each_view2 = _interopRequireDefault(_emberViewsViewsLegacy_each_view); var _emberRoutingViewsViewsLink = require('ember-routing-views/views/link'); var _emberRoutingViewsViewsLink2 = _interopRequireDefault(_emberRoutingViewsViewsLink); var _emberRoutingServicesRouting = require('ember-routing/services/routing'); var _emberRoutingServicesRouting2 = _interopRequireDefault(_emberRoutingServicesRouting); var _emberExtensionSupportContainer_debug_adapter = require('ember-extension-support/container_debug_adapter'); var _emberExtensionSupportContainer_debug_adapter2 = _interopRequireDefault(_emberExtensionSupportContainer_debug_adapter); var _emberMetalEnvironment = require('ember-metal/environment'); var _emberMetalEnvironment2 = _interopRequireDefault(_emberMetalEnvironment); function props(obj) { var properties = []; for (var key in obj) { properties.push(key); } return properties; } var librariesRegistered = false; /** An instance of `Ember.Application` is the starting point for every Ember application. It helps to instantiate, initialize and coordinate the many objects that make up your app. Each Ember app has one and only one `Ember.Application` object. In fact, the very first thing you should do in your application is create the instance: ```javascript window.App = Ember.Application.create(); ``` Typically, the application object is the only global variable. All other classes in your app should be properties on the `Ember.Application` instance, which highlights its first role: a global namespace. For example, if you define a view class, it might look like this: ```javascript App.MyView = Ember.View.extend(); ``` By default, calling `Ember.Application.create()` will automatically initialize your application by calling the `Ember.Application.initialize()` method. If you need to delay initialization, you can call your app's `deferReadiness()` method. When you are ready for your app to be initialized, call its `advanceReadiness()` method. You can define a `ready` method on the `Ember.Application` instance, which will be run by Ember when the application is initialized. Because `Ember.Application` inherits from `Ember.Namespace`, any classes you create will have useful string representations when calling `toString()`. See the `Ember.Namespace` documentation for more information. While you can think of your `Ember.Application` as a container that holds the other classes in your application, there are several other responsibilities going on under-the-hood that you may want to understand. ### Event Delegation Ember uses a technique called _event delegation_. This allows the framework to set up a global, shared event listener instead of requiring each view to do it manually. For example, instead of each view registering its own `mousedown` listener on its associated element, Ember sets up a `mousedown` listener on the `body`. If a `mousedown` event occurs, Ember will look at the target of the event and start walking up the DOM node tree, finding corresponding views and invoking their `mouseDown` method as it goes. `Ember.Application` has a number of default events that it listens for, as well as a mapping from lowercase events to camel-cased view method names. For example, the `keypress` event causes the `keyPress` method on the view to be called, the `dblclick` event causes `doubleClick` to be called, and so on. If there is a bubbling browser event that Ember does not listen for by default, you can specify custom events and their corresponding view method names by setting the application's `customEvents` property: ```javascript var App = Ember.Application.create({ customEvents: { // add support for the paste event paste: 'paste' } }); ``` By default, the application sets up these event listeners on the document body. However, in cases where you are embedding an Ember application inside an existing page, you may want it to set up the listeners on an element inside the body. For example, if only events inside a DOM element with the ID of `ember-app` should be delegated, set your application's `rootElement` property: ```javascript var App = Ember.Application.create({ rootElement: '#ember-app' }); ``` The `rootElement` can be either a DOM element or a jQuery-compatible selector string. Note that *views appended to the DOM outside the root element will not receive events.* If you specify a custom root element, make sure you only append views inside it! To learn more about the advantages of event delegation and the Ember view layer, and a list of the event listeners that are setup by default, visit the [Ember View Layer guide](http://emberjs.com/guides/understanding-ember/the-view-layer/#toc_event-delegation). ### Initializers Libraries on top of Ember can add initializers, like so: ```javascript Ember.Application.initializer({ name: 'api-adapter', initialize: function(container, application) { application.register('api-adapter:main', ApiAdapter); } }); ``` Initializers provide an opportunity to access the container, which organizes the different components of an Ember application. Additionally they provide a chance to access the instantiated application. Beyond being used for libraries, initializers are also a great way to organize dependency injection or setup in your own application. ### Routing In addition to creating your application's router, `Ember.Application` is also responsible for telling the router when to start routing. Transitions between routes can be logged with the `LOG_TRANSITIONS` flag, and more detailed intra-transition logging can be logged with the `LOG_TRANSITIONS_INTERNAL` flag: ```javascript var App = Ember.Application.create({ LOG_TRANSITIONS: true, // basic logging of successful transitions LOG_TRANSITIONS_INTERNAL: true // detailed logging of all routing steps }); ``` By default, the router will begin trying to translate the current URL into application state once the browser emits the `DOMContentReady` event. If you need to defer routing, you can call the application's `deferReadiness()` method. Once routing can begin, call the `advanceReadiness()` method. If there is any setup required before routing begins, you can implement a `ready()` method on your app that will be invoked immediately before routing begins. @class Application @namespace Ember @extends Ember.Namespace @public */ var Application = _emberRuntimeSystemNamespace2['default'].extend({ _suppressDeferredDeprecation: true, /** The root DOM element of the Application. This can be specified as an element or a [jQuery-compatible selector string](http://api.jquery.com/category/selectors/). This is the element that will be passed to the Application's, `eventDispatcher`, which sets up the listeners for event delegation. Every view in your application should be a child of the element you specify here. @property rootElement @type DOMElement @default 'body' @public */ rootElement: 'body', /** The `Ember.EventDispatcher` responsible for delegating events to this application's views. The event dispatcher is created by the application at initialization time and sets up event listeners on the DOM element described by the application's `rootElement` property. See the documentation for `Ember.EventDispatcher` for more information. @property eventDispatcher @type Ember.EventDispatcher @default null @public */ eventDispatcher: null, /** The DOM events for which the event dispatcher should listen. By default, the application's `Ember.EventDispatcher` listens for a set of standard DOM events, such as `mousedown` and `keyup`, and delegates them to your application's `Ember.View` instances. If you would like additional bubbling events to be delegated to your views, set your `Ember.Application`'s `customEvents` property to a hash containing the DOM event name as the key and the corresponding view method name as the value. For example: ```javascript var App = Ember.Application.create({ customEvents: { // add support for the paste event paste: 'paste' } }); ``` @property customEvents @type Object @default null @public */ customEvents: null, /** Whether the application should automatically start routing and render templates to the `rootElement` on DOM ready. While default by true, other environments such as FastBoot or a testing harness can set this property to `false` and control the precise timing and behavior of the boot process. @property autoboot @type Boolean @default true @private */ autoboot: true, init: function init() { this._super.apply(this, arguments); if (!this.$) { this.$ = _emberViewsSystemJquery2['default']; } this.buildRegistry(); registerLibraries(); logLibraryVersions(); // Start off the number of deferrals at 1. This will be // decremented by the Application's own `initialize` method. this._readinessDeferrals = 1; if ((0, _emberMetalFeatures2['default'])('ember-application-visit')) { if (this.autoboot) { // Create subclass of Ember.Router for this Application instance. // This is to ensure that someone reopening `App.Router` does not // tamper with the default `Ember.Router`. // 2.0TODO: Can we move this into a globals-mode-only library? this.Router = (this.Router || _emberRoutingSystemRouter2['default']).extend(); this.buildDefaultInstance(); this.waitForDOMReady(); } } else { this.Router = (this.Router || _emberRoutingSystemRouter2['default']).extend(); this.buildDefaultInstance(); this.waitForDOMReady(); } }, /** Build and configure the registry for the current application. @private @method buildRegistry @return {Ember.Registry} the configured registry */ buildRegistry: function buildRegistry() { var registry = this.registry = Application.buildRegistry(this); return registry; }, /** Create a container for the current application's registry. @private @method buildInstance @return {Ember.Container} the configured container */ buildInstance: function buildInstance() { return _emberApplicationSystemApplicationInstance2['default'].create({ customEvents: (0, _emberMetalProperty_get.get)(this, 'customEvents'), rootElement: (0, _emberMetalProperty_get.get)(this, 'rootElement'), applicationRegistry: this.registry }); }, buildDefaultInstance: function buildDefaultInstance() { var instance = this.buildInstance(); // For the default instance only, set the view registry to the global // Ember.View.views hash for backwards-compatibility. _emberViewsViewsView2['default'].views = instance.container.lookup('-view-registry:main'); // TODO2.0: Legacy support for App.__container__ // and global methods on App that rely on a single, // default instance. this.__deprecatedInstance__ = instance; this.__container__ = instance.container; return instance; }, /** Automatically initialize the application once the DOM has become ready. The initialization itself is scheduled on the actions queue which ensures that application loading finishes before booting. If you are asynchronously loading code, you should call `deferReadiness()` to defer booting, and then call `advanceReadiness()` once all of your code has finished loading. @private @method waitForDOMReady */ waitForDOMReady: function waitForDOMReady() { if (!this.$ || this.$.isReady) { _emberMetalRun_loop2['default'].schedule('actions', this, 'domReady'); } else { this.$().ready(_emberMetalRun_loop2['default'].bind(this, 'domReady')); } }, /** Use this to defer readiness until some condition is true. Example: ```javascript var App = Ember.Application.create(); App.deferReadiness(); // Ember.$ is a reference to the jQuery object/function Ember.$.getJSON('/auth-token', function(token) { App.token = token; App.advanceReadiness(); }); ``` This allows you to perform asynchronous setup logic and defer booting your application until the setup has finished. However, if the setup requires a loading UI, it might be better to use the router for this purpose. @method deferReadiness @public */ deferReadiness: function deferReadiness() { _emberMetal2['default'].assert('You must call deferReadiness on an instance of Ember.Application', this instanceof Application); _emberMetal2['default'].assert('You cannot defer readiness since the `ready()` hook has already been called.', this._readinessDeferrals > 0); this._readinessDeferrals++; }, /** Call `advanceReadiness` after any asynchronous setup logic has completed. Each call to `deferReadiness` must be matched by a call to `advanceReadiness` or the application will never become ready and routing will not begin. @method advanceReadiness @see {Ember.Application#deferReadiness} @public */ advanceReadiness: function advanceReadiness() { _emberMetal2['default'].assert('You must call advanceReadiness on an instance of Ember.Application', this instanceof Application); this._readinessDeferrals--; if (this._readinessDeferrals === 0) { _emberMetalRun_loop2['default'].once(this, this.didBecomeReady); } }, /** Registers a factory that can be used for dependency injection (with `App.inject`) or for service lookup. Each factory is registered with a full name including two parts: `type:name`. A simple example: ```javascript var App = Ember.Application.create(); App.Orange = Ember.Object.extend(); App.register('fruit:favorite', App.Orange); ``` Ember will resolve factories from the `App` namespace automatically. For example `App.CarsController` will be discovered and returned if an application requests `controller:cars`. An example of registering a controller with a non-standard name: ```javascript var App = Ember.Application.create(); var Session = Ember.Controller.extend(); App.register('controller:session', Session); // The Session controller can now be treated like a normal controller, // despite its non-standard name. App.ApplicationController = Ember.Controller.extend({ needs: ['session'] }); ``` Registered factories are **instantiated** by having `create` called on them. Additionally they are **singletons**, each time they are looked up they return the same instance. Some examples modifying that default behavior: ```javascript var App = Ember.Application.create(); App.Person = Ember.Object.extend(); App.Orange = Ember.Object.extend(); App.Email = Ember.Object.extend(); App.session = Ember.Object.create(); App.register('model:user', App.Person, { singleton: false }); App.register('fruit:favorite', App.Orange); App.register('communication:main', App.Email, { singleton: false }); App.register('session', App.session, { instantiate: false }); ``` @method register @param fullName {String} type:name (e.g., 'model:user') @param factory {Function} (e.g., App.Person) @param options {Object} (optional) disable instantiation or singleton usage @public **/ register: function register() { var _registry; (_registry = this.registry).register.apply(_registry, arguments); }, /** Define a dependency injection onto a specific factory or all factories of a type. When Ember instantiates a controller, view, or other framework component it can attach a dependency to that component. This is often used to provide services to a set of framework components. An example of providing a session object to all controllers: ```javascript var App = Ember.Application.create(); var Session = Ember.Object.extend({ isAuthenticated: false }); // A factory must be registered before it can be injected App.register('session:main', Session); // Inject 'session:main' onto all factories of the type 'controller' // with the name 'session' App.inject('controller', 'session', 'session:main'); App.IndexController = Ember.Controller.extend({ isLoggedIn: Ember.computed.alias('session.isAuthenticated') }); ``` Injections can also be performed on specific factories. ```javascript App.inject(<full_name or type>, <property name>, <full_name>) App.inject('route', 'source', 'source:main') App.inject('route:application', 'email', 'model:email') ``` It is important to note that injections can only be performed on classes that are instantiated by Ember itself. Instantiating a class directly (via `create` or `new`) bypasses the dependency injection system. **Note:** Ember-Data instantiates its models in a unique manner, and consequently injections onto models (or all models) will not work as expected. Injections on models can be enabled by setting `Ember.MODEL_FACTORY_INJECTIONS` to `true`. @method inject @param factoryNameOrType {String} @param property {String} @param injectionName {String} @public **/ inject: function inject() { var _registry2; (_registry2 = this.registry).injection.apply(_registry2, arguments); }, /** Calling initialize manually is not supported. Please see Ember.Application#advanceReadiness and Ember.Application#deferReadiness. @private @deprecated @method initialize **/ initialize: function initialize() { _emberMetal2['default'].deprecate('Calling initialize manually is not supported. Please see Ember.Application#advanceReadiness and Ember.Application#deferReadiness'); }, /** Initialize the application. This happens automatically. Run any initializers and run the application load hook. These hooks may choose to defer readiness. For example, an authentication hook might want to defer readiness until the auth token has been retrieved. @private @method domReady */ domReady: function domReady() { if (this.isDestroyed) { return; } this.boot(); return this; }, boot: function boot() { if (this._bootPromise) { return this._bootPromise; } var defer = new _emberMetal2['default'].RSVP.defer(); this._bootPromise = defer.promise; this._bootResolver = defer; this.runInitializers(this.registry); (0, _emberRuntimeSystemLazy_load.runLoadHooks)('application', this); this.advanceReadiness(); return this._bootPromise; }, /** Reset the application. This is typically used only in tests. It cleans up the application in the following order: 1. Deactivate existing routes 2. Destroy all objects in the container 3. Create a new application container 4. Re-route to the existing url Typical Example: ```javascript var App; run(function() { App = Ember.Application.create(); }); module('acceptance test', { setup: function() { App.reset(); } }); test('first test', function() { // App is freshly reset }); test('second test', function() { // App is again freshly reset }); ``` Advanced Example: Occasionally you may want to prevent the app from initializing during setup. This could enable extra configuration, or enable asserting prior to the app becoming ready. ```javascript var App; run(function() { App = Ember.Application.create(); }); module('acceptance test', { setup: function() { run(function() { App.reset(); App.deferReadiness(); }); } }); test('first test', function() { ok(true, 'something before app is initialized'); run(function() { App.advanceReadiness(); }); ok(true, 'something after app is initialized'); }); ``` @method reset @public **/ reset: function reset() { var instance = this.__deprecatedInstance__; this._readinessDeferrals = 1; this._bootPromise = null; this._bootResolver = null; function handleReset() { (0, _emberMetalRun_loop2['default'])(instance, 'destroy'); _emberMetalRun_loop2['default'].schedule('actions', this, 'domReady', this.buildDefaultInstance()); } _emberMetalRun_loop2['default'].join(this, handleReset); }, /** @private @method runInitializers */ runInitializers: function runInitializers(registry) { var App = this; this._runInitializer('initializers', function (name, initializer) { _emberMetal2['default'].assert('No application initializer named \'' + name + '\'', !!initializer); if ((0, _emberMetalFeatures2['default'])('ember-application-initializer-context')) { initializer.initialize(registry, App); } else { var ref = initializer.initialize; ref(registry, App); } }); }, runInstanceInitializers: function runInstanceInitializers(instance) { this._runInitializer('instanceInitializers', function (name, initializer) { _emberMetal2['default'].assert('No instance initializer named \'' + name + '\'', !!initializer); initializer.initialize(instance); }); }, _runInitializer: function _runInitializer(bucketName, cb) { var initializersByName = (0, _emberMetalProperty_get.get)(this.constructor, bucketName); var initializers = props(initializersByName); var graph = new _dagMap2['default'](); var initializer; for (var i = 0; i < initializers.length; i++) { initializer = initializersByName[initializers[i]]; graph.addEdges(initializer.name, initializer, initializer.before, initializer.after); } graph.topsort(function (vertex) { cb(vertex.name, vertex.value); }); }, /** @private @method didBecomeReady */ didBecomeReady: function didBecomeReady() { if (this.autoboot) { if (_emberMetalEnvironment2['default'].hasDOM) { this.__deprecatedInstance__.setupEventDispatcher(); } this.runInstanceInitializers(this.__deprecatedInstance__); this.ready(); // user hook this.__deprecatedInstance__.startRouting(); if (!_emberMetal2['default'].testing) { // Eagerly name all classes that are already loaded _emberMetal2['default'].Namespace.processAll(); _emberMetal2['default'].BOOTED = true; } } this._bootResolver.resolve(); }, /** Called when the Application has become ready, immediately before routing begins. The call will be delayed until the DOM has become ready. @event ready @public */ ready: function ready() { return this; }, /** Set this to provide an alternate class to `Ember.DefaultResolver` @deprecated Use 'Resolver' instead @property resolver @public */ resolver: null, /** Set this to provide an alternate class to `Ember.DefaultResolver` @property resolver @public */ Resolver: null, // This method must be moved to the application instance object willDestroy: function willDestroy() { this._super.apply(this, arguments); _emberMetal2['default'].BOOTED = false; this._bootPromise = null; this._bootResolver = null; if (this.__deprecatedInstance__) { this.__deprecatedInstance__.destroy(); } }, initializer: function initializer(options) { this.constructor.initializer(options); }, /** @method then @private @deprecated */ then: function then() { _emberMetal2['default'].deprecate('Do not use `.then` on an instance of Ember.Application. Please use the `.ready` hook instead.', false, { url: 'http://emberjs.com/guides/deprecations/#toc_deprecate-code-then-code-on-ember-application' }); this._super.apply(this, arguments); } }); if ((0, _emberMetalFeatures2['default'])('ember-application-instance-initializers')) { Application.reopen({ instanceInitializer: function instanceInitializer(options) { this.constructor.instanceInitializer(options); } }); Application.reopenClass({ instanceInitializer: buildInitializerMethod('instanceInitializers', 'instance initializer') }); } if ((0, _emberMetalFeatures2['default'])('ember-application-visit')) { Application.reopen({ /** Creates a new instance of the application and instructs it to route to the specified initial URL. This method returns a promise that will be resolved once rendering is complete. That promise is resolved with the instance. ```js App.visit('/users').then(function(instance) { var view = instance.view; view.appendTo('#qunit-test-fixtures'); }); ``` @method visit @private */ visit: function visit(url) { var instance = this.buildInstance(); this.runInstanceInitializers(instance); var renderPromise = new _emberMetal2['default'].RSVP.Promise(function (res, rej) { instance.didCreateRootView = function (view) { instance.view = view; res(instance); }; }); instance.overrideRouterLocation({ location: 'none' }); return instance.handleURL(url).then(function () { return renderPromise; }); } }); } Application.reopenClass({ initializers: Object.create(null), instanceInitializers: Object.create(null), /** Initializer receives an object which has the following attributes: `name`, `before`, `after`, `initialize`. The only required attribute is `initialize`, all others are optional. * `name` allows you to specify under which name the initializer is registered. This must be a unique name, as trying to register two initializers with the same name will result in an error. ```javascript Ember.Application.initializer({ name: 'namedInitializer', initialize: function(container, application) { Ember.debug('Running namedInitializer!'); } }); ``` * `before` and `after` are used to ensure that this initializer is ran prior or after the one identified by the value. This value can be a single string or an array of strings, referencing the `name` of other initializers. An example of ordering initializers, we create an initializer named `first`: ```javascript Ember.Application.initializer({ name: 'first', initialize: function(container, application) { Ember.debug('First initializer!'); } }); // DEBUG: First initializer! ``` We add another initializer named `second`, specifying that it should run after the initializer named `first`: ```javascript Ember.Application.initializer({ name: 'second', after: 'first', initialize: function(container, application) { Ember.debug('Second initializer!'); } }); // DEBUG: First initializer! // DEBUG: Second initializer! ``` Afterwards we add a further initializer named `pre`, this time specifying that it should run before the initializer named `first`: ```javascript Ember.Application.initializer({ name: 'pre', before: 'first', initialize: function(container, application) { Ember.debug('Pre initializer!'); } }); // DEBUG: Pre initializer! // DEBUG: First initializer! // DEBUG: Second initializer! ``` Finally we add an initializer named `post`, specifying it should run after both the `first` and the `second` initializers: ```javascript Ember.Application.initializer({ name: 'post', after: ['first', 'second'], initialize: function(container, application) { Ember.debug('Post initializer!'); } }); // DEBUG: Pre initializer! // DEBUG: First initializer! // DEBUG: Second initializer! // DEBUG: Post initializer! ``` * `initialize` is a callback function that receives two arguments, `container` and `application` on which you can operate. Example of using `container` to preload data into the store: ```javascript Ember.Application.initializer({ name: 'preload-data', initialize: function(container, application) { var store = container.lookup('store:main'); store.pushPayload(preloadedData); } }); ``` Example of using `application` to register an adapter: ```javascript Ember.Application.initializer({ name: 'api-adapter', initialize: function(container, application) { application.register('api-adapter:main', ApiAdapter); } }); ``` @method initializer @param initializer {Object} @public */ initializer: buildInitializerMethod('initializers', 'initializer'), /** This creates a registry with the default Ember naming conventions. It also configures the registry: * registered views are created every time they are looked up (they are not singletons) * registered templates are not factories; the registered value is returned directly. * the router receives the application as its `namespace` property * all controllers receive the router as their `target` and `controllers` properties * all controllers receive the application as their `namespace` property * the application view receives the application controller as its `controller` property * the application view receives the application template as its `defaultTemplate` property @private @method buildRegistry @static @param {Ember.Application} namespace the application for which to build the registry @return {Ember.Registry} the built registry @public */ buildRegistry: function buildRegistry(namespace) { var registry = new _containerRegistry2['default'](); registry.set = _emberMetalProperty_set.set; registry.resolver = resolverFor(namespace); registry.normalizeFullName = registry.resolver.normalize; registry.describe = registry.resolver.describe; registry.makeToString = registry.resolver.makeToString; registry.optionsForType('component', { singleton: false }); registry.optionsForType('view', { singleton: false }); registry.optionsForType('template', { instantiate: false }); registry.register('application:main', namespace, { instantiate: false }); registry.register('controller:basic', _emberRuntimeControllersController2['default'], { instantiate: false }); registry.register('controller:object', _emberRuntimeControllersObject_controller2['default'], { instantiate: false }); registry.register('controller:array', _emberRuntimeControllersArray_controller2['default'], { instantiate: false }); registry.register('renderer:-dom', { create: function create() { return new _emberMetalViewsRenderer2['default'](new _emberHtmlbarsSystemDomHelper2['default']()); } }); registry.injection('view', 'renderer', 'renderer:-dom'); registry.register('view:select', _emberViewsViewsSelect2['default']); registry.register('view:-outlet', _emberRoutingViewsViewsOutlet.OutletView); registry.register('-view-registry:main', { create: function create() { return {}; } }); registry.injection('view', '_viewRegistry', '-view-registry:main'); registry.register('view:toplevel', _emberViewsViewsView2['default'].extend()); registry.register('route:basic', _emberRoutingSystemRoute2['default'], { instantiate: false }); registry.register('event_dispatcher:main', _emberViewsSystemEvent_dispatcher2['default']); registry.injection('router:main', 'namespace', 'application:main'); registry.injection('view:-outlet', 'namespace', 'application:main'); registry.register('location:auto', _emberRoutingLocationAuto_location2['default']); registry.register('location:hash', _emberRoutingLocationHash_location2['default']); registry.register('location:history', _emberRoutingLocationHistory_location2['default']); registry.register('location:none', _emberRoutingLocationNone_location2['default']); registry.injection('controller', 'target', 'router:main'); registry.injection('controller', 'namespace', 'application:main'); registry.register('-bucket-cache:main', _emberRoutingSystemCache2['default']); registry.injection('router', '_bucketCache', '-bucket-cache:main'); registry.injection('route', '_bucketCache', '-bucket-cache:main'); registry.injection('controller', '_bucketCache', '-bucket-cache:main'); registry.injection('route', 'router', 'router:main'); registry.register('component:-text-field', _emberViewsViewsText_field2['default']); registry.register('component:-text-area', _emberViewsViewsText_area2['default']); registry.register('component:-checkbox', _emberViewsViewsCheckbox2['default']); registry.register('view:-legacy-each', _emberViewsViewsLegacy_each_view2['default']); registry.register('component:-link-to', _emberRoutingViewsViewsLink2['default']); // Register the routing service... registry.register('service:-routing', _emberRoutingServicesRouting2['default']); // Then inject the app router into it registry.injection('service:-routing', 'router', 'router:main'); // DEBUGGING registry.register('resolver-for-debugging:main', registry.resolver.__resolver__, { instantiate: false }); registry.injection('container-debug-adapter:main', 'resolver', 'resolver-for-debugging:main'); registry.injection('data-adapter:main', 'containerDebugAdapter', 'container-debug-adapter:main'); // Custom resolver authors may want to register their own ContainerDebugAdapter with this key registry.register('container-debug-adapter:main', _emberExtensionSupportContainer_debug_adapter2['default']); return registry; } }); /** This function defines the default lookup rules for container lookups: * templates are looked up on `Ember.TEMPLATES` * other names are looked up on the application after classifying the name. For example, `controller:post` looks up `App.PostController` by default. * if the default lookup fails, look for registered classes on the container This allows the application to register default injections in the container that could be overridden by the normal naming convention. @private @method resolverFor @param {Ember.Namespace} namespace the namespace to look for classes @return {*} the resolved value for a given lookup */ function resolverFor(namespace) { _emberMetal2['default'].deprecate('Application.resolver is deprecated in favor of Application.Resolver', !namespace.get('resolver')); var ResolverClass = namespace.get('resolver') || namespace.get('Resolver') || _emberApplicationSystemResolver2['default']; var resolver = ResolverClass.create({ namespace: namespace }); function resolve(fullName) { return resolver.resolve(fullName); } resolve.describe = function (fullName) { return resolver.lookupDescription(fullName); }; resolve.makeToString = function (factory, fullName) { return resolver.makeToString(factory, fullName); }; resolve.normalize = function (fullName) { if (resolver.normalize) { return resolver.normalize(fullName); } else { _emberMetal2['default'].deprecate('The Resolver should now provide a \'normalize\' function', false); return fullName; } }; resolve.knownForType = function knownForType(type) { if (resolver.knownForType) { return resolver.knownForType(type); } }; resolve.moduleBasedResolver = resolver.moduleBasedResolver; resolve.__resolver__ = resolver; return resolve; } function registerLibraries() { if (!librariesRegistered) { librariesRegistered = true; if (_emberMetalEnvironment2['default'].hasDOM) { _emberMetal2['default'].libraries.registerCoreLibrary('jQuery', (0, _emberViewsSystemJquery2['default'])().jquery); } } } function logLibraryVersions() { if (_emberMetal2['default'].LOG_VERSION) { // we only need to see this once per Application#init _emberMetal2['default'].LOG_VERSION = false; var libs = _emberMetal2['default'].libraries._registry; var nameLengths = libs.map(function (item) { return (0, _emberMetalProperty_get.get)(item, 'name.length'); }); var maxNameLength = Math.max.apply(this, nameLengths); _emberMetal2['default'].debug('-------------------------------'); for (var i = 0, l = libs.length; i < l; i++) { var lib = libs[i]; var spaces = new Array(maxNameLength - lib.name.length + 1).join(' '); _emberMetal2['default'].debug([lib.name, spaces, ' : ', lib.version].join('')); } _emberMetal2['default'].debug('-------------------------------'); } } function buildInitializerMethod(bucketName, humanName) { return function (initializer) { // If this is the first initializer being added to a subclass, we are going to reopen the class // to make sure we have a new `initializers` object, which extends from the parent class' using // prototypal inheritance. Without this, attempting to add initializers to the subclass would // pollute the parent class as well as other subclasses. if (this.superclass[bucketName] !== undefined && this.superclass[bucketName] === this[bucketName]) { var attrs = {}; attrs[bucketName] = Object.create(this[bucketName]); this.reopenClass(attrs); } _emberMetal2['default'].assert('The ' + humanName + ' \'' + initializer.name + '\' has already been registered', !this[bucketName][initializer.name]); _emberMetal2['default'].assert('An ' + humanName + ' cannot be registered without an initialize function', (0, _emberMetalUtils.canInvoke)(initializer, 'initialize')); _emberMetal2['default'].assert('An ' + humanName + ' cannot be registered without a name property', initializer.name !== undefined); this[bucketName][initializer.name] = initializer; }; } exports['default'] = Application; module.exports = exports['default'];


A Wiki of Tutorials
Introducing TutsWiki, a new idea around making knowledge sharing easy. TutsWiki is like Wikipedia focused for tutorials. Learn a new technology by referring tutorials created and curated by open source community.
Benefits
Since TutsWiki is open source therefore anyone can provide their inputs on the content. For eg if you find any mistake in a tutorial then you can raise an issue (or even fix it yourself). This results in a high-quality and peer reviewed tutorial which is certainly better than self-owned blogs.
Open and Free
TutsWiki is open source and completely free.
Built by Community with
TutsWiki is an attempt to provide quality and collaborative tutorials for the internet. We welcome all contributions. Follow our "contribution guide".


Welcome
{{loginCTL.getUserName()}}
Logout
Sign Up
Login
User Name
password
Sign in
Remember me
Forgot your password?


{% extends '_base.html' %} {% load static %} {% block title %}Home{% endblock title %} {% block content %}
Hello {{ user.email }}!
Please click on the links in the top navigation bar to perform the desired action.
{% else %}You are not logged in.
You must log in to interact with this website.
{% endif %} {% endblock content %}


Initially, it was hoped that GreenWall could be extended to bridge
standard add-on messages. However, the WoW API doesn't have a function
similar to ChatFrame_MessageEventHandler
that could be used
for add-on messages.
So this simple messaging API is provided for third-party add-on developers
who would like to be able to use the bridged communication on a guild
confederation.
A simple example, which demonstrates the use of the API, is GWSonar.
Before any API functions are called, there are tests that should be
run to verify the environment.
if IsAddOnLoaded('GreenWall') then
...
end
if GreenWallAPI ~= nil then
...
end
if GreenWallAPI >= 1 then
...
end
This combines all of the tests into one function.
function apiAvailable()
function testAPI()
-- Raises and exception of GreenWall is loaded or is pre-1.7.
assert(IsAddOnLoaded('GreenWall'))
return GreenWallAPI.version
end
-- Catch any exceptions
local found, version = pcall(testAPI)
return found and version >= 1
end
To send a message to other instances of the add-on, use the following function.
GreenWallAPI.SendMessage(addon, message)
Arguments:
The receiving of messages is handled with callbacks.
local function handler(addon, sender, message, echo, guild)
Arguments:
local id = GreenWallAPI.AddMessageHandler(handler, addon, priority)
Arguments:
Returns:
In addition to the GreenWallAPI.AddMessageHandler
function to add a handler,
the following functions are available to manage the dispatch table.
local found = GreenWallAPI.RemoveMessageHandler(id)
Arguments:
GreenWallAPI.ClearMessageHandlers(addon)
Arguments:
*
character can be used to match all add-ons. If thisnil
, all entries will be cleared.Note: A
*
value passed as add-on is not a wildcard in this context, it will only matched instances where the handler was installed with*
as the add-on.


Ninja Theory's Bleeding Edge gets March release date
Stealth drop.
News by Imogen Beckhelling, Reporter Intern Updated on 14 November 2019
The Bleeding Edge store page has gone live ahead of this evening's X019 stream, revealing the release date of Ninja Theory's upcoming online brawler.
The colourful four-versus-four class-based game was announced at E3, and had technical alphas earlier this year. Aside from these, the developer has been pretty quiet about it all, until now.
Bleeding Edge arrives on 24th March, and those who pre-order it on Xbox Game Pass will get access to a closed beta - the first starting on 14th February, and the second starting on 13th March.
According to the store page, anyone who pre-orders the game or plays it in the first week of launch (before 31st March 2020) will get an exclusive "Punk Pack", containing three fighter skins and bonus taunts, an in-game sticker pack, and a hoverboard for the character Rioter.
Microsoft seems to have removed the release date and pre-order info from the store page now, but fortunately, we managed to grab a screenshot.
This seems to be one of the first of the reveals for X019, so stick with us a bit later on to see what else Xbox's event has in store.


Optionally, a Swagger or OpenAPI definition about your API can be provided. Adding a definition file will allow consumers to better understand how to use your API. Copy/paste or drag and drop your Swagger API definition into the text area below.
If the API is published, the endpoint in the definition will be automatically replaced by the endpoint of the gateway.
You can retrieve the definition with the following link:
{{ apimanDefinitionUrl }}


confluence-information-macro confluence-information-macro-information
Follow these steps only if you have an Amazon EMR cluster located in VPC different than the one in the Unravel EC2 node.
Introduction
This topic explains how to resolve connectivity issues when Unravel EC2 node is created in a VPC different than where the EMR cluster located. This documentation also applies for Unravel EC2 node connecting to RDS created on different VPC of the same region.
- The VPC where Unravel EC2 located is in the same region where the EMR cluster located (e.g., us-east-1).
- The subnet used by Unravel EC2 does not overlap the IP block range of the subnet used in EMR cluster.
- Network ACL on both VPC for Unravel EC2 and EMR cluster are the default and allow all traffic. The security group is the only security enforcement on network access.
In the following steps, we have both Unravel EC2 node and EMR cluster located in us-east-1 region but configured with different VPC and subnet. There is no network access allowed between Unravel EC2 and EMR cluster by default.
| Reso urce s | Int ern al IP Add res s | Subne t ID | Su bn et IP Bl oc k | VPC ID (Name) | I P b l o c k i n V P C | Security Group ID (Name) |
|---|---|---|---|---|---|---|
| Unra vel EC2 node | 10. 10. 0.7 | subne t-03b 82c56 b2c26 dbd1 | 10 .1 0. 0. 0/ 24 | vpc-0b0e1 7b01c4a3b 54a (Unravel_ VPC) | 1 0 . 1 0 . 0 . 0 / 1 6 | sg-0e0a03084398287c9 (U nravel-EC2_SG) |
| EMR Clus ter Mast er node | 10. 11. 0.5 3 | subne t-029 4cc17 a42a9 acfd | 10 .1 1. 0. 0/ 24 | vpc-c3d07 9a4 (VPC_for_ VPC Peering) | 1 0 . 1 1 . 0 . 0 / 1 6 | sg-0a73c3aea9340ae49 (E MR_VPC_SG) |
| EMR Clus ter Core node s | 10. 11. 0.7 6 10. 11. 0.1 30 |
subne t-029 4cc17 a42a9 acfd | 10 .1 1. 0. 0/ 24 | vpc-c3d07 9a4 (VPC_ for_VPC Peering) | 1 0 . 1 1 . 0 . 0 / 1 6 | sg-0a73c3aea9340ae49 (E MR_VPC_SG) |
Create VPC Peering in VPC Dashboard
From the AWS console → VPC services → Peering Connections, click the Create Peering Connection, and enter the name tag, e.g., “EMR_to_Unravel”. VPC (Requester) field choose VPC of EMR cluster, and VPC (Accepter) field choose VPC of Unravel node. Click Create Peering Connection.
A success message should appear in the screen. Click OK.
Accept the VPC Peering Request
- In the VPC Dashboard, the new VPC peering connection will have a Status showing Pending Acceptance. Select this connection and click Action and select Accept Request.
- Click Yes Accept in the prompt screen. You will see a message regarding “Modify my route tables”. Click Close.
Create Routes between peered VPC
Go to VPC Dashboard → Route Tables to create the routes between VPCs where Unravel node located (Unravel_VPC) and the EMR cluster is located (Test_EMR_VPC). After locating each route table: Click Edit and then Add another route.
- Find the Unravel_VPC route table. Enter the IP block of EMR VPC, e.g., <IP_ADDRESS>/16 In the Destination field. In the Target field choose the VPC peer connection ID, e.g., pcx-0a57a978ef9a525e2. Click **Save. **
- Find the Test_EMR_VPC route table. Set the Destination to IP block of Unravel_VPC, e.g., <IP_ADDRESS>/16. In the Target field choose the VPC peer connection ID, e.g., pcx-0a57a978ef9a525e2. Click Save.Choose connection ID (e.g. pcx-0a57a978ef9a525e2) in the Target field. Click Save.
Update Security Groups
Go to VPC Dashboard → Security Group. After locating each security group: Click Add another rule. Set Type to inbound ALL traffic and Protocol to ALL.
- Locate the security group used on Unravel EC2 node. Enter the EMR VPC IP block, e.g., <IP_ADDRESS>/16 in the Source field. Click **Save. **
- Locate the security group used on EMR cluster node. Enter the Unravel VPC IP block, e.g., <IP_ADDRESS>/16 in the Source field. Click Save.** **
Verify Connection between Unravel EC2 node and EMR master node
ssh
to both Unravel EC2 nodeand EMR master node. Since the above example allowed ALL Traffic from both VPC IP blocks, so we should be able to ping the IP address of EMR master node from Unravel EC2 node.- Then on Unravel EC2 node,
telnet
to EMR master node port 8082 (namenode port)** ** - On the EMR master node, ``telnet ``to Unravel EC2 node port 3000 and port 4043**. **
If telnet port tests are positive, the VPC peering connection is setup correctly. If not, troubleshoot the configuration on network acl, security groups, and route tables used on both VPC.
See unsupported VPC peering configurations on AWS documentation.
Attachments: