|
I know about cua-mode , but I'm specifically wanting to bind C-C and C-V (the uppercase versions) to be like the terminal in Gnome. Is there any way to do this? I tried this, but it gave me all kinds of errors (apparently, it doesn't like me binding something...
Started by Jason Baker on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Those would all and using fewer keystrokes."
My Linux terminal understands C-Insert as Copy and S-Insert as Paste (kill.
Problem is, C-C in particular is a prefix to a lot of other commands.
You with this.
|
|
I need to move backwards through an array, so I have code like this:
for (int i = myArray.Length - 1; i >= 0; i--) { // Do something myArray[i] = 42; }
Is there a better way of doing this?
Update: I was hoping that maybe C# had some built-in mechanism...
Started by MusiGenesis on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
A better way....
That's definitely the best way for any array whose length is a signed with sizeof applied to pointers Actually the above way of determining the size of an array sucks it), it will silently fail.
No, that's pretty good.
|
|
I have a C# class library that contains methods that need to be used with an external application. Unfortunately this external application only supports external APIs in C/C++.
Now I've managed to get a very simple COM example working between a C++ dll...
Started by Alex on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You're primarily a C# developer I hope you understand pointers because if you don't there's no way.
|
Ask your Facebook Friends
|
I'd like to conditionally exclude/include code based on whether I'm building in debug mode.
Can I use something as simple as a #ifndef _DEBUG as I would in C++?
Started by Sambo on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Here is a list from msdn
http://msdn.microsoft.com/en-us/library....
#if !DEBUG // whatever #endif
Yes you can use preprocessors in C# .
If DEBUG Console.WriteLine("Debug version"); #endif #if !DEBUG Console.WriteLine("NOT Debug version"); #endif
See this .
|
|
What is the best way to call C/C++ from other languages such as Java, Python, Perl, PHP, etc?
Started by Jared on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Some languages can bind directly to c/c++ will let you execute an system command....
Http://www.swig.org/
That really depends on the language...
Use Swig, it allows you to generate code for multiple languages that calls any C/C++ functions.
|
|
What is the easiest way to create multithreaded applications with C/C++?
Started by SomeUser on
, 16 posts
by 16 people.
Answer Snippets (Read the full thread at stackoverflow):
Couple of options: pthread you're doing into OpenMP then that is the... .
Unfortunately there is no easy way.
Pthreads!
https://computing.llnl.gov/tutorials/pthreads/
There is no easy way to create a multithreaded application in any language.
|
|
Started by MissRemix on
, 12 posts
by 5 people.
Answer Snippets (Read the full thread at reddit):
The easiest and least expensive way for your clay is sheet mulching, which will actually improve.
I have no idea why it looks like that! Seems a legitimate way to go about.
My apologies for the title.
|
|
What are other ways to do ping in vb.net or c# other than the way found here :
Dim pinger As New System.Net.NetworkInformation.Ping MessageBox.Show(pinger.Send("192.168.0.119").Status.ToString)
Started by Microgen on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There's a WMI class which encapsulates ping, WIN32_PingStatus , which you can use from a client with XP/2003 or later. .
You can launch cmd.exe and execute the ping command by writing to StandardInput To retrieve results read from StandardOutput .
|
|
What would be the best way to pass information from a windows forms C# app to a MFC C++ app while they are running? I don't need to send much, just a small string.
Thanks, Jeff
Started by Yttrium on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Http://msdn.microsoft.com/en-us/library/ms649011%28VS.85%29.aspx
Use named pipes, see this posting....
If the C++ app has a main window, take a look at using the SendMessage function (via P/Invoke) in the C# app to send a WM_COPYDATA message to the C++ app .
|
|
I have no Objective-C experience whatsoever but have a strong C++ background. Is there an automated tool/script or, worst case, some manual method using some excellent reference to port code written in Objective-C to C++? What are the difficulties involved...
Started by Jim Buck on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
There are no automated tools that....
You are likely to start seeing bad design in all c++ code after using Objective-C frameworks for a while.
You'll find more problems in porting.
Objective-C was just a pre-processor (and a runtime library).
|