Usually I do all what I can inside a class, in every method (try and catch). Am I doing it wrong? Recently I heard better way is handle error in program body...
What is good habit?
I'm debugging a program with GDB.
unsigned int example = ~0;
gives me:
(gdb) x/4bt example
0xffd99788: 10101000 10010111 11011001 11111111
why is this not all 1's? i defined it as ~0... then the next line of code is:
example>>=(31);
and GDB gives me this when I try to examine the memory at bits:
(gdb) x/4bt example
0xffffffff: Cannot access memory at address 0xffffffff
what is going on???
when will memory created for extern and static variable. Is it in stack or heap.
Since its life time is till the program end, it cant be in stack it must be in heap. But size of the heap will known only at the run time. So somewhat confusion here ......
I'm currently using the RS command to automate uploading an SSRS report.
I have created a VB.NET program and it works well.
Problem now is that I need to upload an XSLT file together with this report. Anyone knows any way of doing this, either using VB or even directly to the SSRS SQL Server db?
Thanks
I am using Visual Studio to compile some C++ Code. When I compile my program in Debug mode it works perfectly, but when I try compiling it in Release mode, VS halts when Generating Code (ie: took 20 mins and still didn't finish). After I forced VS to stop the build process, the executable generated was huge 2MB while it should be about 304KB.
Please can you help figure this out. How should I setup the configuration parameters for Release mode to work?
Thanks,
Hey,
I have a Java desktop application I wrote, and I would like a recommendation about a monitoring application that can spot bottlenecks in the code and real time memory consumptions.
As I was developing for J2Me, the WTK then, had a memory monitor, and I found it really useful, I would like to know which monitoring program you think is best to use.
Thanks,
Adam.
The following Scala code does just what I expect it to - it prints each line of some_file.txt.
import scala.io.Source
val lines = Source.fromPath("some_file.txt").mkString
for (line <- lines) print(line)
If I use println instead of print, I expect to see some_file.txt printed out with double-spacing. Instead, the program prints a newline after every character of some_file.txt. Could someone explain this to me? I'm using Scala 2.8.0 Beta 1.
hi
i try to run pdf to text C# code, i have reference to 2 dll
and i get this error when i try to run the program:
how to add a reference to assembly ?
the type 'java.io.File' is defined in an assembly that is not referenced. You must add a reference to assembly 'IKVM.GNU.Classpath, Version=0.20.0.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58'.
thank's in advance
Hi I'm learning django and I did successfully start a site on Window XP by following the tutorial.
However, on Window 7 when I issued:
django-admin.py startproject mysite
python.exe was started and a window appeared to ask me to choose either python.exe or other program to open a file....
did I do anthing wrong or there are more tricks for window 7?
thanks.
By what i understand String and StringBuilder objects both allocate contiguous memory underneath.
My program runs for days buffering several output in a String object. This sometimes cause outofmemoryexception which i think is because of non availability of contiguous memory. my string size can go upto 100MBs and i m concatenating new string frequently this causes new string object being allocated. i can reduce new string object creation by using Stringbuilder but that would not solve my problem entirely
Is there an alternative to a contiguous string object?
I'm attempting to create a program that takes input from a usb ps2 hand controller, translate and passes the info to a rs232 device. I already have everything working for the rs232 device. The problem is interfacing with a usb controller. There doesn't seem to be any good documentation out there and on top of that .NET3.0/3.5 doesn't have any libs to help you out. How would one even get started?
Hi all
When we install some applications in Winodws, we would get a dialog ask us if we want to attend the some consumer program, and send some system/applcation information to the company. Or when the Window server meets failure, it would also send error report to MS. I want to know, how can a application send information from client to report?
Best Regards,
I found that I can lunch irc using command line with arguments. The problem is that it won't join the specific channel.
This is that lunch line: C:\Program Files\mIRC\mirc.exe /join #channel1
this command line only connects to the server but it won't join the specific channel.
How can I connect and join a channel?
I write a program helloworld.exe ,it depends on a.dll,I don't have the source code of the a.dll.a.dll is a dynamic dll ,how can i change it to static library?so I can link it to the helloworld.exe.
i am really getting annoyed
all i want to do is setup a compiler for c in netbeans - i donwloaded and followed the instructions for MiniGW, and now whenever i try to comnpile a programme it says
""Resolve missing native build tools"
and the make command and debugger command fields are empty - can anyone help
if not can someone tell me a good program i can just download to code in c with in windows
thanks
I have a tabbed pane with a couple of uneditable JTextFields which I want to fill in with information from a database. However, when I set the text in the text fields to anything, it doesn't show up when I run the program. When I get the text and print it out, it does show. What could be the problem here?
Currently, I am testing every integer element against each other to find which ones match. The arrays do not contain duplicates within their own set. Also, the arrays are not always equal lengths. Are there any tricks to speed this up? I am doing this thousands of times, so it starting to become a bottle neck in my program, which is in C#.
I need to use C# to get data from database(sql) and the data in database is updated every few seconds. So do I have to make a loop or there is a better way to do that? Is it possible that when database is updating, the program can wait until it finishes updating? thx!
I'm looking for test vectors for AES-256 in CBC mode with essiv:sha256 for the IV-generation,
and for testvectors for AFMerge. Both are used in cryptsetup (a Linux program for disk encryption.)
I am a new iphone developer and was wondering if I could get some help with some code. I just want to know how to export basic character strings and variables to a website to be used by a third-party program.
Basically, if I had something as basic as:
int variableOne;
int variableTwo;
What code would I use to export these variables to a website?
I expect any good program should do all their reads and writes in a loop until all data written/read without relying that write will write everything (even with regular files). Am I right?
Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer (using -o direct_io). Some programs work, some not. Are them buggy or programs should not expect truncated writes and reads from the regular files?
I'm attempting to debug my web application with FireFox3. However, when a JSON feed comes from my application, Firefox wants to open up the "application/json" in a new program. Is there a way to configure FireFox3 to handle JSON like regular text files and open up the JSON in the current tab?
Thanks.
Besides Arduino, what other ways are there to learn hardware programming in a hands-on way? Are there any nifty kits available, either a pre-assembled robot, that you can program to move a certain way, or do certain things, or anything similar to that?
Is there a plugin for Visual Studio C++ 2008/2010 express edition just like wave-vs.net live pair programming program? Or do I have to download and install the full version of Visual Studio?