Questions tagged [global-namespace]

54 questions
0
votes
0 answers

Are there any measurements of the performance hit incurred from global namespace pollution in JavaScript?

One of the first things I learned when writing JavaScript was that it bad practice to set variables on window and polluting the global namespace. Looking around there are loads of articles as there are SO questions on why it is considered bad…
frequent
  • 27,643
  • 59
  • 181
  • 333
0
votes
0 answers

Resolving a namespace issue in Ruby?

I have a module in my Rails app Constants, which has a few constants defined within itself. I recently included the mongo gem in my rails app and now all references to those constants throws an error. uninitialized constant…
Gaurav Agarwal
  • 14,664
  • 4
  • 29
  • 41
0
votes
2 answers

Why do college computer science classes promote 'using namespace std'?

I've taken 2 classes on C++ so far, one each at a different school, and both of them have used 'using namespace std;' to teach basic programming. It may be a coincidence but I had to go out of my way to find out it's not a good practice to do so.
gr33kbo1
  • 303
  • 4
  • 5
  • 15
0
votes
1 answer

contains definition for __ in multiple code generated files

I just can't get a handle on how to correct this one. It cropped up about a week ago, and I don't know what change I made could have caused this. We use SVN and I rolled back changes I made of possible culprits of these errors but I am still getting…
ledgeJumper
  • 3,560
  • 14
  • 45
  • 92
0
votes
1 answer

Is it possible to force the underlying class of the T4 runtime template to have no namespace?

I have a T4 runtime template and I would like the underlying class of this template to have no namespace specified (i.e. to be in global namespace). I know I can set the namespace for the generated class using the Custom Tool Namespace property on…
famousgarkin
  • 13,687
  • 5
  • 58
  • 74
0
votes
1 answer

PostgreSQL's plperlu interpreter's @INC and/or cached libraries: separate for different databases?

I have different versions of some libraries I'm developing, and want to, from within various plperl functions I've written, load a certain version based on current_database(). (IIRC using use rather than require is preferred, I think because it…
Kev
  • 15,899
  • 15
  • 79
  • 112
0
votes
6 answers

Should we be teaching beginners to use a global namespace?

NOTE: I am pretty much a beginner myself. This question concentrates on C++ usage, since that is the only language I have experience with. There seems to be a consensus on Stack Overflow to use using namespace std; in the code examples provided for…
jkeys
  • 3,803
  • 11
  • 39
  • 63
0
votes
4 answers

Does the javascript global namespace get cleared with each full postback?

I keep reading about the dangers of cluttering the global namespace with global variables and functions. I just read that the 'old' way of defining global functions is problematic especially in situations where you have several developers working on…
Todd Vance
  • 4,627
  • 7
  • 46
  • 66
-1
votes
1 answer

NameError: global name 'hashed_pwd' is not defined

i am new with python and Flask .I make a login and signup page and everything is working fine.Now, i use werkzeug for password security at signup page password is generated in encrypted form and stored in database but when i tried to login then…
1 2 3
4