With the help of West Wind's wwDotNetBridge, you can easily have access .NET code within a VFP program.
The white paper has all the details, but this concise example will help illustrate the basic steps to running a method in a .NET assembly.
Note that wwDotNetBridge can directly access simple pro...
Startup.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.E...
Create a new folder called MyClasses and create and add the following class
public class GmailEmailService:SmtpClient
{
// Gmail user-name
public string UserName { get; set; }
public GmailEmailService() :
base(ConfigurationManager.AppSettings["GmailHost"], Int32.Parse...
Let's say you use Webpack for front end bundling. You can add webpack-dev-middleware to serve your statics through tiny and fast server. It allows you to automatically reload your assets when content has changed, serve statics in memory without continuously writing intermediate versions on disk.
Pr...
You can use aspnetcore-spa generator for Yeoman to create brand-new single page application with asp.net core.
This allows you to choose one of the popular front end frameworks and generates project with webpack, dev server, hot module replacement and server-side rendering features.
Just run
npm ...
public class NetworkConnection : IDisposable
{
string _networkName;
public NetworkConnection(string networkName,
NetworkCredential credentials)
{
_networkName = networkName;
var netResource = new NetResource()
{...
Pipes supports simple binary communication between a client and a server
In this example:
a client connects and sends a FirstMessage
the server receives and answers DoSomething 0
the client receives and answers DoNothing
step 2 and 3 are repeated indefinitely
The command data type exchange...
Storyboard:
Initial viewController: an empty viewController with a button to present the GameViewController
GameViewController: the typical GameViewController of the "Hello World" Sprite-kit template.
Goal: I want to present the first viewController from my SKScene game with the corre...
You can configure your Linux (or macOS) system in order to tie in an identifier <hostname> to some other system's IP address in your network. You can configure it:
Systemwide. You should modify the /etc/hosts file. You just have to add to that file a new line containing:
the remote sys...
This example shows how to embed some basic C# into a PowerShell script, add it to the runspace/session and utilise the code within PowerShell syntax.
$code = @"
Imports System
Namespace MyNameSpace
Public Class Responder
Public Shared Sub StaticRespond()
Console....
Let us create a simple Hello World console application and log something to the console using log4net. Once we have this running, we can scale it out to use it in real development scenarios in the following examples. Let's start small and build it up from there.
First, we need to create a simple Co...
If you want to use a podfile in more than one target, you can do like this.
You can choose the download address when you pod this lib.
def testpods
pod 'YSDPush', :git => 'https://github.com/youshaoduo/YSDPush.git'
end
target 'One' do
testpods
end
target 'Two' do
testpods
...
With any variadic function, the function must know how to interpret the variable arguments list.
The “traditional” approach (exemplified by printf) is to specify number of arguments up front. However, this is not always a good idea:
/* First argument specifies the number of parameters; the remaind...
in Startup.cs
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
services.AddMvc();
var controllerActivator = new CompositionRoot();
services...
When generating new Angular 2 components in a .NET Core project, you may run into the following errors (as of version 0.8.3):
Error locating module for declaration
SilentError: No module files found
OR
No app module found. Please add your new Class to your component.
Identica...
The goal of backpropagation is to optimize the weights so that the neural network can learn how to correctly map arbitrary inputs to outputs.
Each layer has its own set of weights, and these weights must be tuned to be able to accurately predict the right output given input.
A high level overview ...
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(80))
email = db.Column(db.String(120), unique=True)
posts = db.relationship('Post', backref='user')
class Post(db.Model):
id = db.Column(db.Integer,...