Objective-C programming using mingw32 in Windows
Following are the steps you need to follow to setup the environment and run your first program
| S.No | Description | Link/Path/Command | Note |
|---|---|---|---|
| 1 | Install mingw32 and its libraries | http://www.gnustep.org/experience/Windows.html | Make sure you install the first two packages provided in the link (in the same order mentioned) |
| 2 | Open mingw32 | Start –> Programs –> GNUStep –> Shell | |
| 3 | Write our first program | The command prompt location points to the following path: %GNUStep_Directoy%/home/your_name/ (“D:\GNUstep\home\Prabhu B” for me) |
FirstProgram.h FirstProgram.m (Refer below for the content of the .h and .m files) |
| 4 | Compile the program |
gcc -o FirstProgram FirstProgram.m –I /GNUstep/System/Library/Headers/ -L /GN |
|
| 5 | Run the program | ./FirstProgram |
| FirstProgram.h | FirstProgram.m |
|---|---|
|
#import<Foundation/NSObject.h> @interface FirstProgram:NSObject { } -(int) addNumber1 : (int) x withNumber2 : (int) y; @end |
#import "FirstProgram.h" @implementation FirstProgram -(int)addNumber1: (int) x withNumber2: (int) y { //add |
Windows Live Writer – Already Installed Problem
When you are installing the Windows Live Essentials and wondering why Writer is under the ‘Already installed’ section, then you might be as surprised as me.
Reason: I had installed and removed but still the entries in the registry was creating the issue.
Solution:
To uninstall Windows Live Writer, click Start, then type/paste the following and press Enter:
msiexec /x {178832DE-9DE0-4C87-9F82-9315A9B03985}
Grails Constraints
Consider the following domain
class User {
String name,
String email,
String password
static constraints = {
password(size:6..32,blank:false),
email(blank:false,email:true)
}
}
Is there a way where I can validate only my password?
YES
if(user.hasErrors()) {
if(user.errors.hasFieldErrors(“password”)) {
println user.errors.getFieldError(“password”).rejectedValue
}
}
int value from param – groovy way
In Java,
int paramValue = Integer.parseInt(request.getParameter(“paramName”));
In Grails.
int paramValue – param.int(“paramName”)
how sleek….
Xpressmark – Setting it up on prgmr.com
I enjoyed an impressive service of that of slicehost for hosting xpressmark. But the annual cost of hosting it (a 256MB slice) comes at a price tag of 240 USD (-20 USD for an annual membership) which is a bit on the expensive side considering the fact that I don’t get any revenue out of it. Nevertheless I didnt want to bring it down either. The number of visitors to the site was always on the rise and I felt that people enjoy the service.
So I was looking for an alternative hosting solution (a VDS ofcourse). I came across another solution provider prgmr.com who provided the same solution at 40% of the price.That was pretty cool. And their tag We don’t assume you are stupid means you are on your own once you are given your slice. Though the same applies to slicehost, they have a pretty good console that helps you out in setting up your slice unlike prgmr.com. Rightly so they dont assume you are stupid.
I was successfully able to set it up, was able to setup the environment, bring the server up and migrate the data. But unfortunately couldn’t access the service outside the server, blame it on iptables, had to shut it down and then bingo… Xpressmark back to life in a brand new server (Yes, Luke and his team were in the process of configuring the box and the links to buy the slice werent even made public and I was lucky to get the slice pretty quickly after shooting a mail to them). I will post my experience with prgmr.com in the coming days. Hope it will be as good as slicehost.
126: The specified module could not be found – ../mysql.so
I was trying my hands for the first time on RoR (Ruby on Rails).
(Netbeans 6.7 , Windows XP).
In the process, I got the following (misleading error)
126: The specified module could not be found – ../mysql_api.so
But mysql_api.so was in the path where ruby was looking for.
Solution:
Make sure your MySql bin path is in your PATH variable.
AVAudioRecorder – iPhone Audio Recording
I have been using the AVAudioRecorder class to record the audio. But it wasnt allowing me to play it back. I had to restart the application to play it. I had to toil hard with it for a few hours before I found the culprit.
Thanks to this link. The problem was in my AVAudioSession Category which was set to AVAudioSessionCategoryRecord while it should have been AVAudioSessionCategoryPlayAndRecord.
leave a comment