Questions tagged [c]

1101678 questions
1

votes
1

answer
710

Views

WebSocket Server (Java) cannot read but send to C# (Unity) Client

For a project in university we should build a multiplayer game. Cause I have quiet a lot experience in Unity I want to use it as Game Engine. We have to use WebSockets for communication and json as protocoll to carry the data. So far so good. C# don´t have a default websocket implementation, so I u...
Snubs
1

votes
1

answer
1.1k

Views

What does Znwm and ZdlPv mean in assembly?

I'm new to assembly and I'm trying to figure out how C++ handles dynamic dispatch in assembly. When looking through assembly code, I saw that there were 2 unusual calls: call _Znwm call _ZdlPv These did not have a subroutine that I could trace them to. From examining the code, Znwm seemed to return...
user2999870
1

votes
2

answer
396

Views

How to use boost::asio::buffer in a method parameter

I am trying to use boost::asio::buffer as a reference parameter in my method like this: void ReadDataIntoBufferPassedIn(boost::asio::buffer & buffer); Firstly, compiler complains that: error: no type named 'buffer' in namespace 'boost::asio' void ReadDataIntoBufferPassedIn(boost::asio::buffer & buff...
Game_Of_Threads
1

votes
2

answer
608

Views

Stream.CopyTo throws System.OutOfMemoryException C#

I am trying to load a large video file (250mb) into my browser. The file is large so I am trying to load a certain number of bytes at a time, but it appears the problem lies somewhere else as I have tried changing the bufferSize with no results. MemoryStream ms = new MemoryStream(); using (FileStrea...
RJS
1

votes
2

answer
596

Views

Creating a Message Queue using msgget in Linux in a .c file Receiving function not implementing error

I am receiving a error when the msgget runs, my code is giving me a return of this: ':Function not Implemented' when it gets to the msgget line. I have tried many options, I am running UBUNTU on Windows 10 please help, here is my code and the terminal window results: CODE: #include #include #inclu...
Kodinguotaku
1

votes
1

answer
548

Views

Storing 3D data with Eigen library

How can I store a 3D data using Eigen C++ library? Vector is for 1D data, Matrix is for 2D data but what is for a 3D data? Or is it possible to create a vector of matrix?
michalt38
0

votes
2

answer
34

Views

How to update a global variable inside `where` clause in LINQ?

I want to filter a list using LINQ with Where extension method. But apart from filtering I also want to update a global variable inside Where. However I cannot do it. Consider this example: var list = new List { '1', '2', '3', '4', '5' }; bool flag = false; var newList = list.Where(item => { flag =...
1

votes
1

answer
29

Views

can't connect to method in the controller

I'm using asp.net web api. I'm trying to have a positive response from the server, however program is not seeing one of the methods in the controller. It goes into the controller constructor, but not further. The response is Status Code 404, Reason Phrase: Not Found. I understand that it can be a...
Alice
0

votes
1

answer
26

Views

How to call an implemented interface method with different return types? [duplicate]

This question already has an answer here: Does C# support return type covariance? 9 answers I've an interface that has one method with an Interface return type. Is there a way to implement that method in different classes with different return types (derived from the interface return type)? This is...
Phoenix_uy
0

votes
0

answer
20

Views

Some Special characters doesn't appear in WPF

In my application I use a shower barcode to scan DataMatrix in GS1 format. The code looks like this: ]d2240ARD567910921111706292150026590100923957 However, there are special characters hidden between some visible characters. When I scan my DataMatrix in the windows search bar, they appear. Except t...
Eros Guil
1

votes
2

answer
73

Views

Problem with finding successive integers in C

The main problem of the code is that finally the programm shows every time that there are not successive integers. At first, I tried to figure out a solution to this problem, by investigating how to correct the 'if' statement and then to fix some small mistakes on the code, but I was unable to find...
0

votes
0

answer
19

Views

is there a way of reding individual cells in an access table using row and column indexing

Hey:) am trying to display text in a singe cell of an access table in a text box how can I read that specific cell am new to databases so I can only go as far as connecting to the database itself.
Kevin Gombe
0

votes
0

answer
17

Views

process a map containing boost::variant<int, double,long long> as value datatype

I have a map data structure containing a string as key and multiple data type as values. I populated the map while instantiating it. The problem that I am facing is while I'm iterating through the map and try to have access to the value of each key I'm getting some errors. I believe the return value...
Ben
3

votes
1

answer
55

Views

Is the address of malloc + size_t * 3 aligned for any type?

I'm builing a kind of dynamic array (vector), but instead of embedding the data (typically void *) into a struct vector, I'm reserving space for a struct vector + a chunk of bytes, an example using an array of size_t's: #include #include struct vector { size_t capacity; size_t typesize; size_t siz...
Keine Lust
0

votes
0

answer
16

Views

Xamarin - Google Maps keep “showing” Malls

We are using a stylization with the minimum of items to render (without markers, houses, rivers, etc ...) but somehow we can not disable the rendering of Malls. The rendering in the browser works perfectly (does not display the malls): But when we load the JSON in the Device the malls keep appearing...
Igor
0

votes
0

answer
16

Views

Trying to use a non-static object in a List of objects

I am working with Razor Components and have a question about using non-static values in a list of objects. I have the following code: @page '/CircularGauge/DefaultFunctionalities' @using Syncfusion.EJ2.RazorComponents.CircularGauge @functions { int myInteger = 21; public List axes { get; set; } = ne...
arlan schouwstra
0

votes
1

answer
15

Views

I want to Integrate ODBC in my Code for both linux and windows using CMakeLists.txt but its only working in windows

I am currently working on a project which requires SQL database. I want to make project platform independent so i am writing CMakeLists.txt but unfortunately its not working with linux currrently I have this part in CmakeLists.txt find_package(ODBC) TARGET_LINK_LIBRARIES(${PROJECT_NAME}_component $...
user1993504
2

votes
1

answer
110

Views

Trying to make epaper dynamic using C# asp.net web form

I have static e paper but i want to develop dynamic e-paper like below url https://epaper.dawn.com/?page=15_04_2019_001 I have no idea to start e paper dynamic below is my whole html code q Times body { background-color: #fafafa; min-height: 100vh;} .container { margin: 200px auto; max-width: 600px;...
mohd mazhar khan
0

votes
0

answer
8

Views

StructureMap: how to report problems

Suppose I have an object that is itself declared as StructureMap registry but I forgot to add some dependencies to its list so the object cannot be built. For some reason, this does not manifest at all in any logs. How such debug information can be viewed?
Askar Ibragimov
0

votes
0

answer
5

Views

Chat Programm with C# via IP-Address. Connecting two Computers in different Networks

I'm writing a Chat Programm for me and my friend in C# and I don't know how to connect my Computer to a Computer in a different Network. The Code Works fine in my Home Network between two Computers but between two different Networks it doesn't work. I know why it doesn't work, I mean it makes sense,...
Eric de la Fuente
0

votes
0

answer
2

Views

How display chart axis in normal layout (Y-Vertical, X-horizontal)? (Auto-replace error with axis layout) [C# WindowsForms]

I try to print a point chart (WindowsForms) in normal layout (I mean axis X is horizontal, and axis Y is vertical), but when I do it, it auto changed axis location. After print I've got X in vertical and Y in horizontal. image -> https://ibb.co/7KvdfXr (I dont have 10 reputation rank...) How display...
Tom Mro
1

votes
0

answer
6

Views

Is there a way to remove the selection line(highlighted) in a databound combox on a datagridview?

I am having trouble with a databound datagridviewcomboboxcell I want to remove the blue selection line that appears on a databound comboboxcell. I noticed that if a comboboxcell is not databound but has a collection of items, the blue line does not appear. however a databound combobox does have it....
Stuart Black
5

votes
0

answer
35

Views

Template metafunctions to generate pybind11 bindings

I am trying to create python bindings for some C++ functions using pybind11. The functions are templated but in the python bindings, I need one of the template parameter to be a function argument. Currently the way I have it is a lot of repetition for each template parameter. enum MyEnum {E1, E2, E3...
Bilentor
1

votes
1

answer
3.1k

Views

Connection ID required

I am trying to build a simple chat application using SignalR with ASP.NET Core 2.0. The problem is that when I want to access one of my hub's url (localhost:5000/chat) I receive as a response: Connection ID required with error code 400. I am using auto generated from template authentication (users...
Georgi Stoimenov
1

votes
2

answer
1.5k

Views

WPF Material Design Raised Button Hovered state

I'm trying to recreate a material design look & feel for a button. For the focused (hovered) state the guidelines say to make a 12 % #000000 shade over the button. I was wondering how this could be achieved in WPF. I've been looking around a good option would be to add a non-hittable rectangle over...
Bart Pinnock
1

votes
1

answer
1.4k

Views

MongoDB, does MaxPoolSize limit applies to all the client instances?

I increased MaxPoolSize value to 3000. does this mean that there are 3000 concurrent connections allowed using this instance, or it counts any other connections through other object instances too? var connectionString = 'mongodb://username:[email protected]:27017/MyDB?maxPoolSize=3000' var client = new Mo...
Blendester
1

votes
1

answer
1.2k

Views

What this CMake Error means? My variables are set to NOTFOUND

I am trying to run some code from my university, but when I do 'cmake ..' inside 'build' I get the following error: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: iceutil_...
Carasandia
1

votes
1

answer
531

Views

Azure File Storage: Error 400 (Condition headers are not supported.)

I'm not sure what is going wrong here. I am trying to display an image that is currently stored on Azure File Storage. If I go to the link directly in my browser then it seems to download just fine. But when I put the url in an img src then I am getting this error in the console. Here is how I am cu...
Quiver
1

votes
2

answer
89

Views

OpenGL: Quads seemingly not culled properly

I have built a simple scene like the following: The problem is, the blue shape is lower than the red one but somehow bleeds through. It looks proper when I rotate it like the following: From what I searched this could be related to the order of vertices being sent, and here is my definition for thos...
SenselessCoder
1

votes
1

answer
100

Views

How to test a method that makes calls to a database

I have several methods that make connections to a database and I can't figure out how to write unit tests for them. Here is a sample of what I'm talking about. public static User GetByPendingUserId(int a_PendingUserId) { User l_User = new User(); SqlConnection l_conn = DbHelp.CreateSqlConnection();...
tayopi
1

votes
1

answer
239

Views

Get all properties on a class that are a specific open generic type

If I have the following generic class: public class Gen { public T Value { get; set; } } And a class that uses it: public class Thing { public Gen GenIntProperty { get; set; } public Gen GenStringProperty { get; set; } public string NoGenericProp { get; set; } } Using reflection, how can I get just...
Bradley Uffner
1

votes
4

answer
1.1k

Views

Save string locally on device in Xamarin Forms

I want to save a small piece of data from a Xamarin Forms app locally on a device where it can be retrieved later. I don't want to use SQL Lite, App.Config or save it as a file, it's basically just a string. Is this possible, and if so does anyone have an example?
DarkW1nter
1

votes
1

answer
185

Views

Stop Sound playing on Node in SceneKit

I have the following code for a gesture recogniser that plays a horn, when tapped, and stops when it is released: @objc func didPressHorn(_ sender: UILongPressGestureRecognizer) { let tapLocation = sender.location(in: sceneView) if sender.state == .began { if (wasNodeTapped(node: hornNode!, tapLocat...
Pascal
1

votes
1

answer
1.1k

Views

How to broadcast HTTP request?

I'm designing a data acquisition system with sensor nodes that communicate with a server using HTTP, in Mono/C#. I'm using basic HttpWebRequest and HttpListener to implement the communication. The server will have an app with a Search button to find and display nodes present in LAN. Basically the no...
Cristian M
1

votes
1

answer
1.2k

Views

Exception: Partition key provided …, when using CreateDocumentUri with a partitioned document db

DeleteDocumentAsync and ReadDocumentAsync don't work for me when I have a partitioned collection. I used the RequestOptions: await client.DeleteDocumentAsync(document.SelfLink, new RequestOptions { PartitionKey = new PartitionKey('mykey') }).ConfigureAwait(false); // This works. var uri = UriFactor...
Jose
1

votes
2

answer
376

Views

Dynamically return fields from a web method

I have a WebAPI service where I would like to allow users to specify which fields they'd like returned. For example, say I have the following Person class: public class Person { public string FirstName { get; set; } public string LastName { get; set; } public string Email { get; set; } } and that ca...
Phillip Copley
1

votes
1

answer
504

Views

How to know if a ID has a parent ID or not in WIQL TFS?

I have an id and I want to know if has a parentid or not by C# coding for TFS. In my TFS board there are many user stories that do not include a Feature ? My hierarchical structure in TFS is as follows: Feature --->User Stories(u1,u2,u3) --->Tasks (t1,t2,t3) Sometimes a user story does not contain...
Akhil Jain
1

votes
3

answer
4.5k

Views

.net core cross platform desktop app

I'd like to develop a cross platform desktop app by using .net Core. The app needs to be executed on linux, mac os, and windows. For that purpose, should i create a console app and put below lines in settings xml? win10-x64;osx.10.12-x64;debian.8-x64 Will it be sufficient? If so, should i write all...
Dilara Albayrak
1

votes
1

answer
954

Views

What is the difference between uid and sAMAccountName

What is the difference between uid and sAMAccountName attributes of a Microsoft Active Directory. Edit : I am aware of the fact that sAMAccountName is a mandatory field and uid is not. Can someone explain how they differ from each other in terms of usage
Prayag Sagar
1

votes
1

answer
924

Views

Azure Cosmos Document DB - Read multiple documents by id

I'm using Azure Cosmos Document DB and want to fetch several documents in one call. I've understood that the best way of retrieving a document if you have its id is to use DocumentClient.ReadDocumentAsync(...) I wonder if there is a similar way to fetch multiple documents? Right now I'm doing a Docu...
OriginalUtter

View additional questions