private

Javascript new object (function ) vs inline invocation

Is there any considerations to determine which is better practice for creating an object with private members? var object = new function () { var private = "private variable"; return { method : function () { ..dosomething with private; } } } VS var object = function () { ... }(); Basically what ...

iPhone private APIs

How to add private APIs and frameworks to an iPhone App. Like Apple80211. ...

Why a "private static" is not seen in a method?

I have a class with the following declaration of the fields: public class Game { private static String outputFileName; .... } I set the value of the outputFileName in the main method of the class. I also have a write method in the class which use the outputFileName. I always call write after main sets value for outputFileName. But wr...

Why cant we create Object if constructor is in private section?

Dear all I want to know why cant we create object if the constructor is in private section. I know that if i make a method static i can call that method using <classname> :: <methodname(...)>; But why can't we create object is what I don't understand. I also know if my method is not static then also I can call functio...

Accessing "Public" methods from "Private" methods in javascript class

Is there a way to call "public" javascript functions from "private" ones within a class? Check out the class below: function Class() { this.publicMethod = function() { alert("hello"); } privateMethod = function() { publicMethod(); } this.test = function() { privateMethod(); ...

How Can open root in iphone?

Hi , I want to knowing how can i open root directory ? I know Messages saved in sms.db that is in "/var/root/Library/SMS/sms.db" , but I can not see sub folder of root, I know ,the root have password and should enter it to open ,... but how can open this without Unlock or entering password? ...

XCode project complains about missing files if a linked framework contains private headers

My Problem is this: My framework contains public and private headers - the public headers import private headers in the framework My app that links against this framework imports public headers Now when I compile it, XCode complains about missing files (the private headers that are indirectly imported via the frameworks public header...

Does it make a difference whether I put 'friend class xxxxx' in the public or private section?

class A1 { public: friend class B; } class A2 { private: friend class B; } Any difference? ...

Private members when extending a class using ExtJS

I have done some research on the ExtJS forum regarding private methods and fields inside a extended class, and I couldn't find any real answer to this. And when I say an extended class I mean something like this: Ext.ux.MyExtendedClass = Ext.extend(Ext.util.Observable, { publicVar1: 'Variable visible from outside this class', c...

Pattern for database-wrapper in java

I am currently writing a java-class that wraps an SQLite database. This class has two ways to be instantiated: Open an existing database. Create a new database. This is what I came up with: public class SQLiteDatabaseWrapper { public static SQLiteDatabaseWrapper openExisting(File PathToDB) { return new SQLiteDatabaseWrap...

J2ME private folder(only accessible to my midlet)

I have two midlets, one will download some files form server everyday and the other uses these files. If i download the files to a normal folder the mobile user may delete the folder or files manually. So i need a private folder which is hidden and only accessible for my midlets. I heard about private folders which symbian platform pro...

initializing properties with private sets in .Net

public class Foo { public string Name { get; private set;} // <-- Because set is private, } void Main() { var bar = new Foo {Name = "baz"}; // <-- This doesn't compile /*The property or indexer 'UserQuery.Foo.Name' cannot be used in this context because the set accessor is inaccessible*/ using (DataContext dc = n...

Initilizing a static class member that depends on a private template type (C++)

Hi, I have the following situation: class Test { private: class SubType { //... }; static std::vector<SubType> v; }; Because v is static, I initilize it in the cpp file with std::vector<Test::SubType> Test::v; But this does not work, the compiler tells me that "Test::SubType" is private. What can I do about thi...

Set a project default for VB.NET projects so that the default Modifiers property for controls is Private

Is it possible to set a project default for VB.NET winforms projects so that the default Modifier for controls added to winforms is Private (not Friend)? I know there's a "modifiers" property in the properties window so I can set it for each individual control... however I would like to change the project so from now on myself and other...

Private IP Address Identifier in Regular Expression

Hey I'm a total n00b at Regular Expressions. I'm wondering if this is the best way to match a string that starts with a private IP address (Perl-style Regex): (^127\.0\.0\.1)|(^192\.168)|(^10\.)|(^172\.1[6-9])|(^172\.2[0-9])|(^172\.3[0-1]) Thanks much! ...

Can a constructor in Java be private?

Can a constructor be private? How is a private constructor useful? ...

class modifier issues in C# with "private" classes

I had a class that had lots of methods: public class MyClass { public bool checkConditions() { return checkCondition1() && checkCondition2() && checkCondition3(); } ...conditions methods public void DoProcess() { FirstPartOfProcess(); SecondPartOfProcess(); Thir...

Quick Java question about private static final keywords for fields

I'm declaring a field: private static final String filename = "filename.txt"; First, does the order of private static final matter? If not, is there a standard accepted sequence or convention? Second, the filename in my application is fixed. Is this the best was to store its value? ...

groovy call private method in Java super class

I have an abstract Java class MyAbstractClass with a private method. There is a concrete implementation MyConcreteClass. public class MyAbstractClass { private void somePrivateMethod(); } public class MyConcreteClass extends MyAbstractClass { // implementation details } In my groovy test class I have class MyAbstractClass...

Stop scrolling to top in UIWebView - iPhone

I have placed following javascript in my html file. <script TYPE="text/javascript"> function srk(){ document.ontouchmove = function(e){ e.preventDefault(); } } </script> I am scrolling my webview by following code with some animation. [myWebView stringByEvaluatingJavaScriptFromString:[NSString st...