Questions tagged [c]

50236 questions
1

votes
0

answer
1.2k

Views

Transforming a custom Shape in WPF

I have a custom shape in WPF that creates two rectangles in the DefiningGeometry override and returns both as a GeometryGroup as follows: protected override System.Windows.Media.Geometry DefiningGeometry { get { System.Windows.Media.GeometryGroup group = null; System.Windows.Media.RectangleGeometry...
Raheel Khan
4

votes
0

answer
138

Views

I am not able to post any comments in Google+

Post(Google+) not working. I tried to implement post using Google+ Domains API v1 (https://developers.google.com/+/domains/getting-started ) Sending the request works, but GetResponse(), I get error like: The remote server returned an error: (400) Bad Request. I am trying using the below sample C#...
Shinoj Thomas
3

votes
0

answer
80

Views

Having issue on viewing Excl file generated by SSRS report with cube data source in ASP.net MVC Using view.officeapps.live.com/op/embed.aspx?src=url

These are the following are my requirements. There is URL from SSRS Report which renders the report in EXCEL file We have setup for MVC application as web app and the webapi as App server. Since the ssrs inside the firewall the app server will connect only through Appserver. In Appserver, The repor...
ansari
0

votes
0

answer
15

Views

Dynamically allocated 2D array with unknown dimensions

I want to write a function that returns a dynamic 2D matrix the size of which is detemined by input, for example: aba cd abd would be a 3x3 array. I know how to write a function that returns a 1d array made out of input: char *read(int *cols) { char *array = NULL; int size = 0; int i; int character;...
idkmanimdumb
0

votes
0

answer
93

Views

Is JWT secure for passing confidential data [duplicate]

This question already has an answer here: If you can decode JWT how are they secure? 5 answers I am just reading about JWT to encrypt some personal data of the user so that it can be passed to other APIs securely. var payload = new Dictionary() { {'email', '[email protected]'}, {'phone', '9878987899'}...
Venky
0

votes
0

answer
7

Views

Change data type in PIVOT Query

I have a table built using the command pivot. I am writing a program (C#) which inserts the results of the sql query into the excel file. I use the library ClosedXML.Excel, System.Data.SqlClient;. I have a problem inserting values pivot (1, 1), the remaining values are inserted into the excel file....
RobinВricks
3

votes
0

answer
60

Views

Resolution is strange on second animation via template

In my Universal Windows 10 app, I have an animation that shrinks a custom control whose looks is applied via a template. It works as expected the first time it is run. The second time it is run, the start of the animation is rendered in a horrible resolution, apparently tainted by the previous run:...
Petter Hesselberg
4

votes
0

answer
105

Views

Invocation static vars from C++ on cgo

I have a static var that calls to a constructor in a library in C++, something like this: class ClassToBuild { public: ClassToBuild() { // Some cool stuff happens here... } }; static ClassToBuild classToBuild; The problem is that when this file is included in C++, the constructor is being called bef...
4

votes
0

answer
67

Views

¿How to deal with virtual methods when trying to create COM class?

I'm trying to create a COM class in .Net to interop with VB6. The idea is to integrate Crystal Reports in a .Net library and so this one can be consumed in VB6. As far as I've gotten, some methods are working in the VB6 enviroment, but when I try to execute a method which uses a virutal function, th...
Rafael Pinzón
3

votes
0

answer
102

Views

How to determine behavior of TCP/IP stack in C#

I have been facing slow client message consuming in client/server app using TCP sockets in c#. Whenever slow client is connected to server, it affects the processing of other clients. After reading some literature regarding tcp/ip stack in c#, i concluded that due to RCV_BUFFER full at client side...
Naveed Asad
-3

votes
0

answer
22

Views

Switch and case statement C++ [on hold]

I need to do this exercise about switch and case statement C++ but it's really confusing for me. May someone please help me? We use **Write a program that shows how a case statement can be used to provide a menu system. Write a program ( it's all the same exercise) that accepts a number from the k...
John
0

votes
0

answer
144

Views

Can't install selenium in Visual Studio 2017

I'm trying to install the 'Selenium.WebDriver' extension in Visual Studio 2017 and I get this error: Severity Code Description Project File Line Suppression State Error Package Selenium.WebDriver 3.12.1 is not compatible with uap10.0.15063 (UAP,Version=v10.0.15063) / win10-arm-aot. Pa...
Rafał Zając
4

votes
0

answer
62

Views

Why do all template instantiations need to be complete to resolve function overload?

This question requires quite a long setup, but bear with me. Consider following files: Type1.hpp #ifndef TYPE1_HPP #define TYPE1_HPP struct Type1 { int a; int b; }; #endif Type2.hpp #ifndef TYPE2_HPP #define TYPE2_HPP struct Type2 { int c; int d; }; #endif MyTemplate.hpp #ifndef MYTEMPLATE_HPP #defi...
khuttun
2

votes
0

answer
103

Views

RTTI type tagging classes and functions

what could be a good custom RTTI-like functionality without using 3rd party library or meta compiler? I want to create a 32 bit TAG/ uuid for each class and function within a class and later use it for debugging or logging purpose. please note: RTTI is not suitable for me hence this question; pleas...
3

votes
0

answer
116

Views

How to specify a “COM” class, when multiple “COM” class has same name in C++?

I have defined a COM interface as shown below(C#): using System.Runtime.InteropServices; namespace CommonInterop.Hello { [ComVisible(true)] [Guid('24484884-DAAE-4B24-B0BD-C7B9AEB3D70D')] public interface IComInterop { int Plus1(int x); } } and again almost the same interface is defined with a differ...
RayOldProf
3

votes
0

answer
46

Views

Compilation error using boost mpl list with BOOST_AUTO_TEST_CASE_TEMPLATE

I have been battling the compiler for sometime now. Here is my code: #include #include namespace MyMessageNamespace { class ParticularMessage { template void SetSomething(int myValue) {}; }; } template struct MyMessage { using MyMessageType = MyMessageT; }; using MyMessages = boost::mpl::list; B...
Jonathon Hill
0

votes
0

answer
24

Views

“Resources” does not contain a definition for 'mypng.png' file

I have a project in Visual Studio 2015 C#. I have all the .png images I am using in the Resources file of the project. But suddenly the images are not being accessed and error : Resources does not contain a definition for 'mypng.png' file Screenshot: enter image description here
Chaman Ali
3

votes
0

answer
71

Views

ASP.NET : EF 5.X : LINQ - Using Rules in ASPxGridView

I am trying to achieve adding conditions into a table where, for example, if the column cleared amount is not equal to the column total amount is displays red text. I have been researching and came across a perfect example of what I want done which is here - by DevExpress. I took a look at the ASP...
Jaquarh
4

votes
0

answer
100

Views

Is it possible to give style to exceptions messages in Visual Studio?

I want to know if there's some way to add style like: bold, italic, underline etc. to the exception pop-up in Visual Studio. E.g: string keyword = 'important stuff'; string anotherKeyword = 'other important stuff'; throw new Exception($'My exception message with that important keyword: **{keyword}*...
Thomas
3

votes
0

answer
92

Views

Securing settings in ASP.NET 5

I am working with ASP.NET 5 in an effort to get some web apps ready to port when it goes mainstream. One of the things I haven't been able to find yet is a way to secure configuration settings. In previous versions, everything was stored in the web.config which could then be encrypted. Now it app...
DrewB
0

votes
0

answer
19

Views

How to passing HashMap to C++ via java and extract the values?

I'm trying to passing an object from java to c++. So, I created the 'Book' class public class Book { public String name; public Book(String name) { this.name = name; } } Now, in my activity i mock up some data: ... setContentView(R.layout.activity_main); //Creating the books objects to hashMap HashM...
Matt
3

votes
0

answer
195

Views

What does the cursor hint message System_CAPS_protmethod mean?

While researching MSDN documentation I ran into the following cursor hint. Can anyone tell me what the hint represents. I tried finding the answer to this question myself, to no avail. There are others, as well such as System_CAPS_protproperty, System_CAPS_pubmethod, and System_CAPS_pubproperty....
Chef_Code
4

votes
0

answer
188

Views

How do i create a rootCA for UWP apps in windows 10?

I am trying to create a root certificate authority for a UWP app, which allows the users to install a certificate before the app is intialized. the X509 certificates cannot be used here. Im trying to use the standard 'Certificate' class inside the Windows.Security.Cryptography.Certificates namespace...
vishnuvaradhan
3

votes
0

answer
75

Views

Gtk Ckipboard: pasting files from a source with custom URI scheme

I'm trying to write a a GTK/C application that puts some files on the Gtk clipboard, so a user with Nautilus will be able to paste them. There is a good example of Gtk Clipboard local file copy and paste on stackoverflow. Unofrtunately the files I need to paste are not on the local disk, and cannot...
giox069
0

votes
0

answer
23

Views

Returning incorrect data type?

I've encountered an error when I'm returning a pointer to a substructure in a structure. The error is as follows. evolve.c:28:21: error: incompatible types when returning type ‘PPM_IMAGE {aka struct }’ but ‘PPM_IMAGE * {aka struct *}’ was expected return (indPointer->image); Everything is t...
Akila Kavisinghe
1

votes
0

answer
13

Views

Address ranges reserved by gdb?

I have a program that mmaps memory at higher addresses using MAP_FIXED at TASK_SIZE - PAGE_SIZE. This program runs fine if I execute it, but if I run it with gdb, it segfaults just after the mmap. Also at this point, the gdb state seems to be completely corrupted and it appears that the execution re...
Ajay Brahmakshatriya
0

votes
0

answer
21

Views

Why I cannot use VLA when writing C codes in Visual Studio 2017?

Just some really simple codes, as shown below. int row = 4; int column = 5; int val_arr[row][column]; Could you please help me solve this problem? Thanks very much!
Dylan Liu
2

votes
0

answer
598

Views

Xamarin Facebook-SDK Facebook Java Binding “Argument applicationId cannot be null”

I'm using the Mondroid sample for the Facebook SDK java binding (https://developers.facebook.com/docs/tutorials/androidsdk/3.0/scrumptious/authenticate/). I added the facebook binding to my project and attempted to follow the facebook sdk instructions for setting up a session based login activity. N...
George Muresan
4

votes
0

answer
207

Views

iGUI dll could not be found

Previously, I was able to build an iOS project with Unity 4.6.2, but I can't with Unity 5.1.1. I get an iGUI dll could not be found error: ArgumentException: The Assembly UnityEditor is referenced by iGUI ('Assets/lib/igui/Runtime/iGUI.dll'). But the dll is not allowed to be included or could not be...
Mukesh
4

votes
0

answer
124

Views

Is there any thorough documentation on very early (~1974) versions of C? [closed]

Out of curiosity I got the SIMH PDP-11 emulator working and running Unix V6. I thought I would fiddle about with making some pointless C programs and discovered to moderate horror that very little of my already frankly inconsequential knowledge of C seems to actually be valid code in this ancient ve...
Roflcopter4
4

votes
0

answer
530

Views

Some environments conflict with current Glimpse async support

I have just installed Glimpse in my application via NUGET. I am getting this exception: I do not know why this is happening, I am none the wiser looking in the Github reference and I do not know where in the web.config file to set DisableAsyncSupport = true. Is it really a good idea to disable this...
arame3333
3

votes
0

answer
126

Views

Reading lines from files without storing anything wastes memory

I have a folder with 2000 folders in it (0001 to 2000), each of which contains a number of files, with a total of 145000 files in the original folder. I read each folder and then read each file in folder. For each file I read it line by line and do some storing and processing. But the memory usage i...
user302787
2

votes
0

answer
47

Views

Strange C# GUI+ issue: image re-sized when drawing under 120 dpi

I experienced a strange image drawing issue in C# when setting dpi to 120. The image we created in run-time got re-sized in another Image object when we proform this code: if ((dstimg == null) || srcimg == null)) return; Graphics dstg = Graphics.FromImage(dstimg); dstg.PageUnit = GraphicsUnit.Pixel;...
ncite
2

votes
0

answer
216

Views

Unsuccess in using URLOpenBlockingStream to check if online file exists

I followed the approach presented here -- How to check if a link exists or not in VC++? and I also tried this code IStream* pStream = NULL; if (URLOpenBlockingStream(0, sUrl, &pStream, 0, 0) == S_OK) { pStream->Release(); // don't need the data return TRUE; } return FALSE; I get a TRUE return whethe...
Bob H
2

votes
0

answer
99

Views

Ideas to improve metadata count search

I am working on a classified website, i am converting from sql server to mongodb/no-sql and probably node.js. I really want to come up with a better solution to the filtering of metadata (Eg the filter in ebay). I currently have all my metadata in a table Metadata Value Table AdvertID MetaDataValue...
andyewebb
2

votes
0

answer
45

Views

Packaging Parameter Packs

Recently I've come across a problem whose only solution I can think of is using macros, which although fine for some purposes, I think make this an ugly solution. The problem is when declaring a class whose template parameters change all the time as more code is added and new functionality is requir...
Filipe Rodrigues
2

votes
0

answer
43

Views

How to access float pointer in C struct through a SWIG generated Python wrapper

I have a C struct with a float* field. It's considered an array of floats which depict an image. The C struct is part of a library that I'm wrapping by means of SWIG. That pretty much works. I can import the module and create instances of that struct (and others). The struct looks something like th...
Hendrik Wiese
1

votes
0

answer
147

Views

Getting 401 error from Twitter Streaming API using C#

I got some code for Twitter streaming API from previous post . I added some code snippets based on the accepted answers in that post. However, i still get 401 when i tried to convert it for the stream api: 'https://stream.twitter.com/1/statuses/filter.json'. I will appreciate any help. See code belo...
user2621610
4

votes
0

answer
87

Views

Some times if I run my tests the lib files are gone from my Output folder, Can someone tell me the reason?

If I run or debug test, this test working but I can't run my main project because lib file not found. If rebuild solution it works. [TestMethod] public void MyTestMethod() { Assert.AreEqual(2, 2 + 2); } If run project I get this error: There were 3 error(s) during build. Details: error CS0006: Meta...
Qutfullo Ochilov
0

votes
0

answer
19

Views

Group some C struct fields into another struct

I'm looking for a tool that can group some struct fields into another struct and update every reference to it. Example: struct mystruct { int a; int b; int c; } mystruct; mystruct s; s.c = s.a + s.b; Now moving a and b to another struct: struct mystruct2 { int a; int b; } mystruct2; struct mystruct...
rnunes