c%23's questions - English 1answer

7.728 c%23 questions.

I wrote code to extract the contour of a hole, based mostly on the Moore-Neighbor Tracing algorithm. Only a. instead of finding a shape, I'm finding a "hole"; and, b. I'm looking for the (outer) ...

Hi, the english not is my native lenguage, sorry my bad syntax. I want to make my own netflix in c # (Without using sql, only using dynamic memory). (Not the part of watching videos) I thought about ...

Create a project named BankAccountTester. Create a class named BankAccount. A bank account has fields for a balance. The bank account balance should be initialized to 0. The bank account class should ...

I want to know what is wrong with my approach because it feels like its far too simplistic, but I don't see what I'm missing. It works how I actually intended, but there may be something I'm missing ...

Poker server as a service

1 answers, 82 views c# .net
This is very simple poker server. Target is a REST server. In real poker you do not act until action is on you (well you are not supposed to). On a server it is nice to accept action (bet, call, ...

I have a class that loads locales from a database. I'm not sure if locale is the right word. It's basically loading texts for a game, generic sayings like alerts and error messages. I'm also not sure ...

I was asked to give more context. So here we go. We want to create some HTML in code behind to add an "add" and a "refresh" button to a grid view header column. Approach #1 does this using string ...

I implemented a resettable version of .NET Lazy (context: mostly to use it in a MemoryCache for auto refresh purposes on item expiration) This is a very naive implementation and I am pretty sure ...

For executing a Process I've created an separate class which binds the possibilities together, for example reading output, start as Admin, catch Exceptions and also start all this asynchronous. Are ...

I have a huge array that I want to group by by category and subcategory. A Book is contained in a shelve. A Shelve is contained in a Library. The output is a list of Library. I cannot change my Book ...

TCP/IP server which controls up to 500 clients. There's a list of added computers and the server gets this list, selects computers which are not already connected and ping them using host name. ...

...

So I'm writing a program that runs quite a few different tests. Which tests are ran varies based on which UI elements are selected by the user. For example, on one form I have 7 radio buttons and 6 ...

IPDaemon component from nsoftware. I haven't found good example of using this control. I'm developing socket server which can accept up to 500 clients connections each client can send a lot of ...

...

I have just started learning C# and decided to do some problems from Project Euler. I wrote a code to find 10 001st prime and I thought it would be cool optimize it to make it as fast as possible. How ...

So I was working on an ASP.Net-Core project where I need to send an Email to somebody. I've the account credentials configured via the ASP.Net options pattern. But ...

how can i read .csv file and save selected column in database. I am having a .csv file like this A, B, C, D 33, 32, 36, 33 67, 34, 37 ,33 So i need to save column B And C Value in new table in ...

In my program I need to impersonate users on the domain network to perform various tasks. Obviously I can only be one user at a time, and there are multiple threads that would like to be either the ...

Question might be more appropriate in StackOverflow, however I'd also like a review. I'd like to make my code inline as I feel like this could be possible, I'm just not sure how. ...

I have a DbContext like that.: Domain.MyDbContext ...

In my scenario I have list of object in C# code and need to be converted into JavaScript object. But there are certain condition, where the value of the object might be dynamic based on certain key. ...

I have a json array that is being passed into a function. Whenever the function comes across a field (call it Field1) in a record with a value that starts with "@!!!@" the function compile them into ...

I need something akin to C++'s shared_ptr. Essentially I need an IDisposable item that I can ensure is cleaned up as soon as possible once all references have been removed, but this resource will be ...

For some time I am trying to make a mocking library for C# that mocks objects with just 1 line of code. I am using abstract factory pattern to know what is the object's type so that I can work with ...

PBKDF2 C# Implementation

1 answers, 54 views c#
This is my first attempt to do any hashing. I wanted to make a class that handled everything I needed to implement PBKDF2. The only question I have is am I ok to store the iterations in the database ...

I have unit class which have some properties, and I have acceptancePolicy table which contain values. If values (from one row) are true method should return true. The method is below. How can I ...

I'm calculating the GS1 SSCC codes that are 18-digit barcodes. The 18th digit is a check digit which is used to validate the rest of that code and check that it is correct. the check digit is a number ...

Yesterday I did an interview coding test in Codility. Maybe my solution wasn't the best solution, but I thought it was quite straight forward. The problem was this one: And my solution: ...

I've implemented countdown timer control with arc animation that looks like this Implementation notes: For arc visualization I've created class Arc derived from <...

This class has the responsibility of parsing a string to one of the primitive types: int, double, ...

Interop compression

1 answers, 113 views c# compression
This is a function definition from an external dll, that I'm calling from my code: ...

So, there is a big jagged string array (~ [120] [1 000 000]) here that represents data from an excel worksheet ( columns / rows). Task: We have to append items at the beginning of each inner array. ...

Looking for some feedback on the Two Sum LeetCode problem. Looking for feedback on code style in general, use of var, variable naming and initialization, return placement, and any other feedback or ...

Problem statement Given an array S of n integers, are there elements a, ...

I'm writing a socket server for a project I am working on. I'm used to working in .NET FW, but I'm attempting to write this using .NET standard/core. Particularly, I am concerned about managing ...

std::isnormal in C#

2 answers, 329 views c# floating-point
Is this correct? Is this portable to .NET core and 32-bit ARM Linux? Is there a faster way, maybe something in the .NET framework? Is there a way to implement float32 version without using dynamic ...

I have the following function to replace all the occurrence of a string that matches certain token. ...

In my assignment I am executing a long running NodeJs script from C# using EdgeJs. Since the script may take a long time to execute, I also want to provide user an option to Cancel the script ...

I have a small WPF application which I'm not exactly localizing, but not hard-coding resources either. I know WPF doesn't use .resx files for that purpose, but I exposed the resource strings as public ...

Today I was posting a question to get a bit of information on how to optimize my code for maximum performance. I'm a beginner to C# (in a sense) and I don't really know as much as all of you other ...

FindTwoSums using Tuple

2 answers, 1.312 views c# k-sum
I am writing a function that, given a list and a target sum, returns zero-based indices of any two distinct elements whose sum is equal to the target sum. If there are no such elements, the function ...

A related Java question got me curios. All unique combinations (not permutations) of 3 values that sum to a target from a list of integers. Values can duplicate in the list but are only used once. ...

Is this the optimal algorithm to satisfy this problem? It does work. I get the: 1 and 5 (or 5 and 1) as 1 + 9 = 10. Here's a function that, when passed a list and a target sum, returns two distinct ...

I wrote this simple contact book app. It helps the user to store and retrieve contact information. The app uses a SQL database server to store all the user data. One significant fact is that the db ...

I am trying to write a Linked List implementation that can insert and delete at either head or tail in constant time. I think I have it working, but I was curious what improvements I could make to ...

In my app I have a RequestService for making requests to the external API. It works fine, but I want to know if there can be improvements. The RequestService returns the type ...

Navigation with arrow keys

1 answers, 89 views c#
This is my attempt for C# navigation with arrow keys. Basically, when the arrow down/up key is pressed, the specified option is highlighted (so it's like a WPF/WinForms ComboBox). However, I think it ...

Just for fun, I tried creating a function that takes the value entered in a textbox, and determines the type of it. Below is the full code. ...

I'm currently making a system that can accept different sorts of files and some classes are interested only in specific types of files, while some don't discriminate at all. Note Type of file isn't ...

Related tags

Hot questions

Language

Popular Tags