public

Auto-push changes to one folder in a git repository to github?

I have a repository that I work in. There's one folder in there where I put all the stuff I want to open source so it's separate from the private parts. Is there a way to automatically get git to push anything committed to that folder to a github repository without me having to remember to push the newly changed files up there every time...

Access child user control's property in parent user control

I have included a user control in another statically following code : place the folowing directive in the asp code of the parent page or usercontrol: <%@ Register src="Name_of_your_child_control.ascx" tagname="Name_of_your_child_control" tagprefix="uc1" %> use the following tag in the asp-code of the parent page/control: <uc1:Name_...

iPhone App : Beta testing on specific device before App goes to AppStore

Sub: iPhone App : Beta testing on specific device before App goes to AppStore for public How do you do specific beta testing? I have registered 2 devices in App program portal. Only I have a Mac & device to download the App for testing. The other user does not have a Mac. But he has a iPhone. Is it possible for the other user to have ...

how do i make this so everything can use it? C++

im somewhat new to c++ so i don't know how to do this but my main point in recoding this is to incress the speed of my program, i have been coding a project and my code is: HWND hWnd = FindWindow(NULL, L"*window's name*"); DWORD th32ProcId; HANDLE hProc; GetWindowThreadProcessId(hWnd, &th32ProcId); hProc = OpenProcess(PROCESS_VM_OPERA...

Ruby private instance variables, with exceptions

I am making a card game in ruby. I have the Game class, which has an array of Player objects. array_of_players = Array[ Player.new("Ben"), Player.new("Adam"), Player.new("Peter"), Player.new("Fred"), ] my_game = Game.new(array_of_players) puts my_game.players[2].name #=> Peter Each player also has access to the Game, so ...

What's the easiest language/api/webapp to build a public calculator for simple 4-5 equation functions?

Most of what I need to accomplish is doable with Google docs spreadsheets, except locking only certain fields to allow updates by the public so they can do their own calculations based on the data. I would like the lowest method entry cost of writing simple table data with some functions that allow user update/selection. Free form portab...

Should I put a public interface in a separate file?

I have the following code: import com.apple.dnssd.*; public interface IServiceAnnouncer { public void registerService(); public void unregisterService(); public boolean isRegistered(); } class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World!"); } } Th...

Does static method in PHP have any difference with non-static method ?

class t { public function tt() { echo 1; } } t::tt(); See?The non-static function can also be called at class level.So what's different if I add a static keyword before public? ...

Closest Ruby representation of a 'private static final' and 'public static final' class variable in Java?

Given the Java code below, what's the closest you could represent these two static final variables in a Ruby class? And, is it possible in Ruby to distinguish between private static and public static variables as there is in Java? public class DeviceController { ... private static final Device myPrivateDevice = Device.getDevice("myd...

What is the best practical way to add a major feature/service to an existing medium-sized Ruby on Rails project?

Hi there, I have an existing project written in Ruby on Rails. It is sort of backend solution for the upcoming major addition to the project. What I mean is it currently serves for the admins and it already has loads of features and actual Rails files in there. Now I am planning to add the new "Public" facing part of the App in Rails a...

A pragmatic view on private vs public

Hello everybody! I've always wondered on the topic of public, protected and private properties. My memory can easily recall times when I had to hack somebody's code, and having the hacked-upon class variables declared as private was always upsetting. Also, there were (more) times I've written a class myself, and had never recognized an...

Public and Internal members in an Internal class?

Ok, so this may be a bit of a silly question, and there's certainly the obvious answer, but I was curious if I've missed any subtleties here. Is there any difference in terms of visibility/usability between a public member declared in an internal class and an internal member declared in an internal class? i.e. between internal class F...

Can I make all public variables/methods/classes internal in Visual Studio at compile time?

Hi, I would like to make all my public variables variables/methods/classes internal when compiling my Visual Studio project. The source code would not change but when the compiled library is done, it should only have internal access. Is this possible? I have "InternalsVisibleTo("ClassLibrary") " set inthe Assembly info file for all th...

What does it means? [c#]

If we define a property as public property and in this property we have a protected getter. what does it means? if property is public, what does defining a protected getter for that, means? please see below code: public ISessionFactory SessionFactory { protected get { return sessionFactory; } set { sessionFactory...

Using Session State in Public Class in ASP.NET?

I'm trying to move some reusable portions of code into a class. This is working okay except when I attempt to use Session within this class. I get an error: "Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class." My code looks something like thi...

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(); ...

Can there be two public section in a class? If yes then why ? And in which circumstances we do so?

Dear all I have a doubt related to class. For example class A { public: A() { ..... ..... } void cleanup() { .... .... .... } public: UINT a; ULONG b; }; In the above example there are two public section, In first section i am defining constructor and the method and in the second section i am declaring data members. Does the above ...

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? ...

Rails fails to return scripts/stylesheets

This only happens on my local machine (Windows 7, Ruby 1.8.7). Occasionally rails will just stop returning my stylesheets/javascript and I'll get gross looking pages. If I navigate directly to those scripts, sometimes they work, and sometimes I get errors like: private method `gsub!' called for #<Class:0x76ff830> What could be causing...

If I add a public method to a C# class, do I need to recompile other assemblies using that type?

Question in the title. I'd like to avoid recompiling since the source code I'm modifying is third party and I'd like to use the original binaries where possible, and replace only the assembly which contains the class I modified. But I'm not sure if this is a safe thing to do. In C++ for example this is definitely a bad idea. ...