How to do client-side UI events in Blazor
I just started playing around with Blazor and I can already see the great potential of this new framework. I'm wondering, though, how it will handle doing simple things like setting focus on an input...
- Modified
- 13 Mar at 00:56
Difference between Marshal.SizeOf and sizeof
Until now I have just taken for granted that Marshal.SizeOf is the right way to compute the memory size of a blittable struct on the unmanaged heap (which seems to be the consensus here on SO and almo...
When same-named namespaces exist (in current scope), how to refer any of them?
I have: ``` namespace Book { ... } ... ... namespace Company { public class Book { } ... ... ... ... ... ... public class MyBook : Book.smth ...
- Modified
- 27 Mar at 07:48
Flutter get context in initState method
I'm not sure if the `initState` is the right function for this. What I'm trying to achieve is to check when the page is rendered to perform some checks and based on them opening a `AlertDialog` to mak...
ASP.NET Core WebAPI Cookie + JWT Authentication
we have a SPA (Angular) with API backend (ASP.NET Core WebAPI): SPA is listens on `app.mydomain.com`, API on `app.mydomain.com/API` We use JWT for Authentication with built-in `Microsoft.AspNetCore....
- Modified
- 23 Mar at 18:8
Call F# function from C# passing function as a parameter
I have the following F# function ``` let Fetch logger id = logger "string1" "string2" // search a database with the id and return a result ``` In my C# class I want to call the F# functio...
Dynamic HeightRequest not working for StackLayout
In my XAML I have this StackLayout: ``` <StackLayout x:Name="FooterWrapper" Spacing="0" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" ...
- Modified
- 14 Nov at 19:26
How to specify "namespace" and "conformsto" attribute to APIs for services developed using ServiceStack?
We are currently in process of converting our legacy web services (asmx) into REST APIs layer developed using ServiceStack platform. There exists a few Web services having the namespace and Binding C...
- Modified
- 23 Mar at 05:23
Round button with text and icon in flutter
how to have a button with text and icon for the `flutter`? I wanted to have a `button` which looks like icon with a text that is able to put at the bottom of the screen For example, the icon is like...
Could not load file or assembly System.Data.SqlClient, Version=4.2.0.2 when I use System.Data.SqlClient Version 4.4.3
I use System.Data.SqlClient Version 4.4.3 for all .NET Standard 2.0 class libraries in my ASP.NET Core 2.0 project. Why do I get > > Could not load file or assembly 'System.Data.SqlClient, Version=4...
- Modified
- 22 Mar at 22:3
how to test if a variable is pd.NaT?
I'm trying to test if one of my variables is pd.NaT. I know it is NaT, and still it won't pass the test. As an example, the following code prints nothing : ``` a=pd.NaT if a == pd.NaT: print("a ...
- Modified
- 25 Nov at 20:31
How do I initialize weights in PyTorch?
How do I initialize weights and biases of a network (via e.g. He or Xavier initialization)?
- Modified
- 29 Jul at 07:13
Converting a POSTMAN request to Curl
I am calling my java webservice (POST request) via POSTMAN in the following manner which works perfectly fine (i.e. I can see my records getting inserted into the database): [](https://i.stack.imgur.c...
Project file is incomplete. Expected imports are missing
After format my computer I reinstalled Vs 2017 V 15.6.3 and install ASP.Net Core SDK from Microsoft 2.1.4 But when I create new asp core application VS failed with error > "Project file is incomplet...
- Modified
- 9 Apr at 13:40
await is only valid in async function
I wrote this code in `lib/helper.js`: ``` var myfunction = async function(x,y) { .... return [variableA, variableB] } exports.myfunction = myfunction; ``` Then I tried to use it in another file...
- Modified
- 9 Jul at 11:37
How to represent Guid in typescript?
let's say I have this C# class ``` public class Product { public Guid Id { get; set; } public string ProductName { get; set; } public Decimal Price { get; set; } public int Level { get; s...
- Modified
- 22 Mar at 15:18
TS2531: Object is possibly 'null'
I have the following function:- ``` uploadPhoto() { var nativeElement: HTMLInputElement = this.fileInput.nativeElement; this.photoService.upload(this.vehicleId, nativeElement.files[0]) ...
- Modified
- 22 Mar at 14:58
Dotnet build fails when project includes foreign language resources
I am using Visual Studio 15.6.3, dotnet SDK 2.1.102. Recently, (maybe after an update) I tracked down a dotnet build bug that is showing up to a project that includes foreign language resources. The ...
- Modified
- 15 May at 09:2
Why does .NET Core 2.0 perform worse than .NET Framework 4.6.1
I've wrote a program that creates 4 threads which each sort 20.000 numbers from low to high 50 times. I've runned this test several times on .NET Core 2.0 and .NET Framework 4.6.1. In this test .NET F...
Fastest way to solve chain-calculations
I have a input like ``` string input = "14 + 2 * 32 / 60 + 43 - 7 + 3 - 1 + 0 * 7 + 87 - 32 / 34"; // up to 10MB string size int result = Calc(input); // 11 ``` - - - `14 + 2 * 32``512`- `+-*/`- ...
- Modified
- 22 Mar at 13:30
Programmatically create service bus subscription using .net standard
My scenario: Website hosted on the cloud, where each instance creates a subscription to a Service Bus Topic for itself to listen for messages. My question:
- Modified
- 21 May at 10:44
Flutter: how to prevent device orientation changes and force portrait?
I would like to prevent my application from changing its orientation and force the layout to stick to "portrait". In the main.dart, I put: ``` void main(){ SystemChrome.setPreferredOrientations([ ...
- Modified
- 26 Dec at 09:42
Why am I getting error "The type 'IReturn<>' is defined in an assembly that is not referenced" using ServiceStack in VIsualStudio 2017
I am running Visual Studio 2017 15.6.3. I have a .NET Standard 2.0 DLL project which contains Request and Response classes for use with ServiceStack. The Request classes implement IReturn<>. I have...
- Modified
- 22 Mar at 09:6
What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?
I'm trying to run `npm install` in the angular project folder I got from [ASP.NET Boilerplate](https://aspnetboilerplate.com/Pages/Documents/Zero/Startup-Template-Angular) and I'm getting an error tha...
- Modified
- 19 Nov at 13:59
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I'm trying to execute a [Python script](https://pastebin.com/jSjn1aaD), but I am getting the following error: ``` Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) ``` I'm usi...
- Modified
- 9 Oct at 12:35