Tutorial by Examples

A Lifestyle is the "how" Castle controls the scope in which a component is used and when to clean it up. The built-in lifestyles are Singelton, Transient, PerWebRequest, Scoped, Bound, PerThread and Pooled container.Register( Component.For<IFoo>() .ImplementedBy<...
The entire idea with dependency injection is that a class does not instantiate its dependencies but requests them (through constructor or property). Using Castle the way for specifying the way to resolve a dependency is by using the DependsOn: public class Foo : IFoo { public Foo(IBar bar, st...
When registering a component use the Interceptors() method to specify what are the interceptors/types of interceptors to be used for this component: The TInterceptor must implement the IInterceptor interface A single interceptor by type: container.Register( Component.For<MyInterceptor>...
Theme.xml app/design/frontend/Magento/mytheme/theme.xml <theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> <title>My theme</title> <!-- your theme's name --> ...
<ItemGroup> <FilesToDelete Include="*.tmp" /> </ItemGroup> <Delete Files="@(FilesToDelete)" />
<PropertyGroup> <DirectoryToCreate>NewDirectory</DirectoryToCreate> </PropertyGroup> <MakeDir Directories="$(DirectoryToCreate)" />
<PropertyGroup> <DirectoryToRemove>TempData</DirectoryToRemove> </PropertyGroup> <RemoveDir Directories="$(DirectoryToRemove)" />
<Exec Command="echo Hello World" />
<PropertyGroup> <CustomMessage>Hello World</CustomMessage> <MessageImportance>Low</MessageImportance> <!-- Low / Normal / High --> </PropertyGroup> <Message Text="$(CustomMessage)" Importance="$(MessageImportance)" /> ...
<PropertyGroup> <LinkedSolution>LinkedSolution.sln</LinkedSolution> <BuildType>Build</BuildType> <!-- Build / Rebuild --> <BuildArchitecture>x86</BuildArchitecture> <!-- x86 / 64 --> <BuildConfiguration>Debug</BuildCo...
awk '{ for(f=1; f<=NF; f++) { print $f; } }' file
1) Services A service is a constructor function that is invoked once at runtime with new, just like what we would do with plain javascript with only difference that AngularJs is calling the new behind the scenes. There is one thumb rule to remember in case of services Services are constructors...
There is no additional installation required for excel-formula on top of what is already required for excel. Please refer to excel documentation.
This ActionResult returns a Razor view page. Under the standard routing template this ActionResult method would be reached at http://localhost/about/me The View will be looked for automatically in your site at ~/Views/About/Me.cshtml public class AboutController : Controller { public ActionR...
Eclipse debugging starts with what is referred to as Agents. The JVM, which runs the complied .class sources has a feature that allows externally libraries (written in either Java or C++) to be injected into the JVM, just about runtime. These external libraries are referred to as Agents and they ha...
Android ButterKnife Zelezny Plugin for generating ButterKnife injections from selected layout XMLs in activities/fragments/adapters. Note : Make sure that you make the right click for your_xml_layou(R.layout.your_xml_layou) else the Generate menu will not contain Butterknife injector option. ...
Via jCenter including the following in your project's build.gradle file: compile 'com.google.android.exoplayer:exoplayer:rX.X.X' where rX.X.X is the your preferred version. For the latest version, see the project's Releases. For more details, see the project on Bintray.
Instantiate your ExoPlayer: exoPlayer = ExoPlayer.Factory.newInstance(RENDERER_COUNT, minBufferMs, minRebufferMs); To play audio only you can use these values: RENDERER_COUNT = 1 //since you want to render simple audio minBufferMs = 1000 minRebufferMs = 5000 Both buffer values can be twea...
// 1. Instantiate the player. player = ExoPlayer.Factory.newInstance(RENDERER_COUNT); // 2. Construct renderers. MediaCodecVideoTrackRenderer videoRenderer = ... MediaCodecAudioTrackRenderer audioRenderer = ... // 3. Inject the renderers through prepare. player.prepare(videoRenderer, audioRend...
Note: Let's setup some anonymous authentication for the example { "rules": { ".read": "auth != null", ".write": "auth != null" } } Once it is done, create a child by editing your database address. For example: https://your-proje...

Page 858 of 1336