how does this work?
in irb:
>> class A
>> b = [1, 2,3]
>> end
=> [1, 2, 3]
Is b an instance variable? class variable? how would I access b from
outside the class? Is it used for meta-programming?
I'm new to Python... and coming from a mostly Java background, if that accounts for anything.
I'm trying to understand polymorphism in Python. Maybe the problem is that I'm expecting the concepts I already know to project into Python. But I put together the following test code:
class animal(object):
"empty animal class"
class dog(animal):
"empty dog class"
myDog = dog()
print myDog.__class__ is animal
print myDog.__class__ is dog
From the polymorphism I'm used to (e.g. java's instanceof), I would expect both of these statements to print true, as an instance of dog is an animal and also is a dog. But my output is:
False
True
What am I missing?
Hi there guys! I'm starting out learning some ASP.Net programming and I'm going to be making a little community website for my friends and myself.
I'm trying to pick up some good habits along the way.
I was thinking of having a usercontrol and have that 'loginBox' shows the appropriate textboxes and login button, but also show his username when he is logged in.
Do you think I should handle this as a user control or am I missing something as an ASP.Net newbie?
Hello Evryone.
I am new to this type of programming..i just want some help...regarding what to do when u need to extract the data from the serial port..and how to check that tha data is available in the serial port..so that no data loss is there....
Hello,
I know it's not really a programming question but I don't know where to ask it.
Should i use a captcha in my sign up form ?
Facebook, twitter, foursquare, gowalla etc... don't use one (or not a visible one). Is there an invisible catpcha on theses sites ?
Thank you
I'm not sure how important it is having a large reputation number, but then I'm also worried someone hacked into my account or something, since I don't see how else it would be possible to loose 500 points in a single day ( hopefully this non-programming related post won't cause another 500 drop :) ). Any idea why this happened?
thanx
A friend of mine, who studies game development at an university, is currently learning programming in OpenCL. What would be a simple project that teaches the most important aspects of OpenCL and can be finished within about 50 - 100 hours?
Hello,
I'm new to PHP programming and I wanted to know that is it possible to handle PHP events as we do in ASP.NET
I mean I've got a img and I want to perform some task on click event of this img.
I know how to do it in ASP.NET but please help me in context of PHP
Thanks,
GURU
Hi all
I am developing windows mobile application using with .NET CF 2.0
I want to disabling the End Call 'Key'. when my application running,
This functionality should happen by programming using C#
Can any one Know please help me.
Thanks in advance.
vimal..
hi, i am siva this is frist time taken the python programming language i have a small problem please help me the question is **Write two functions, called countSubStringMatch and countSubStringMatchRecursive that take two arguments, a key string and a target string. These functions iteratively and recursively count the number of instances of the key in the target string. You should complete definitions for
def countSubStringMatch(target,key):
and
def countSubStringMatchRecursive (target, key):
**
hello i am trying to sort a textual file using c programming language,
in order to sort the file i am using a unique key,
i need to be able to jump from line to line in order to sort the file , the problem is that i do not know if there is a command in c which let me jump from the first line to lets say the
20 line for example
the only solution which i know for it is to use each time fscanf with a loop
but this solution is not very effective
thanks in advance for your time.
Hello people,
I have three images,and , they are not square or rectangular in shape. They are just like face of anyone.
So,basically, my images are in the size 196x196 or anything like that, but complete square or rectangle with the face in the middle and transperant background in the rest of the portion.
Now, I want to remove the transperant background too and just keep the faces.
Don't know if this is possible and mind you, this isn't a programming question.
I'm looking for a web application to manage tasks (not necessary programming-oriented) for a small team. It must be easy to setup and maintain. It must offer file upload and mail users in case of a change. There is hundred of solutions available but most are too complex for what we want or are not "stable" (not updated since a long time, not very well programmed). i was wondering if stack overflow's folks have some recommendations...
hello I'm new to PHP programming and I migrated from ASP .net to PHP..
I have a div just like below
<div id="mydiv"></div>
what I wanted to do is just to change the text and html content(like some name or any data in it) in it.
What I imagine is just like
mydiv=innertext="some value";
Thanks,
GURU
Forgive me if this is the wrong place but I am curious as to how other programmers feel about this topic:
I am currently working on my portfolio site, it is being designed and built in silverlight 4. I initially started off with a typical stylised e-folio theme much like a standard website in terms of layout and flow.
As I work more in the concept stages something has struck me. Am I trying to shoe-horn yesterday into today? What I am talking about is UI expectations. I'm all for clean user interfaces but that does not mean they should not take advantage of new concepts in presentation right?
If you where to develop a site in silverlight as your own portfolio piece would you stick to the tried and tested "website" feel or would you try to come up with a UI that is intuitive and complements the technology?
I feel that UI discussions are all the more important now that all forms of web development are allowing better methods to engage the user.
Hi,
Is it possible to do Aspect Oriented Programming in Delphi? I would be interested in native support as well as third party solutions.
I don't have a specific problem I want to solve with AOP, but am simply interested in studying AOP.
Thanks, Miel Bronneberg.
I need to programatically encrypt a directory of files, like in a .zip or whatever. Preferably password protected obviously.
How can I accomplish this, and WHAT IS the BEST encryption way to do it, if applicable?
Programming language doesn't matter. I am dictioned in all syntax.
Hi
I'm doing programming with ASP.NET . I have no idea how to use JavaScript in ASP.NET Server Side controls ( Totally uncomfortable with it ) . Do you mind introduce me some resource for folks like my type , please ?
Hello ,
I went through local variables and class variables concept.
But I had stuck at a doubt
" Why is it so that we cannot declare local variables as static " ?
For e.g
Suppose we have a play( ) function :
void play( )
{
static int i=5;
System.out.println(i);
}
It gives me error in eclipse : Illegal modifier for parameter i;
I had this doubt because of the following concepts I have read :
Variables inside method : scope is local i.e within that method.
When variable is declared as static , it is present for the entire class i.e not to particular object.
Please could anyone help me out to clarify the concept.
Thanks.
I have never written a DSL, but I am considering it as a feature for a new project (hypothetical). It would be for end users to be able to express in natural language concepts such as weekdays between 10 and 11 except on the first monday of the month.
Dutch users might write weekdagen tussen 10 en 11 behalve op de eerste maandag van de maand. In this case the position of the words seems to match, but there may be expressions where the position of verbs/nouns etc. could be different between languages.
I realise the obvious answer (it depends). I am a .NET developer and I consider using Boo but I'm open to suggestions. I need to understand wether each translation requires rewriting a part of the implementation (which part) or if there is a way to do actual translations, maybe in some sort of preprocessor.
Thanks!
This isn't a question about code, but it's programming related. We have a web app that's ready for beta testing. Has anyone noticed any difference between open beta vs. closed beta in terms of the quality or quantity of feedback the testers give or any other factors?
Is there a design document for Scala 2.8 Actors, like it is for 2.7?
Scala Actors: Unifying Thread-based and Event-based Programming
Is there one for Akka?
The "Scala Improvement Documents Library" doesn't mention Actors.
Hi,
I want to store multiple column values in table.Lets take a example .. What are your favourite colors? the choices can be red,blue,green, orange. So lets assume, the user selects atleast 2 values.
Is there any way to store the multiple values in table. I have implemented by concatinating choices of users in a column in the table. I later found that it is a bad practise.
Currently i can think of using Bitwise operator and habtm.
What are the different ways for storing multiple choices values in table?
If I am implementing in rails, What is the best way to implement this with OOP concepts?
Is there any builtin options in rails?
For those of you who are into programming not just for the money. I would like to know which benefits you would like to have (or already have).
OK, maybe taking away the money factor will limit this question too much. I am surprised to see that most companies have a fixed set for their benefits package. Were you able to negotiate something new or just your salary? What things have you seen out there and/or value most?