Post your queries here

Post your queries here, you can post them as Comment.....!



38 comments:

  1. Core Plot API

    Here is a link(http://www.switchonthecode.com/tutorials/using-core-plot-in-an-iphone-application) for core plot framework but the issue with that is when we draw curve using this framework it is not so smooth. It shows pixels corner in curve. The solution we need is we have to show the curve without pixel's corner and the lines should be smooth as we use bezier curve.

    How to achieve this?

    ReplyDelete
    Replies
    1. his might help you, although its not related to CorePlot:

      http://developer.apple.com/library/ios/#documentation/2ddrawing/conceptual/drawingprintingios/BezierPaths/BezierPaths.html

      Delete
  2. "Curve Fitting" thats what you need to do,
    To know more about curve fitting, visit this: http://en.wikipedia.org/wiki/Curve_fitting

    you need to implement curve fitting on data points/point values.

    ReplyDelete
  3. Curve Fitting explained here: http://archives.math.utk.edu/visual.calculus/0/curve_fit.5/index.html

    ReplyDelete
  4. this is all what related to data points, however if you want to work on drawing, then work on "Jaggies"/"Jagged Edges".

    ReplyDelete
  5. also look for smoothing algorithms.

    ReplyDelete
  6. How you handle input validations (regular expressions) in an application with localization support ?

    Suppose you are developing an application, which supports multiple languages (let assume English, Japanese).

    Now suppose we have put alphanumeric validation in some field, using regular expression

    like ...



    NSString *regex = @"^\\s*([0-9a-zA-Z]*)\\s*$";

    NSPredicate *test = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];

    if (![test evaluateWithObject:string]) {

    // do something...

    }else{

    // do something...

    }

    As you can see this regular expression is in "English", so how do you handle this code if user selects "Japanese" language.

    Does only translating regex into Japanese string going to work ??

    ReplyDelete
  7. If person is running having iPhone with him, is it possible to measure his speed just using Accelerometer?

    If no than what is alternative?

    ReplyDelete
    Replies
    1. i think accelerometer will not help you in this case.

      Delete
    2. Speed = Distance/Time,

      To calculate speed you have to calculate how much distance person travel and how much time it take.

      But you just can't consider total time, as suppose a person is started running and after some interval of time, he is at same position where he started..

      Delete
    3. i have even doubt on measuring accurate location, as you have to consider location with best precision. and it also depands upon which type of network you are connected. wifi or GPS or cellular network.

      Delete
    4. if ignored question of location accuracy, you can use combined approach location + accelerometer to measure velocity

      Delete
    5. i found this link helpful : http://stackoverflow.com/questions/1994018/measuring-velocity-via-iphone-sdk

      Delete
    6. ok, important update, CLLocation has speed property, so rather than calculating speed manually, you can use it.

      Delete
    7. just go through following sample from apple library:

      http://developer.apple.com/library/ios/#samplecode/LocateMe/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007801

      it will definitely help you.

      Delete
    8. Another link: http://stackoverflow.com/questions/10579004/how-to-calculate-correct-velocity-values-from-accerometer

      Also look for CoreMotion framework for iOS 5

      Delete
    9. Download a document from this link:

      http://www.freescale.com/files/sensors/doc/app_note/AN3397.pdf

      its regarding "Implementing Positioning Algorithms Using Accelerometers"

      Delete
    10. ok, how about below approach:

      calculate location(L1) at certain time "T1"
      Now after some seconds, again calculate Location(L2) at Time(T2).
      Again go on L2, T2,
      L3, T3 and so on....!

      Delete
  8. How to edit a video (Like display some text in video) using ffmpeg and gpu? Don't want to get all images from video and re-write images with text and again converting to video manually. Help me to achieve this using either ffmpeg or GPU.

    ReplyDelete
    Replies
    1. Are you talking about Digital watermarking effect ??

      Delete
    2. why you want only it via ffmpg or gpu ? i mean look for other possibilities too.

      Delete
    3. I tried other things and its bit time consuming.. I want a faster way for this. So GPU and ffmpeg is better option than the process I mentioned in question. If you think we have any better way than FFMPEG and GPU for this solution please let me know.

      Delete
    4. Also look for digital watermarking approach/algorithms on video

      Delete
    5. Digital watermarking concept used for copyright purpose mostly.

      Delete
    6. Can you tell me the purpose behind it, because there are two kind of digital watermarking, visible and non-visible.
      visible mean user can see it.
      non-visible mean user can't see it, but a copyrighter/owner/software can verify it by doing some computation algorithms.

      Delete
    7. ok, here someone already posted solution:
      http://stackoverflow.com/questions/7205820/iphone-watermark-on-recorded-video

      see the soln provided by Julio Bailon

      Delete
    8. so that was for visible watermarking, and if want invisible watermarking then you need to implement like "Stenography"

      Steganography is the art and science of writing hidden messages in such a way that no one, apart from the sender and intended recipient, suspects the existence of the message, a form of security through obscurity.

      Delete
  9. Hello,
    How to Erase line on the view using coregraphics library ?

    ReplyDelete
    Replies
    1. CGContextClearRect will not work
      instead use CGContextSetBlendMode(context, kCGBlendModeClear)

      Delete
  10. Thxs Shivang,

    Now I have another question

    When we use Sqliet db with iphone application then what maximum size of the data that sqlite db can store ?

    ReplyDelete
    Replies
    1. iPhone application sandbox has no max limits except the storage size of device.

      So now question indirectly comes to max size of SQLite Database:
      here is your answer: http://www.sqlite.org/limits.html

      Delete
    2. however have a look at this link: http://topappcast.blogspot.in/2011/03/sqlite-db-max-size.html

      Delete
    3. Hello Nirmal,

      According to your query the answer is both. You have limit as your device free disc space as well 50MB. Let me explain:

      If you are creating native iphone app you have no limit as sqlite database can store large number of data. The only limit is your disc space.

      In case you are creating web apps there is a limit of 50 MB of database. You can't create database over 50 MB size.

      For other limits of sqlite you would like to see this.. http://www.sqlite.org/limits.html

      Hope this will satisfy you.. :)

      Delete
  11. How to measure dimensions(height/width) of real world objects programmatically ??

    ReplyDelete
  12. how to add variable to existing class without actually sub classing it ?

    ReplyDelete
  13. we know that objective C doesn't support multiple inheritance, so how can we achieve multiple inheritance in objective C ?

    ReplyDelete
  14. How to encrypt & decrypt file in iOS SDK ?

    ReplyDelete
  15. @Matrix, Can you help built an AMQP library/wrapper for IOS? please contact me http://stackoverflow.com/users/1568532/fellowworldcitizen

    ReplyDelete