Hi. I have an exception being thrown in my code, but when I wrap it in an try/catch block, it doesn't get caught. The NSLog statement is never called in the catch block. Here's the code...
NSInteger quoteLength;
[data getBytes:(void *)"eLength range:NSMakeRange(sizeof(messageType), sizeof(quoteLength))];
@try
{
//Debugger stack trace shows an NSException being thrown on this statement
NSData *stringData = [data subdataWithRange:NSMakeRange(sizeof(messageType) + sizeof(quoteLength), [data length])];
NSString *quote = [[NSString alloc] initWithData:stringData encoding:NSUTF8StringEncoding];
NSLog(@"received quote: %@",quote);
[quote release];
}
@catch (NSException * e)
{
NSLog(@"Exception Raised: %@", [e reason]);
}
Why doesn't it get caught?
Thanks so much!
I have this peice of code in my handler.js, I'm getting the correct serverData value throught ajax, ( Well it's echoed correctly un the alert box) but no matter what, i just cant seem to enter either of the 'if' blocks. I have double checked the type and it is a string. Something is definetly funky.
function uploadSuccess(file, serverData) {
try {
var progress = new FileProgress(file, this.customSettings.progressTarget);
alert(serverData);
if(serverData == "uploadSuccess") {
progress.setComplete();
progress.setStatus("Completed");
progress.toggleCancel(false);
}
if(serverData == "uploadError") {
progress.setError();
progress.toggleCancel(false);
progress.setStatus("Error: X");
progress.toggleCancel(false);
}
}
catch (ex) {
this.debug(ex);
}
}
I have an app that needs to run a command in the terminal.
or i want to run this command in my app.
ssh -N -p 24 -g -C -c des -D 1080 username@server
plz help me . tnx
Hi. I need to take a picture from a webcam into a webapp (PHP5/JQuery/HTML5) but I don't want to use Flash; Is there a light java applet or any alternative technology for this?.
Hi all,
May I know what does this chunk of code do in wsadmin?
serverMBean = AdminControl.completeObjectName("*,type=Server")
AdminControl.invoke(serverMBean, "stop")
Will it stop the server entirely? Otherwise, what does "stop" do in the invoke method?
Using Memcache Java API (http://code.google.com/appengine/docs/java/memcache/overview.html)
The JCache is not fully implemented and the methods values(), keySet() as well as entrySet() throw java.lang.UnsupportedOperationException
Anybody know of a workaround or have a working example using a lower-level API?
Hello,
I am having a rather strange problem, I deployed 2 .NET applications on my machine. Both run on v2.0.
Now, while one of it works smoothly, the other one doesn't even start! Moreover, it doesn't throw any error, I couldn't see any error listings in the Event Viewer.
Becoming hard to debug. On every other machine, both the exe's work perfectly fine!
Any known issues?
Thanks
Hi, I have a question about ruby and wsdl soap.
I couldn't find a way to get each method's params and their type.
For example, if I found out that a soap has a methods called "get_user_information" (using wsdlDriver) is there a way to know if this method requires some params and what type of params does it require (int, string, complex type, ecc..)?
I'd like to be able to build html forms from a remote wsdl for each method...
Sorry for my horrible English :D
Hi
I m working on a client-server program, where there is no test at all.
When i try to do some test with two server, it's look like both server is connected to the same database. I think the reason is some bad use of static field.
So i wonder, is there a way to start two VM in a junit test?
Hey all
so i wehnt ahead and opened up my .gitconfig file and manually input the
[core]
editor = 'C:/Program Files/Notepad++/notepad++.exe'
which would allow me to execute command:
(im trying to setup my .gitignore list)
"C:/Program Files/Notepad++/notepad++.exe" .gitignore
im JUSt not interested in typing this out every time that i need to make a file
SO ive heard something about editing PATH to allow me to replace the above with something like:
npp .gitignore
any help would be aprpeciated!
i create my own dialog form with two buttons (ok, cancel) and checked list box. i want to get all selected strings in first form which shown second form. for that purpose i do function GetSelected which return CheckedIndices-GetEnumerator() of my list box. now i want to deselect all strings on pressed cancel button. And deselect all strings on close form by pressing X in corner of form. how to track click the X?
One last question about Client Profile installation. I downloaded the Microsoft .NET Framework Client Profile Online Installer because we want to put it in the installation CD because our end user might not have either .net framework 3.5 or internet. So we want to be able to handle both cases.
In the prerequisites I'm able to select the location of where the file will be, but I don't know where it should be. I want to be able to somehow put the path of the cd, something like d:\ProductName\Prerequisites\DotNetFx35ClientSetup.exe so it can get it and install it from there. Does anyone have an idea of how this can be achieved?
Thank you.
Here's the prerequisites window:
Ok, i have a simple database engine (its a proprietary product written in vb6) for one of my applications...
i'd like to create an ODBC driver for it so i can use some of my other applications (which require a database) with my database engine rather than microsoft sql (which they are currently using)....
Does anyone have any heads up on how to develop an ODBC driver (preferably in vb6) ... i'v spent the last few hours googling it and havnt had much luck... about the best thing i have found so far is: http://www.datadirect.com/products/openaccess/index.ssp
but i dont exactly want to go buying an SDK to write an ODBC driver...
Cheers in advance,
Code Complete says it is good practice to always use block identifiers, both for clarity and as a defensive measure.
Since reading that book, I've been doing that religiously. Sometimes it seems excessive though, as in the case below.
Is Steve McConnell right to insist on always using block identifiers? Which of these would you use?
//naughty and brief
with myGrid do
for currRow := FixedRows to RowCount - 1 do
if RowChanged(currRow) then
if not(RecordExists(currRow)) then
InsertNewRecord(currRow)
else
UpdateExistingRecord(currRow);
//well behaved and verbose
with myGrid do begin
for currRow := FixedRows to RowCount - 1 do begin
if RowChanged(currRow) then begin
if not(RecordExists(currRow)) then begin
InsertNewRecord(currRow);
end //if it didn't exist, so insert it
else begin
UpdateExistingRecord(currRow);
end; //else it existed, so update it
end; //if any change
end; //for each row in the grid
end; //with myGrid
Hi friends,
How I can develop 'Search Engine Friendly' web app in GWT? Take an example of StackOverflow it self, its a web app and should be SEO friendly allowing user to search from search engine. If some one want to develope same app in GWT. How one can make it SEO friendly?
As GWT contain a single HTML file. How we can allow its inner content to be visible in SE?
Any suggestion or comment, will really help. Thank you.
I am not sure where the best place to put validation (using the Enterprise Library Validation Block) is? Should it be on the class or on the interface?
Things that may effect it
Validation rules would not be changed in classes which inherit from the interface.
Validation rules would not be changed in classes which inherit from the class.
Inheritance will occur from the class in most cases - I suspect some fringe cases to inherit from the interface (but I would try and avoid it).
The interface main use is for DI which will be done with the Unity block.
We are really in a mess. The following is what happened.
We have taken backup of WSS_Content database.
From Central Administration Page we remove the database.
Added a new database for the website.
Now we are getting the below error
HTTP/1.1 404
Connection: close
Date: Wed, 07 Apr 2010 10:04:54 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 12.0.0.4518
Even replacing the database not helping. Can someone help us??
Is there a way to capture the screen but without the app itself getting shown. I know how to minimize or make a frame invisible but this has to be done real fast cos it's going to happen alot in each second (at least once every second). I want it to look something like the magnifier in Windows Vista/7. (The app can see behind itself.)
Thanks in advance.
I am trying to dislplay a kannda character in a Java app.
String fonts[] = ge.getAvailableFontFamilyNames();
This shows that there is a font family by name "BRH Kannada"
Font f = new Font("BRH Kannada", Font.PLAIN, 20);
and then I do
button.setFont(f);
now when i set the button text, I have to ideally get the text on button to use the BRH kannada font.
However, what and how should I give the string as?
I am having issues with RAD7.
My server will not start for me today. I am working from home and connected to the VPN. Everything works except my server in RAD. It worked fine yesterday in work and had previously worked when I was at home but that was a few weeks ago.
Are there any settings that I should look out for? I have disabled my proxy settings in RAD and turned off everything in my firewall. I can ping all the DBs that the server is connecting to.
I have even removed all the projects from the server and it will still not start. It keeps trying and then times out after 300s.
Any suggestions?
A system has up to 100 VC++ projects, each spitting out a DLL or EXE. In addition there are many COM components with IDL and generated .h/.c files.
What's 'the right way' or at least a good way to organise this with Doxygen? One overall doxy project or one per project/solution? And what's the right way to handle COM, which has generated code and a lot of 'fluff' that will bloat generated HTML files.
I'm looking for a package to support reliably executing external processes from Java. My criteria:
Abstract over OS. So if I want to run 'foo', it will look for 'foo.bat', 'foo.exe' under windows and 'foo' under other OSs (or, have a way of passing a map of os-command)
Being able to execute Java classes by simply giving the class name and arguments (so the package locates the java command, copies jvm flags and then executes)
Process stdout and stderr properly
Watchdog / Monitoring capabilities
I've looked at commons-exec but it looks like it answers only 3 & 4. Ant has support for execution but looks like an overkill to use it for this purpose only.