Search Results

Search found 261 results on 11 pages for 'mohammad ashraful alam'.

Page 5/11 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >

  • Converting NSMutableData to NSString Problem

    - by Sheehan Alam
    initWithData does not convert my data object into a string properly. When I check the length of the data object, it has a value. NSMutableData* receivedData =[[NSMutableData data] retain]; NSString* json_string = [[NSString alloc] initWithData:receivedData encoding:NSUTF8StringEncoding]; Am I doing something wrong creating the string?

    Read the article

  • get error with using php nusoap for web service.

    - by mohammad mirzadeh
    i want get data from a webserver (.net) and display it into my website. my code is : $client = new soapclient('http://www.tsetmc.com/WebService/TsePublic.asmx?WSDL', true); $client->useHTTPPersistentConnection(); $user = array('UserName' => 'etc'); $pass = array('Password' => 'etc'); $result = $client->call('Board', $user, $pass); print_r( $result ); and i get this error : Warning: Illegal offset type in isset or empty in /home/mmdicir/public_html/lib/nusoap-0.7.3/lib/nusoap.php on line 7211 Array ( [faultcode] = soap:Server [faultstring] = Server was unable to process request. --- String reference not set to an instance of a String. Parameter name: s [detail] = )

    Read the article

  • Asynchronous NSURLConnection Throws EXC_BAD_ACCESS

    - by Sheehan Alam
    I'm not really sure why my code is throwing a EXC_BAD_ACCESS, I have followed the guidelines in Apple's documentation: -(void)getMessages:(NSString*)stream{ NSString* myURL = [NSString stringWithFormat:@"http://www.someurl.com"]; NSURLRequest *theRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:myURL]]; NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self]; if (theConnection) { receivedData = [[NSMutableData data] retain]; } else { NSLog(@"Connection Failed!"); } } And my delegate methods #pragma mark NSURLConnection Delegate Methods - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { // This method is called when the server has determined that it // has enough information to create the NSURLResponse. // It can be called multiple times, for example in the case of a // redirect, so each time we reset the data. // receivedData is an instance variable declared elsewhere. [receivedData setLength:0]; } - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { // Append the new data to receivedData. // receivedData is an instance variable declared elsewhere. [receivedData appendData:data]; } - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { // release the connection, and the data object [connection release]; // receivedData is declared as a method instance elsewhere [receivedData release]; // inform the user NSLog(@"Connection failed! Error - %@ %@", [error localizedDescription], [[error userInfo] objectForKey:NSErrorFailingURLStringKey]); } - (void)connectionDidFinishLoading:(NSURLConnection *)connection { // do something with the data // receivedData is declared as a method instance elsewhere NSLog(@"Succeeded! Received %d bytes of data",[receivedData length]); // release the connection, and the data object [connection release]; [receivedData release]; } I get an EXC_BAD_ACCESS on didReceiveData. Even if that method simply contains an NSLog, I get the error. Note: receivedData is an NSMutableData* in my header file

    Read the article

  • UITextView inside UIScrollView is not First Responder

    - by Sheehan Alam
    I have a UITextView on a View that becomes the first responder. When I embed the UITextView inside of a UIScrollView in Interface Builder the UITextView is no longer the first responder. I am not sure what has changed? - (void)viewDidLoad { [super viewDidLoad]; [scrollView setContentSize:CGSizeMake(540,620)]; composeTextView.delegate = self; [composeTextView becomeFirstResponder]; }

    Read the article

  • View outlet not set with UINavigationController

    - by Sheehan Alam
    I have a NIB that contains a UINavigationController which has a UIViewController. The UIViewController is being loaded externally from another nib. I am unable to set the view property thus I get the error: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "LBRootViewController" nib but the view outlet was not set.' How can I set my view property correctly?

    Read the article

  • How to make php closure compiler write to a predefined file name?

    - by Mohammad
    I'm quite embarrassed to ask this but I've been trying to figure it out all day with no luck. http://code.google.com/p/php-closure/source/browse/trunk/php-closure.php on Line 172 the write() function get the md5 encoded name via the _getHash() function on Line 276. I was wondering how I could alter this code to write the compiled code to a predefined name like copiled_code.js I've tried altering the _getCacheFileName() function on Line 272 to this function _getCacheFileName() { //return $this->_cache_dir . $this->_getHash() . ".js"; return 'copiled_code.js'; } without any results. Thanks to all of you in advance!

    Read the article

  • JQuery Ajax response not triggering success

    - by Mohammad
    This is my code, $.ajax({ type:"get", //this doesn't work //url:'http://example.com/json.php', //But this works url:'http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?', dataType:"jsonp", success:function(data){ alert('success'); }, error:function(){ alert('error'); } }); in json.php I have <?php header("Content-type: application/javascript"); ?> Then I've copied all the output of that flickr url. So the problem shouldn't be in the content of my code but how it's being sent. What do i need to fix here? Thanks in advance!

    Read the article

  • How to decode Google spreadsheet's Json respose as a Php Array

    - by Mohammad
    My google Docs Spreadsheet call returns this response in the json format (I only need everything after "rows") please look at the formatted response here : ) I use php's json_decode function to parse the data and use it (Yes, I am awful at php) This code returns NULL, and according to the documentation, NULL is returned "if the json cannot be decoded". $json = file_get_contents($jsonurl); $json_output = json_decode($json); var_dump ($json_output); // Returns NULL Basically, what i want to accomplish is to make a simple array from the first row values of the Json response. like this $array = {'john','John Handcock','[email protected]','2929292','blanc'} You guys are genius, I would appreciate your insight and help on this very much! Answer as "sberry2A" mentions bellow, the response is not valid Json, google offers the Zend Json library for this purpose, tho I decided to parse the tsv-excel version instead :)

    Read the article

  • Unsupported Media Type when deploying OTA Blackberry App

    - by Sheehan Alam
    I have a blackberry app that I am trying to deploy OTA (over the air). I have set the MIME type on my server to be: cod application/vnd.rim.cod jad text/vnd.sun.j2me.app-descriptor jar application/java-archive When I access the JAD file on my web-server through the BlackBerry Browser, I get the message Unsupported Media Type and then a prompt to download the JAD. How can I resolve this?

    Read the article

  • Dismissing a modal view in horizontal orientation?

    - by Sheehan Alam
    I have a modal view that is presented and dismissed fine when my device is in vertical orientation. I have problems when my modal view is presented in the vertical orientation, but dismissed in horizontal orientation. The entire app switches back to vertical orientation automatically. How can I ensure that if I am in horizontal orientation, the view should dismiss properly?

    Read the article

  • How to implement JQuery easing into this window scroll movement function?

    - by Mohammad
    With this code I've been able to capture the mousewheel movement and apply it to the horizontal scroll bars instead of the vertical default. $('html').bind('mousewheel', function(event, delta) { window.parent.scrollBy(-120 * delta, 0); return false; }); Is there any way that I could add this jQuery easing animation to the scroll movement? jQuery.extend( jQuery.easing, { easeInOutBack: function (x, t, b, c, d, s) { if (s == undefined) s = 1.70158; if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; } }); Thank you so much in advance!

    Read the article

  • How to auto-scroll UITableView?

    - by Sheehan Alam
    I am trying to do something interesting. I am pulling some JSON data and populating cells in a UITableView. How can I make the UITableView scroll ever second or so? I want to give the effect that as new data is coming in, the table is scrolling, so it is streaming. Any ideas?

    Read the article

  • Discrete mathematics problem - Probability theory and counting

    - by Mohammad
    Hello All, I'm taking a discrete mathematics course, and I encountered a question and I need your help. I don't know if this is the right place for that though :) It says: Each user on a computer system has a password, which is six to eight characters long, where each character is an uppercase letter or a digit. Each password must contain at least one digit. How many possible passwords are there? The book solves this by adding the probabilities of having six,seven and eight characters long password. However, when he solves for probability of six characters he does this P6 = 36^6 - 26^6 and does P7 = 36^7 - 26^7 and P8 = 36^8 - 26^8 and then add them all I understand the solution, but my question is why doesn't calculating, P6 = 10*36^5 and the same for P7 and P8, work? 10 for the digit and 36 for the alphanumeric? Also, if anyone could give me another solution, other than the one in the book. Thank you very much :)

    Read the article

  • Video match anlysis

    - by Mohammad
    Hi every body I am looking forward to find an algorithm to detect a pattern in a given video file. Actually I am going to index moments in a tennis match video at which service (first kick after a goal) is shot. PS1: sorry for broken English. PS2: I DO NOT know anything about tennis except that you need a ball to play!!

    Read the article

  • How to make php-closure compiler output to a predefined file name? (Updated)

    - by Mohammad
    Php-closure compiler (linked to source code) currently writes the compiled code to a md5 encoded filename. How can I make it so it write the compiled code to a predefined name like compiled_code.js? . . I think it has to do with the write() function on Line 164. It gets the filename via the _getCacheFileName() function (Line 272). function _getCacheFileName() { return $this->_cache_dir . $this->_getHash() . ".js"; } I've tried altering it to this: function _getCacheFileName() { //return $this->_cache_dir . $this->_getHash() . ".js"; return 'copiled_code.js'; } without any results. Thanks to all of you in advance!

    Read the article

  • Create Oracle Cursor

    - by Mohammad
    Hi, I create a cursor like this: SQL> CREATE OR REPLACE PROCEDURE Update_STUD_FinAid ( AIDY_CODE IN VARCHAR2 ) IS 2 CURSOR PublicationC IS 3 SELECT SGBSTDN_USER_ID from SGBSTDN 4 WHERE SGBSTDN_TERM_CODE_EFF ='201030'; 5 BEGIN 6 close PublicationC; 7 8 OPEN PublicationC; 9 10 FOR PublicationR IN PublicationC 11 LOOP 12 DBMS_OUTPUT.PUT_LINE( PublicationR.SGBSTDN_USER_ID ); 13 END LOOP; 14 15 close PublicationC; 16 17 END; 18 / Procedure created. And then when I run the Procedure then I get this error: ERROR at line 1: ORA-06512: at line 2 Please advise. Thanks

    Read the article

  • Confused about copying Arrays in Objective-C

    - by Sheehan Alam
    Lets say I have an array X that contains [A,B,C,D,nil]; and I have a second array Y that contains [E,F,G,H,I,J,nil]; If I execute the following: //Append y to x [x addObjectsFromArray:y]; //Empty y and copy x [y removeAllObjects]; y = [x mutableCopy]; What is the value of y? is it?: [A,B,C,D,E,F,G,H,I,J,nil] Am I performing the copy correctly?

    Read the article

  • speeding up website load using multiple servers/domains

    - by Mohammad
    When Yahoo! developer guide says "Deploying your content across multiple, geographically dispersed servers will make your pages load faster from the user's perspective". And as an explanation I read somewhere, that browsers will load up to 5 things simultaneously from the same domain. Would a subdomain, for example cdn.example.com be considered a new domain, in the previous statement?

    Read the article

  • AddObjectsFromArray does not work properly

    - by Sheehan Alam
    I have two NSMutableArrays: NSMutableArray* currentMessages NSMutableArray* items I am trying to copy the contents of items into currentMessages as such: [self.currentMessages addObjectsFromArray:self.items]; When I am debugging self.items contains 30 objects. After this operation self.currentMessages contains 0 objects. Why is the copy not working?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11  | Next Page >