Home >

c#

Advertisement
  • Random Winner Based on Percentage Weighting

    Random Winner Based on Percentage WeightingMarch 12

    I have 3 variables and each one has their own percentage to win out of 99.99...%. (The 3 percentages don't act up to 100% perfectly) When button1 is clicked, it will go through 100,000 simulations and afterwards it will output how many times each var

  • Controlling parallel jobs with condition_variableMarch 12

    I'm trying to set up a system where I can have an arbitrary number of parallel tasks, all of which wait for a go signal, do their work, and then stop while a manager collects the results, prepares for the next batch of work, and so on. The easy way I

  • Type-Safe Event SystemMarch 11

    I have recently started writing C# from a strong JavaScript background, and found myself wanting to do something I do all the time in JavaScript: events. Since I have a type system at my disposal, I figured I'd make use of it and make the event syste

  • How to make my Delay Program more efficient and short?March 9

    #include<iostream> using namespace std; const int count = 0; void delay (double); int main() { //your code here... double inp; cout << "Give the desired delay in seconds : "; cin >> inp; delay (inp); return 0; } void delay (dou

  • DirectoryInfo to Resources folder in apk (Unity)March 9

    How do I write a path to Resources folder of apk that is build with Unity? For instance, I'm writing dataPath = Application.dataPath + "/Resources/"; DirectoryInfo dir = new DirectoryInfo(dataPath); in Windows (PC). How do I write this for Andro

  • Testing internal class or private method with xUnitMarch 9

    We're using xUnit as a unit testing framework. The instantiation of the internal classes can be done using [InternalsVisibleTo] attribute (like in here). What is a way to invoke a private method of the class with xUnit? The MSTest framework has Priva

  • Im trying to backup and restore database from sqlserver 2008 .But getting an error saying "Incorrect Syntax near Database name "March 8

    I m trying to backup and restore sql server database 2008 but getting an error saying "Incorrect Syntax near database name ". Here is the code for back up and restore which is written c# asp.net. Can I get a help regarding this? private void btn

  • What are the elements of the pivot vector in Gauss-Jordan eliminationMarch 7

    In numerical recipes, on page 39 (page 4 of the pdf) the following algorithm has been suggested for finding a pivot: void gaussj(float **a, int n, float **b, int m) /* Linear equation solution by Gauss-Jordan elimination, equation (2.1.1) above. a[1.

  • Why i am getting 4683872 in my output?March 6

    Can anyone tell me why i am getting this wierd output for my program? --------------Solutions------------- I think the problem is caused by the return value from function cr7(). Since you didn't return any value and tried to print the return value ou

  • How does cin split a sequence of integers?March 6

    How does cin split a sequence of integers? An example of this has been given below: #include <iostream> int main() { int sum = 0, value = 0; while (std::cin >> value) { sum += value; } std::cout << "Sum is: " << sum <&

  • sql query for combobox to populate second combobox c#March 6

    I have a windows 10 universal app 3 sql tables 1 contains countries with id 2nd contains matching country id with states from that country 3rd contains columns to submit the data into I have 2 combo box queries 1 to get country, 1 to get state. how d

  • AABB Collision Problems in SFML

    AABB Collision Problems in SFMLFebruary 15

    I have a problem with AABB collision. I am making a top down rougelike in SFML and my collision algorithm does't quite work properly. It mostly works, except for when you're against an edge of the block and hold the direction towards the block for a

  • Error handling in C++February 9

    So, in the recent weeks I delved into C++ programming, and I programmed some things in SDL. Doing so, you always have to deal with a lot of (ugly) C++ code, which looks more like C than C++. One thing I noticed I when programming with SDL as opposed

  • Cannot use SPEN SDK in Xamarin [on hold]February 9

    I have a problem with the SPEN SDK. I downloaded it from the Samsung page and wanted to create a bindings library as stated on the Xamarin Website. The SPEN SDK consists of an .aar and an .jar file. So I acted according to Xamarin website and when I

  • How to write this simple program? [on hold]January 16

    I'm learning c++, and looking to write a simple script that can automatically type stuff into Bing and search (in my absence). I'm thinking maybe it takes blocks of text from a pdf or text file I specify and just types them in then hits search. This

  • FindAllReferencesCommand 2.0

    FindAllReferencesCommand 2.0January 16

    Rubberduck 2.0 will feature a "Search Results" dockable toolwindow that will be used for displaying the results of Find all references, Find all implementations, and whatever else we need to find. It replaces the ugly 1.x "SimpleList"

  • Redirecting arriving customers to the nearest empty queueJanuary 16

    I have a task to make a checkout line controller. First it receives, as input, an amount of checkouts and commands. Then commands that are C for coming and L for leaving, and after those the number of the checkout they are coming/leaving. Also, if th

  • Timestamp function with millisecond precisionJanuary 16

    I want to be able to print timestamps with milliseconds precision and time_t doesn't provide this. I also want the code to be portable, so operating specific functions are out. ftime seems to be deprecated but there doesn't seem to be a general-purpo

  • DAL basic implementation using Entity framework 6 and AutofacJanuary 15

    Would like to ask for a code review for my DAL. I use Entity framework 6 and Autofac for dependency injection. All comments will be appreciated. public interface IBaseEntityObject { public int Id {get; set;} } public abstract class BaseEntityObject :

  • Exposing Iterators while Trully Hiding Their ImplementationJanuary 15

    While implementing classes composed of various collections, I've found that it's pretty hard to completely hide the type of collection used, while still allowing C++ style operations on iterators. For example, the following two classes allow the clie

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 13 q. 0.197 s.