Hey all.
Having a reallllll mind pain.
I have a php image uploader which is all good and sotring the file and the jquery ajax is returning the image in an ammended html div with a div set up like this:
#crop-holder {
width:80px;
height:80px;
margin:10px 10px 20px 10px;
border:1px #c0c0c0 solid;
overflow:hidden;
cursor:move;
}
The image is viewing fine and I am using the jquery scrollview plugin: http://code.google.com/p/jquery-scrollview/
I have tried adding a few lines to the plugin to store variables of scrollTop and Left and then replacing two hidden input values with x and y in my page. And then on the returned ajax html in the div I am trying to on a button click (for example) retrieve the values of the two hidden inputs....
Heres what i added to the plugin (i'm no js expert!):
.mouseout(function(){
var _m = this.m;
var lasty = _m.scrollTop();
getElementById("ycord").value = lasty;
var lastx = _m.scrollLeft();
getElementById("xcord").value = lastx;
self.stopgrab();
})
Still no luck!!
How can I get the scrollTop and scrollLeft and successfully prepare them for sending onto another php script!?
Thanks:)
stefpretty
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]
Hello,
I've used a familiar code to convert image to Black & White which I've founded on several forums.
The code is:
CGColorSpaceRef colorSapce = CGColorSpaceCreateDeviceGray();
CGContextRef context = CGBitmapContextCreate(nil, originalImage.size.width, originalImage.size.height, 8, originalImage.size.width, colorSapce, kCGImageAlphaNone);
CGContextSetInterpolationQuality(context, kCGInterpolationHigh);
CGContextSetShouldAntialias(context, NO);
CGContextDrawImage(context, CGRectMake(0, 0, originalImage.size.width, originalImage.size.height), [originalImage CGImage]);
CGImageRef bwImage = CGBitmapContextCreateImage(context);
CGContextRelease(context);
CGColorSpaceRelease(colorSapce);
UIImage *resultImage = [UIImage imageWithCGImage:bwImage]; // This is result B/W image.
CGImageRelease(bwImage);
return resultImage;
When I'm using this code with on Horizontal image it's work fine,
but when I'm trying a to use this code on Vertical image, the result is
disproportionate image and rotate 90 degree left.
Can anyone know what could be the problem?
Thanks,
Kfir.
I'd like to create a regular expression that will match and return based on the following criteria:
1) I have N search terms entered by a user
2) I have a body of text.
3) I want to return a list of all the occurrences of all the search terms entered by the user plus surrounding context. I think (\w+\W+){,4}(", ")(\W+\w+){,4} might work.
4) I don't know how to use RegexKitLite at all. Do I invoke a RegexKitLite class? or does it interface into NSString somehow?
My problem is twofold: 1) I'm trying to determine an eloquent way to allow the user to type into a UITextView and store the time each word was typed into an array. The time will be a float which starts at 0 when the user begins to type. 2) Conversely, I'd like the user to be able to tap on a word in the UITextView and display the time that word was typed (displaying in an NSLog() is fine). Considerations that may throw a wrench into a possible approach -- what if the user goes back to the top of the text and starts typing or to the middle of the text?
Even a suggested approach without code would be appreciated, because right now I'm drawing a blank.
I know that javascript, for example supports functions inside of functions, like so:
function doSomething(){
function doAnothingThing(){
//this function is redefined every time doSomething() is called and only exists inside doSomething()
}
//you can also stick it inside of conditions
if(yes){
function doSomethingElse(){
//this function only exists if yes is true
}
}
}
Does objective-c support this? Theoretical example:
-(void) doSomething:(id) sender{
-(void) respondToEvent: (id) sender{
//theoretically? ... please?
}
}
BONUS: What is the proper term for a "local" function?
Hi,
I am building an app that plays multiple video files, But I would like to know How do you download a video file (100mb - 300mb) from a server into the application's bundle so it can later be locally referred to in code? The reason I want this type of a set up in my app is that I don't want the app binary to be made unnecessarily large due to including videos some users may not want. Also does this violate any of apple's terms? Also would it be simple to implement a progress view with this kind of set up and if so how?
Any help is appreciated.
When i request for inbox messages in fql.query using the below query.
SELECT message_count FROM thread WHERE folder_id = 0
It is giving this error.
yyyyyyyyyy is not permitted to requested mailbox permissions from xxxxxxxxx
hi..
i am using UIviewcontroller subclasses. In my main view i have 3 buttons, each button will load a different nib. and each new nib is having one back button to come back to main view.
when i click one the back button of any view to move to the main view the dealloc of that view is not getting called? i didnt understood this.
can anyone explain when those views dealloc will be called?
I'm trying to build an iPhone application that has two subviews in the main window. Each view has its own UIViewController subclass associated with it. Also, within each controller's implementation, I've added the following method:
-(BOOL)shouldAutorotateToInterfaceOrientation:
(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
Thus, I would expect both of the views to respond to changes in orientation. However, this is not the case. Only the first view added to the app's main window responds to orientation. (If I swap the order the views are added, then only the other view responds. In other words, either will work--but only one at a time.)
Why is this? Is it not possible to handle the orientation changes of more than one view?
Thanks!
EDIT: Someone else had this question, so I'm copying my solution here:
I was able to address this issue by providing a root view and a root view controller with the method "shouldAutoRotate..." and adding my other views as subviews to the root view. The subviews inherit the auto-rotating behavior, and their associated view controllers shouldn't need to override "shouldAutoRotate..."
I use this in FMBL = echo "<p>Hello, <fb:name uid=\"$user_id\" useyou=\"false\" />!</p>";
But it dont work on the iFrame option. What i need to do in order to see the user name in a iFrame? Thanks
hi,
I'm trying to check if a given URL is valid and i'm doing it like this:
- (BOOL)urlIsValid:(NSString *)address {
NSURL *testURL = [NSURL URLWithString:address];
if (testURL == nil) {
return NO;
}
else {
return YES;
}
}
Since "URLWithString" is supposed to return "nil" if the URL is malformed I thought this would work but it doesn't for some reason. Could someone please tell me why?
Thanks in advance!
I've seen several questions/answers related to entirely creating a button in code, but not one which would let me know how to change the button image in code, when I originally added the button to my NIB in Interface Builder. I know how to change the background in Interface Builder.. but I want to change it in code, so I can change it automagically. Any help really appreciated!
Perhaps the answer is so obvious nobody needs to ask.. if so please forgive the dweeb that I am and help! :-)
New to MapKit. Having problems centering map around a specified point. Here is the code. Not sure why this is not working. We are expecting to see a map centered around Cincinnati, OH. What we are seeing is the default google map of the world.
Any help appreciated.
/ Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
CLLocationCoordinate2D mapCoords[2];
mapCoords[0].latitude = 39.144057;
mapCoords[0].latitude = -84.505484;
mapCoords[1].latitude = 39.142984;
mapCoords[1].latitude = -84.502534;
MKCoordinateSpan span;
span.latitudeDelta = 0.2;
span.longitudeDelta = 0.2;
MKCoordinateRegion region;
region.center = mapCoords[0];
region.span = span;
[mapView setRegion:region animated:YES];
}
How does iOs know?
Does each view has a pointer to it's controller?
What happened?
When we pop a viewController from navigation, does the navigationController arrange which view should be called?
For example:
If I added:
[[BNUtilitiesQuick window] addSubview:[BNUtilitiesQuick searchController].view];
viewWillAppear will be called.
However, window doesn't know the viewController. I am passing the view outlet of the controller not the controller. How can iOs 5 knows that it has to call [[BNUtilitiesQuick searchController] viewWillAppear:YES]
I've read many many blogs and examples of how to open an app from an URL scheme (for example, this blog), and it seems to work great when I call my app from mobile safari. For instance, when I call testapp://some.data.here in mobile safari, it opens my testapp and I can parse out the some.data.here.
However, when I call testapp://some.data.here in iOS-Chrome, it just googles the term instead of calling the app.
Is there a way to have iOS Chrome recognize the URL as a registered app the way mobile safari does?
When I google this topic, I see a lot of comments on how to open a url in chrome from an app, but not the other way around.
Has anyone encountered this?
Thanks!
i read it was going to be changed to 520px in early 2010, but i keep seeing pages that are new that are the older 760px width - is it safe to build at the wider width still or should we be building at 520px?
I've built a notification sending system that sends notifications to all users of our app, using the app access token. This system is currently running on my localhost. When I configure it with the appid and appsecret for my dev and stage environments, it works fine. But when I put in the appid and appsecret of the LIVE app, I get this error:
{"message":"The client token cannot be used for this API", "type":"OAuthException", "code":190}
So what's different between dev and live? Dev and Stage are in sandbox mode, Live is not. So I tried disabling sandbox mode on Dev/Stage and they continue to function fine. Dev works fine, Stage works fine, Live gives this error. All other code is the same except for the appid, appsecret, and redirect_uri (changing it to match the domain of each environment).
I have checked this post, but unfortunately resetting our appsecret on a site with 1,000,000 users is not something we can do at the moment (too much other functionality relies on it).
I'm using Xcode 2.5 on Mac 10.4.11 PPC. javac -version returns 1.5.x yet when I imported my source code and tried to build it in Xcode, I get errors all over because generics, annotations, and for-each loops are not supported in -source 1.3.
I thought I found the setting to change the source version in Xcode in the above but it doesn't work. Any ideas?
I am looking for some direction on how to render a barcode from a numeric string on an iPhone? The symbology is not really important right now just curious on the basics or third party support if necessary.
Thanks in advance.
Hi,
I am building an app that plays multiple video files, But I would like to know How do you download a video file (100mb - 300mb) from a server into the application's documents so it can later be locally referred to in code? The reason I want this type of a set up in my app is that I don't want the app binary to be made unnecessarily large due to including videos some users may not want. Also does this violate any of apple's terms? Also would it be simple to implement a progress view with this kind of set up and if so how?
Any help is appreciated.