I'm having a difficult time getting a very specific use case to work. The application in question has two components: a Windows service, which needs to run in a privileged context outside of the desktop (i.e. to accept connections while a user is log
I am trying to get distribution groups and users from Office 365 from a Visual WebPart solution in VS 2010. My question is how can I create a connection to Office 365 using C#? --------------Solutions------------- You may want to take a look at the O
In my application, there is a transparent InkCanvas on top of a Viewport3D object. The Viewport3D shows a large 3D mesh. The user will sketch on the InkCanvas in order to select a portion of the 3D model that the Viewport3D is rendering. The user is
I'm writing a C application and in my code I'm calling the constructor GdipCreateBitmapFromHBITMAP. I know the constructor should not be called from C, but I used a "hack" from here "How can I take a screenshot and save it as JPEG on Window
I'm creating a Dice Game, where the user rolls 3 dice and gets some random outputs (up to integer 6). My next step is to add those 3 values obtained and get its sum. How do I achieve this? Any suggestion would be helpful. Here's my source code: //Rol
I am developing a stand alone windows application in c# I am using service based database. Can anyone tell me how to protect .mdf database from copying or attaching to sql server management studio without password from Client's machine ?? Is there an
When scaffolding a new ApiController with asynchronous actions and Entity Framework support in Visual Studio 2013, some methods wrap DbContext.SaveChangesAsync calls in try-catch blocks. For instance, the Put method, try { await db.SaveChangesAsync()
string str,a; DateTime dat, aa; using (con = new SqlConnection(@"Data Source=daniyal\sqlexpress;Initial Catalog=webassign;Integrated Security=True")) { con.Open(); using(com = new SqlCommand("select * from tasks",con)) { rdr = com.Exec
I need help with passing char to function's var list. Here is the code: #include <stdio.h> #include <stdlib.h> /* for the exit command */ #pragma warning (disable :4996) void AddCustomer(char phone, char firstname, char lastname, char creditca
Hello I have a simple 2d tile map that creates the floor and a straight road, I would like some explanations on how I could do the following. When pressing play the... The floor images should randomly set another image randomly. The straight road ima
I have searched high and low for an answer to no avail. Maybe I don't understand the proposed solutions but I cannot get my system to receive mTom encoded messages. I added a regular web service reference. I read the instructions here https://msdn.mi
I have a class with some static variables and I want to create multiple independent instances of this class. Independent meaning, that they do not share values of these static variables. Is there a way how to achieve this without refactoring said cla
this is the function code: void statistics(int arr[], int n, int *positive, int *even, int *doubledigit) { int i = 0, countP = 0, countE = 0, countD = 0; for(i = 0; i < n; i++) { if(arr[i] > 0) countP++; if((arr[i] % 2) == 0) countE++; if(abs(arr[i]
I have this function char toLowerCase(char buf[]){ for(int i =0; buf[i]; i++){ buf[i] = tolower(buf[i]); } return *buf; } which gives the result INPUT: HELoooO OOOOO RESULT: heloooo ooooo How do I modify this so that it only converts the first string
I searched the answer to the question "What is default value of FileShare enum" and find the answerIO.FileStream : FileShare default ?. In this answer also is link to MSDN FileStream Constructor (String, FileMode). I understand from this answer,
So I'm passing a char Array(En) that consists a few words and I'm trying to sort alphabetically. Unfortunately, my compiler explodes with " int strcmp(const char *,const char *)' : cannot convert argument 1 from 'char' to 'const char *" and I'm
I have a xsd file acount.xsd, using which i created a acount.cs file, using this i created a xml file. I have written these following command in c# for button click to generate the xml file. string PATH = "C:\\Sample.xml"; CreateEmptyFile(PATH);
I want to connect to my Web API from Windows Phone 8.1. The following code works for WPF. But when I compile it with Windows Phone 8.1 I get the System.TypeAccessException with additional information Attempt by security transparent method 'System.Net
I'm getting the error Conflicting types for 'free' on the call to free() function below. int main ( ) { char fx [] = "x^2+5*x-1"; node * fxNode = buildTree(fx, sizeof(fx)/sizeof(char)); printf(deriveFromTree(fxNode)); // Should print "2*x+5
The explanation: Working with two input streams streams, both use getline() to capture the user input. The first getline() is called in the userStringPrompt() function: string userStringPrompt() { string userString; cout << "Enter a string: &qu