Hi,
I'm writing a set of functions in c++ which can be called by excel. However, these functions are asynchronous, therefore no immediate return values available. Once a result is available I used a callback function through VBA which update the result to the relevant cell which called the functions.
But, here I'm having circular function calling problem, because when I update the cell. excel automatically call the original function once again. Please help me to get around this problem
Thank You
I have two database say DB_A and DB_B. In DB_A database, table having huge data (few tables are having 2 to 10 million data). I want to move the all table data from DB_A to DB_B database. Please help me on writing stored procedures to move efficiently (fast) the data from one database to another.
I'm writing some Erlang code and I'm very unsure whether I should let everything fail fast. One problem I find with fail fast is that for the developer/user the exception generated is pretty meaningless. Any idea what I should return which would not give esoteric and hard to read stack traces?
I'm writing a program and I have the following problem:
char *tmp;
sprintf (tmp,"%ld",(long)time_stamp_for_file_name);
Could someone explain how much memory allocate for the string tmp.
How many chars are a long variable?
Thank you,
I would appreciate also a link to an exahustive resource on this kind of information.
Thank you
I'm trying to setup log rotation in rails. I have put this in my environment/development.rb:
config.logger = Logger.new("#{RAILS_ROOT}/log/#{ENV['RAILS_ENV']}.log", 1, 5*1048576)
2 files are created :-) but it looks like rails is writing to them randomly and at the same time as well. This creates messy log files :-( what am I missing?
I am trying to figure out best practice for N-Tier application design. When designing the objects my UI needs and those that will be persisted in the DB some of my colleagues are suggesting that the objects be one in the same. This doesn't not feel right to me and I am ultimately looking for some best practice documentation to help me in this decision.
I honestly do not understand why I would want to design this way given that other applications may want to interact with my Data Access Layer....or it is just ignorance or lack of understanding on my part.
Any documentation, information you could provide would be greatly appreciated. Just want to better understand these concepts and I am having a hard time finding some good information on the best practice for implementing these patterns (Or it is right in front of me on what I found and I didn't understand what was being outlined).
Thanks,
S
I want to load a pdf file on the click of a button.
In the OnClickButton() implementation I am writing the function which open the PDF file
ShellExecute(0,
"Open",
"%s\\HELP\\RiverCADPro_User_Manual.pdf",
NULL,
NULL,
SW_MAXIMIZE);
The above code is not working.What else is to be needed so as to run the above code
I am writing a program that stores data in a dictionary object, but this data needs to be saved at some point during the program execution and loaded back into the dictionary object when the program is run again.
How would I convert a dictionary object into a string that can be written to a file and loaded back into a dictionary object? This will hopefully support dictionaries containing dictionaries.
Hey.
I was coding here the other day, writing a couple of if statements with ints that are always either zero or one (~bools), and I asked myself:
Should I use if (int == 1) or if (int != 0) ?
Is there any difference at all?
Please, don't answer with stuff regarding the int may being more/less than 1/0, that's not what I want to know.
I want some default values in my combo boxes but can't seem to figure out how to do this without writing a module that populates the combo boxes. How can I manually fill in the combo boxes so I don't have to use code to do something so simple.
Thanks
During a recent interview I was asked why one would want to create mock objects. My answer went something like, "Take a database--if you're writing test code, you may not want that test hooked up live to the production database where actual operations will be performed."
Judging by response, my answer clearly was not what the interviewer was looking for. What's a better answer?
My question is simply: what are the differences in performance between synchronous and asynchronous JavaScript script loading?
From what I've gathered synchronous code blocks the loading of a page and/or rest of the code from executing. This happens at two levels.
First, at the level of the script actually loading, and secondly, within the JavaScript code itself.
For example, on the page:
Synchronous: <script src="demo_async.js" type="text/javascript"></script>
Asynchronous: <script async src="demo_async.js" type="text/javascript"></script>
And within a script:
Synchronous: function a() {alert("a"); function b() {alert("b");}}
Asynchronous (and self-executing):
(function(a,
function(b){
alert(b);
})
{
alert(a);
}))();
So what really is the difference in performance from using these different loading methods and JavaScript patterns?
I'm writing an VS 2008 add-in to synchronize Setup project Version with startup project assembly version. It works fine.
But I was wondering if it was possible to call add-in from the Prebuild Event of my setup project.
It works fine by command line window, but I didn't find any syntax to make it work in prebuildEvent. Is Someone has an idea ?
Thanks
I am writing an iPhone App that uses a HTTPS/SOAP service which needs user credentials. After I change the password used for these credentials from a valid to an invalid one I still get a valid response from the service, as if the password was never changed. When I restart the app (with the invalid password) the app immediately receives the expected '401' message.
Any hints what I might left out to code?
Thx :)
Hey all,
I'm writing a C++ app that will communicate with another process via boost::interprocess, however I need to check if the other process is actually running first - as the other process is responsible for creating the inter-process shared memory. How do I check if the other process is running ?
folks, I'm specifically required to check other processes
This code is compiling clean. But when I run this, it gives exception "Access violation writing location" at line 9.
void reverse(char *word)
{
int len = strlen(word);
len = len-1;
char * temp= word;
int i =0;
while (len >=0)
{
word[i] = temp[len-1]; //line9
++i;--len;
}
word[i] = '\0';
}
Suppose I have two .h files: A.h and B.h.
Moreover, A.h includes B.h itself:
B.h - declares class B.
class B {
...
};
A.h - declares class A, which uses class B.
#include B.h
class A {
void SomeFunction(const B& b);
};
Now, I have some .cpp file, that uses both A and B classes (B class maybe used not only in A::SomeFunction(B))
What are the pluses to include both A.h and B.h (instead of only A.h) from the perspective of design-patterns and coding style.
I am writing a program that can have either a list or a string as an argument. How can I tell the difference between a string and a list programmatically in Erlang. Something like:
print(List) -> list;
print(String) -> string.
I've been writing a program in C++ and noticed there is a library in C# that someone else wrote that I would like to link in to my code.... but I'm not sure how to do that. Can someone suggest something? Doubt this matters, but I'm using Windows 7 with MSVC2010.
Thanks in advance!
How does one construct and access a set of key-value pairs in C? To use a silly simple example, let's say I want to create a table which translates between an integer and its square root.
If I were writing javascript, I could just do this:
var squareRoots = {
4: 2,
9: 3,
16: 4,
25: 5
}
and then access them like:
var squareRootOf25 = squareRoots[5]
What's the prettiest way to do this in C? What if I want to use one type of enum as the key and another type of enum as the value?
What are the limits of writing a C# app when you want a truly impressive GUI? At what point does one have to leave Visual C# behind and go into WPF?
Also, if I choose to go with WPF, do I have to ditch the Visual Studio IDE and go with Expression Studio?