Search Results

Search found 1007 results on 41 pages for 'rajendra kumar uppal'.

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

  • FMS NetConnection.Connect.Close happening when starts and even in the middle of video in Flash with

    - by Sunil Kumar
    Hi I have developed a Flash Video player in Flash CS3 with Action Script 2.0 to play video from Adobe Flash Media Server 3.5. To play video from FMS 3.5, first I have to verify my swf file on FMS 3.5 server console so that it can be ensure that RTMP video URL only be play in verified SWF file. Right now I am facing problem of "NetConnection.Connect.Close" when I try to connect my NetConnection Object to FMS 3.5 to stream video from that server. So now I am getting this message "NetConnection.Connect.Close" from FMS 3.5. When this is happening in my office area at the same time when I am checking the the same video url from out side the office (With help of my friends who is in another office) area it is working fine. My friends naver faced even a single issue with NetConnection.Connect.Close. But in my office when I got message NetConnection.Connect.Close, I can play another streaming video very well like mtv.com jaman.com rajshri.com etc. Some time FMS works fine and video starts playing but in the middle of the video same thing happen "NetConnection.Connect.Close" There is no issue of Bandwidth in my office. I do't know why this is happening. Please see the message when I am getting "NetConnection.Connect.Close" message. NetConn == data: NetConn == objectEncoding: 0 NetConn == description: Connection succeeded. NetConn == code: NetConnection.Connect.Success NetConn == level: status NetConn == level: status NetConn == code: NetConnection.Connect.Closed Please help Thanks & regards Sunil Kumar

    Read the article

  • which xml validator will work perfectly for multithreading project

    - by Sunil Kumar Sahoo
    Hi All, I have used jdom for xml validation against schema. The main problem there is that it gives an error FWK005 parse may not be called while parsing The main reason was that multiple of threads working for xerces validation at the same time. SO I got the solution that i have to lock that validation. which is not good So I want to know which xml validator works perfectly for multithreading project public static HashMap validate(String xmlString, Validator validator) { HashMap<String, String> map = new HashMap<String, String>(); long t1 = System.currentTimeMillis(); DocumentBuilder builder = null; try { //obtain lock to proceed // lock.lock(); try { builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); // Source source = new DOMSource(builder.parse(new ByteArrayInputStream(xmlString.getBytes()))); validator.validate(new StreamSource(new StringReader(xmlString))); map.put("ISVALID", "TRUE"); logger.info("We have successfuly validated the schema"); } catch (Exception ioe) { ioe.printStackTrace(); logger.error("NOT2 VALID STRING IS :" + xmlString); map.put("MSG", ioe.getMessage()); // logger.error("IOException while validating the input XML", ioe); } logger.info(map); long t2 = System.currentTimeMillis(); logger.info("XML VALIDATION TOOK:::" + (t2 - t1)); } catch (Exception e) { logger.error(e); } finally { //release lock // lock.unlock(); builder = null; } return map; } Thanks Sunil Kumar Sahoo

    Read the article

  • How to play .3gp videos in mobile using RTMP (FMS) and HTTP?

    - by Sunil Kumar
    Hi I am not able to play video on mobile device which is .3gp container and H.263 / AMR_NB encoded. I just want to play my website videos in mobile device also just like youtube.com. I want to use RTMP and HTTP both. My requirement is as follows- Which codec and container will be best? Should I use FLV to play video on mobile device? RTSP required or can be use RTMP? Is NetStream and NetConnection methods different from Flash Player in Flash Lite Player? How to play 3gp video using RTMP stream ie. ns.play(“mp4:mobilevideo.3gp”, 0, -1, true) is it ok or any thing else required? For mobile browser and computer browser, can I use single player or I have to make different player for computer browser and mobile browser? It would be better if I can do it with single player for both mobile and computer browser. Sample code required for testing. If you can. I got below article in which they mention that we can play video 3gp container in mobile also. Please find the article. Articles URL- http://www.hsharma.com/tech/articles/flash-lite-30-video-formats-and-video-volume/ http://www.adobe.com/devnet/logged_in/dmotamedi_fms3.html Thanks Sunil Kumar

    Read the article

  • android odbc connection

    - by Vijay Kumar
    i want to connect odbc connection for my android application. Here in my program i'm using oracle database 11g and my table name is sample. After i run the program close the emulator open the database the values could not be stored. Please give one solution or any changes in my program or connection string. package com.odbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import android.app.Activity; import android.os.Bundle; public class OdbcActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); String first="vijay"; String last="kumar"; try { DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localshot:1521:XE","system","vijay"); PreparedStatement pst=con.prepareStatement("insert into sample(first,last) values(?,?"); pst.setString(1,first); pst.setString(2,last); pst.executeUpdate(); } catch(Exception e) { System.out.println("Exception:"+e); } } }

    Read the article

  • Help regarding Android NDK

    - by Siva Kumar
    I am a beginner in using Android NDK. I am using Eclipse and I installed cygwin to build the c file to generate the .so file But while building the c file in cygwin I am always getting the error make: ***No rule to make target 'file.c' ... .Stop I tried building different C codes but for every file it says the same error .. Here is the source code: public class ndktest extends Activity { static { System.loadLibrary("ndkt"); } private native void helloLog(String logThis); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); helloLog("this is to test log file"); } } file.c void Java_com_ndktest_helloLog(JNIEnv * env, jobject this, jstring logThis) { jboolean isCopy; const char * szLogThis = (*env)->GetStringUTFChars(env, logThis, &isCopy); (*env)->ReleaseStringUTFChars(env, logThis, szLogThis); } And here is my Android.mk LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_LDLIBS := -llog LOCAL_MODULE := ndkt LOCAL_SRC_FILES := file.c include $(BUILD_SHARED_LIBRARY) I searched for the solution for the cause of error ... but nothing works for me. Can anyone tell me where I am making the mistake ? Thanks, Siva Kumar

    Read the article

  • Update MySQL table using data from a text file through Java

    - by Karthi Karthi
    I have a text file with four lines, each line contains comma separated values like below file My file is: Raj,[email protected],123455 kumar,[email protected],23453 shilpa,[email protected],765468 suraj,[email protected],876567 and I have a MySQL table which contains four fields firstname lastname email phno ---------- ---------- --------- -------- Raj babu [email protected] 2343245 kumar selva [email protected] 23453 shilpa murali [email protected] 765468 suraj abd [email protected] 876567 Now I want to update my table using the data in the above text file through Java. I have tried using bufferedReader to read from the file and used split method using comma as delimiter and stored it in array. But it is not working. Any help appreciated. This is what I have tried so far void readingFile() { try { File f1 = new File("TestFile.txt"); FileReader fr = new FileReader(f1); BufferedReader br = new BufferedReader(fr); String strln = null; strln = br.readLine(); while((strln=br.readLine())!=null) { // System.out.println(strln); arr = strln.split(","); strfirstname = arr[0]; strlastname = arr[1]; stremail = arr[2]; strphno = arr[3]; System.out.println(strfirstname + " " + strlastname + " " + stremail +" "+ strphno); } // for(String i : arr) // { // } br.close(); fr.close(); } catch(IOException e) { System.out.println("Cannot read from File." + e); } try { st = conn.createStatement(); String query = "update sampledb set email = stremail,phno =strphno where firstname = strfirstname "; st.executeUpdate(query); st.close(); System.out.println("sampledb Table successfully updated."); } catch(Exception e3) { System.out.println("Unable to Update sampledb table. " + e3); } } and the output i got is: Ganesh Pandiyan [email protected] 9591982389 Dass Jeyan [email protected] 9689523645 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1 Gowtham Selvan [email protected] 9894189423 at TemporaryPackages.FileReadAndUpdateTable.readingFile(FileReadAndUpdateTable.java:35) at TemporaryPackages.FileReadAndUpdateTable.main(FileReadAndUpdateTable.java:72) Java Result: 1 @varadaraj: This is the code of yours.... String stremail,strphno,strfirstname,strlastname; // String[] arr; Connection conn; Statement st; void readingFile() { try { BufferedReader bReader= new BufferedReader(new FileReader("TestFile.txt")); String fileValues; while ((fileValues = bReader.readLine()) != null) { String[] values=fileValues .split(","); strfirstname = values[0]; // strlastname = values[1]; stremail = values[1]; strphno = values[2]; System.out.println(strfirstname + " " + strlastname + " " + stremail +" "+ strphno); } bReader.close(); } catch (IOException e) { System.out.println("File Read Error"); } // for(String i : arr) // { // } try { st = conn.createStatement(); String query = "update sampledb set email = stremail,phno =strphno where firstname = strfirstname "; st.executeUpdate(query); st.close(); System.out.println("sampledb Table successfully updated."); } catch(Exception e3) { System.out.println("Unable to Update sampledb table. " + e3); } }

    Read the article

  • SQL SERVER – SQL Server Performance: Indexing Basics – SQL in Sixty Seconds #006 – Video

    - by pinaldave
    A DBA’s role is critical, because a production environment has to run 24×7, hence maintenance, trouble shooting, and quick resolutions are the need of the hour.  The first baby step into any performance tuning exercise in SQL Server involves creating, analyzing, and maintaining indexes. Though we have learnt indexing concepts from our college days, indexing implementation inside SQL Server can vary.  Understanding this behavior and designing our applications appropriately will make sure the application is performed to its highest potential. Vinod Kumar and myself we often thought about this and realized that practical understanding of the indexes is very important. One can not master every single aspects of the index. However there are some minimum expertise one should gain if performance is one of the concern. More on Indexes: SQL Index SQL Performance I encourage you to submit your ideas for SQL in Sixty Seconds. We will try to accommodate as many as we can. Here is the interview of Vinod Kumar by myself. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Video

    Read the article

  • Silverlight Cream for November 24, 2011 -- #1173

    - by Dave Campbell
    In this Thanksgiving Day Issue: Andrea Boschin, Samidip Basu, Ollie Riches, WindowsPhoneGeek, Sumit Dutta, Dhananjay Kumar, Daniel Egan, Doug Mair, Chris Woodruff, and Debal Saha.Happy Thanksgiving Everybody! Above the Fold: Silverlight: "Silverlight CommandBinding with Simple MVVM Toolkit" Debal Saha WP7: "How many pins can Bing Maps handle in a WP7 app - part 3" Ollie Riches Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up From SilverlightCream.com:Windows Phone 7.5 - Play with musicAndrea Boschin's latest WP7 post is up on SilverlightShow... he's talking about the improvements in the music hub and also the programmability of musicOData caching in Windows PhoneSamidip Basu has an OData post up on SilverlightShow also, and he's talking about data caching strategies on WP7How many pins can Bing Maps handle in a WP7 app - part 3Ollie Riches has part 3 of his series on Bing Maps and pins... sepecifically how to deal with a large number of them... after going through discussing pins, he is suggesting using a heat map which looks pretty darn good, and renders fast... except when on a device :(Improvements in the LongListSelector Selection with Nov `11 release of WP ToolkitWindowsPhoneGeek's latest is this tutorial on the LongListSelector in the WP Toolkit... check out the previous info in his free eBook to get ready then dig into this tutorial for improvements in the control.Part 25 - Windows Phone 7 - Device StatusSumit Dutta's latest post is number 25 in his WP7 series, and time out he's digging into device status in the Microsoft.Phone.Info namespaceVideo on How to work with Picture in Windows Phone 7Dhananjay Kumar's latest video tutorial on WP7 is up, and he's talking about working with Photos.Live Tiles–Windows Phone WorkshopDaniel Egan has the video up of a Windows Phone Workshop done earlier this week on Live Tiles31 Days of Mango | Day #15: The Progress BarDoug Mair shares the show with Jeff Blankenburg in Jeff's Day 15 in his 31 Day quest of Mango, talking about the progressbar: Indeterminate and Determinate Modes abound31 Days of Mango | Day #14: Using ODataChris Woodruff has a guest spot on Jeff Blankenburg's 31 Days series with this post on OData... long detailed tutorial with all the codeSilverlight CommandBinding with Simple MVVM ToolkitDebal Saha has a nice detailed tutorial up on CommandBinding.. he's using the SimpleMVVM Toolkit and shows downloading and installing itStay in the 'Light!Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCreamJoin me @ SilverlightCream | Phoenix Silverlight User GroupTechnorati Tags:Silverlight    Silverlight 3    Silverlight 4    Windows PhoneMIX10

    Read the article

  • Silverlight Cream for November 25, 2011 -- #1174

    - by Dave Campbell
    In this Issue: Michael Collier, Samidip Basu, Jesse Liberty, Dhananjay Kumar, and Michael Crump. Above the Fold: WP7: "31 Days of Mango | Day #16: Isolated Storage Explorer" Samidip Basu Metro/WinRT/W8: "1360x768x32 Resolution in Windows 8 in VirtualBox" Michael Crump Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up Alex Golesh releases a Silverlight 5-friendly version of his external map manifest file tool: Utility: Extmap Maker v1.1From SilverlightCream.com:31 Days of Mango | Day #17: Using Windows AzureMichael Collier has Jeff Blankenburg's Day 17 and is talking about Azure services for your Phone apps... great discussion on this... good diagrams, code, and entire project to download31 Days of Mango | Day #16: Isolated Storage ExplorerSamidip Basu has Jeff Blankenburg's 31 Days for Day 16, and is discussing ISO, and the Isolated Storage Explorer which helps peruse ISO either in the emulator or on your deviceTest Driven Development–Testing Private ValuesJesse Liberty's got a post up discussing TDD in his latest Full Stack excerpt wherein he and Jon Galloway are building a Pomodoro timer app. He has a solution for dealing with private member variables and is looking for feedbackVideo on How to work with System Tray Progress Indicator in Windows Phone 7Dhananjay Kumar's latest video tutorial is up... covering working with the System Tray Progress Indicator in WP7, as the title says :)1360x768x32 Resolution in Windows 8 in VirtualBoxMichael Crump is using a non-standard resolution with Win8 preview and demosntrates how to make that all work with VirtualBoxMichaelStay in the 'Light!Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCreamJoin me @ SilverlightCream | Phoenix Silverlight User GroupTechnorati Tags:Silverlight    Silverlight 3    Silverlight 4    Windows PhoneMIX10

    Read the article

  • AIOUG TechDay @ Lovely Professional University, Jalandhar, India

    - by Tori Wieldt
    by guest blogger Jitendra Chittoda, co-leader, Delhi and NCR JUG On 30 August 2013, Lovely Professional University (LPU) Jalandhar organized an All India Oracle User Group (AIOUG) TechDay event on Oracle and Java. This was a full day event with various sessions on J2EE 6, Java Concurrency, NoSQL, MongoDB, Oracle 12c, Oracle ADF etc. It was an overwhelming response from students, auditorium was jam packed with 600+ LPU energetic students of B.Tech and MCA stream. Navein Juneja Sr. Director LPU gave the keynote and introduced the speakers of AIOUG and Delhi & NCR Java User Group (DaNJUG). Mr. Juneja explained about the LPU and its students. He explained how Oracle and Java is most used and accepted technologies in world. Rohit Dhand Additional Dean LPU came on stage and share about how his career started with Oracle databases. He encouraged students to learn these technologies and build their career. Satyendra Kumar vice-president AIOUG thanked LPU and their stuff for organizing such a good technical event and students for their overwhelming response.  He talked about the India Oracle group and its events at various geographical locations all over India. Jitendra Chittoda Co-Leader DaNJUG explained how to make a new Java User Groups (JUG), what are its benefits and how to promote it. He explained how the Indian JUGs are contributing to the different initiatives like Adopt-a-JSR and Adopt-OpenJDK. After the inaugural address event started with two different tracks one for Oracle Database and another for Java and its related technologies. Speakers: Satyendra Kumar Pasalapudi (Co-founder and Vice President of AIOUG) Aman Sharma (Oracle Database Consultant and Instructor) Shekhar Gulati (OpenShift Developer Evangelist at RedHat) Rohan Walia (Oracle ADF Consultant at Oracle) Jitendra Chittoda (Co-leader Delhi & NCR JUG and Senior Developer at ION Trading)

    Read the article

  • SQL SERVER – Follow up – Usage of $rowguid and $IDENTITY

    - by pinaldave
    The most common question I often receive is why do I blog? The answer is even simpler – I blog because I get an extremely constructive comment and conversation from people like DHall and Kumar Harsh. Earlier this week, I shared a conversation between Madhivanan and myself regarding how to find out if a table uses ROWGUID or not? I encourage all of you to read the conversation here: SQL SERVER – Identifying Column Data Type of uniqueidentifier without Querying System Tables. In simple words the conversation between Madhivanan and myself brought out a simple query which returns the values of the UNIQUEIDENTIFIER  without knowing the name of the column. David Hall wrote few excellent comments as a follow up and every SQL Enthusiast must read them first, second and third. David is always with positive energy, he first of all shows the limitation of my solution here and here which he follows up with his own solution here. As he said his solution is also not perfect but it indeed leaves learning bites for all of us – worth reading if you are interested in unorthodox solutions. Kumar Harsh suggested that one can also find Identity Column used in the table very similar way using $IDENTITY. Here is how one can do the same. DECLARE @t TABLE ( GuidCol UNIQUEIDENTIFIER DEFAULT newsequentialid() ROWGUIDCOL, IDENTITYCL INT IDENTITY(1,1), data VARCHAR(60) ) INSERT INTO @t (data) SELECT 'test' INSERT INTO @t (data) SELECT 'test1' SELECT $rowguid,$IDENTITY FROM @t There are alternate ways also to find an identity column in the database as well. Following query will give a list of all column names with their corresponding tablename. SELECT SCHEMA_NAME(so.schema_id) SchemaName, so.name TableName, sc.name ColumnName FROM sys.objects so INNER JOIN sys.columns sc ON so.OBJECT_ID = sc.OBJECT_ID AND sc.is_identity = 1 Let me know if you use any alternate method related to identity, I would like to know what you do and how you do when you have to deal with Identity Column. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLServer, T SQL, Technology

    Read the article

  • Oracle Enterprise Manager 12c Anniversary at Open World General Session and Twitter Chat using #em12c on October 2nd

    - by Anand Akela
    As most of you will remember, Oracle Enterprise Manager 12c was announced last year at Open World. We are celebrating first anniversary of Oracle Enterprise Manager 12c next week at Open world. During the last year, Oracle customers have seen the benefits of federated self-service access to complete application stacks, elastic scalability, automated metering, and charge-back from capabilities of Oracle Enterprise manager 12c. In this session you will learn how customers are leveraging Oracle Enterprise Manager 12c to build and operate their enterprise cloud. You will also hear about Oracle’s IT management strategy and some new capabilities inside the Oracle Enterprise Manager product family. In this anniversary general session of Oracle Enterprise Manager 12c, you will also watch an interactive role play ( similar to what some of you may have seen at "Zero to Cloud" sessions at the Oracle Cloud Builder Summit ) depicting a fictional company in the throes of deploying a private cloud. Watch as the CIO and his key cloud architects battle with misconceptions about enterprise cloud computing and watch how Oracle Enterprise Manager helps them address the key challenges of planning, deploying and managing an enterprise private cloud. The session will be led by Sushil Kumar, Vice President, Product Strategy and Business Development, Oracle Enterprise Manager. Jeff Budge, Director, Global Oracle Technology Practice, CSC Consulting, Inc. will join Sushil for the general session as well. Following the general session, Sushil Kumar ( Twitter user name @sxkumar ) will join us for a Twitter Chat on Tuesday at 1:00 PM to 2:00 PM.  Sushil will answer any follow-up questions from the general session or any question related to Oracle Enterprise Manager and Oracle Private Cloud . You can participate in the chat using hash tag #em12c on Twitter.com or by going to  tweetchat.com/room/em12c (Needs Twitter credential for participating).  You could pre-submit your questions for Sushil using any of the social media channels mentioned below. Stay Connected: Twitter |  Face book |  You Tube |  Linked in |  Newsletter

    Read the article

  • How to crop the UIImage?

    - by Rajendra Bhole
    Hi, I develop an application in which i process the image using its pixels but in that image processing it takes a lot of time. Therefore i want to crop UIImage (Only middle part of image i.e. removing/croping bordered part of image).I have the develop code are, - (NSInteger) processImage1: (UIImage*) image { CGFloat width = image.size.width; CGFloat height = image.size.height; struct pixel* pixels = (struct pixel*) calloc(1, image.size.width * image.size.height * sizeof(struct pixel)); if (pixels != nil) { // Create a new bitmap CGContextRef context = CGBitmapContextCreate( (void*) pixels, image.size.width, image.size.height, 8, image.size.width * 4, CGImageGetColorSpace(image.CGImage), kCGImageAlphaPremultipliedLast ); if (context != NULL) { // Draw the image in the bitmap CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, image.size.width, image.size.height), image.CGImage); NSUInteger numberOfPixels = image.size.width * image.size.height; NSMutableArray *numberOfPixelsArray = [[[NSMutableArray alloc] initWithCapacity:numberOfPixelsArray] autorelease]; } How i take(croping outside bordered) the middle part of UIImage?????????

    Read the article

  • Find largest rectangle containing all zero's in an N X N binary matrix

    - by Rajendra
    Given an N X N binary matrix (containing only 0's or 1's). How can we go about finding largest rectangle containing all 0's? Example: I 0 0 0 0 1 0 0 0 1 0 0 1 II->0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 <--IV 0 0 1 0 0 0 IV is a 6 X 6 binary matrix, return value in this case will be Cell 1: (2, 1) and Cell 2: (4, 4). Resulting sub-matrix can be square or rectangle. Return value can be size of the largest sub-matrix of all 0's also, for example, here 3 X 4.

    Read the article

  • UIImage cropping on user selected rectangle in iphone?

    - by Rajendra Bhole
    Hi, I developing an small application in which i want to crop the UIImage captured by imagePickerControllerSourceTypeOfCamera. The UIImage should crop by user selected crop area or cropped rectangle. That means first user capture the image from the camera.Then on captured image the user selected an rectangle having color gray.That image(image data) should crop from that gray colored rectangle. My under develop code is as follows. -(IBAction) getPhoto:(id)sender { UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; if((UIButton *) sender == btnphotoAlbum) { imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } else { imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; } imagePickerController.allowsImageEditing = YES; //imagePickerController.toolbar.barStyle =UIBarStyleBlackOpaque; //UIToolbar *toolBar=[[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 20, 320)]; //imagePickerController. [self presentModalViewController:imagePickerController animated:YES]; } (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { UIImage *selectedImage = image; UIImage *originalImage = [editingInfo objectForKey:@"UIImagePickerControllerOriginalImage"]; NSValue *cropRect = [editingInfo objectForKey:UIImagePickerControllerCropRect]; CGRect theRect = [cropRect CGRectValue]; //captureImage.image =[info objectForKey:@"UIImagePickerControllerOriginalImage"]; [picker dismissModalViewControllerAnimated:YES]; } How i crop the image?

    Read the article

  • Invalid Entitlement.plist for my iphone?

    - by Rajendra Bhole
    Hi, i m sending .ipa file and ad-hoc provisional profile to my friend for installing my application in his iphone through itunes of windowsXP But it shows invalid entitlement.plist for his iphone. please reply me as soon as possible, Thanks in advance for sending me answer.

    Read the article

  • How i set the background color in UIView using CGContext?

    - by Rajendra Bhole
    Hi, I have developed the application in which i want to set the background color of UIView which is already set on UIViewController.The code is below, @implementation frmGraphView /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } /* // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; } */ /* // Override to allow orientations other than the default portrait orientation. - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationPortrait); } */ - (void)drawRect:(CGRect)rect { CGContextRef ctx = UIGraphicsGetCurrentContext(); CGContextClearRect(ctx, rect); //CGContextSetCMYKFillColor(ctx, 35.0, 56.0, 34.0, 30.0, 1.0); //CGContextSetRGBFillColor(ctx, 92.0f, 95.0f, 97.0f, 1.0f); //CGContextFillRect(ctx, CGRectMake(0, 0, 300, 280)); CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextSetLineWidth(ctx, 2.0); float fltX1,fltX2,fltY1,fltY2=0; NSArray *hoursInDays = [[NSArray alloc] initWithObjects:@"0",@"1" ,@"2",@"3",@"4",@"5",@"6",@"7",@"8",@"9",@"10",@"11",@"12", nil]; fltX1 = 30; fltY1 = 5; fltX2 = fltX1; fltY2 = 270; //Dividing the Y-axis CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); //float y = 275; for(int intIndex = 0 ; intIndex < [hoursInDays count] ; fltY2-=20, intIndex++) { CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextMoveToPoint(ctx, fltX1-3 , fltY2); CGContextAddLineToPoint(ctx, fltX1+3, fltY2); CGContextSelectFont(ctx, "Helvetica", 14.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); CGContextSetRGBFillColor(ctx, 0, 255, 255, 1); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForYAxis = [[hoursInDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx, fltX1-18, fltY2-18 , arrayDataForYAxis, strlen(arrayDataForYAxis)); CGContextStrokePath(ctx); } CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextSetLineWidth(ctx, 2.0); fltX1 = 5; fltY1 = 250; fltX2 = 270; fltY2 = fltY1; NSArray *weekDays =[[NSArray alloc] initWithObjects:@"Sun", @"Mon", @"Tus", @"Wed", @"Thu", @"Fri", @"Sat", nil]; //Dividing the X-axis CGContextMoveToPoint(ctx, fltX1, fltY1); CGContextAddLineToPoint(ctx, fltX2, fltY2); //float y = 275; for(int intIndex = 0 ; intIndex < [weekDays count] ; fltX1+=33, intIndex++) { CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextMoveToPoint(ctx, fltX1+52 , fltY2-3); CGContextAddLineToPoint(ctx, fltX1+52, fltY2+3); CGContextSelectFont(ctx, "Arial", 15.0, kCGEncodingMacRoman); CGContextSetTextDrawingMode(ctx, kCGTextFill); CGContextSetRGBFillColor(ctx, 0, 255, 255, 1); CGAffineTransform xform = CGAffineTransformMake( 1.0, 0.0, 0.0, -1.0, 0.0, 0.0); CGContextSetTextMatrix(ctx, xform); const char *arrayDataForXAxis = [[weekDays objectAtIndex:intIndex] UTF8String]; CGContextShowTextAtPoint(ctx, fltX1+37, fltY2+18 , arrayDataForXAxis, strlen(arrayDataForXAxis)); CGContextStrokePath(ctx); } } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end

    Read the article

  • How i implement the CGContextBeginPath() functions in iphone using objective-C?

    - by Rajendra Bhole
    Hi, I want to divide the circle using CGContext and following code of function given by apple API reference library, CGContextBeginPath (context); for (k = 0; k < count; k += 2) { CGContextMoveToPoint(context, s[k].x, s[k].y); CGContextAddLineToPoint(context, s[k+1].x, s[k+1].y); } CGContextStrokePath(context); The above code i want to implement inside following code instead of C5, C6 and C7 block, (void)drawRect:(CGRect)rect { // circle CGContextRef contextRef = UIGraphicsGetCurrentContext(); CGContextSetRGBFillColor(contextRef, 0, 0, 255, 0.1); CGContextSetRGBStrokeColor(contextRef, 0, 0, 255, 0.5); //CGContextFillEllipseInRect(contextRef, CGRectMake(100, 100, 150, 150)); CGContextStrokeEllipseInRect(contextRef, CGRectMake(100, 100, 150, 150)); CGContextRef c5= UIGraphicsGetCurrentContext(); CGContextSetLineWidth(c5, 2.0); CGContextSetStrokeColorWithColor(c5, [UIColor brownColor].CGColor); CGContextBeginPath(c5); CGContextMoveToPoint(c5, 175.0f, 175.0f); CGContextAddLineToPoint(c5, 100.0f, 175.0f); CGContextStrokePath(c5); CGContextRef c6= UIGraphicsGetCurrentContext(); CGContextSetLineWidth(c6, 2.0); CGContextSetStrokeColorWithColor(c6, [UIColor blueColor].CGColor); CGContextBeginPath(c6); CGContextMoveToPoint(c6, 175.0f, 175.0f); CGContextAddLineToPoint(c6, 175.0f, 250.0f); CGContextStrokePath(c6); CGContextRef c7= UIGraphicsGetCurrentContext(); CGContextSetLineWidth(c7, 02.0); CGContextSetStrokeColorWithColor(c7, [UIColor greenColor].CGColor); CGContextBeginPath(c7); CGContextMoveToPoint(c7, 175.0f, 175.0f); CGContextAddLineToPoint(c7, 175.0f, 100.0f); CGContextStrokePath(c7); } It is possible, if it is then how i should have implement?

    Read the article

  • Why we used double and triple pointer in objective-C or C language?

    - by Rajendra Bhole
    Hi, I confused when i want to take single pointer and when should i take double pointer? In following structure what exactly did? struct objc_class { Class isa; Class super_class; const char *name; long version; long info; long instance_size; struct objc_ivar_list *ivars; struct objc_method_list **methodLists; struct objc_cache *cache; struct objc_protocol_list *protocols; }; Why we use the "**methodLists" double pointer. Edited int sqlite3_get_table( sqlite3 *db, const char zSql, char **pazResult, int *pnRow, int *pnColumn, char *pzErrmsg ); In above scenario what will be meaning of triple pointer char **pazResult?

    Read the article

  • Problem in cropping the UIImage using CGContext?

    - by Rajendra Bhole
    Hi, I developing the simple UIApplication in which i want to crop the UIImage (in .jpg format) with help of CGContext. The developed code till now as follows, CGImageRef graphicOriginalImage = [originalImage.image CGImage]; UIGraphicsBeginImageContext(originalImage.image.size); CGContextRef ctx = UIGraphicsGetCurrentContext(); CGBitmapContextCreateImage(graphicOriginalImage); CGFloat fltW = originalImage.image.size.width; CGFloat fltH = originalImage.image.size.height; CGFloat X = round(fltW/4); CGFloat Y =round(fltH/4); CGFloat width = round(X + (fltW/2)); CGFloat height = round(Y + (fltH/2)); CGContextTranslateCTM(ctx, 0, image.size.height); CGContextScaleCTM(ctx, 1.0, -1.0); CGRect rect = CGRectMake(X,Y ,width ,height); CGContextDrawImage(ctx, rect, graphicOriginalImage); croppedImage = UIGraphicsGetImageFromCurrentImageContext(); return croppedImage; } The above code is worked fine but it can't crop image. The original image memory and cropped image memory i will got same(equal to original image memory). The above code is right for cropping the image?????????????????? How i cropping the image (in behind pixels should also be crop) from the center of the image???????????? I already wasting a lot of time for developing the above code , but i didn't get answer or way to find out how to crop the image.Thanks for sending me answer in advanced.

    Read the article

  • How to write text(using CGContextShowTextAtPoint) dynamically near graph x and y-axis intervals?

    - by Rajendra Bhole
    I developed graph using NSObject class and using CGContext method. The following code displaying dynamically in X and Y-axis intervals, CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextSetLineWidth(ctx, 2.0); CGContextMoveToPoint(ctx, 30.0, 200.0); CGContextAddLineToPoint(ctx, 30.0, 440.0); for(float y = 400.0; y >= 200.0; y-=30) { CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextMoveToPoint(ctx, 28, y); CGContextAddLineToPoint(ctx, 32, y); CGContextStrokePath(ctx); //CGContextClosePath(ctx); } CGContextMoveToPoint(ctx, 10, 420.0); CGContextAddLineToPoint(ctx, 320, 420.0); //CGContextAddLineToPoint(ctx, 320.0, 420.0); //CGContextStrokePath(ctx); for(float x = 60.0; x <= 260.0; x+=30) { CGContextSetRGBStrokeColor(ctx, 2.0, 2.0, 2.0, 1.0); CGContextMoveToPoint(ctx, x, 418.0); CGContextAddLineToPoint(ctx, x, 422.0); CGContextStrokePath(ctx); CGContextClosePath(ctx); } I want to write the dynamic text on the X and Y-axis lines near the intervals (like X-axis is denoting number of days per week and Y-axis denoting something per someting)? Thanks.

    Read the article

  • How i zoom perticular part of UIScrollView?

    - by Rajendra Bhole
    HI, I develop an application in which i want to implement the splash screen, on that splash screen i want to bind the scrollView and UIImage. My code as follow, -(void)splashAnimation{ window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 420)]; //scrollView = [[UIScrollView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; scrollView = [[UIScrollView alloc] initWithFrame:[window bounds]]; scrollView.pagingEnabled = NO; scrollView.bounces = NO; UIImage *image = [UIImage imageNamed:@"splash.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.userInteractionEnabled = NO; [scrollView addSubview:imageView]; [scrollView setDelegate:self]; //[scrollView release]; } - (void)applicationDidFinishLaunching:(UIApplication *)application { [self splashAnimation]; [self initControllers]; [window addSubview:[mainTabBarController view]]; [window makeKeyAndVisible]; } On my given code the one blank window comes up and stay on. I want to on that blank screen bind my splash.png. *The Above problem is solved* My current code is scrollView.pagingEnabled = NO; scrollView.bounces = NO; UIImage *image = [UIImage imageNamed:@"splash.png"]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.userInteractionEnabled = NO; [scrollView addSubview:imageView]; scrollView.maximumZoomScale = 4.0f; scrollView.minimumZoomScale = 1.0f; CGRect rect = CGRectMake(119, 42, 208, 166); [scrollView zoomToRect:rect animated:YES]; [scrollView setDelegate:self]; [window addSubview:scrollView]; [window makeKeyAndVisible]; i want to zoom the particular part of scrollView.

    Read the article

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