All streams
Search
Write a publication
Pull to refresh

Development

Show first
Period
Level of difficulty

Upcoming SameSite Cookie Changes in ASP.NET and ASP.NET Core

Reading time5 min
Views3.9K
SameSite is a 2016 extension to HTTP cookies intended to mitigate cross site request forgery (CSRF). The original design was an opt-in feature which could be used by adding a new SameSite property to cookies. It had two values, Lax and Strict.

Setting the value to Lax indicated the cookie should be sent on navigation within the same site, or through GET navigation to your site from other sites. A value of Strict limited the cookie to requests which only originated from the same site. Not setting the property at all placed no restrictions on how the cookie flowed in requests. OpenIdConnect authentication operations (e.g. login, logout), and other features that send POST requests from an external site to the site requesting the operation, can use cookies for correlation and/or CSRF protection. These operations would need to opt-out of SameSite, by not setting the property at all, to ensure these cookies will be sent during their specialized request flows.

Google is now updating the standard and implementing their proposed changes in an upcoming version of Chrome. The change adds a new SameSite value, «None», and changes the default behavior to «Lax». This breaks OpenIdConnect logins, and potentially other features your web site may rely on, these features will have to use cookies whose SameSite property is set to a value of «None».

However browsers which adhere to the original standard and are unaware of the new value have a different behavior to browsers which use the new standard as the SameSite standard states that if a browser sees a value for SameSite it does not understand it should treat that value as «Strict». This means your .NET website will now have to add user agent sniffing to decide whether you send the new None value, or not send the attribute at all.

Read more →

Announcing Support for Native Editing of Jupyter Notebooks in VS Code

Reading time3 min
Views1.9K
With October release of the Python extension, we’re excited to announce the support of native editing of Jupyter notebooks inside Visual Studio Code! You can now directly edit .ipynb files and get the interactivity of Jupyter notebooks with all of the power of VS Code.

You can manage source control, open multiple files, and leverage productivity features like IntelliSense, Git integration, and multi-file management, offering a brand-new way for data scientists and developers to experiment and work with data efficiently. You can try out this experience today by downloading the latest version of the Python extension and creating/opening a Jupyter Notebook inside VS Code.



Since the initial release of our data science experience in VS Code, one of the top features that users have requested has been a more notebook-like layout to edit their Jupyter notebooks inside VS Code. In the rest of this post we’ll take a look at the new capabilities this offers.
Read more →

How to debug and profile any EXE with Visual Studio

Reading time3 min
Views5.7K
Have you ever needed to debug or profile an executable (.exe file) that you don’t have source for or can’t build? Then the least known Visual Studio project type, the EXE project, is for you!

In Visual Studio you can open any EXE as a ‘project’. Just go to File->Open->Project/Solution and browse to the .exe file. Like you would if it was a .sln file. Visual Studio will then open that EXE as a project. This feature has been around for a long time. It works on all currently supported Visual Studio versions and the docs for it are at  ‘Debug an app that isn’t part of a Visual Studio solution‘.

 
Read more →

Introducing Cascadia Code font

Reading time2 min
Views2K
Cascadia Code is finally here! You can install it directly from the GitHub repository’s releases page or automatically receive it in the next update of Windows Terminal.



Wait, what’s Cascadia Code?


Cascadia Code was announced this past May at Microsoft’s Build event. It is the latest monospaced font shipped from Microsoft and provides a fresh experience for command line experiences and code editors. Cascadia Code was developed hand-in-hand with the new Windows Terminal application. This font is most recommended to be used with terminal applications and text editors such as Visual Studio and Visual Studio Code.
Read more →

Tips And Tricks For Conducting A Successful Mobile App A/B Test

Reading time4 min
Views1.2K


As per the latest stats reveal, there are more than 2.7 billion smartphone users globally and over 2.8 million apps on Google Play Store.


Now, it's a fact that the number of mobile users is increasing at outstanding speed, and so is the name of apps on Google Play Store.


But does all the apps success to make a difference? No, but just a handful of having stood out and gain popularity.


For instance, there are several games on the Play Store, but why only Candy Crush, Subway Surfers and Angry Birds topped the charts while the other games struggle for even ten downloads.


The trick is to provide the players with what they want, and in turn, the response for such apps is tremendous.


However, at this point, when the competition is very high, it's challenging to come up with something new that can stand out from the crowd.


It's crucial to create a brand name so that people can talk about it.

Read more →

Building a Bare-Metal Application on Intel Cyclone V for Absolute Beginners

Reading time7 min
Views9.6K
Setting up Linux on the development board like SocKit with a double-core ARM Cortex A9 is not rocket science. A manufacturer of the board supports the ready-to-use image, appropriate for installing on SD card or another media. But what if you are craving to touch bare metal, approaching a neck-breaking speed of code not restrained by an OS core? Well, it is possible, but not so easy and obvious. In this short essay, I'll give you step-by-step instruction, how to build and run you first bare-metal application on Cyclone V SoC, that uses ARM Cortex A9 core of the HPS subsystem of the SoC.

You need to have the development board with Intel (Altera) Cyclone V SoC. I used SoCKit board:


Ready? Let's go!

How to Catch a Cat with TLA+

Reading time3 min
Views2K
Many programmers struggle when using formal methods to solve problems within their programs, as those methods, while effective, can be unreasonably complex. To understand why this happens, let’s use the model checking method to solve a relatively easy puzzle:

Conditions


You’re in a hallway with seven doors on one side leading to seven rooms. A cat is hiding in one of these rooms. Your task is to catch the cat. Opening a door takes one step. If you guess the correct door, you catch the cat. If you do not guess the correct door, the cat runs to the next room.
Read more →

Automatic respiratory organ segmentation

Reading time8 min
Views2.3K

Manual lung segmentation takes about 10 minutes and it requires a certain skill to get the same high-quality result as with automatic segmentation. Automatic segmentation takes about 15 seconds.


I assumed that without a neural network it would be possible to get an accuracy of no more than 70%. I also assumed, that morphological operations are only the preparation of an image for more complex algorithms. But as a result of processing of those, although few, 40 samples of tomographic data on hand, the algorithm segmented the lungs without errors. Moreover, after testing in the first five cases, the algorithm didn’t change significantly and correctly worked on the other 35 studies without changing the settings.


Also, neural networks have a disadvantage — for their training we need hundreds of training samples of lungs, which need to be marked up manually.


Read more →

Write Better Code Faster with Roslyn Analyzers

Reading time3 min
Views4.7K
Roslyn, the .NET compiler platform, helps you catch bugs even before you run your code. One example is Roslyn’s spellcheck analyzer that is built into Visual Studio. Let’s say you are creating a static method and misspelled the word static as statc. You will be able to see this spelling error before you run your code because Roslyn can produce warnings in your code as you type even before you’ve finished the line. In other words, you don’t have to build your code to find out that you made a mistake.



Roslyn analyzers can also surface an automatic code fix through the Visual Studio light bulb icon that allows you to fix your code immediately.

Read more →

Simplify Your Code With Rocket Science: C++20’s Spaceship Operator

Reading time8 min
Views2.3K
C++20 adds a new operator, affectionately dubbed the «spaceship» operator: <=>. There was a post awhile back by our very own Simon Brand detailing some information regarding this new operator along with some conceptual information about what it is and does. The goal of this post is to explore some concrete applications of this strange new operator and its associated counterpart, the operator== (yes it has been changed, for the better!), all while providing some guidelines for its use in everyday code.

Read more →

How AI, drones and cameras are keeping our roads and bridges safe

Reading time4 min
Views938
«It's a dangerous business, Frodo, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.»

― J.R.R. Tolkien, The Lord of the Rings

Europe’s roads are the safest in the world. Current figures show that there are 50 fatalities per one million inhabitants, compared to the global figure of 174 deaths per million. Despite this, each loss remains a tragedy. In 2017, 25,300 people lost their lives on European roads.

The cause of these accidents can vary from human error and weather conditions, to damaged structures and surfaces. While some things are beyond the realms of control, road and bridge conditions are a variable which can be governed.

As soon as a road is paved, a combination of traffic and weather conditions begin to degrade and erode the surface. Undetected cracks, abrasions or defects can quickly lead to bigger problems, such as costly repairs, major traffic delays, and in the worst cases, unsafe condition. These problems are also shared by bridges, particularly when concrete is critical in maintaining the integrity of the structure. The earlier faults are detected, the sooner they can be addressed, saving time and money, while minimising disruption. Ultimately, this helps ensure that the roads themselves are safer for those travelling on them.

The detection of these faults, however, can be very difficult to carry out manually, especially as early-forming cracks are hard to spot with the naked eye. Predicting where faults are likely to occur ahead of time so that appropriate measures can be taken in advance also possess a massive challenge. Thankfully, technology is here to help.

Read more →

Python in Visual Studio Code – June 2019 Release

Reading time2 min
Views2.4K
We are pleased to announce that the June 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. If you already have the Python extension installed, you can also get the latest update by restarting Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

In this release we made improvements that are listed in our changelog, closing a total of 70 issues including a plot viewer with the Python Interactive window, parallel tests with pytest, and indentation of run selection in the terminal.

Read more →

Just take a look at SObjectizer if you want to use Actors or CSP in your C++ project

Reading time21 min
Views3.7K


A few words about SObjectizer and its history


SObjectizer is a rather small C++ framework that simplifies the development of multithreaded applications. SObjectizer allows a developer to use approaches from Actor, Publish-Subscribe and Communicating Sequential Processes (CSP) models. It's an OpenSource project that is distributed under BSD-3-CLAUSE license.


SObjectizer has a long history. SObjectizer itself was born in 2002 as SObjectizer-4 project. But it was based on ideas from previous SCADA Objectizer that was developed between 1995 and 2000. SObjectizer-4 was open-sourced in 2006, but its evolution was stopped soon after that. A new version of SObjectizer with the name SObjectizer-5 was started in 2010 and was open-sourced in 2013. The evolution of SObjectizer-5 is still in progress and SObjectizer-5 has incorporated many new features since 2013.


SObjectizer is more or less known in the Russian segment of the Internet, but almost unknown outside of the exUSSR. It's because the SObjectizer was mainly used for local projects in exUSSR-countries and many articles, presentations, and talks about SObjectizer are in Russian.


A niche for SObjectizer and similar tools


Multithreading is used in Parallel computing as well as in Concurrent computing. But there is a big difference between Parallel and Concurrent computing. And, as a consequence, there are tools targeted Parallel computing, and there are tools for Concurrent computing, and they are different.

Read more →

The Data Structures of the Plasma Cash Blockchain's State

Reading time7 min
Views1.6K


Hello, dear Habr users! This article is about Web 3.0 — the decentralized Internet. Web 3.0 introduces the concept of decentralization as the foundation of the modern Internet. Many computer systems and networks require security and decentralization features to meet their needs. A distributed registry using blockchain technology provides efficient solutions for decentralization.
Read more →

Artificial neural networks explained in simple words

Reading time7 min
Views4.7K
image

When I used to start a conversation about neural networks over a bottle of beer, people were casting glances at me of what seemed to be fear; they grew sad, sometimes with their eyelid twitching. In rare cases, they were even eager to take refuge under the table. Why? These networks are simple and instinctive, actually. Yes, believe me, they are! Just let me prove this is true!


Suppose there are two things I’m aware of about the girl: she looks pretty to my taste or not, and I have lots to talk about with her or I haven’t. True and false will be one and zero respectively. We’ll take similar principle for appearance. The question is: “What girl I’ll fall in love with, and why?”


We also can think it straight and uncompromisingly: “If she looks pretty and there’s plenty to talk about, then I will fall in love. If neither is true, then I quit”.


But what if I like the lady but there’s nothing to talk about with her? Or vice versa?

Read more →

Microsoft Edge for macOS

Reading time3 min
Views2K

Last month, we announced the first preview builds of the next version of Microsoft Edge for Windows 10. Today, we are pleased to announce the availability of the Microsoft Edge Canary channel for macOS. You can now install preview builds from the Microsoft Edge Insider site for your macOS or Windows 10 PC, with more Windows version support coming soon.


Снимок экрана Microsoft Edge для macOS

Read more →