I am new to mac, my question is what else text editors can be used to edit object c code except xcode. And which one is the best for productively editing source code?
consider the following code:
@try {
if (something.notvalid)
{
return;
}
// do something else
} @catch (NSException *ex) {
// handle exception
} @finally {
NSLog(@"finally!");
}
if something is not valid and i return from within the try, does the code in @finally execute or not? I believe that it should but others I've spoken to don't think so and i'm unable to test this at the moment.
I have been facing an error when I trigger XSLT from a C# code, It mentions something about dll file access failure every time, so just want to know whether this transformation code creates any dll files (in C:\Windows\temp directory) as such??
(I have mentioned the error and triggering program in my previous question),
Consider a situation. We have some specific C++ compiler, a specific set of compiler settings and a specific C++ program.
We compile that specific programs with that compiler and those settings two times, doing a "clean compile" each time.
Should the machine code emitted be the same (I don't mean timestamps and other bells and whistles, I mean only real code that will be executed) or is it allowed to vary from one compilation to another?
I have a c++ project I am working on. I am a little stumped at the moment. I need a little help. I need to implement code from the .h file into the main.cpp file and I am not sure how to do that.
For example code code from main.cpp:
switch (choice){
case 1: // open an account
{
cout << "Please enter the opening balence: $ ";
cin >> openBal;
cout << endl;
cout << "Please enter the account number: ";
cin >> accountNum;
cout << endl;
break;
}
case 2:// check an account
{
cout << "Please enter the account number: ";
cin >> accountNum;
cout << endl;
break;
}
and code from the .h file:
void display(ostream& out) const;
// displays every item in this list through out
bool retrieve(elemType& item) const;
// retrieves item from this list
// returns true if item is present in this list and
// element in this list is copied to item
// false otherwise
// transformers
void insert(const elemType& item);
// inserts item into this list
// preconditions: list is not full and
// item not present in this list
// postcondition: item is in this list
In the .h file you would need to use the void insert under transformer in the main.cpp under case 1. How would you do that? Any help is apprecaited. I hope I didn't confuse anyone on what I am needing to know how to do. Thanks
What is faster: writing PHP code using functions or writing it as pure script? So, as I see it Apache or any other server will create from PHP code using functions a pure script... I mean we had:
function foo($a, $b){ return ($a + $b); echo foo(4, 5)}
and Apache will turn it into something like:
echo (5 + 4)
Or will it?
The title says it all: How can I close a different WinForm (B) from a different WinForm's (A) code?
I already have it set up so WinForm (B) gets opened in WinForm (A)'s code:
Form2 form2 = new Form2();
form2.ShowDialog();
im trying to load an assembly nunit created in Monodevelop
Im using the software NUnit Test Case Code Generator for create unit testing
http://www.codeproject.com/Articles/28461/NUnit-Test-Case-Code-Generator
After compiling the project in MonoDevelop, loading file .dll of the proyect in Nunit Test case generator the following error appears:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Can you help me?
How to make this css code cross browser compatible using jquery. this code only works on firefox and IE8. i wan to use in IE6 and 7 also.
ol {list-style-type: none;}
li:before {content: "(" counter(section, lower-alpha) ") ";}
li { counter-increment: section;}
Hi,
I have done changes in registry (proxy settings) via Windows programming code.
I have to restart (reopen) Internet Explorer each time I run the code to make those changes take effect.
Is there any API in Windows programming through which I can notify Internet Explorer or Windows that changes are made to the registry and there will not be any need to reopen Internet Explorer to make those changes take effect?
Thanks.
Do you know a tutorial how to create a CXF web service from existing Java code and embed it in Tomcat, and also generate a wsdl file so that any .NET system would be able to generate client code easily?
I miss that WSDL creation point in, for example this
http://www.ibm.com/developerworks/library/ws-pojo-springcxf/
tutorial. No wsdl file is generated. But still it should be present in my case to provide system interoperability.
I have some old personal/proprietary code that I want to "promote" to open-source.
But I'd really like to preserve (and publish) the full CVS history... is this possible through Google Code's SVN repository?
Take some code like
if (person.IsMale()) {
doGuyStuff();
} else {
doGirlOtherStuff();
}
(Yes, I realize this is bad OO code, it's an example)
Should this be written so that to explicitly check if person.isFemale(), and then add a new else that throws an exception? Or maybe you're checking values in an enum, or something like that. You think that no one will add new elements to the enum, but who knows? "Can never happen" sounds like famous last words.
Suppose I have a function in code behind like:
Public Function Calc(ByVal ID As Integer) As Boolean
'......
End Function
I can call this function in javascript like
var isSuccess ='<%=Calc()%>';
but how to pass the parameter in for this case? Following code not working:
var ID = 1;
var isSuccess ='<%=Calc(ID)%>';
Hi,
I am using a third party API which performs what I would assume are expensive operations in terms of time/resources used (image recognition, etc). What tell-tale signs are there that the code under test should be made to use threads to increase performance?
I have a profiler and will be profiling the code I write which will rely on this API.
Thanks
I would like to set some values in the node before actually writing the data to the DB. I already have it working by modifying book_nodeapi but I would like to do it from outside the code, some _alter option that allows me to leave the module code untouched would be great.
Thanks
The following simple program snippet gives compilation errorswith gcc-4.3.4.
Program:
int main()
{
char *ptr = new char[10];
char *ptr1 = new char[];
return 0;
}
Compilation errors:
prog.cpp: In function ‘int main()’:
prog.cpp:4: error: expected primary-expression before ‘]’ token
prog.cpp:3: warning: unused variable ‘ptr’
prog.cpp:4: warning: unused variable ‘ptr1’
But the same compiles cleanly with MSVC without any diagnostic message.
So my question is:
Does the Standard allow an new [] to be called without specifying the size? Or this a bug in MSVC?
Can someone provide a reference from the standard which will conclusively say that the above code example is ill-formed or well-formed?
I have had a look at:
5.3.4 New [expr.new] &
18.4.1.2 Array forms [lib.new.delete.array]
but couldnt find any conclusive evidence about the behavior.
I once needed the lines of the stored procedures, to be able to trace whether i have a reference to some function, procedure or table, or sometimes to try to find something inside of the sp's code. Where does the sql server stores the procedures's code?
So, you are using a bunch of javascript libraries in a website. Your javascript code calls the several APIs, but every once in a while after an upgrade, one of the API changes, and your code breaks, without you knowing it.
How do you prevent this from happening?
I'm mostly interested in javascript, but any answer regarding dynamically typed languages would be valuable.
I have this code i am doing for university. The first code works as expected, the second one provides different results.
I can not see what they are doing differently??
first:
public Mat3 getNormalMatrix() {
return new Mat3(this.getInverseMatrix()).transpose();
}
second:
public Mat3 getNormalMatrix() {
Mat4 mat = this.getInverseMatrix();
Mat3 bla = new Mat3(mat);
bla.transpose();
return bla;
}
To be a bit more clear. If I have a Visual Studio C++ solution that has two projects, say a static library with CLR support turned off, and a second project with CLR support turned on that depends on this static library, does the static library get compiled as managed code? What about libraries that the CLR project uses that are external to this solution, do they also get compiled as managed code?
I have a large cross-cutting commit that I would like to split up according to the authors whose code was affected, both to increase the reviewers' familiarity with the code they're reviewing, and to divide the review burden equitably.
I realize that the blame may be mixed within a given hunk, in which case it would be nice to either collect multiple reviewers or just choose the most "blameworthy" one (breaking ties arbitrarily is fine).
I wrote this code to subscribe to USB devices being plugged in and unplugged; the point is for IOKit to deliver notifications to my iAttached() and iDetached() functions when the corresponding events occur. However, I don't get notifications.
The code can be seen here: http://gist.github.com/402391
I didn't want to over-populate this page with it, as it is moderately long.
I need a Java code that takes tab delimited info from a file to a displayed table. The user should be able to click a row and update it, this is followed by updating the file. The code should use Swing objects.