Search Results

Search found 6 results on 1 pages for 'vishwas gagrani'.

Page 1/1 | 1 

  • What problems will I face if I remove the concept of interfaces from my code?

    - by Vishwas Gagrani
    I have been programming for many years but I am still not comfortable with the concept of "Interfaces". I try to use interfaces but many times I don't see a mandatory use for it. I think this is probably because the projects weren't so big, or because interfaces are more useful when teamwork is involved. So, making another attempt to understand the importance of interfaces, here is my question: What problems will I face if I remove the concept of interfaces from my code?

    Read the article

  • How to detect webcam?

    - by Vishwas
    I installed Cheese but it is not yet possible for me to work with my webcam. After running lsusb I get this: Bus 007 Device 002: ID 0483:2016 SGS Thomson Microelectronics Fingerprint Reader Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 005: ID 044e:3012 Alps Electric Co., Ltd Bus 003 Device 004: ID 044e:3013 Alps Electric Co., Ltd Bus 003 Device 003: ID 044e:3010 Alps Electric Co., Ltd Bluetooth Adapter Bus 003 Device 002: ID 044e:3011 Alps Electric Co., Ltd Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Tell me what should I do now?

    Read the article

  • Why to say, my function is of IFly type rather than saying it's Airplane type

    - by Vishwas Gagrani
    Say, I have two classes: Airplane and Bird, both of them fly. Both implement the interface IFly. IFly declares a function StartFlying(). Thus both Airplane and Bird have to define the function, and use it as per their requirement. Now when I make a manual for class reference, what should I write for the function StartFlying? 1) StartFlying is a function of type IFly . 2) StartFlying is a function of type Airplane 3) StartFlying is a function of type Bird. My opinion is 2 and 3 are more informative. But what i see is that class references use the 1st one. They say what interface the function is declared in. Problem is, I really don't get any usable information from knowing StartFlying is IFly type. However, knowing that StartFlying is a function inside Airplane and Bird, is more informative, as I can decide which instance (Airplane or Bird ) to use. Any lights on this: how saying StartFlying is a function of type IFly, can help a programmer understanding how to use the function?

    Read the article

  • ViewController in programming

    - by Vishwas Gagrani
    ViewController is a term for classes that handle views in a framework. This is especially used in MVC frameworks. I go through various projects, written by various programmers, who implement MVC in different ways. Especially, i get confused, about the relation between the MainView ( parent view ) and some CustomView ( widget etc) in the framework. I personally pass reference of the MainView into the ViewController to be instantiated. All the subviews of ViewController are added to that reference of MainView. Additionally, ViewController itself is added as a child of MainView. Like this : Want to know, if this is the right way to relate each other ?

    Read the article

  • Concept behind SHA-1 Checksum

    - by Vishwas Gagrani
    What's the basis behind SHA-1 or SHA-2 or other Checksum algorithms? I read about it here http://en.wikipedia.org/wiki/SHA-1#Data_Integrity But I am still wondering about an answer in a layman's language. Can I understand it as a very, very compressed code that can be translated back into original data? Let's say, I have a letter written in notepad. Then the whole of my 1 A4 page size data can be converted into something like this "9b90417b6a186b6f314f0b679f439c89a3b0cdf5". So whenever I want my original data back, I can convert this back into original data? I am very sure that I am wrong here, because it is weird how data that itself contains combination of letters and numbers can be represented by smaller set of letters and numbers. Illogical! Then, what's the basic?

    Read the article

  • Landscape orientation for UITabBarController?

    - by gingersnap
    The UITabBarController does not allow landscape orientation. So I used a subclass of UITabBarContoller (called RotatingTabBarController). Its sole purpose it to allow rotation by returning YES to shouldAutorotateToInterfaceOrientation call. The problem is that when you rotate the iPhone in simulator it gives the following malloc error. malloc: *** error for object 0x3888000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug I am using 3.0 SDK with Xcode 3.2 on Snow Leopard. I set a breakpoint in malloc_error_break but I can not trace it back to my code. Is there something I can do to make this error go away? Here is the RotatingTabBarController class: #import <UIKit/UIKit.h> @interface RotatingTabBarController : UITabBarController { } @end @implementation RotatingTabBarController -(BOOL)shouldAutorotateToInterfaceOrientation:UIInterfaceOrientation)interfaceOrientation { return YES; } @end Update: I tried the same with a category. But it gives the same malloc error. // UITabBarController+Rotation.h @interface UITabBarController (rotation) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation; @end // UITabBarController+Rotation.m #import "UITabBarController+Rotation.h" @implementation UITabBarController (rotation) - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } @end Backtrace [Session started at 2009-09-05 12:13:19 -0400.] Untitled(992,0xa06d9500) malloc: *** error for object 0x2024000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Untitled(992,0xa06d9500) malloc: *** error for object 0x2014000: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug [Session started at 2009-09-05 12:13:27 -0400.] GNU gdb 6.3.50-20050815 (Apple version gdb-1344) (Fri Jul 3 01:19:56 UTC 2009) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-apple-darwin".Attaching to process 992. sharedlibrary apply-load-rules all (gdb) bt #0 0x951908fa in mach_msg_trap () #1 0x95191067 in mach_msg () #2 0x30244d62 in CFRunLoopRunSpecific () #3 0x30244628 in CFRunLoopRunInMode () #4 0x32044c31 in GSEventRunModal () #5 0x32044cf6 in GSEventRun () #6 0x309021ee in UIApplicationMain () #7 0x00002608 in main (argc=1, argv=0xbfffef94) at /Users/vishwas/Desktop/Untitled/main.m:13 (gdb)

    Read the article

1