private

c++ return private array

hi, i've a class and there is an array set as private, how do i make the get_array() function i mean how do i return that array knowing that i will have to return a pointer of arr[0] as we know , but isn't this breaking the private rule ? is there other way of returning array ? I actually thought of having array2 in the main , then edit...

Private class (not class method) in a Ruby module?

I'm new to Ruby (experienced with Python, C++ and C). I need to create a class that is only to be used by other classes and methods in a module. In Python, I'd just call it __classname. I'd use an empty typedef in C++. How do I do this in Ruby (or am I barking up the wrong tree and not doing this the "Ruby way"?) ...

In .NET, how is access to private methods restricted?

In .NET, are private methods and properties enforced by the runtime or just by the compiler? If you try to call another object's private methods, the compiler will throw an access exception. What if you manually manipulate the IL or try to call via reflection -- will you be able to? Also, does it vary by runtime version (1.1 vs. 2.0 vs....

iPhone SDK @package vs. @private vs. @public and struct

Hey I have a really simple question that needs more of just an explanation than a debug, but I have seen in the interface definitions for many class objects the keywords "@package", "@private", "@public", and then even weirder "struct {...}". I have been able to make complete programs without using any of the aforementioned, so I was hop...

python: reference "private" variables' names in an organized way

Suppose I have a class, and I want to reference some elements in the ' __dict__ (for instance, I want to copy the dict and delete the attribute that cannot be pickled), from inside the class. Problem is, those attributes are "private" so my code ends up looking like so class MyClasss(object): def __init__(self): self.__pr...

How to transfer data from ipad to bluetooth device via bluetooth using private api

How to transfer data from ipad to bluetooth device via bluetooth using private api ...

Is it possible to create private property in Objective-C?

Is it possible to create private property in Objective-C? I do know that a kind of private property functionality could be implemented in another way but I'm interested in particular question. Thanks. ...

Why is this not allowed in C++?

Here is my code - #include<iostream> using namespace std; class base { private: public: void sid() { cout<<"base"; } }; class derived : private base { private: public: void sid() { cout<<"derived"; }...

YouTube API (PHP) - Retrieving a private video under my account

I'm using Zend_Gdata_YouTube to interface with the YouTube API to upload videos from my site. The videos are uploaded as "private": $myVideoEntry->setVideoPrivate(); ...and have unique tags and developer tags. An admin can then go into a custom CMS and approve the private user-submitted entries and make them public - at least, that's ...

Is there anything wrong with using private classes in my Java Servlet?

I have Servlet that looks something like this: public class MyServlet extends Servlet { private class Page { private Page(HttpServletRequest request, HttpServletResponse response) { /* Do stuff */ } } protected void doGet(HttpServletRequest request, HttpServletResponse response) { Page page = new Page(request...

Non-static private variables in javascript

I'm setting up my javascript objects like the following Object1 = function() { var privateMember = "private value" return { publicMember: "public value" setPrivateMember: function(value) { privateMember = value; } } }(); Now if I use prototypal inheritance to create new objects Object2.prototype = Object1 ...

Which open source platform is good for a private/hybrid cloud?

I'm working on building a private cloud, and we've been considering Eucalyptus and OpenNebula. Are there any other good open source platform available for building a private/hybrid cloud? Between Eucalyptus and OpenNebula, which one do you recommend? ...

Reasons to avoid access modifiers in php

hi, here's my question. What are valid reasons NOT to use keywords public, private, protected in php? The story: I've started a project with a team that actively uses access modifiers in their code (even "public" explicitly) and wants to convince me to do the same. I always find this kind of stuff totally useless in a dynamic language ...

When should private methods in PHP work on class variables, and when should such methods be used as functions?

Hi, I'm wondering when private/protected methods should work on the class it's variables (like $this->_results) and when such methods should be used as if they were functions (like $this->_method($results)). Examples below: Work on class properties <?php class TestA { protected $_results; public function getResults() { ...

zend framework 2 underscore private

Will Zend Framework 2 continue to place underscores in front of private members and methods of classes? e.g: class blah { private $_name; private function _doSomethingToName() { } } I see that they are still there in the dev release of ZF2. ...

Strange behavior when overriding private methods

Consider the following piece of code: class foo { private function m() { echo 'foo->m() '; } public function call() { $this->m(); } } class bar extends foo { private function m() { echo 'bar->m() '; } public function callbar() { $this->m(); } } $bar = new bar; $bar->call...

Is there a way to make Rails ActiveRecord attributes private?

By default, ActiveRecord takes all fields from the corresponding database table and creates public attributes for all of them. I think that it's reasonable not to make all attributes in a model public. Even more, exposing attributes that are meant for internal use clutters the model's interface and violates the incapsulation principle. ...

Show a private YouTube movie on a single enabled domain?

Is it possible to embed a YouTube movie marked as "private" on a specific domain or URL? Probably using the YouTube API? Thanks! ...

Blackberry signature tool - invalid private key

Hi, A couple of months after installing successfully the blackberry signature key for signing my application,I have lost my private key. How can I retrieve it? I have already sent an email to Blackberry developers support,but they're really slow in replying. thanks a lot ...

.NET 'Private' Application

I create a .NET (WPF) Application, and compile it to .EXE. Then I create a second project, and add a reference to the compiled .exe, I can see all the classes and forms, and can use them for automation, etc. I want to prevent other people from using my compiled .exe as a .dll, so I changed all my classes to 'Friend' instead of 'Public',...