We are thrilled to announce that Orchard Core RC2 is now available.
What is Orchard Core?
Orchard Core Framework is a community-based application framework for building modular, multi-tenant applications on ASP.NET Core. It has been created by more than 150 contributors and has over 4K stars on GitHub.
Orchard Core also includes Orchard Core CMS, a Web Content Management System (CMS), that is built on top of the Orchard Core Framework. It allows you to build full websites, or headless websites using GraphQL.
Getting Started
Installing the templates
You can install the recommended templates by running:
dotnet new -i OrchardCore.ProjectTemplates::1.0.0-*
Creating a new modular application
Using the templates, a modular MVC application can be created by running:
dotnet new ocmvc -n MySite
And a module is created by running:
dotnet new ocmodulemvc -n MyModule
dotnet add MySite reference MyModule
Creating an Orchard CMS website
To create a new site based on the Orchard Core CMS run:
dotnet new occms -n MySite
dotnet run --project .\MySite\MySite.csproj
After going through the setup form you get a working Blog.
What’s new
Some notable improvements include:
Content localization support, and pre-configured localized Setup experience
Improved block content management experience
Sitemaps management
Azure support improvements
Resources
Development plan
The Orchard Core source code is available on GitHub.
There are still many important pieces to add and you might want to check our roadmap, but it’s also the best time to jump into the project and start contributing new modules, themes, improvements, or just ideas.
Feel free to drop on our dedicated Gitter chat and ask questions.
PSA: Apple Ending Sign-In Support For Fortnite, Epic Games Accounts
As of September 11, 2020 users will no longer be able to access their Epic Games accounts via Apple ID in the wake of their ongoing legal feud. If you're someone who was using an Apple ID to sign in to an Epic Games account, including for use in Fortnite, you need to update your email and password as soon as possible.
Detailed directions for how to do this can be found on Epic's site, but the gist is that you'll need to head over to your general settings with your Apple ID and change your email address to your most current, non-Apple ID one. It's going to be a similar process when it comes to setting up an Epic Games password. Visit the change your password page, login with your Apple ID and enter a new password.
It's going to be easiest to get this done before September 11, but if you don't do so in time there will still be hope. To reset your email after Apple support has ended, go to the Epic Games Contact Us page and follow the prompts. You'll also need to have the verification code Epic is sending out via an email with the subject "IMPORTANT! Epic Games account update required for continued access." The code looks like this: ABC-123-DEF.
Open Liberty Java runtime now available to Red Hat Runtimes subscribers
Open Liberty is a lightweight, production-ready Java runtime for containerizing and deploying microservices to the cloud, and is now available as part of a Red Hat Runtimes subscription. If you are a Red Hat Runtimes subscriber, you can write your Eclipse MicroProfile and Jakarta EE apps on Open Liberty and then run them in containers on Red Hat OpenShift, with commercial support from Red Hat and IBM.
Develop cloud-native Java microservices
Open Liberty is designed to provide a smooth developer experience with a one-second startup time, a low memory footprint, and our new dev mode:
Open Liberty provides a full implementation of MicroProfile 3 and Jakarta EE 8. MicroProfile is a collaborative project between multiple vendors (including Red Hat and IBM) and the Java community that aims to optimize enterprise Java for writing microservices. With a four-week release schedule, Liberty usually has the latest MicroProfile release available soon after the spec is published.
Also, Open Liberty is supported in common developer tools, including VS Code, Eclipse, Maven, and Gradle. Server configuration (e.g., adding or removing a capability, or “feature,” to your app) is through an XML file. Open Liberty’s zero migration policy means that you can focus on what’s important (writing your app!) and not have to worry about APIs changing under you.
Deploy in containers to any cloud
When you’re ready to deploy your app, you can just containerize it and deploy it to OpenShift. The zero migration principle means that new versions of Open Liberty features will not break your app, and you can control which version of the feature your app uses.
Monitoring live microservices is enabled by MicroProfile Metrics, Health, and OpenTracing, which add observability to your apps. The emitted metrics from your apps and from the Open Liberty runtime can be consolidated using Prometheus and presented in Grafana.
Learn with the Open Liberty developer guides
Our Open Liberty developer guides are available with runnable code and explanations to help you learn how to write microservices with MicroProfile and Jakarta EE, and then to deploy them to Red Hat OpenShift.
A lambda function allows you to define a function in a single line. It starts with the keyword lambda, followed by a comma-separated list of zero or more arguments, followed by the colon and the return expression. For example, lambda x, y: x+y calculates the sum of the two argument values x+y in one line of Python code.
Problem: How to define a function in a single line of Python code?
Example: Say, you’ve got the following function in three lines. How to compress them into a single line of Python code?
def say_hi(*friends): for friend in friends: print('hi', friend) friends = ['Alice', 'Bob', 'Ann']
say_hi(*friends)
The code defines a function say_hi that takes an iterable as input—the names of your friends—and prints 'hi x' for each element x in your iterable.
The output is:
'''
hi Alice
hi Bob
hi Ann '''
Let’s dive into the different methods to accomplish this! First, here’s a quick interactive overview to test the waters:
Exercise: Run the code—is the output the same for all four methods?
Next, you’ll learn about each method in greater detail!
A lambda function is an anonymous function in Python. It starts with the keyword lambda, followed by a comma-separated list of zero or more arguments, followed by the colon and the return expression. For example, lambda x, y, z: x+y+z would calculate the sum of the three argument values x+y+z.
friends = ['Alice', 'Bob', 'Ann'] # Method 1: Lambda Function
hi = lambda lst: [print('hi', x) for x in lst]
In the example, you want to print a string for each element in an iterable—but the lambda function only returns an object. Thus, we return a dummy object: a list of None objects. The only purpose of creating this list is to execute the print() function repeatedly, for each element in the friends list.
You obtain the following output:
hi(friends) '''
hi Alice
hi Bob
hi Ann '''
Method 2: Function Definition
A similar idea is employed in this one-liner example—but instead of using a lambda function, we define a regular function and simply skip the newline. This is possible if the function body has only one expression:
friends = ['Alice', 'Bob', 'Ann'] # Method 2: Function Definition
def hi(lst): [print('hi', x) for x in lst]
The output is the same as before:
hi(friends) '''
hi Alice
hi Bob
hi Ann '''
This approach is more Pythonic than the first one because there’s no throw-away return value and it’s more concise.
To make a Python one-liner out of any multi-line Python script, replace the new lines with a new line character '\n' and pass the result into the exec(...) function. You can run this script from the outside (command line, shell, terminal) by using the command python -c "exec(...)".
We can apply this technique to the first example code snippet (the multi-line function definition) and rename the variables to make it more concise:
friends = ['Alice', 'Bob', 'Ann'] # Method 3: exec()
exec("def hi(*lst):\n for x in lst:\n print('hi', x)\nhi(*friends)")
If you run the code, you’ll see the same output as before:
hi(friends) '''
hi Alice
hi Bob
hi Ann '''
This is very hard to read—our brain cannot grasp the whitespaces and newline characters easily. But I still wanted to include this method here because it shows how you or anyone else can compress complicated algorithms in a single line of Python code!
Watch the video if you want to learn more details about this technique:
Python One-Liners Book
Python programmers will improve their computer science skills with these useful one-liners.
Python One-Linerswill teach you how to read and write “one-liners”: concise statements of useful functionality packed into a single line of code. You’ll learn how to systematically unpack and understand any line of Python code, and write eloquent, powerfully compressed Python like an expert.
The book’s five chapters cover tips and tricks, regular expressions, machine learning, core data science topics, and useful algorithms. Detailed explanations of one-liners introduce key computer science concepts and boost your coding and analytical skills. You’ll learn about advanced Python features such as list comprehension, slicing, lambda functions, regular expressions, map and reduce functions, and slice assignments. You’ll also learn how to:
• Leverage data structures to solve real-world problems, like using Boolean indexing to find cities with above-average pollution • Use NumPy basics such as array, shape, axis, type, broadcasting, advanced indexing, slicing, sorting, searching, aggregating, and statistics • Calculate basic statistics of multidimensional data arrays and the K-Means algorithms for unsupervised learning • Create more advanced regular expressions using grouping and named groups, negative lookaheads, escaped characters, whitespaces, character sets (and negative characters sets), and greedy/nongreedy operators • Understand a wide range of computer science topics, including anagrams, palindromes, supersets, permutations, factorials, prime numbers, Fibonacci numbers, obfuscation, searching, and algorithmic sorting
By the end of the book, you’ll know how to write Python at its most refined, and create concise, beautiful pieces of “Python art” in merely a single line.
If you have to come this article now with an intention to migrate your website from PHP 5.6 to PHP 7, first please be aware. Your time is already over. This is too late. Somehow you should get this done now. Do not postpone this work beyond this moment.
This is an overwhelming task. We never know what will break. For now things are running smooth with the website. If we migrate the version to PHP 7, we do not know if it will run or not. So everybody keeps postponing this sensitive task.
Fear not, I will guide you through this migration journey. I have done it for many shopping cart, financial domain and critical websites. I have sound experience doing this and you can bank on me. I will present you my experience doing these migrations.
Upgrading the setup or development or server environment to PHP 7
I will guide you for the migration of the PHP application or website only. Upgrading the server environment like Apache version or the installed PHP version can be dealt with another article. It is a sysadmin thing.
If you are on a shared web hosting server, you will have an option in your control panel. It should be a single click easy work. Otherwise your hosting provider will do it for you. You may have to raise a ticket to get it done. Unless if you are in a dedicated server environment, you need not worry about.
Whatsoever, migration of the website or the PHP application should be done by you. It is not in the hosting provider or sysadmin’s scope. It should be done by the PHP developer.
PHP versions, support and EOL
Why now? What is the necessity to migrate PHP 5.6 to PHP 7 now? Before going into why, you should know about the PHP versions, their support duration and EOL details. It will give you the answers.
PHP 5.6 version active releases ended in early 2017 and reached its end of life (EOL) by 2018 end. That was once upon a time and long long ago. After PHP 5.6, we had PHP 7.0, 7.1, … and the current live version is 7.4
My longtime client recently forward an email he got from his hosting provider. His website is hosted with a popular shared hosting server.
The hosting provider has given ten days time to upgrade from PHP 5.6 to PHP 7.2 Even they have asked to migrate PHP 7.0 and PHP 7.1 to PHP 7.2 If the upgrade is not done within the given time frame, the hosting provider will upgrade the PHP version to 7.2 themselves.
This timeframe is to allow migrate the website to be compatible with 7.2. The control panel allows to change the PHP versions back and forth.
If you are in a shared hosting server environment, you will be forced to migrate anytime soon. You better make the move yourself, so that you can plan and execute at your convenience.
Security
If there is one reason that stands on top of everything is security. There are many vulnerabilities that are being exposed to public daily. When there is a known vulnerability, PHP team will release a fix.
But if the PHP version has reached it EOL, then there will not be a release. Your website will stand exposed inviting the hackers. So it is important to migrate your website to a PHP version that is being supported. Upgrade your old PHP now!
Performance
There are numerous studies published and circulated widely. PHP 7 has, “100%+ performance gain on most real-world applications” says Rasmus Lerdorf (Ref: http://talks.php.net/fluent15#/php7) This is from his slides from PHP 7 talk at fluentconf. The good performance due to low latency is widely acknowledged.
So how does good performance help your website? For one second lag, you will loose a minimum of 10% visitors. Search engines give priority to fast loading websites. Are these two reasons not enough?
As published by Christian Vigh, PHP 7 is faster by a whooping 400% than PHP 5.2
Developers should be armed with good set of tools. When the language gives a good set of features, that enables the developer to produce a good product. Following are some of the features that are available in PHP 7.
The null coalescing operator
Return and scalar type declarations
Anonymous Classes
Zero cost asserts
Typed properties 2.0
Preloading
Null coalescing assignment operator
Improve openssl_random_pseudo_bytes
Weak references
New custom object serialization mechanism
Password hash registry
Covariant returns and contravariant parameters
Spread operator in array expression
Multi-catch exceptions
Keys usable in lists
Backwards compatibility
This is the key thing to focus on website migration. You might have used a feature that is available only in the lower version and removed in the newer version. Here is a list of backward incompatible changes between PHP 5.6 and PHP 7.0
set_exception_handler() is no longer guaranteed to receive Exception objects
Internal constructors always throw exceptions on failure
Parse errors throw ParseError
list() no longer assigns variables in reverse order
Empty list() assignments have been removed
list() cannot unpack strings
Array ordering when elements are automatically created during by reference assignments has changed
Parentheses around function arguments no longer affect behaviour
foreach no longer changes the internal array pointer and more changes.
Changes to Division By Zero and more integer handling changes.
Hexadecimal strings are no longer considered numeric and more string handling changes.
All ext/mysql functions and more list of functions removed.
New objects cannot be assigned by reference
Switch statements cannot have multiple default blocks
So you are going to move forward. Know about what you should not use going forward. If you have already used the deprecated features, then it is better to migrate them also. Here is a list the deprecated list.
PHP 4 style constructors
Static calls to non-static methods
password_hash() salt option
capture_session_meta SSL context option
ldap_sort() function is deprecated.
More list of changes to keep an eye on
Steps to do the PHP website migration
Backup your website, application, database, data in disk.
Check if your hosting provider or your environment will allow to rollback the PHP version. This will be helpful if in case you are stuck at some point.
Check the PHP compatibility for the respective version of the dependent vendor applications, plugins, modules and extensions.
Prepare a checklist for items to be changed for backwards incompatibility. Refer above for consolidated list.
Add the deprecated items to the checklist. Refer above for consolidated list.
Use a well equipped IDE. Detach the old dependent PHP library and then add the new to be migrated PHP library. The IDE will warn and show errors. I promise, this will be helpful. If you are a person using a plain texteditor, then now is the time to dump it.
That’s it! You should now be all set to use .NET 5 Preview 6.
What’s new?
Blazor WebAssembly template now included
The Blazor WebAssembly template is now included in the .NET 5 SDK along with the Blazor Server template. To create a Blazor WebAssembly project, simply run dotnet new blazorwasm.
JSON extension methods for HttpRequest and HttpResponse
You can now easily read and write JSON data from an HttpRequest and HttpResponse using the new ReadFromJsonAsync and WriteAsJsonAsync extension methods. These extension methods use the System.Text.Json serializer to handle the JSON data. You can also check if a request has a JSON content type using the new HasJsonContentType extension method.
The JSON extension methods can be combined with endpoint routing to create JSON APIs in a style of programming we call “route to code”. It is a new option for developers who want to create basic JSON APIs in a lightweight way. For example, a web app that has only a handful of endpoints might choose to use route to code rather than the full functionality of ASP.NET Core MVC.
endpoints.MapGet("/weather/{city:alpha}", async context =>
{ var city = (string)context.Request.RouteValues["city"]; var weather = GetFromDatabase(city); await context.Response.WriteAsJsonAsync(weather);
});
Custom handling of authorization failures is now easier with the new IAuthorizationMiddlewareResultHandler interface that is invoked by the AuthorizationMiddleware. The default implementation remains the same, but a custom handler can be be registered in DI which allows things like custom HTTP responses based on why authorization failed. A sample that demonstrates usage of the IAuthorizationMiddlewareResultHandler can be found here.
SignalR Hub filters
Hub filters, called Hub pipelines in ASP.NET SignalR, is a feature that allows you to run code before and after Hub methods are called, similar to how middleware lets you run code before and after an HTTP request. Common uses include logging, error handling, and argument validation.
You can read more about this Hub filters on the docs page.
Give feedback
We hope you enjoy this release of ASP.NET Core in .NET 5! We are eager to hear about your experiences with this latest .NET 5 release. Let us know what you think by filing issues on GitHub.
We’re Getting A New Pocky & Rocky Game On Nintendo Switch
Taito and Natsume Atari have just announced that a new entry in the KiKi KaiKai series (known as Pocky & Rocky in the west) is coming to Switch.
According to Weekly Famitsu, KiKi KaiKai: Kuro Mantle no Nazo (that’s a tentative title) is being developed by Tengo Project, a team within Natsume Atari which is formed of staff who worked on the 1992 SNES title KiKi KaiKai: Nazo no Kuro Mantle, including Toshiyasu Miyabe.
Miyabe had this to say about the announcement:
We started work on a sequel with the thought that if we didn’t respond to requests for a remake now, we wouldn’t have the chance in the future considering the staff’s age. While you may think it’s a remake, it’s a completely new title. It’s loaded with new elements.
The KiKi KaiKai series began life in arcades in 1986. The aforementioned SNES title gave the franchise global fame and would inspire a 16-bit sequel called KiKi KaiKai: Tsukiyo Soushi (Pocky & Rocky 2 in the west) as well as a Game Boy Advance entry called KiKi KaiKai Advance (Pocky & Rocky with Becky).
Welcome to this edition in our series of Stasis spotlight
articles where we’re examining Stasis via each of the three Guardian classes in Destiny 2. Earlier in the series, we featured the Warlock Shadebinder and the Titan Behemoth. In this final article of
the series, we’re focusing on the Hunter Revenant.
—
Finding the Fantasy
One of the most important parts of developing Stasis and its
accompanying Guardian subclasses has been in defining each of their fantasies. The
team has spent a great deal of time iterating each subclass, starting with the fantasy
that instantly summarizes the experience. In some cases, that comes with ease.
For example, the fantasy shorthand for the Warlock Shadebinder was established
early on as “ice wizard.” From that simple phrase, anyone could instantly
conjure the image in their mind of what it would be like to play as a
Stasis-powered Warlock in Beyond Light, summoning your Stasis staff and
unleashing dark energy to freeze opponents.
Other times the fantasy evolves over the course of many
discussions, iterations, and playtests. That was the case with the Hunter
Revenant subclass which went through many iterations before we aligned on the “ninja”
archetype. The result is an amazing Stasis experience that we can’t wait for Hunter
fans to try for themselves.
Early on we knew that the Hunter would embody the idea of
slowing the battle around them with their Stasis powers. That starts with
Withering Blade, the Hunter Revenant’s melee attack. The player throws a deadly
Stasis shuriken into the fight; it ricochets off surfaces and enemies, slowing
and damaging them along the way. Land two shuriken on the same target and that
enemy will be instantly frozen.
When fully charged with ability energy, the Hunter Revenant
can unleash their deadly Super – Silence and Squall. Named after the pair of
Kama blades that the Hunter summons, this Super involves a two-pronged attack,
with each Kama blade having a different function. The first blade, when thrown,
immediately detonates on impact, freezing enemies in a radius from the center
of the blast. Hurl Squall, the second blade, and it will embed itself in a surface
(or an enemy) and then detonate, creating a Stasis storm that will track nearby
enemies, slowing and damaging them as it makes contact.
As is the case with the Warlock Shadebinder and the Titan
Behemoth, players using the Hunter Revenant will also be able to customize
their Stasis powers over time using Aspect and Fragment slots (check out our Warlock Shadebinder article for more detail on how Aspects and
Fragments will work), including, for example, a Hunter-specific Slow Dodge Aspect
that will allow the Revenant to temporarily slow nearby enemies each time they perform
a dodge.
Things That Go Boom
Apart from the intrinsic Stasis abilities that will be a
part of each subclass, all Guardian classes using Stasis will have their choice
of a variety of Stasis grenades to use in combat:
Glacier Grenade – Upon contact with the ground, a
wall of Stasis crystals instantly burst from the earth and nearby enemies are
frozen inside Stasis crystal. These grenades have multiple uses – from encasing
enemies to creating cover. When destroyed, the crystals will create
AoE burst damage to nearby enemies.
Coldsnap Grenade – Upon impact with the ground or an
enemy, this grenade unleashes a wave of Stasis energy that races along the
ground in the direction of the closest nearby enemy, freezing them and then
searching out the next nearby foe. You can freeze up to three enemies with a
single Coldsnap Grenade.
Duskfield Grenade – Duskfield Grenades create
powerful Stasis fields that suck enemies into them when forming. Once an enemy
is caught inside, they will be slowed and, if unable to make it out in time, frozen
in place.
All three of these grenade abilities show the potential
of Stasis to change the way you fight in Beyond Light. Slowing and
freezing enemies have obvious advantages, and we’ve put a lot of effort into
thinking about how Stasis affects combat in both PvE and PvP situations,
including things like how often you can freeze a foe and how long those freeze
durations last.
The ability to create new geometry with Stasis is also an
exciting new addition. With a well-timed Glacier Grenade, you can now create
Stasis crystal formations that can perform double duty as platforms. Players
are going to use this new power – be it in the form of a grenade or a Super –
to gain easier access to tough-to-reach areas, create new lines of sight, and even
do things that we could never predict.
Wielding Stasis is going to be an unprecedented change to Destiny
2. This is a new take on elemental power, where the path to victory is
found through controlling the enemy and the pace of the fight instead of
through brute force and damage. With Aspects and Fragments, we’re also giving
players a new level of control over how they customize their Stasis experience.
Have you been keeping up to date on the latest combat news? There are some more changes and adjustments since the last Combat Test Snapshot was released. Be sure to let Mojang Studio’s know your thoughts and suggestions as they continue to develop these changes.
Redesigned aim assist again. A different approach this time, NO LESS CONTROVERSIAL!
Removed “Coyote Time”
Entities with bounding boxes that are smaller than 0.9 of a block are inflated (for targeting purposes) to be 0.9 of a block (rabbits, bats, etc)
Swords always have sweeping attacks again, axes have it with the Sweeping enchantment
Missing now only puts a 4 tick delay until the next attack regardless of weapon.
Increased base reach to 3 (was 2.5) and removed bonus reach for delayed attacks
Changes to shields:
Shields now only protect up to 5 damage for melee attacks (still 100% against projectiles)
Shields recover faster after an attack
Changes to axes:
Renamed Chopping to Cleaving
Removed other weapon enchantments from the enchanting table. The axes simply had too many possible enchantments. It also feels a little bit fitting with a rare Cleaving enchantment than a common Sharpness enchantment for axes
Changes to bows / projectiles:
Player momentum is added to thrown projectiles, but only in the direction you are aiming
Bow and arrow accuracy now slowly decreases the longer you pull the bow
Changes to food and hunger:
Reverted eating time to 32 ticks
Eating is now interrupted if something hits you
Natural healing is even faster (2 seconds, was 3 seconds)
Natural healing drains food 50% slower
By popular request – Reintroduced the rule that sprinting requires more than 6 points of food
Other changes:
Removed the attack indicator completely since it is no longer used by any systems
Fixed knockback calculation
Fixed damage value on items being off-by-one client-side
Fixed bug that caused players to be unable to attack/interract after respawning
Nerfed Sweeping Edge enchantment to 25/33/37.5 percent (was 50/66/75%)