|
DotNetBrowser
1.16
|
Class for all JavaScript values. This class is used to store the result of the Browser.ExecuteJavaScript(string) method execution. More...
Inherited by DotNetBrowser.JSNull, DotNetBrowser.JSObject, DotNetBrowser.JSPrimitive< T >, and DotNetBrowser.JSUndefined.
Public Member Functions | |
| virtual bool | IsUndefined () |
| Indicates whether JavaScript value is undefined. More... | |
| virtual bool | IsObject () |
| Indicates whether JavaScript value is an object. If this method returns true, then the value can be casted to JSObject type. For example: More... | |
| virtual bool | IsFunction () |
| Indicates whether JavaScript value is a function. If this method returns true, then the value can be casted to JSFunction type. For example: More... | |
| virtual bool | IsNull () |
| Indicates whether JavaScript value is NULL. More... | |
| bool | IsTrue () |
| Indicates whether JavaScript value represents bool TRUE value. More... | |
| bool | IsFalse () |
| Indicates whether JavaScript value represents bool FALSE value. More... | |
| virtual bool | IsString () |
| Indicates whether JavaScript value is a string. If this method returns true, then the value can be casted to JSString type. For example: More... | |
| virtual bool | IsJSON () |
| Indicates whether JavaScript value is a string in JSON format. More... | |
| virtual bool | IsBool () |
| Indicates whether JavaScript value is a boolean value. If this method returns true, then the value can be casted to JSBoolean type. For example: More... | |
| virtual bool | IsNumber () |
| Indicates whether JavaScript value is a number value which equals to double type. If this method returns true, then the value can be casted to JSNumber type. For example: More... | |
| virtual bool | IsArray () |
| Indicates whether JavaScript value is an array. If this method returns true, then the value can be casted to JSArray type. For example: More... | |
| virtual bool | IsBooleanObject () |
| Indicates whether JavaScript value is a JSBoolean object. If this method returns true, then the value can be casted to JSBooleanObject type. For example: More... | |
| virtual bool | IsNumberObject () |
| Indicates whether JavaScript value is a Number object. If this method returns true, then the value can be casted to JSNumberObject type. For example: More... | |
| virtual bool | IsStringObject () |
| Indicates whether JavaScript value is a String object. If this method returns true, then the value can be casted to JSStringObject type. For example: More... | |
| virtual bool | IsDotNetObject () |
| Indicates whether JavaScript value is a .Net object. If this method returns true, then the value can be casted to Object type. For example: More... | |
| virtual JSBoolean | AsBoolean () |
| Casts the current JavaScript object to JSBoolean type. If the current object doesn't represent a Boolean object, the InvalidCastException error is thrown. More... | |
| virtual JSFunction | AsFunction () |
| Casts the current JavaScript object to JSFunction type. If the current object doesn't represent a function, the InvalidCastException error is thrown. More... | |
| virtual JSBooleanObject | AsBooleanObject () |
| Casts the current JavaScript object to JSBooleanObject type. If the current object doesn't represent a Boolean object, the InvalidCastException error is thrown. More... | |
| virtual JSNumber | AsNumber () |
| Casts the current JavaScript object to JSNumber type. If the current object doesn't represent a number value, the InvalidCastException error is thrown. More... | |
| virtual JSNumberObject | AsNumberObject () |
| Casts the current JavaScript object to JSNumberObject type. If the current object doesn't represent a Number object, the InvalidCastException error is thrown. More... | |
| virtual JSArray | AsArray () |
| Casts the current JavaScript object to JSArray type. If the current object doesn't represent an array, the InvalidCastException error is thrown. More... | |
| virtual JSObject | AsObject () |
| Casts the current JavaScript object to JSObject type. If the current object doesn't represent an object (e.g. it's a primitive value), the InvalidCastException error is thrown. More... | |
| virtual JSString | AsString () |
| Casts the current JavaScript object to JSString type. If the current object doesn't represent a string value, the InvalidCastException error is thrown. More... | |
| virtual JSStringObject | AsStringObject () |
| Casts the current JavaScript object to JSStringObject type. If the current object doesn't represent a String object, the InvalidCastException error is thrown. More... | |
| virtual object | AsDotNetObject () |
| Casts the current JavaScript object to Object type. If the current object doesn't represent a .Net object, the InvalidCastException error is thrown. More... | |
| virtual bool | GetBool () |
| Returns boolean value of the current JavaScript object if object represents a primitive boolean or Boolean object, otherwise throws InvalidOperationException. More... | |
| virtual double | GetNumber () |
| Returns number value of the current JavaScript object if object represents a primitive number or Number object, otherwise throws InvalidOperationException. More... | |
| virtual string | GetString () |
| Returns string value of the current JavaScript object if object represents a primitive string or String object, otherwise throws InvalidOperationException. More... | |
Static Public Member Functions | |
| static JSValue | Create (double value) |
| Creates double JSValue instance. More... | |
| static JSValue | Create (bool value) |
| Creates boolean JSValue instance. More... | |
| static JSValue | CreateUndefined () |
| Creates undefined JSValue instance. More... | |
| static JSValue | Create (string value) |
| Creates string JSValue instance. More... | |
| static JSONString | CreateJSON (string jsonString) |
| Creates JavaScript value that represents a string in JSON format. When this value is passed to JavaScript side, it will be automatically parsed and converted to appropriate JavaScript object. More... | |
| static JSValue | CreateNull () |
| Creates null JSValue instance. More... | |
Class for all JavaScript values. This class is used to store the result of the Browser.ExecuteJavaScript(string) method execution.
|
virtual |
Casts the current JavaScript object to JSArray type. If the current object doesn't represent an array, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent an array. |
Reimplemented in DotNetBrowser.JSArray.
|
virtual |
|
virtual |
Casts the current JavaScript object to JSBooleanObject type. If the current object doesn't represent a Boolean object, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a Boolean object. |
Reimplemented in DotNetBrowser.JSBooleanObject.
|
virtual |
Casts the current JavaScript object to Object type. If the current object doesn't represent a .Net object, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a .Net object. |
Reimplemented in DotNetBrowser.JSObject.
|
virtual |
Casts the current JavaScript object to JSFunction type. If the current object doesn't represent a function, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a function. |
Reimplemented in DotNetBrowser.JSFunction.
|
virtual |
Casts the current JavaScript object to JSNumber type. If the current object doesn't represent a number value, the InvalidCastException error is thrown.
|
virtual |
Casts the current JavaScript object to JSNumberObject type. If the current object doesn't represent a Number object, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a Number object. |
Reimplemented in DotNetBrowser.JSNumberObject.
|
virtual |
Casts the current JavaScript object to JSObject type. If the current object doesn't represent an object (e.g. it's a primitive value), the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent an Object. |
Reimplemented in DotNetBrowser.JSObject.
|
virtual |
Casts the current JavaScript object to JSString type. If the current object doesn't represent a string value, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a string value. |
|
virtual |
Casts the current JavaScript object to JSStringObject type. If the current object doesn't represent a String object, the InvalidCastException error is thrown.
| InvalidCastException | when current object doesn't represent a String object. |
Reimplemented in DotNetBrowser.JSStringObject.
|
static |
|
static |
|
static |
|
static |
Creates JavaScript value that represents a string in JSON format. When this value is passed to JavaScript side, it will be automatically parsed and converted to appropriate JavaScript object.
| jsonString | string in JSON format. |
|
static |
|
static |
|
virtual |
Returns boolean value of the current JavaScript object if object represents a primitive boolean or Boolean object, otherwise throws InvalidOperationException.
| InvalidOperationException | when current JavaScript object doesn't represent a primitive boolean or Boolean object. |
Reimplemented in DotNetBrowser.JSBooleanObject.
|
virtual |
Returns number value of the current JavaScript object if object represents a primitive number or Number object, otherwise throws InvalidOperationException.
| InvalidOperationException | when current JavaScript object doesn't represent a primitive number or Number object. |
Reimplemented in DotNetBrowser.JSNumberObject.
|
virtual |
Returns string value of the current JavaScript object if object represents a primitive string or String object, otherwise throws InvalidOperationException.
| InvalidOperationException | when current JavaScript object doesn't represent a primitive string or String object. |
Reimplemented in DotNetBrowser.JSStringObject.
|
virtual |
Indicates whether JavaScript value is an array. If this method returns true, then the value can be casted to JSArray type. For example:
if (value.IsArray()) { JSArray array = value.AsArray(); }
Reimplemented in DotNetBrowser.JSArray.
|
virtual |
|
virtual |
Indicates whether JavaScript value is a JSBoolean object. If this method returns true, then the value can be casted to JSBooleanObject type. For example:
if (value.IsBooleanObject()) { JSBooleanObject booleanObject = value.AsBooleanObject(); }
Reimplemented in DotNetBrowser.JSBooleanObject.
|
virtual |
Indicates whether JavaScript value is a .Net object. If this method returns true, then the value can be casted to Object type. For example:
if (value.IsDotNetObject()) { Object object = value.AsDotNetObject(); }
Reimplemented in DotNetBrowser.JSObject.
| bool DotNetBrowser.JSValue.IsFalse | ( | ) |
Indicates whether JavaScript value represents bool FALSE value.
| InvalidOperationException | when current JavaScript object doesn't represent a primitive boolean or Boolean object. |
|
virtual |
Indicates whether JavaScript value is a function. If this method returns true, then the value can be casted to JSFunction type. For example:
if (value.IsFunction()) { JSFunction function = value.AsFunction(); }
Reimplemented in DotNetBrowser.JSFunction.
|
virtual |
Indicates whether JavaScript value is a string in JSON format.
|
virtual |
Indicates whether JavaScript value is NULL.
Reimplemented in DotNetBrowser.JSNull.
|
virtual |
|
virtual |
Indicates whether JavaScript value is a Number object. If this method returns true, then the value can be casted to JSNumberObject type. For example:
if (value.IsNumberObject()) { JSNumberObject numberObject = value.AsNumberObject(); }
Reimplemented in DotNetBrowser.JSNumberObject.
|
virtual |
Indicates whether JavaScript value is an object. If this method returns true, then the value can be casted to JSObject type. For example:
if (value.IsObject()) { JSObject object = value.AsObject(); }
Reimplemented in DotNetBrowser.JSObject.
|
virtual |
|
virtual |
Indicates whether JavaScript value is a String object. If this method returns true, then the value can be casted to JSStringObject type. For example:
if (value.isStringObject()) { JSStringObject stringObject = value.asStringObject(); }
Reimplemented in DotNetBrowser.JSStringObject.
| bool DotNetBrowser.JSValue.IsTrue | ( | ) |
Indicates whether JavaScript value represents bool TRUE value.
| InvalidOperationException | when current JavaScript object doesn't represent a primitive boolean or Boolean object. |
|
virtual |
Indicates whether JavaScript value is undefined.
Reimplemented in DotNetBrowser.JSUndefined.


PowerLevelsReader
final public class PowerLevelsReader: PowerLevelsContainer
A class which provides convenience accessors for the internal representation of a power levels structure.
This will usually be accessed through Room.powerLevels
.
Version
1.0.0-
The power level required to add a new state to a room.
Version
1.0.0Declaration
Swift
public var addState: Int
-
The default power level for events in the room.
Version
1.0.0Declaration
Swift
public var eventDefault: Int
-
An object where the key is an event type and the value is that event type’s required power level.
Version
1.0.0Declaration
Swift
public var events: [String:NSNumber]
-
The power level required to invite a user to the room.
Version
1.0.0Declaration
Swift
public var invite: Int
-
The power level required to kick a user form the room.
Version
1.0.0Declaration
Swift
public var kick: Int
-
The power level required to redact an event from the room.
Version
1.0.0Declaration
Swift
public var redact: Int
-
The power level required to set the name of the room.
Version
1.0.0Declaration
Swift
public var setName: Int
-
The power level required to set the power levels in a room.
Version
1.0.0Declaration
Swift
public var setPowerLevels: Int
-
The power level required to set the topic of the room.
Version
1.0.0Declaration
Swift
public var setTopic: Int
-
The power level required to set the type of the room.
Version
1.0.0Declaration
Swift
public var setType: Int
-
The default power level for users in the room.
Version
1.0.0Declaration
Swift
public var userDefault: Int
-
An object where the key is a userId and the value is that user’s power level.
Version
1.0.0Declaration
Swift
public var users: [String:NSNumber]


This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an Action
to handle HTTP requests to the
application's home page.
This controller creates an
Action
to handle HTTP requests to the application's home page.


Education
- Code Fellows 2018 - 2019
- DOD BMET School 2006 - 2007
- Highline C.C. 1991 - 2002
Work Experience
| Novasyte (Baxter) | BMET | 2017 - Present | Uber | Driver | 2016 - Present | Xoran Technologies | Customer Service Engineer (BMET) | 2013 - 2016 | U.S. Army | Soldier (BMET) | 2007 - 2013 | U.S.Army | Soldier (Signal Operator) | 2002 - 2007 |
Hobies & Interests
- Music from the 1920's to the present
- Psuedo-trading Stocks
- Playing the Saxaphone
- Sci-Fy & Fantacy (Movies, T.V. shows, books)


Attention ⚠ You must have completed the study plan to get the links in this way. If you haven't already, go below the video to get the links from the posters
The lessons can be followed online, even those in person (the classrooms are set up)
You use webex, you can find all the links to access the personal classrooms of the professors from the personal timetable section of the online services (it works only if you have already filled in the study plan). If you have not completed the study plan, it will be possible (shortly) to access the links by means of a poster / beep. However, the links are so simple that you can build them yourself. https://politecnicomilano.webex.com/meet/profname.surnameprof (yes, it may be slightly different in case of homonymy)
Recording is NOT guaranteed. What is guaranteed is the transmission of the lesson live. Recording is a courtesy of the teacher.
Question: But will access to the virtual classroom of the course / professor also be allowed to those who do not have that particular course in the study plan?
Answer: Each personal classroom can be locked or not, if the teacher leaves it unlocked (by default this is the case) everyone can enter, otherwise he must admit manually. Theoretically speaking, since the limit is 1000 per lesson, teachers should leave it open
Question: Where are the links to the recordings?
Answer: The links to the recordings are not in an easily usable platform. At the end of registration, the professors obtain a link manually and must manually communicate it to the students. They were advised to keep a beep document updated with links to the recordings
Question: Is Linux version available?
Answer: No. There is Cisco Webex Teams VDI for Linux (but it has fewer features and is very unstable). For Linux users, we recommend using the website https://politecnicomilano.webex.com. However, the university said it will report the problem to Cisco
Question: How are the teams divided?
Answer: Person code (the one starting with 10xxxxxx) odd => team 1, even person code => team 2.
The division is important for any contact-tracing purposes
Question: Can I join two Webex lessons at the same time?
Answer: On Windows yes. The MacOs version seems to give problems on this aspect


--- title: WordPress Upgraded, Atom Feed via FeedBurner date: 2007-12-23 06:12:37 +1100 modified: 2007-12-23 17:12:37 +1100 uid: http://paul.annesley.cc/articles/2007/12/23/wordpress-upgraded-atom-feed-via-feedburner layout: post ---
I've just upgraded WordPress, and while I was there it seemed a good time to switch from RSS to Atom feeds, and deliver them via FeedBurner.
I've always been interested to see how different feed readers handle a feed switching from RSS to Atom - I guess I'll find out. The new Atom entry IDs are the same as the old RSS item IDs, so hopefully we wont see duplicated posts...


The games Fabinho will miss for Liverpool after injury lay-off confirmed
Liverpool have confirmed Fabinho will miss the rest of 2019 after suffering ankle ligament damage.
Fabinho limped off against Napoli during the week and there were immediate fears the Brazilian could miss as much as six weeks of action.
Liverpool welcome Brighton and Hove Albion to Anfield at the weekend, a game Fabinho was already suspended for.
But the influential midfielder will miss the entirety of Liverpool’s jam-packed festive period and will not make his injury comeback until after the New Year.
‘Losing a player like Fabinho is massive,’ Klopp ahead of Liverpool’s game this weekend.
‘We are not sure how long it will take but it looks pretty sure he will not be involved in the Christmas fixtures.
‘We have solutions for the position. We have to replace him and we will play without him. It’s important he does the right things and be back as soon as possible.
Advertisement Advertisement
‘We have to find solutions. We are not the only team with injured players. We have to deal with it and we will.’
Fabinho will miss the Merseyside derby against Everton next week, the Champions League decider against RB Salzburg, the Carabao Cup quarter-final against Aston Villa and a crucial Premier League clash with Leicester City.
Liverpool first game in January is a home match against Sheffield United on 2 January before a big game against Jose Mourinho’s Tottenham the following week.
Games Fabinho will miss
(H) Brighton & Hove Albion – Sat Nov 30
(H) Everton – Wed Dec 4
(A) Bournemouth – Sat Dec 7
(A) RB Salzburg – Tues Dec 10
(H) Watford – Sat Dec 14
(A) Aston Villa EFL Cup – Tues Dec 17
FIFA Club World Cup – Wed Dec 18-21
(A) Leicester City – Thurs Dec 26
(H) Wolverhampton Wanderers – Sun Dec 29


Database
In this section you will get familiar with how helpful the fluent testing library is with an Entity Framework Core database. Despite the data storage abstraction you use (repository pattern, unit of work, etc.), the "DbContext" testing has never been easier. And you don't even need a mocking framework! How cool is that? :)
The scoped in-memory database
Let's try to test an action using the "DbContext". An easy one is "Index" in "StoreController":
public async Task<IActionResult> Index()
{
var genres = await DbContext.Genres.ToListAsync();
return View(genres);
}
Create a "StoreControllerTest" class, add the necessary usings and try to test the action:
[Fact]
public void IndexShouldReturnViewWithGenres()
=> MyController<StoreController>
.Instance()
.Calling(c => c.Index())
.ShouldReturn()
.View(result => result
.WithModelOfType<List<Genre>>());
A nice little test. With a big "KABOOM"!
When calling Index action in StoreController expected no exception but AggregateException (containing ArgumentException with 'Format of the initialization string does not conform to specification starting at index 0.' message) was thrown without being caught.
Not cool for sure! The exception occurs because our "config.json" file contains a dummy (and invalid) connection string:
"Data": {
"DefaultConnection": {
"ConnectionString": "Test Connection"
}
}
And we should be happy about it! The last thing we want is our tests knowing where the application database is.
But we still need to write a test against the "DbContext"! Fear no more - go to the "MusicStore.Test.csproj" file and add "MyTested.AspNetCore.Mvc.EntityFrameworkCore" as a dependency:
<!-- Other ItemGroups -->
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views" Version="2.2.0" />
<!-- MyTested.AspNetCore.Mvc.EntityFrameworkCore package -->
<PackageReference Include="MyTested.AspNetCore.Mvc.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Models" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ModelState" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
<!-- Other ItemGroups -->
Now run the test again and see the magic! :)
Wuuut! I can't believe it! It passes! And we didn't even touch the code! There must be some voodoo involved around here!
As we mentioned earlier - no developer should love magic so here is the trick revealed. The "EntityFrameworkCore" package contains a test plugin, which recognizes the "DbContext" related services and replaces them with scoped in-memory ones. More information about test plugins can be found HERE.
Our test passes but it will be better if we assert the action with actual data. Change the test to:
MyController<StoreController>
.Instance()
.WithData(data => data // <---
.WithEntities(entities => entities.AddRange(
new Genre { Name = "FirstGenre" },
new Genre { Name = "SecondGenre" })))
.Calling(c => c.Index())
.ShouldReturn()
.View(result => result
.WithModelOfType<List<Genre>>()
.Passing(model => model.Count == 2));
A shorter syntax is also available:
MyController<StoreController>
.Instance()
.WithData( // <---
new Genre { Name = "FirstGenre" },
new Genre { Name = "SecondGenre" })
.Calling(c => c.Index())
.ShouldReturn()
.View(result => result
.WithModelOfType<List<Genre>>()
.Passing(model => model.Count == 2));
The good part of this test is the fact that these data objects live only in-memory and are not stored anywhere.
The best part of this test is the fact that these data objects live in "scoped per test lifetime". We will dive deeper into scoped services during the next tutorial section. For now, write these two tests and run them:
[Fact]
public void IndexShouldReturnViewWithGenres()
=> MyController<StoreController>
.Instance()
.WithData(
new Genre { Name = "FirstGenre" },
new Genre { Name = "SecondGenre" })
.Calling(c => c.Index())
.ShouldReturn()
.View(result => result
.WithModelOfType<List<Genre>>()
.Passing(model => model.Count == 2));
[Fact]
public void IWillShowScopedDatabaseServices()
=> MyController<StoreController>
.Instance()
.WithData(new Genre { Name = "ThirdGenre" })
.Calling(c => c.Index())
.ShouldReturn()
.View(result => result
.WithModelOfType<List<Genre>>()
.Passing(model =>
model.Count == 1 &&
model.TrueForAll(g => g.Name == "ThirdGenre")));
Both tests pass successfully. They are almost the same, but you can notice the difference in the database objects. The first test adds two entities and passes the predicate expecting two objects in the returned list. The second test adds another entity and passes the expectation of having a single genre with a specific name. It is evident the database is fresh, clean, and empty while running each test. This is the power of the scoped test services - they allow each test to be run in an isolated and asynchronous environment.
Asserting saved database changes
Remove the second test as it is not needed. We will now examine how we can assert saved database objects. For this purpose we are going to use the "Create" action (the HTTP POST one) in the "StoreManagerController" (located in the "Admin" area):
public async Task<IActionResult> Create(
Album album,
[FromServices] IMemoryCache cache,
CancellationToken requestAborted)
{
if (ModelState.IsValid)
{
DbContext.Albums.Add(album);
await DbContext.SaveChangesAsync(requestAborted);
cache.Remove("latestAlbum");
return RedirectToAction("Index");
}
// action code skipped for brevity
}
The action expects an "IMemoryCache" service, and since we will cover caching later in this tutorial, we will need a cache mock. Add "Moq" to the "MusicStore.Test.csproj" dependencies:
<!-- Other ItemGroups -->
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<!-- Moq package -->
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.ActionResults" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Controllers.Views" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.EntityFrameworkCore" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.Models" Version="2.2.0" />
<PackageReference Include="MyTested.AspNetCore.Mvc.ModelState" Version="2.2.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
<!-- Other ItemGroups -->
In "Controllers", create an "Admin" folder. In it create a "StoreManagerControllerTest" class, add the necessary usings, and write the following test:
[Fact]
public void CreateShouldSaveAlbumWithValidModelStateAndRedirect()
{
var album = new Album
{
AlbumId = 1,
Title = "TestAlbum",
Price = 50
};
MyController<StoreManagerController>
.Instance()
.Calling(c => c.Create(
album,
Mock.Of<IMemoryCache>(),
With.Default<CancellationToken>()))
.ShouldHave()
.ValidModelState()
.AndAlso()
.ShouldHave()
.Data(data => data
.WithSet<Album>(albums => albums
.Any(dataAlbum => dataAlbum.AlbumId == album.AlbumId)))
.AndAlso()
.ShouldReturn()
.Redirect(result => result
.ToAction(nameof(StoreManagerController.Index)));
}
The actual database assertion is in the following lines:
.ShouldHave()
.Data(data => data
.WithSet<Album>(albums => albums
.Any(dataAlbum => dataAlbum.AlbumId == album.AlbumId)))
My Tested ASP.NET Core MVC validates that the database set of albums should have the saved album with the correct "AlbumdId". As with the previous example, the in-memory database will be empty before the test runs. You may notice the "With.Default" call. It's just a more expressive way to write "new CancellationToken()". Providing "CancellationToken.None" is also an option.
Repository pattern
We will take a look at the repository pattern as a small deviation from the Music Store web application. As long as you use the Entity Framework Core's "DbContext" class in your web application, the scoped in-memory database will work correctly no matter the data abstraction layer. Imagine we had the following repository registered as a service in our web application:
public class Repository<T> : IRepository<T>
where T : class
{
private readonly MyDbContext db;
public Repository(MyDbContext db)
{
this.db = db;
}
public IQueryable<T> All() => this.db.Set<T>();
}
And a controller using it:
public class HomeController : Controller
{
private IRepository<Album> albums;
public HomeController(IRepository<Album> albums)
{
this.albums = albums;
}
public IActionResult Index()
{
var latestAlbums = this.albums
.All()
.OrderByDescending(a => a.AlbumId)
.Take(10)
.ToList();
return this.Ok(latestAlbums);
}
}
Testing the "Index" action does not require anything more than adding lots of albums to the "DbContext" and test whether the result list contains exactly 10 elements (you may test the sorting too):
MyController<HomeController>
.Instance()
.WithData(data => data
.WithSet<Album>(set => AddAlbums(set)))
.Calling(c => c.Index())
.ShouldReturn()
.Ok(result => result
.WithModelOfType<List<Album>>()
.Passing(model => model.Count == 10));
Piece of cake! :)
Section summary
This section showed you one of the many useful built-in services suitable for writing fast and asynchronous tests for the ASP.NET Core Framework. A lot of web applications use a database layer, so it is a crucial point to have a friendly and easy way to assert it without having to lose a lot of development time in writing mocks or stubs. Now, head over to the next important part of our journey - the test Services!


This document demonstrates "Hello World" applications in some of the most popular languages as of , according to the TIOBE index.
C, and its extension, C++, are in tandem with each other the most popular languages in recent history.
C(++) developers find jobs in the following industries:
- Robotics and machine programming
- Embedded systems
C allows for a complex vocabulary, but doesn't enforce it by introducing verbosity like Java does. How little you can get away with may confuse developers coming from other languages, that make a high level of abstraction part of their design.
This is an example of a Hello World application in C:
#include <stdio.h>
int main() {
// printf() displays the string inside quotation
printf("Hello, World!");
return 0;
}
For decades, Java is going head-to-head with C(++). Its rich ecosystem provides many opportunities for developers to latch on.
Java developers find jobs in the following industries:
- Public sector
- Business to business
Java code is much more verbose than C(++) code and the compiler enforces this verbosity rigorously. This leads to some critique from experienced developers who wish for the support of a more rapid development style. Beginners, however, are met with very clear expectations.
This is an example of a Hello World application in Java:
public class Application {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Swift is a programming language for Apple devices and Linux. It is relatively young, being first released in 2014.
Swift developers find jobs in the following industries:
- Apple device focused companies
In comparison to C(++), Swift provides a less steep learning curve. An active community and a large variety of tools makes it one of the most successful languages of the past decade.
This is an example of a Hello World application in Swift:
import Swift
print("Hello, World!")
Visual Basic (.NET) is the spiritual successor of the proprietary Microsoft Visual Basic programming language which was no longer being supported after the release of the .NET platform.
Visual Basic (.NET) developers find jobs in the following industries:
- Public sector
- Finance and insurance
Many want it dead but the demand for developers is still steady and VB.NET isn't going to disappear anytime soon. Its importance in legacy systems is undeniable.
This is an example of a Hello World application in Visual Basic (.NET):
Imports System
Module Hello_Program
Sub Main()
Console.WriteLine("Hello, World!")
Console.ReadKey()
End Sub
End Module
The R programming language is designed for statistical computing and a de-facto standard due to its active development for more than two decades.
R developers find jobs in the following industries:
- Education
- Data science
R has recently seen a significant surge in activity. The language rose from rank 20 in to rank 8 in .
This is an example of a Hello World application in R:
cat("Hello World\n")


Hello World, I am a final year Computer Science student at University of Waterloo. I have a passion for coding and automation and my aim in life is to solve real world problems using the power of technology.
UW Tennis Club
Apart from being a software developer, I am also a fitness enthusiast and a budding tennis player. I like exploring new places on my bike and going for hikes.
I like to have deep philosophical coversations about topics like universe, reality and nature.


JD.com, Inc. 2019 Q3 - Results - Earnings Call Presentation
by SA Transcripts, https://seekingalpha.com/author/sa-transcriptsThe following slide deck was published by JD.com, Inc. in conjunction with their 2019 Q3 earnings call.
The following slide deck was published by JD.com, Inc. in conjunction with their 2019 Q3 earnings call.


|
HornetEngine
Open Alpha
Open source framework for creating Tangible Interfaces
|
Public Member Functions | |
| delegate void | WindowRefreshFunc () |
| The refresh function of the window More... | |
| delegate void | WindowFixedUpdateFunc () |
| The fixed update function of the window More... | |
| delegate void | WindowMoveFunc (Vector2 newpos) |
| The move function of the window More... | |
| delegate void | WindowResizeFunc (Vector2 newsize) |
| The resize function of the window More... | |
| delegate void | WindowFocusFunc (bool focussed) |
| The focus function of the window More... | |
| delegate void | WindowCloseFunc () |
| The close function of the window More... | |
| Window () | |
| Instantiates a new window object with base parameters More... | |
| bool | Open (String title, int width, int height, WindowMode mode) |
| Opens a new application window on the current thread with specified title and size parameters More... | |
| void | Run () |
| Start the application window refresh loop and processes More... | |
| void | SetFixedUpdateFrequency (float newfreq) |
| Sets the FixedUpdate frequency of the FixedUpdate thread More... | |
| Public Member Functions inherited from HornetEngine.Graphics.NativeWindow | |
| unsafe void | SetTitle (String title) |
| A function which can set the title of the window More... | |
| unsafe void | SetSize (int width, int height) |
| A function which can set the size of the window More... | |
| unsafe void | SetPosition (uint x_pos, uint y_pos) |
| A function which can set the position of the screen More... | |
| unsafe double | GetAliveTime () |
| A function which checks how long the window has been running More... | |
| unsafe bool | ShouldClose () |
| A function which checks whether the window should be closed More... | |
| unsafe void | SetDrawArea (uint x, uint y, uint width, uint height) |
| A function which sets the draw area of the window More... | |
| unsafe void | Dispose () |
| A function which can be used to dispose the current window More... | |
Protected Member Functions | |
| override void | OnWindowSizeChanged (int width, int height) |
| override void | OnWindowPosChanged (int x, int y) |
| override void | OnWindowFocusChanged (bool isfocus) |
| override void | OnWindowCloseRequested () |
| override void | OnWindowIconify (bool iconified) |
| override void | OnWindowMaximize (bool maximized) |
| Protected Member Functions inherited from HornetEngine.Graphics.NativeWindow | |
| NativeWindow () | |
| unsafe void | SwapBuffers () |
| unsafe void | ClearBuffer (ClearBufferMask mask) |
| unsafe void | PollEvents () |
| unsafe bool | CreateWindowHandle (int width, int height, string title, WindowMode mode) |
Properties | |
| Mouse | Mouse [get] |
| The mouse within the window More... | |
| Keyboard | Keyboard [get] |
| The keyboard within the window More... | |
| TouchPanel | Touch_panel [get] |
| The touch panel within the window More... | |
| TouchManager | Touch_manager [get] |
| Properties inherited from HornetEngine.Graphics.NativeWindow | |
| static GL | GL [get] |
| The GL context More... | |
| static Glfw | GLFW [get] |
| The GLFW context More... | |
| String | Title [get, set] |
| The title of the window More... | |
| vec2 | Size [get, set] |
| The size of the window More... | |
| vec2 | Pos [get, set] |
| The position of the window More... | |
Events | |
| WindowRefreshFunc | Redraw |
| The redraw event More... | |
| WindowMoveFunc | Move |
| The move event More... | |
| WindowResizeFunc | Resize |
| The resize event More... | |
| WindowFocusFunc | Focus |
| The focus event More... | |
| WindowCloseFunc | Close |
| The close event More... | |
| WindowFixedUpdateFunc | FixedUpdate |
| The fixed update event More... | |
Additional Inherited Members | |
| Protected Attributes inherited from HornetEngine.Graphics.NativeWindow | |
| unsafe WindowHandle * | w_handle |
| unsafe GlfwNativeWindow | n_window |
| TouchDriver | touch_driver |
| HornetEngine.Graphics.Window.Window | ( | ) |
Instantiates a new window object with base parameters
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
|
protectedvirtual |
Implements HornetEngine.Graphics.NativeWindow.
| bool HornetEngine.Graphics.Window.Open | ( | String | title, |
| int | width, | ||
| int | height, | ||
| WindowMode | mode | ||
| ) |
Opens a new application window on the current thread with specified title and size parameters
| title | The title of the application window |
| width | The width of the application window in pixels |
| height | The height of the application window in pixels |
| fullscreen | Fullscreen specifier, false: undecorated window, true: decorated window |
| void HornetEngine.Graphics.Window.Run | ( | ) |
Start the application window refresh loop and processes
| void HornetEngine.Graphics.Window.SetFixedUpdateFrequency | ( | float | newfreq | ) |
Sets the FixedUpdate frequency of the FixedUpdate thread
| newfreq | The new frequency in Hz |
| delegate void HornetEngine.Graphics.Window.WindowCloseFunc | ( | ) |
The close function of the window
| delegate void HornetEngine.Graphics.Window.WindowFixedUpdateFunc | ( | ) |
The fixed update function of the window
| delegate void HornetEngine.Graphics.Window.WindowFocusFunc | ( | bool | focussed | ) |
The focus function of the window
| focussed | A bool which shows whether the window is focused |
| delegate void HornetEngine.Graphics.Window.WindowMoveFunc | ( | Vector2 | newpos | ) |
The move function of the window
| newpos | The new position |
| delegate void HornetEngine.Graphics.Window.WindowRefreshFunc | ( | ) |
The refresh function of the window
| delegate void HornetEngine.Graphics.Window.WindowResizeFunc | ( | Vector2 | newsize | ) |
The resize function of the window
| newsize | The new size |
|
get |
The keyboard within the window
|
get |
The mouse within the window
|
get |
|
get |
The touch panel within the window
| WindowCloseFunc HornetEngine.Graphics.Window.Close |
The close event
| WindowFixedUpdateFunc HornetEngine.Graphics.Window.FixedUpdate |
The fixed update event
| WindowFocusFunc HornetEngine.Graphics.Window.Focus |
The focus event
| WindowMoveFunc HornetEngine.Graphics.Window.Move |
The move event
| WindowRefreshFunc HornetEngine.Graphics.Window.Redraw |
The redraw event
| WindowResizeFunc HornetEngine.Graphics.Window.Resize |
The resize event


Armour@ThePark: Charged RunUnder Armour SEASunday, November 20, 2016 from 6:30 AM to 8:30 AM (MYT)Malaysia, Malaysia |
|
Order Summary
| TYPE | QUANTITY | |
| RSVP | 1 |
|
6:56
Please complete registration within 8:00 minutes. * Required Field
|
When & Where
Pocket Park KL
Laman Standard Chartered
Wilayah Persekutuan Kuala Lumpur
Malaysia,
Kuala Lumpur 50450
Malaysia
Sunday, November 20, 2016 from 6:30 AM to 8:30 AM (MYT)
Add to my calendar


TinyBlog: Develop your First Web App with Pharo
Pharo is a clean, innovative, open-source, live-programming environment.
TinyBlog: Develop your First Web App with Pharo is an English step by step tutorial to build your first Web Application using Pharo.
An Open Book
TinyBlog: Develop your First Web App with Pharo: Contributions are welcomed.
The content of this book is released under a Creative Commons Attribution-ShareAlike license.
Authors
- Olivier Auverlot
- Stéphane Ducasse
- Luc Fabresse


public interface HashJoinMemoryCalculator extends HashJoinStateCalculator<HashJoinMemoryCalculator.BuildSidePartitioning>
This class is responsible for managing the memory calculations for the HashJoin operator.
Since the HashJoin operator has different phases of execution, this class needs to perform
different memory calculations at each phase. The phases of execution have been broken down
into an explicit state machine diagram below. What ocurrs in each state is described in
the documentation of the HashJoinState
class below. Note: the transition from Probing
and Partitioning back to Build Side Partitioning. This happens when we had to spill probe side
partitions and we needed to recursively process spilled partitions. This recursion is
described in more detail in the example below.
+--------------+ <-------+ | Build Side | | | Partitioning| | | | | +------+-------+ | | | | | v | +--------------+ | |Probing and | | |Partitioning | | | | | +--------------+ | | | +----------------+ | v Done
An overview of how these states interact can be summarized with the following example.
Consider the case where we have 4 partition configured initially.
| Modifier and Type | Interface and Description |
|---|---|
static class |
HashJoinMemoryCalculator.BatchStat |
static interface |
HashJoinMemoryCalculator.BuildSidePartitioning
The interface representing the
HashJoinStateCalculator corresponding to the
HashJoinState.BUILD_SIDE_PARTITIONING state. |
static interface |
HashJoinMemoryCalculator.PartitionStat |
static class |
HashJoinMemoryCalculator.PartitionStatSet
This class represents the memory size statistics for an entire set of partitions.
|
static interface |
HashJoinMemoryCalculator.PostBuildCalculations
The interface representing the
HashJoinStateCalculator corresponding to the
HashJoinState.POST_BUILD_CALCULATIONS state. |
| Modifier and Type | Method and Description |
|---|---|
void |
initialize(boolean doMemoryCalc) |
getState, next
Copyright © 2021 The Apache Software Foundation. All rights reserved.


public class MCLPoseProvider extends java.lang.Object implements PoseProvider, MoveListener
MCLParticleSet
to represent the probability distribution of the
estimated pose.
It uses a MoveProvider
to supply odometry
data whenever a movement is completed,
from which the Pose
of each particle is updated.
It then uses a lejos.robotics.RangeScanner
to provide
lejos.robotics.RangeReadings
which are used, together with the
RangeMap
to calculate the
probability weight of each MCLParticle
.| Modifier and Type | Class and Description |
|---|---|
(package private) class |
MCLPoseProvider.Updater
Predicts particle pose from odometry data.
|
| Modifier and Type | Field and Description |
|---|---|
private float |
_heading |
private float |
_x |
private float |
_y |
private float |
BIG_FLOAT |
private int |
border |
private boolean |
busy |
private boolean |
debug |
private boolean |
incomplete |
private boolean |
lost |
private RangeMap |
map |
private float |
maxX |
private float |
maxY |
private float |
minX |
private float |
minY |
private int |
numParticles |
private MCLParticleSet |
particles |
private RangeReadings |
readings |
private RangeScanner |
scanner |
private boolean |
updated |
private MCLPoseProvider.Updater |
updater |
private double |
varH |
private double |
varX |
private double |
varY |
| Constructor and Description |
|---|
MCLPoseProvider(MoveProvider mp,
RangeScanner scanner,
RangeMap map,
int numParticles,
int border)
Allocates a new MCLPoseProvider.
|
MCLPoseProvider(RangeMap map,
int numParticles,
int border)
Constructor for use on PC
|
| Modifier and Type | Method and Description |
|---|---|
void |
dumpObject(java.io.DataOutputStream dos)
Dump the serialized estimate of pose to a data output stream
|
void |
estimatePose()
Estimate pose from weighted average of the particles
Calculate statistics
|
void |
generateParticles()
Generate a new particle set, uniformly distributed within the map, and
uniformly distributed heading.
|
Rectangle2D |
getErrorRect()
Returns the minimum rectangle enclosing all the particles
|
Pose |
getEstimatedPose() |
float |
getMaxX()
Returns the maximum value of X in the particle set
|
float |
getMaxY()
Returns the maximum value of Y in the particle set;
|
float |
getMinX()
Returns the minimum value of X in the particle set;
|
float |
getMinY()
Returns the minimum value of Y in the particle set;
|
MCLParticleSet |
getParticles()
Returns the particle set
|
Pose |
getPose()
Returns the best best estimate of the current pose;
|
RangeReadings |
getRangeReadings()
Returns most recent range readings
|
RangeReadings |
getReadings()
Get the current range readings
|
RangeScanner |
getScanner()
Returns the range scanner
|
float |
getSigmaHeading()
Returns the standard deviation of the heading values in the particle set;
|
float |
getSigmaX()
Returns the standard deviation of the X values in the particle set;
|
float |
getSigmaY()
Returns the standard deviation of the Y values in the particle set;
|
float |
getXRange()
Returns the difference between max X and min X
|
float |
getYRange()
Return difference between max Y and min Y
|
boolean |
incompleteRanges()
returns range scanner failure status
|
boolean |
isBusy()
returns true if particle weights are being updated.
|
boolean |
isLost()
returns lost status - all particles have very low probability weights
|
boolean |
isUpdated()
Returns update success flag
|
void |
loadObject(java.io.DataInputStream dis)
Load serialized estimated pose from a data input stream
|
void |
moveStarted(Move event,
MoveProvider mp)
Required by MoveListener interface; does nothing
|
void |
moveStopped(Move event,
MoveProvider mp)
Required by MoveListener interface.
|
void |
setDebug(boolean on)
Set debugging on or off
|
void |
setInitialPose(Pose aPose,
float radiusNoise,
float headingNoise)
Generates an initial particle set in a circular normal distribution, centered
on aPose.
|
void |
setInitialPose(RangeReadings readings,
float sigma)
Generates an initial particle set using the range readings.
|
void |
setMap(RangeMap map)
Associates a map with the MCLPoseProvider
(for example a map send from the PC).
|
void |
setParticles(MCLParticleSet particles)
Associate a particle set with the MCLPoseProvider
(e.g. particles sent from the PC)
|
void |
setPose(Pose aPose)
set the initial pose cloud with radius noise 1 and heading noise 1
|
boolean |
update()
Calls range scanner to get range readings, calculates the probabilities
of each particle from the range readings and the map and calls resample(()
|
boolean |
update(RangeReadings readings)
Calculates particle weights from readings, then resamples the particle set;
|
private MCLParticleSet particles
private RangeScanner scanner
private RangeMap map
private int numParticles
private float _x
private float _y
private float _heading
private float minX
private float maxX
private float minY
private float maxY
private double varX
private double varY
private double varH
private boolean updated
private MCLPoseProvider.Updater updater
private int border
private boolean debug
private boolean busy
private float BIG_FLOAT
private RangeReadings readings
private boolean lost
private boolean incomplete
public MCLPoseProvider(MoveProvider mp, RangeScanner scanner, RangeMap map, int numParticles, int border)
mp
- - the MoveProivderscanner
- - the RangeScannermap
- - the RangeMapnumParticles
- number of particlesborder
- of the mappublic MCLPoseProvider(RangeMap map, int numParticles, int border)
map
- the RangeMapnumParticles
- the numbers of particlesborder
- of the mappublic void setMap(RangeMap map)
map
- the RangeMappublic void setInitialPose(Pose aPose, float radiusNoise, float headingNoise)
aPose
- - center of the cloudradiusNoise
- - standard deviation of the radius of the cloudheadingNoise
- - standard deviation of the heading;public void setInitialPose(RangeReadings readings, float sigma)
readings
- sigma
- range reading noise standard deviation.public void setDebug(boolean on)
on
- true = on, false = offpublic void setPose(Pose aPose)
setPose
in interface PoseProvider
public MCLParticleSet getParticles()
public RangeReadings getReadings()
public void setParticles(MCLParticleSet particles)
particles
- the particle setpublic void generateParticles()
public void moveStarted(Move event, MoveProvider mp)
moveStarted
in interface MoveListener
event
- the movementmp
- the movement providerpublic void moveStopped(Move event, MoveProvider mp)
moveStopped
in interface MoveListener
event
- the move just completedmp
- the MoveProviderpublic boolean update()
public boolean update(RangeReadings readings)
readings
- public boolean isUpdated()
public boolean isLost()
public boolean incompleteRanges()
public float getXRange()
public float getYRange()
public Pose getPose()
getPose
in interface PoseProvider
public Pose getEstimatedPose()
public void estimatePose()
public RangeReadings getRangeReadings()
public Rectangle2D getErrorRect()
public float getMaxX()
public float getMinX()
public float getMaxY()
public float getMinY()
public float getSigmaX()
public float getSigmaY()
public float getSigmaHeading()
public RangeScanner getScanner()
public void dumpObject(java.io.DataOutputStream dos) throws java.io.IOException
dos
- the data output streamjava.io.IOException
public void loadObject(java.io.DataInputStream dis) throws java.io.IOException
dis
- the data input streamjava.io.IOException
public boolean isBusy()


Police investigate 'unexplained' death of woman, 46, in Brecon
Lorraine Price, 46, was found dead at a property on Sunday, November 17
by Katie-Ann GupwellA 46-year-old woman has been found dead at a property in Brecon .
Dyfed-Powys Police described the death of Lorraine Price, 46 as 'unexplained' and said officers are investigating the circumstances.
Officers were called to an address in Talbot Terrace on Sunday, November 17, where the 46-year-old was found deceased.
Detective Chief Inspector Paul Jones said: “We are not looking for anyone in connection with Lorraine’s death, but we are nevertheless trying to piece together what has happened over the past few days.
“We are asking anyone who saw Lorraine between the morning of Thursday, November 14 and the evening of Sunday, November 17 to please contact us, as any information you have could help the investigation.
“We would like to pass our sincere condolences to Lorraine’s family for their tragic loss.”
People living in the area have been advised there may be a higher than usual police presence while enquiries are taking place.
Anyone with information that could help police with the investigation is urged to contact CID at Brecon Police Station.
You can report information online at: http://bit.ly/dppReportOnline , by email at<EMAIL_ADDRESS>or by calling 101.
When making a report, please use reference number DP-20191117-278.


This project is a port of the Couchbase Lite portable Java codebase, ported to C#. Couchbase Lite is a fully functional, on-device, lightweight, native, embedded JSON database. With Couchbase Lite, you have the full power of a Couchbase database locally on the device. You can create, update, delete, query, sync and much, much more.


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
1/3 12-WP13436.17.doc IN THE HIGH COURT OF JUDICATURE AT BOMBAY CIVIL APPELLATE JURISDICTION WRIT PETITION NO.13436 OF 2017 Panchashil Reality & Developers Pvt. Ltd. .. Petitioner Vs. Maharashtra Pollution Control Board & Ors. .. Respondents ... Mr. S.S. Patwardhan for the Petitioner. Ms. Jaya Bagwe for Respondent No.1. Mr. M. M. Pabale, A.G.P. for the State. CORAM: PRADEEP NANDRAJOG, C.J. & SMT. BHARATI DANGRE, J.
DATED : 04th SEPTEMBER, 2019.
P.C:-
1. Heard learned counsel for the parties.
2. It is a case where the desire to improve the environment i.e. to ensure that river Mula Mutha in Pune is made free from the discharge of untreated effluent, the National Green Tribunal exceeded its jurisdiction in O.A. No.55 of 2015.
3. It happened like this.
AJN
::: Uploaded on - 05/09/2019 ::: Downloaded on - 05/09/2019 23:45:47 :::
2/3 12-WP13436.17.doc
4. One Mr. Subhash Ramkrishna Patil invoked the jurisdiction of the National Green Tribunal under Section 14 of the National Green Tribunal Act, 2010 pleading that on account of untreated effluent being discharged in river Mula Mutha, its water had turned so polluted that far from being a river, it became a drain.
5. Issuing notice to the Government of Maharashtra and the Maharashtra Pollution Control Board the latter being obliged to ensure compliance with the Water (Prevention and Control of Pollution) Act, 1974, the National Green Tribunal got the response that of the 189 project proponents in Pune, 30 were non- complaint and against whom the Pollution Control Board had already issued a notice on 10th March, 2017 proposing the action referred to in the notice.
6. The National Green Tribunal noted the reply as also the action proposed by the Maharashtra Pollution Control Board and thereafter issued notice to the said 30 project proponents and while issuing the show cause notice informed the project proponents to show cause why they should not be saddled with environmental compensation for not discharging their obligations under the Environment (Protection) Act, 1986.
7. Now, the show cause notice issued by the Maharashtra Pollution Control Board itself informs the project proponents that action proposed against them was firstly to disconnect the water AJN ::: Uploaded on - 05/09/2019 ::: Downloaded on - 05/09/2019 23:45:47 ::: 3/3 12-WP13436.17.doc and electricity supply to the project and secondly to initiate action under the Environmental Acts and Rules.
8. Thus, the National Green Tribunal could have at best directed Maharashtra Pollution Control Board to pass necessary orders pursuant to the notice dated 10th March, 2017 issued by the Maharashtra Pollution Control Board and not to take over the task of passing final order pursuant to the notice in question. The reason is obvious. The statutory right of appeal available to the Petitioner was being taken away by the National Green Tribunal.
9. Under the circumstances, we dispose of the Writ Petition quashing the notice issued by the National Green Tribunal to the Petitioner but simultaneously direct the Maharashtra Pollution Control Board to pass a final order pursuant to the show cause notice which was issued to the Petitioner by the Board on 10 th March, 2017.
10. Needless to state that the procedures of the law contemplated post notice issued till final order passed shall be followed. If the order is against the Petitioner, the Petitioner shall be entitled to remedy as per law.
11. No costs.
(SMT. BHARATI DANGRE, J.) (CHIEF JUSTICE) AJN ::: Uploaded on - 05/09/2019 ::: Downloaded on - 05/09/2019 23:45:47 :::


Haitian president calls for help in tackling humanitarian crisis [Morning Call]
by Jerry BambiHaiti needs international support to tackle an unfolding humanitarian crisis.
President Jovenel Moise made the call in an interview on sunday. His appeal for help comes two months into anti-government protests that have exacerbated food insecurity in the Americas’ poorest nation.
Moise also said he was holding closed-door talks with civil society groups and the private sector, as well as radical and moderate members of the opposition in a bid to break political gridlock by creating a government of unity.


vs debug
This page compares ulog
to debug
.
Open devtools
Open the browser developer tools (F12).
Enable logging
No output will be visible until you enable logging. To enable
logging in both debug
and ulog
, set
debug=*
.
You can do this using the developer tools GUI (tab Application in
Chrome), or in the Console tab run this command:
localStorage.setItem('debug', '*')
,
or you can press the button below:
Log some messages
Press the buttons to log messages with both loggers:You should get output like this:
ulog
monitors the config
You may notice that debug
is not producing any output,
whereas ulog
is. That's because ulog
monitors
the configuration at runtime but debug
doesn't. So to get
debug
to pick up our configuration change, reload the
page (F5). Then, press both buttons again. This time, we can see
debug
and ulog
output side by side:
The output of ulog
and debug
is very similar.
Both loggers add the name of the logger to the message and both loggers
show some timing information. Also, both loggers use colors to produce
more clear output. But, there are actually more differences here than
initially meet the eye.
ulog
preserves the callstack
One big difference between debug
and ulog
is marked with arrows in the screenshot. ulog
preserves
the callstack, meaning file names and line numbers shown in the
console point to the client code. This is in big contrast to
debug
, which injects it's own formatting function in
the callstack, meaning all file names and line numbers point to that
function in the debug
minified source file. Not very
convenient!
ulog
has configurable formatting
debug
only allows some tweaks to it's formatting.
ulog
allows you to take full control of formatting.
You can change the format for all or some loggers using config
option log_format. For example, let's try adding the time to the
message. Set log_format=time lvl name perf
in the
devtools or press the button below:


Introducing C
Hengfeng Wei (魏恒峰)
<EMAIL_ADDRESS>Sep. 27, 2021
Questionnaire
$75\%$ of students are new to programming.
To C Beginners
From Beginners to Masters
Programming
De-programming
What is C?
C is a computer programming language (PL).
You communicate your ideas to computers via PLs.
What is C?
Programming is NOT (only) about languages.
Programming is not about C.
You learn C to express YOUR IDEAS.
How to Learn (1)?
How to Learn (2)?
"无他, 但手熟尔"
How to Learn (3)?
How many bugs have you ever produced?
C Programming:
A Modern Approach
K&R
Brian W. Kernighan (1942 ~)
Dennis M. Ritchie (1941 ~ 2011)
Examination and Scores
-
考勤
-
期中测试
-
期末笔试
- 期末机试 (30 分)
- 编程练习 (70 分)
- 奖励
编程练习: 每周基础训练 (40 分) + 学期项目 (30 分; 2 个)
Q&A
CLion
"你有你的选择, 而我选择 CLion"
Hello World (K&R C)
Brief History of C
You do not have to become a language lawyer.
Brief History of C
Turing Award (1983)
Game: Guess the Number
You think. I will type it for you.
How to Obtain a Random Number?
How to Obtain a Random Number?
How to Obtain a Random Number?
$s \qquad f(s) \qquad f(f(s)) \qquad \ldots$
pseudo-random number sequence
Code Style
Braces
Tabs vs. Spaces
Code Style in CLion
How to Obtain a Random Number (Revisited)?
What is Next?
- Variables and Types (
int
, double
)
- Math: computer arithmetic
- Input/Ouput (I/O)
- Branching: "if/else", "switch/case"
- Looping: "while", "do/while", "for"
- Jumps: "break", "continue", "goto"
- Functions & Libraries
No Plagiarism!!!
前两次各扣 10 分, 第三次总分降为 60 分 $\;(\times\; 60\%)$
Resources
6735 99232 2021-C-PL


Hacker News
Sound1
Sound2
Sound3
Sound4
Sound5
Sound6
Sound7
Sound8
|
Volume
|
Dismiss: No
Dismiss: 05s
Dismiss: 07s
Dismiss: 09s
Dismiss: 11s
Dismiss: 13s
Dismiss: 15s
Dismiss: 17s
Dismiss: 20s
|


Guess the number generated from 1 to 1000
Your guess is higher
Your guess is lower
Your guess matched!
No. of Guess(es) : {{noOfTries}}


A handy jQuery solution for blocking responsive, IE, or incomplete bits from being seen while in development.
Pop a /?dev=true
on the end of the URL to bypass, and check the console message (after a reload). Turn off Developer Mode with /?dev=off
.
Also try viewing in Internet Explorer!


| < Day Day Up > |
Data Sharing AdministrationOne of the benefits of data sharing is that the entire environment can be administered from a single MVS console. The DB2 command prefix, which can be up to eight characters long, is used to differentiate between the different members of a data sharing group. NOTE Individual data sharing group member names can be used as command prefixes. In a sysplex environment administrative DB2 commands can be routed to any DB2 member from a single console. This eliminates the need to know the MVS system name to send DB2 commands. In addition, there is no need to use ROUTE DB2 commands in this environment (see Figure 19.3). Figure 19.3. Administering the DB2 data sharing environment.Data Sharing Group CreationTo enable data sharing, a common DB2 catalog is required. IBM does not provide an automated mechanism for merging data from multiple existing DB2 subsystems. The process of merging systems is complex and should not be undertaken lightly. Merging subsystems is not solely a physical data movement problem but includes other administrative issues including the creation and enforcement of naming standards, DB2 security and authorization, backup and recovery, utility execution, data distribution, and on and on. Indeed, the decision to merge subsystems into a data sharing group will impact almost every aspect of database administration for the subsystems involved. If you are still interested in merging pre-existing DB2 subsystems into a data sharing, an exhaustive 16 step process for merging data from individual DB2 subsystems is available in the IBM manual Data Sharing: Planning and Administration (SC26-9935). CAUTION Watch for duplicate object names when merging multiple DB2 catalogs into the shared DB2 catalog for the data sharing group. Because the objects were originally created in isolation from one another, it is likely that duplicate object names (for example, databases, tablespaces, indexes, and so on) may be encountered when catalogs are merged. Backup and RecoveryEach DB2 member still maintains its own recovery logs and BSDS data sets. Each DB2 member must be able to read the logs of every other data sharing group member. This is required because logs from multiple members may be required to do media recovery for a single member. If logs are required from multiple members, the multiple logs are merged together during the recovery process. Log Record Sequence Numbers (LRSN) are used to provide common log record sequencing across members. The LRSNs are used to control "redo"/"undo" for data sharing environments and are identified by a 6 byte value derived from the DB2 timestamp. The RBA is still used during non-data sharing recoveries. Data Sharing Database StatusesIn a data sharing environment, there are two new page set statuses that can occur—GRECP and LPL. These statuses can appear on the output of the -DISPLAY DATABASE command. The GRECP status stands for "Group buffer pool recovery pending." It indicates that the group buffer pool was lost. This means that there are changes recorded in the log that need to be applied to the page set. DB2 will automatically recover GRECP page sets when the group buffer pool is defined with AUTOREC(YES) and at least one member was connected when the failure occurred. The LPL status stands for "Logical page list." It indicates that some pages were not read from or written to the group buffer pool. An LPL status can be caused by a disk failure, a channel failure (between the group buffer pool and the processor), or some other transient disk problem. Improved LPL RecoverySubsystem AvailabilityDB2 data sharing improves data availability by providing redundant failover capabilities. In the event of a DB2 data sharing group member failure, the remaining members are used to process the data requests. The workload is spread across the remaining DB2 members. Uncommitted locks held by the failed member are retained. No member is permitted to obtain a lock that is not compatible with the retained locks. All other (non-locked) data is still accessible to the remaining DB2 members. Retained locks are purged during the restart process for the failed member. The failed DB2 member can restart on the same or different z/OS system. Restart LightThe restart light simplifies data sharing administration. Because the storage required is significantly reduced, the restart light can potentially start up a system with minimal resources that would not be able to be started and stopped in normal mode. If you experience a system failure in a Parallel Sysplex, the automated restart in light mode removes retained locks with minimum disruption.
Monitoring Data Sharing GroupsThe DISPLAY GROUP command can be issued from any active member of a group to determine information about all members of a data sharing group. An example of issuing a DISPLAY GROUP command follows: -DB1G DISPLAY GROUP The results of this command will be a listing of the group members, the status of all members in the group, SCA and lock structure sizes and percentages in use. The maximum number of lock and list entries possible with the number of entries in use are shown. An example of the information returned by DISPLAY GROUP is depicted in Listing 19.1. Listing 19.1. Results of the DISPLAY GROUP CommandDSN7100I -DB1G DSN7GCMD *** BEGIN DISPLAY OF GROUP(DSNDB0G) ---------------------------------------------------------------- DB2 SYSTEM IRLM MEMBER ID SUBSYS CMDPREF STATUS NAME SUBSYS IRLMPROC -------- --- ---- -------- ------- -------- ---- -------- DB1G 1 DB1G -DB1G ACTIVE MVS1 DJ1G DB1GIRLM DB2G 2 DB2G -DB2G ACTIVE MVS2 DJ2G DB2GIRLM DB3G 3 DB3G -DB3G ACTIVE MVS3 DJ3G DB3GIRLM DB4G 4 DB4G -DB4G ACTIVE MVS4 DJ4G DB4GIRLM ---------------------------------------------------------------- SCA STRUCTURE SIZE: 2560 KB, STATUS= AC, SCA IN USE: 48 % LOCK1 STRUCTURE SIZE: 16384 KB, LOCK1 IN USE: 1 % NUMBER LOCK ENTRIES: 4194304, LOCK ENTRIES IN USE: 981 NUMBER LIST ENTRIES: 59770, LIST ENTRIES IN USE: 719 *** END DISPLAY OF GROUP(DSNDB0G ) DSN9022I -DB1G DSN7GCMD 'DISPLAY GROUP ' NORMAL COMPLETION Coupling Facility RecoveryAlthough unlikely, it is possible for the coupling facility to fail causing its structures to be lost. A dynamic rebuild of the coupling facility structures (lock, SCA) is executed during coupling facility recovery. However, if the dynamic rebuild fails, and the structures cannot be rebuilt on another coupling facility, all DB2 members contained in the data sharing group are brought down. To recover from this scenario, a group restart is required. Group restart rebuilds the information that was lost from the SCA and/or lock structure using the logs of the DB2 group members. All of the logs for every data sharing group member must be available during the group restart process. NOTE Group restart does not necessarily mean that all DB2s in the group start up again, but information from all DB2s must be used to rebuild the lock structure or SCA. |
| < Day Day Up > |


‘let’ me be a ‘const’(ant), not a ‘var’(iable)!
Since JavaScript does not have any type-checking, either of these
keywords can be used to declare a variable of any type (datatype)
in JavaScript. Though all the three keywords are used for the same
purpose, they are different.
What is linting and how can it save you time?
One of the biggest challenges in software development is time. It’s
something we can’t easily get more of, but linting can help us make
the most out of the time we have.
 We
all want to become stars, or at the very least, a recognizable name
in the industry.
How to write easily describable code
When code is not describable using words, most people have to do
some mental mapping to turn it in to words. This wastes mental
energy, and you run the risk of getting the mapping wrong. Different
people will map to different words, which leads to confusion when
discussing the code.
Everything you should know about ‘module’ & ‘require’ in Node.js
Node.js treats each JavaScript file as a separate module. For
instance, if you have a file containing some code and this file is
named xyz.js, then this file is treated as a module in Node, and you
can say that you’ve created a module named xyz.
Are you sure you want to delete this post?


Team Members
Michael
Manager
ID: 100-1
Email:
<EMAIL_ADDRESS>Office Number: 1
Dwight
Engineer
ID: 100-2
Email:
<EMAIL_ADDRESS>GitHub:
dwight-github
Stanley
Engineer
ID: 100-3
Email:
<EMAIL_ADDRESS>GitHub:
big-stanley
Ryan
Intern
ID: 5
Email:
<EMAIL_ADDRESS>School: University of Business


Password Reset Mail
{% if ctx.name %}
Dear {{ ctx.name }},
{% endif %}
You can reset your password by connect the admin
Now you can't reset it by yourself.


This has been offered as an alternative to the CSS only activity indicator.
The img
tag is used to display the activity indicator.
The default activity indicator is in the accent color, and is intended for use on a light background.
An alternative activity indicator using the primary color has also been supplied, and is intended for use on a dark background.
The activity indicators are supplied as .svg
and .gif
images.
There are large and small sizes available, which can be used in case of browser compatibility issues with the default indicators.
Note: Use only
.gif
for Internet Explorer. Other browsers can use.svg
or.gif
.


A graphql ready starter kit for Angular2 using Apollo Client and Webpack. This starter kit is built to seamlessly integrate with the scaphold.io's powerful GraphQL-as-a-Service platform.
Out of the box, the application handles authentication and exhibits pagination using GraphQL connections. The template also comes packed with a few other goodies.
User
type that handles authentication necessities like password encryption
out of the box. This template is built to seamlessly work with a fresh scaphold.io app.# clone our repo $ git clone https://github.com/scaphold-io/angular2-apollo-client-webpack-starter.git
my-app
# update /my-app/src/config.ts with your scaphold api url $ cd my-app $ vi src/config.ts
# install the dependencies with npm $ npm install
# Your scaphold url will look something like https://api.scaphold.io/graphql/my-awesome-app-alias
# start the server $ npm start
Your application is now hooked up to a production GraphQL API and is ready for you to build an awesome app.
Go to http://localhost:8080 to start using your API.
bootangular2-apollo-webpack-starter/
├── src/ # Project Root
│ ├── app/ # Angular2 Application
│ │ ├── about/ # about, home, login, register all contain Angular components
│ │ ├── home/
│ │ ├── login/
│ │ ├── register/
│ │ ├── shared/ # shared contains Angular services. e.g. auth.service.ts
│ │ ├── app.component.html # Each component has a X.component.html template file
│ │ ├── app.component.scss # Component specific sass styling
│ │ ├── app.component.ts # The component controller
│ │ ├── app.component.e2e-spec.js # Protractor integration tests
│ │ ├── app.component.spec.ts # Karma unit tests
│ │ ├── app.routes.ts # Angular application router
│ │ └── client.ts/ # Apollo client initialization
│ ├── public/ # Public static assets
│ │ ├── img/
│ │ └── index.html
│ ├── style/ # Application wide sass styling
│ │ └── app.scss
│ ├── config.ts # Contains your API's url.
│ ├── main.ts # Application entry point
│ ├── polyfills.ts
│ └── vendor.ts # Update application dependencies here
├── typings/ # Contains TypeScript definitions
│ ├── globals/
│ ├── modules/
│ └── index.d.ts
├── package.json
├── karma-shim.js
├── karma-conf.js
├── protractor.conf.js
├── tsconfig.json
├── tslint.json
├── typedoc.json
├── typings.json
├── webpack.config.js
├── LICENSE
└── README.md
Apollo Client is an easy to use, framework agnostic GraphQL client library that makes it easy to integrate GraphQL with your app. In our experience it can be a little easier to work with than Relay and allows you to use non-React frameworks like Angular 2! Under the hood, Apollo Client uses the Redux state container for caching so that your queries run quickly and your data is always in sync.
Angular2 uses decorator functions to attach metadata to classes. Components use @Component, services use @Injectable, and
classes that need GraphQL functionality use @Apollo. Take a look at the HomeComponent in src/home/home.component.ts
.
@Apollo({ client,
queries(context) {
return { data
: { query
: gql`
query AllUsers($first: Int, $after: String, $last: Int, $before: String) {
viewer {
allUsers(first: $first, after: $after, last: $last, before: $before) {
edges {
node {
id
username
lastLogin
createdAt
modifiedAt
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
}
`, variables
: { first
: context.first, after
: context.after, last
: context.last, before
: context.before }, forceFetch
: false, returnPartialData
: true, pollInterval
: 10000 } }; } })
The Apollo decorator allows you to define queries and mutations and make them reactive so that your data stays up to date
as properties in your component class change. @Apollo takes a single object with the keys client
, queries
,
mutations
as a parameter and returns an object that maps to properties in the decorated class.
For the example above note how we have property data: any
in our HomeCompnoent class. We can access the data
returned by the query defined in the @Apollo decorator via the data
property. Also note how the queries
function in the parameter exposes a single context
argument. This context
points to the scope
of the decorated class so that you can directly reference your component's state properties. This is extra awesome because
Apollo Client automatically makes the queries defined in the @Apollo decorator reactive. This means that when properties
in your class change so will your data. Apollo implements a bunch of cool tricks to make this efficient such that it
only issues new API requests when needed and uses cached data in Redux for the rest.
You can find more documentation here for Apollo Client and Angular2Apollo (a native wrapper for Angular2)
Scaphold is a GraphQL-as-a-Service platform that makes it really easy to create production backends using GraphQL. Their web interface greatly simplifies the process of defining a GraphQL schema, integrations make adding other services like social authentication, stripe payments, email support, and push notifications a breeze, and the data exploration tools let you comb through your data without having to write GraphQL.
This template was created to work seamlessly with a fresh scaphold.io application and
already has user registration and authentication configured for you. The HomeComponent src/home/home.component.ts
also includes and example of how you can easily implement pagination using Connections on Scaphold.
A necessary part of any application is the ability to paginate through data in arbitrarily sized pages. To do this in GraphQL, we use Connections. A Connection is a standards based approach to pagination that offers a efficient and straigh-forward pagination mechanism.
A GraphQL connection field takes 4 arguments
first
: An integer specifying the count of objects following the after
cursor in a sequence
that should be included in the response.after
: A string 'cursor'. This is an opaque identifier that points to an object in a sequence. It specifies
where our page slice should start in a sequence and is used with first
. Results are bounds-exclusive and
will start strictly after this cursor.last
: An integer specifying the count of objects precursing the before
cursor in a sequence
that should be included in the response.before
: A string 'cursor'. This is an opaque identifier that points to an object in a sequence. It specifies
where our page slice should end in a sequence and is used with last
. Results are bounds-exclusive and
will start strictly before this cursor.Note: We advise you only use (
first
andafter
) OR (last
andbefore
) at any given time. Although you technically can use both at the same time it can lead to unexpected results. See the Cursor Connections Spec for more details.
The HomeComponent defines the following GraphQL query in the @Apollo decorator function.
query AllUsers($first: Int, $after: String, $last: Int, $before: String) {
viewer {
allUsers(first: $first, after: $after, last: $last, before: $before) {
edges {
node {
id
username
lastLogin
createdAt
modifiedAt
}
cursor
}
pageInfo {
hasNextPage
hasPreviousPage
}
}
}
}
It also binds the connection arguments to 4 properties in the HomeComponent class.
variables: {
first: context.first,
after: context.after,
last: context.last,
before: context.before
}
With this setup, we are able to immediately start paginating through our User data by changing the first
,
after
, last
, and before
properties in the HomeComponent class. Apollo Client automatically
handles making our query reactive and will make sure the presented data stays in sync with our class properties.
const edgeCount = this.
data.viewer.allUsers.edges.
length;
const afterCursor = (edgeCount
> 0) ? this.data.
viewer.allUsers.edges[edgeCount - 1]['cursor']
: null;
this.after = afterCursor;
this.first = this.
defaultPageSize;
this.before = null;
this.last = null;
Try out different values to experiment with Cursor Connection pagination.
fork
this repoclone
your forknpm install
to install all dependenciesWhat you need to run this app:
node
and npm
v4.x
+) and NPM (3.x
+) but others will most likely work as
wellAfter you have installed all dependencies you can now run the app with:
npm start
It will start a local server using webpack-dev-server
which will watch, build (in-memory), and reload for
you. The port will be displayed to you as http://localhost:8080
.
npm run build
npm run watch
npm run docs
npm test
npm run test-watch
npm e2e
npm e2e-live
Please feel free to fork this project and contribute. Send us a pull request and we'd be happy to merge :)


// In file packages-and-imports/ex1/Ex1.scala package bobsrockets.navigation class Navigator
package bobsrockets.navigation { class Navigator }
package bobsrockets { package navigation { // In package bobsrockets.navigation class Navigator package tests { // In package bobsrockets.navigation.tests class NavigatorSuite } } }
// In file packages-and-imports/ex4/Ex4.scala package bobsrockets { package navigation { class Navigator { // No need to say bobsrockets.navigation.StarMap val map = new StarMap } class StarMap } class Ship { // No need to say bobsrockets.navigation.Navigator val nav = new navigation.Navigator } package fleets { class Fleet { // No need to say bobsrockets.Ship def addShip() = { new Ship } } } }
package bobsrockets { class Ship } package bobsrockets.fleets { class Fleet { // Doesn't compile! Ship is not in scope. def addShip() = { new Ship } } }
// In file packages-and-imports/launch.scala // In file launch.scala package launch { class Booster3 } // In file bobsrockets.scala package bobsrockets { package navigation { package launch { class Booster1 } class MissionControl { val booster1 = new launch.Booster1 val booster2 = new bobsrockets.launch.Booster2 val booster3 = new _root_.launch.Booster3 } } package launch { class Booster2 } }
package bobsrockets package fleets class Fleet { // No need to say bobsrockets.Ship def addShip() = { new Ship } }
// In file packages-and-imports/Fruits.scala package bobsdelights abstract class Fruit( val name: String, val color: String ) object Fruits { object Apple extends Fruit("apple", "red") object Orange extends Fruit("orange", "orange") object Pear extends Fruit("pear", "yellowish") val menu = List(Apple, Orange, Pear) }
// In file packages-and-imports/Ex5.scala // easy access to Fruit import bobsdelights.Fruit // easy access to all members of bobsdelights import bobsdelights._ // easy access to all members of Fruits import bobsdelights.Fruits._
// In file packages-and-imports/Ex5.scala def showFruit(fruit: Fruit) = { import fruit._ println(name + "s are " + color) }
// In file packages-and-imports/Ex6.scala import java.util.regex class AStarB { // Accesses java.util.regex.Pattern val pat = regex.Pattern.compile("a*b") }
// In file packages-and-imports/Ex7.scala import Notebooks._ import Fruits.{Apple => _, _}
import java.lang._ // everything in the java.lang package import scala._ // everything in the scala package import Predef._ // everything in the Predef object
// In file packages-and-imports/Ex8.scala.err class Outer { class Inner { private def f() = { println("f") } class InnerMost { f() // OK } } (new Inner).f() // error: f is not accessible }
// In file packages-and-imports/Ex9.scala.err package p { class Super { protected def f() = { println("f") } } class Sub extends Super { f() } class Other { (new Super).f() // error: f is not accessible } }
// In file packages-and-imports/ex10/Ex10.scala package bobsrockets package navigation { private[bobsrockets] class Navigator { protected[navigation] def useStarChart() = {} class LegOfJourney { private[Navigator] val distance = 100 } private[this] var speed = 200 } } package launch { import navigation._ object Vehicle { private[launch] val guide = new Navigator } }
val other = new Navigator other.speed // this line would not compile
// In file packages-and-imports/Rocket.scala class Rocket { import Rocket.fuel private def canGoHomeAgain = fuel > 20 } object Rocket { private def fuel = 10 def chooseStrategy(rocket: Rocket) = { if (rocket.canGoHomeAgain) goHome() else pickAStar() } def goHome() = {} def pickAStar() = {} }
// In file packages-and-imports/package.scala // In file bobsdelights/package.scala package object bobsdelights { def showFruit(fruit: Fruit) = { import fruit._ println(name + "s are " + color) } } // In file PrintMenu.scala package printmenu import bobsdelights.Fruits import bobsdelights.showFruit object PrintMenu { def main(args: Array[String]) = { for (fruit <- Fruits.menu) { showFruit(fruit) } } }
|
For more information about Programming in Scala, Fourth Edition (the "Stairway Book"), please visit: http://www.artima.com/shop/programming_in_scala_4ed and: |
Copyright © 2007-2019 Artima, Inc. All rights reserved. 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. |


Programming language.
Technology skills.
Language.
Thai :
English :
Hobbies:
Play game computer and learning about new technology.


Preparation time
30 mins to 1 hour
Cooking time
less than 10 mins
Serves
Serves 2
Dietary
For the tiramisu, place the egg yolks and icing sugar into a large bowl and whisk with an electric hand whisk until pale and frothy.
Add the softly whipped cream and mascarpone and a dash of the coffee liqueur, and stir well.
In a separate bowl, whisk the egg whites until stiff peaks form when the whisk is removed. Fold into the cream mixture.
Mix the rest of the coffee liqueur with the chilled coffee in a shallow dish.
Dip half of the sponge fingers into the coffee mixture. Place in the base of a large dessert glass, then spoon over half of the cream mixture. Dip the rest of the sponge fingers into the coffee mixture, then place on top of the cream mixture in the glass. Finish with the remaining cream mixture.
Dust with cocoa powder and grated white chocolate and chill for 30 minutes, if time permits.
For the almond brittle, place the caster sugar into a frying pan and melt over a gentle heat until it turns a caramel colour.
Add the almonds and stir to coat. Pour onto a baking sheet lined with baking paper and leave to cool.
When cold, break the brittle into pieces and use to decorate the top of the tiramisu. Serve.


Heracles is the cohort analysis tool for the OMOP Common Data Model (CDM). Begin your analyses by selecting a cohort.
{{cohort.cohortDefinition.description}}
{{job.message}}


public interface KbFactoryServices
AssertionService getAssertionService()
BinaryPredicateService getBinaryPredicateService()
KbCollectionService getCollectionService()
ContextService getContextService()
ConvenienceService getConvenienceService()
FactService getFactService()
FirstOrderCollectionService getFirstOrderCollectionService()
KbFunctionService getFunctionService()
KbIndividualService getIndividualService()
KbObjectService getKbObjectService()
KbPredicateService getPredicateService()
RelationService getRelationService()
RuleService getRuleService()
SecondOrderCollectionService getSecondOrderCollectionService()
SentenceService getSentenceService()
SymbolService getSymbolService()
KbTermService getTermService()
VariableService getVariableService()
Copyright © 2013–2015 Cycorp, Inc. All rights reserved.


Introduction
This is the namespace document for the XML schema used in the Protocol for Web Description resources (POWDER). It provides a human-readable summary of the XML Schema itself.
A series of simple (atomic) datatypes is defined, followed by a list of datatypes derived from them. These are used as the range of the various RDF properties defined in POWDER: Grouping of Resources [GROUP].
The Description Resource complex type is provided to facilitate quick validation of a DR, when serialized in XML, before full semantic processing in an RDF environment. Description Resources themselves are defined separately [DR].
For each atomic type we have defined a pattern restriction (i.e. a regular expression). For those data types that refer to URI components, these are, of course, conformant with RFC3986. Appendix B of that RFC provides a regular expression that is useful in splitting up a URI into its components:
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? 12 3 4 5 6 7 8 9
However, matching against this regular expression is not necessarily the same as validating a component once it has been
separated from the URI. In some cases therefore we define our own pattern that we believe is more useful as a validation tool.
White space is excluded from all atomic data types except response
.
The group is particularly keen to receive feedback on whether we have chosen wisely and whether there are better patterns for validating URI components.
Simple Types
uriScheme
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriScheme
Base: xsd:string
Pattern value restriction: [a-zA-Z]+[a-zA-Z0-9\+\-\.]*
The datatype denoting a string corresponding to the scheme component of a URI.
uriUserInfo
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriUserInfo
Base: xsd:string
Pattern value restriction: [^/?#@\s]+
The datatype denoting a string corresponding to the userInfo component of a URI.
uriHost
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriHost
Base: xsd:string
Pattern value restriction: [^/?#@:\s]+
The datatype denoting a string corresponding to the host component of a URI.
uriPort
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriPort
Base: xsd:string
Pattern value restriction: (\d{1}|[1-9]\d*)
The datatype denoting a string corresponding to the port component of a URI.
uriPath
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriPath
Base: xsd:string
Pattern value restriction: [^?#\s]+
The datatype denoting a string corresponding to the path component of a URI.
uriQuery
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriQuery
Base: xsd:string
Pattern value restriction: [^#\s]+
The datatype denoting a string corresponding to the query component of a URI.
uriFragment
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriFragment
Base: xsd:string
Pattern value restriction: [^#\s]+
The datatype denoting a string corresponding to the fragment component of a URI.
uriPortRange
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:uriPortRange
Base: xsd:string
Pattern value restriction: (\d{1}|[1-9]\d*)\-(\d{1}|[1-9]\d*)
The datatype denoting a string corresponding to a range of logical ports.
The regular expressions used in the following two data types are provisional. The group would welcome feedback on this, particularly on developing a regular expression for an IPv6 address.
ip
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:ip
Base: xsd:string
Pattern value restriction: (((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5]))|((([\da-fA-F]{1,4})|(\:))\:){7}(([\da-fA-F]{1,4})|(\:))))
The datatype denoting a string corresponding to a IPv4 or IPv6 address.
cidr
Atomic Datatype
Type: xsd:simpleType
Name: wdrd:cidr
Base: xsd:string
Pattern value restriction: (((([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}([1-9]?\d|1\d{2}|2[0-4]\d|25[0-5])\/(\d|[1-2]\d|3[0-2]))|((([\da-fA-F]{0,4})|(\:))\:){7}(([\da-fA-F]{0,4})|(\:)))\/([1-9]?\d|1[01]\d|12[0-8])))
stringList
The datatype denoting a space-separated list of strings. This is used for POWDER vocabulary properties having as range a space-separated list of generic strings.
uriList
The datatype denoting a space-separated list of URIs.
uriSchemeList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriSchemeList
Item: wdrd:uriScheme
Range datatype for wdr:includeSchemes wdr:excludeSchemes
The datatype denoting a space-separated list of URI schemes.
uriUserInfoList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriUserInfoList
Item: wdrd:uriUserInfo
Range datatype for wdr:includeUsers wdr:excludeUsers
The datatype denoting a space-separated list of URI userInfos.
uriHostList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriHostList
Item: wdrd:uriHost
Range datatype for wdr:includeHosts wdr:excludeHosts
The datatype denoting a space-separated list of URI hosts.
uriPortList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriPortList
Item: wdrd:uriPort
Range datatype for wdr:includePorts wdr:excludePorts
The datatype denoting a space-separated list of URI ports.
uriPathList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriPathList
Item: wdrd:uriPath
Range datatype for wdr:includeExactPaths wdr:excludeExactPaths wdr:includePathContains wdr:excludePathContains wdr:includePathStartsWith wdr:excludePathStartsWith wdr:includePathEndsWith wdr:excludePathEndsWith
The datatype denoting a space-separated list of URI paths.
uriQueryList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriQueryList
Item: wdrd:uriQuery
Range datatype for wdr:includeExactQueries wdr:excludeExactQueries wdr:includeQueryContains wdr:excludeQueryContains
The datatype denoting a space-separated list of URI queries.
uriFragmentList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriFragmentList
Item: wdrd:uriFragment
Range datatype for wdr:includeFragments wdr:excludeFragments
The datatype denoting a space-separated list of URI fragments.
uriPortRangeList
List Datatype
Type: xsd:simpleType
Name: wdrd:uriPortRangeList
Item: wdrd:uriPortRange
Range datatype for wdr:includeRanges wdr:excludePortRanges
The datatype denoting a space-separated list of logical port ranges.
ipList
List Datatype
Type: xsd:simpleType
Name: wdrd:ipList
Item: wdrd:ip
Range datatype for wdr:includeIPs wdr:excludeIPs
The datatype denoting a space-separated list of IP addresses.
cidrList
List Datatype
Type: xsd:simpleType
Name: wdrd:cidrList
Item: wdrd:cidr
Range datatype for wdr:includeIpRanges wdr:excludeIpRanges
The datatype denoting a space-separated list of CIDR blocks.
Complex Types
Description Resource
A complex type will defined for easy validation of a Description Resource when serialized in XML.
Acknowledgements
The editors duly acknowledge contributions made by all members of the POWDER Working Group.
References
- [GROUP]
- Protocol for Web Description Resources (POWDER): Grouping of Resources, A Perego, P Archer. This document is at http://www.w3.org/TR/powder-grouping/
- [DR]
- Protocol for Web Description Resources (POWDER): Description Resources, K Smith, P Archer. This document is at http://www.w3.org/TR/powder-dr/


Deployed Web Application is hosted on Heroku with real time web app monitoring.
Projects:
Synopsis: The essence of this project is to create an intelligent app to gather and real-time tweets from Twitter and dispay them for the user to view.It has a search box that is connected using Twitter API and rails as its framework. In the process while I learn how to use new ruby gems with my application. This Web app is hosted on the free tier plaform of Heroku called Wayne.


The good thing about JavaScript is that you can change anyhthing in a breeze. Try to change the text here by clicking the button below.


Note
Click here to download the full example code
1.6.1. Implementing an anti-aliasing technique with a model¶
When performing nonlinear computations on discrete grids, it is important to choose the time window and the number of sample points large enough to prevent aliasing errors [B2001]. This example demonstrates how to implement an anti-aliasing technique directly with a model.
For a nonlinearity of order three, as for the cubic Kerr nonlinearity, an easy anti-aliasing procedure is to extend the spectrum by a factor of two and to proceed by zero-padding [HCL2008] [FCGK2005]. Therefore, in each step, after the nonlinear term is evaluated in the time domain and transformed to the Fourier domain, the upper half of the spectrum is set to zero.
Here, the symmetric split-step Fourier method is used and the propagation of a fourth-order soliton is considered.
We first import the functionality needed to perform the sequence of numerical experiments:
import sys; sys.path.append('../../')
import numpy as np
import numpy.fft as nfft
from fmas.models import ModelBaseClass
from fmas.config import FTFREQ, FT, IFT, C0
from fmas.solver import SySSM
from fmas.grid import Grid
from fmas.tools import plot_evolution
Next, we implement a model for the nonlinear Schrödinger equation. In particular, we here consider the standard nonlinear Schrödinger equation, given by
wherein \(u = u(z, t)\) represents the slowly varying pulse envelope, \(\beta_2=-1\) is the second order dispersion parameter, and \(\gamma=1\) is the nonlinear parameter. As discussed above, we here implement a simple technique allowing to compute the nonlinear term free of aliasing errors.
class NSE(ModelBaseClass):
def __init__(self, w, b2 = -1.0, gamma = 1.):
super().__init__(w, 0.5*b2*w*w)
self.gamma = gamma
# ANTI-ALIASING FILTER SETTING UPPER HALF OF SPECTRUM TO ZERO
self._de_alias = lambda uw: np.where(np.abs(w) < 0.5 * w.max(), uw, 0j)
@property
def Lw(self):
return 1j*self.beta_w
def Nw(self, uw):
ut = IFT(uw)
return self._de_alias(1j*self.gamma*FT(np.abs(ut)**2*ut))
Next, we initialize the computational domain and use a symmetric split-step Fourier method to propagate a single third-order soliton for six soliton periods. For this numerical experiment, the extend of the time domain and the number of sample points is chosen large enough to allow for a zero padding anti-aliasing technique without cropping important parts of the spectrum.
grid = Grid( t_max = 34., t_num = 2**12)
t, w = grid.t, grid.w
model = NSE(w, b2=-1., gamma=1.)
u_0t = 4./np.cosh(t)
solver = SySSM(model.Lw, model.Nw)
solver.set_initial_condition(w, FT(u_0t))
solver.propagate(z_range = 3*np.pi/2, n_steps = 10000, n_skip = 50)
z, utz = solver.z_, solver.utz
plot_evolution( solver.z, grid.t, solver.utz,
t_lim = (-5,5), w_lim = (-60,60), DO_T_LOG=False)
References:
- B2001
J.P. Boyd, Chebychev and Fourier Spectral Methods, Dover, New York (2001)
- HCL2008
H. Holmas, D. Clamond, H.P. Langtangen, A pseudospectral Fourier method for a 1D incompressible two-fluid model, Int. J. Numer. Meth. Fluids 58 (2008) 639, https://doi.org/10.1002/fld.1772
- FCGK2005
D. Fuctus, D. Clamond, J. Grue, O. Kristiansen, An efficient model for three-dimensional surface wave simulations Part I: Free space problems, J. Comp. Phys. 205 (2005) 665, https://doi.org/10.1016/j.jcp.2004.11.027
Total running time of the script: ( 0 minutes 9.406 seconds)


Document {{uri}} was not found.
An error occurred when fetching the metadata for this document. As a result, this document's metadata is not displayed.


any text
any height
any content, for example generated from DB
everything is vertically centered
another div
any text
any height
any content, for example generated from DB
everything is vertically centered
another div


Judges 11:22
And they possessed all the coasts of the Amorites, from Arnon even unto Jabbok, and from the wilderness even unto Jordan.


<foreign>
The <foreign>
element allows the introduction of non-DITA content, for
example, MathML, SVG, or Rich Text Format (RTF). The <foreign>
element
or a specialization may contain more than one type of non-DITA content or a mix of DITA and
non-DITA content. Specialization of the <foreign>
element generally is
implemented as a domain, but architects looking for more control over the content may
implement foreign vocabularies as structural specializations.
Category: Specialization elements


Pros
Amazing Performance
Free For 1 Month
Unlimited Storage Space
Cons
No Phone Support
Complicated UI
Check Latest Price Here