Please help Ukrainian armed forces! Official Fundraising

What is Universal Windows Platform?

1 1 1 1 1 What is Universal Windows Platform?5.00Rating 4.33 (3 Votes)

The UWP (Universal Windows Platform) is a unified platform for building and running apps on Windows 10 and Windows 10 Mobile.

UWP is the evolution of earlier technologies. So, with the release of Windows 8, a new architectural platform for applications was introduced - Windows Runtime (WinRT), which allowed running applications in the so-called Modern (Metro) mode on desktops and tablets. Then, with the release of Windows 8.1 and Windows Phone 8.1, this technology was developed - there were "universal applications" that could run immediately Windows 8.1 and WP8.1. And in July 2015, the new Windows 10 OS was officially released. It uses the UWP platform, which is an evolution of the Windows Runtime.

As the name of the platform suggests, it is universal - universal for all devices in the Windows 10 ecosystem. And these are ordinary destops, tablets, mobile devices, IoT (Internet of Things) devices, Xbox, Surface Hub devices. And a UWP app can work the same on all of these platforms as long as they have Windows 10 installed.

Read more: What is Universal Windows Platform?

WM_MOUSEMOVE message

1 1 1 1 1 WM_MOUSEMOVE message5.00Rating 5.00 (1 Vote)

The WM_MOUSEMOVE Message is posted to a window when the cursor moves. If the mouse is not currently captured, this message is posted to the window that contains the cursor. If the mouse is captured, the WM_MOUSEMOVE message is posted to the window that has captured the mouse. A window receives this message through the windows procedure function.

Read more: WM_MOUSEMOVE message

Using Ninject in C# ASP.NET MVC5 Projects

1 1 1 1 1 Using Ninject in C# ASP.NET MVC5 Projects5.00Rating 4.33 (3 Votes)

The IoC containers are used for dependency injection. There are many IoC containers, we use Ninject, as it is easy to use and understand. You can install the required package via NuGet. The package is called Ninject.MVC5

After installing the package, we can already use Ninject in the project. For example, let's change the constructor of the controller as follows:


using Ninject;
//.....................
public class HomeController : Controller
{
    IRepository repo;
    public HomeController()
    {
        IKernel ninjectKernel = new StandardKernel();
        ninjectKernel.Bind<IRepository>().To<BookRepository>();
        repo = ninjectKernel.Get<IRepository>();
 
    }
    public ActionResult Index()
    {
        return View(repo.List());
    }
}

Read more: Using Ninject in C# ASP.NET MVC5 Projects

Basic SQL Commands Every Developer Should Know

1 1 1 1 1 Basic SQL Commands Every Developer Should Know5.00Rating 4.05 (21 Votes)

The SQL or Structured Query Language (structured query language) is used to manage data in a relational database system (RDBMS). In this article, you will learn about frequently used SQL commands that every developer should know. This material is ideal for those who want to refresh their knowledge of SQL before a job interview. We will be using MySQL or MariaDB syntax in this article. But most of the commands are patform-independent and will work on SQL Server, PostgreSQL, SQLite, OracleDB and others. 

Read more: Basic SQL Commands Every Developer Should Know

How to Set Programmatic Breakpoint in JavaScript

1 1 1 1 1 How to Set Programmatic Breakpoint in JavaScript5.00Rating 5.00 (1 Vote)

Modern browsers hav vast debugging capabilities. They include variable watching, code un-minifying, regular and conditional JavaScript code breakpoints. If you want to set a breakpoint to code, you need to open browser debugging console, find the subject code line and then just press the button "Place breakpoint"

But what if you want to place breakpoint in code when you actually write the code? This is much easier when you write your own code, no need to locate the code line twice (in editor and in debugger), it is persistent and more clean.

So, to place progammatic breakpoint in your JavaScript code, just use the debugger instruction:

debugger;

If the JavaScript debugger is active (i.e. developer window is open), the browser will stop on this code line.

 

You can even place conditional breakpoints:

if (x==5) breakpoint;

The mentioned breakpoint will stop the debugger only if x can be equalized to 5. 

 

  

JavaScript Variables Scope

1 1 1 1 1 JavaScript Variables Scope5.00Rating 4.50 (2 Votes)

In JavaScript there are two types of variables scope:

  • Local scope
  • Global scope

Scope determines the accessibility (visibility) of these variables.

Global variables can be accessed from any function.

The example of variable created in global scope:

 var userName = "Alice";

// code can use userName 
function myFunction1() {
    // code here can also use userName 
}
function myFunction2() {
    // code here can also use userName 
    function myFunction3() {
        // code here can also use the same userName 
    }
}

 

Local variables can only be accessed from the function they are declared.

 

// code here can NOT see userName 
function myFunction() {
    var userName = "Bob";
    // code here CAN see and use userName 
}

 

Presentaion Remote Control Privacy Policy

1 1 1 1 1 Presentaion Remote Control Privacy Policy5.00Rating 5.00 (2 Votes)

Privacy Policy
Artem Moroz built the Presentation Remote Control app as an Ad Supported app. This SERVICE is provided by Artem Moroz at no cost and is intended for use as is.

This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Presentation Remote Control unless otherwise defined in this Privacy Policy.

Read more: Presentaion Remote Control Privacy Policy

How to fix PHP upload file inherit permissions error using Windows IIS Server

1 1 1 1 1 How to fix PHP upload file inherit permissions error using Windows IIS Server5.00Rating 5.00 (911 Votes)

If you’re like me, and you use Windows IIS, you’ve spent hours trying to figure out why your uploaded file won’t inherit the permissions needed to display correctly. Luckily, the answer is extremely easy and something most people would have never thought of.

The problem only happens when you use PHP to upload a file. When you upload a file, PHP sends the file to a temporary directory on the hard drive (for me it is C:\Windows\Temp) and then copies it over to it’s intended directory. Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions.

Read more: How to fix PHP upload file inherit permissions error using Windows IIS Server

How to unpack .tar.gz archive in Linux

1 1 1 1 1 How to unpack .tar.gz archive in Linux5.00Rating 5.00 (750 Votes)

.tar.gz archives are widely used in a GNU/Linux world because of love of the community to the patent freedom and open source formats. Usually, Linux distributions utilize tar.gz format for source code compression. When you begin familiarizing yourself with the Linux world, you quickly realize you need to know how to extract .tar.gz files in Linux. Actually, tar.gz archives are a a combination of two technologies chained one after another. First, all the files are merged in what is called a Tarball - just a single file plus file names information. Then, the Tarball is compressed with the use of gzip compression algorithm. 

So, how to actually extract the .tar.gz archive?

 

tar -xvf www1.tar.gz -C /var/www/website/

 

The above command will eventually extract the file www1.tar.gz residing in current directory to the folder /var/www/website/

Let's look at the details of this command:

x command means we want to extract the archive

v switch tells tar to verbosely output file names

f means we need to specify archive name (othewise tar will look into standard input)

 

As a bonus, you can extract .tar files or even .tar.bz2 files using the same command! Just specify the correct archive name and extension.

Now, you have mastered extracting tar.gz files. Good luck!

 

 

How to import large .sql file in MS SQL Server

1 1 1 1 1 How to import large .sql file in MS SQL Server5.00Rating 5.00 (721 Votes)

Sometimes you need to import large database into MS SQL Server, but when you use Microsoft SQL Server Management Studio, it doesn't do the job right, but shows the message "Insufficient memory". Or maybe you need to do a batch import of sql script to database instead of doing the import by hand. Here comes in handy the sqlcmd command line tool. It can import large .sql files, can be run from a batch script, installer, etc.

How to use sqlcmd command-line tool to import large .sql file?

Open a command prompt window.
In the Command Prompt window, type: sqlcmd -S yourServer\instanceName -i C:\yourScript.sql
Press ENTER.
The progress of operation is written to the command prompt window.

Source: Microsoft

Friday the 26th.