Member Avatar
Till now I was expecting that there in no block level scope in Javascript. But after reading this article I came to know that block-scoped variables are introduced in javascript. Although this article < > has a very good explaination about the javascript variable scope, I am still wondering the …
by Mr in Web Development ()
Member Avatar
I am a programmer. That's why I'm receiving a paycheck. I sit alone in a small cubicle and do my work. I don't do desktop support and I'm not interested in working closely with users. So my boss says to me today that I am being signed up for a …
by hotelsinger in Community Center ()
Member Avatar
how to make a bean application scoped so that it will persist as long as the web application is running??? and how can we access it in our controller?? thank you
by cool_zephyr 7 in Web Development ()
Member Avatar
I stumbled on upon this anomaly in one of my programs and can't figure out why this is happening. I made a small test function that exhibits the same behavoir. It's like the local variables of my function are being saved after the function exits. The exclude_ids variable keeps growing. …
by ihatehippies 11 in Software Development ()
Member Avatar
How can an array be accessed from within another function? Here is an example of some code. editarray can not seem to access values of the array from outside of the writetofile function. Is there any way to change the scope of the array?
by duke.tim in Software Development ()
Member Avatar
Hello! So I currently have a class titled Appliciation which contains a method called start. I'm including this file that will only use the Path object. When the script is run I get this error: So obviously the Path variable/object isn't in the scope of the included file for some …
by NardCake 30 in Web Development ()
Member Avatar
I have declared a local variable inside of getAddress. When I try to access that variable inside a local function it falls outside its scope. What am I doing wrong?
by singularity~ in Web Development ()
Member Avatar
Hello, I am new in trying to figure out how to use two classes together. One class is called circle, and is supposed to hold attributes of radius and area. It is also supposed to have the methods of print and computeArea. The next class is the geometry class and …
by thunderjuice in Software Development ()
Member Avatar
Ok, so currently I've been trying to recreate missile command, an old atari game. While I've had help from a group in creating the graphics for the game i.e menu, plotter class, etc. I've basically been flying solo as of the game's logic i.e missile detection, health, missiles spawning and …
by Hopp3r in Software Development ()
Member Avatar
Can you please help me and tell me what I am doing wrong? I have been looking at the program for two hours and need help. I keep getting this error: 'triangle' was not declared in this scope. Also, that is the only error, so I don't have anymore. Thank …
by pars99 in Software Development ()
Member Avatar
Based off some stuff from my last thread I tried to write a search results page using maximum 3 parameters. I used a couple of function to try and get everything organized. One: sort_mysql_results has no defined parameters so I can put in as many parameters as needed. The code …
by dancks 4 in Web Development ()
Member Avatar
Hello, I'm in a pickle. (Please observe the code) In the actionPerformed method, I don't know how I can get the value of the variable 'minutes'. I can get 'hours' by e.getActionCommand(), but can't do minutes that way. I need to get both 'hours' and 'minutes' at the same action. …
by thompsonSensibl in Software Development ()
Member Avatar
consider I expected the update to show the updated value of x+y but it doesn't I want to be able to update the variable x whenever y is set to some random number //frustrated
by Pyler in Software Development ()
Member Avatar
Hello all, I'm new to programming in Objective-C and have some C++ under my belt. As one of my first programs, I'm trying to make a fairly simple app that can record the user's heart rate. I made a class to store all of this information in (called HeartRate), from …
by TheMorphinator in Software Development ()
Member Avatar
Hey all, I have created a mail script in PHP for a contact form on my website. I have a message that displays when the message has been sent. I would like this message to display below my form but am having some trouble with this. The message is currently …
by sway1101 in Web Development ()
Member Avatar
I'm having a small problem with a variable in one of my PHP scripts. The variable is . It gets set using a function that runs recursively called createNavigationMenu. However, even though I have set it, the interpreter keeps telling me that the variable is undefined. I really don't know …
by nexocentric 18 in Web Development ()
Member Avatar
i am ensuring on both pages i have first of all called session_start(); on one page i declared the link of another page is on this page. and another page i tried to print it by but it showed nothing. i am using php 5.4 with apache and mysql. lookin …
by nchy13 in Web Development ()
Member Avatar
Hey, I get confused when dealing with the static scope and dynamic scope, and for this pseudocode I have to find both. For static I believe it should print out: 9 4 2 3 however, I'm not entirely sure. Any help would be appreciated, thanks. Procedure main g:integer --body of …
by crodriguez08 in Computer Science ()
Member Avatar
This is the project I am reading from . class Cart { &lt;snip&gt; private function __construct() {} } &lt;snip&gt; // initialize shopping cart // note that Cart implements Singleton pattern $cart = Cart::getInstance(); How is getInstance which is not a static method, called using :: .the double colon, is a …
by kutchbhi in Web Development ()
Member Avatar
I was working on a project when I thought that maybe a ::. operator would look funny in some code. Just for fun I typed that into the global scope area like this: ::. int main() { //etc... and my code completion software said too many results to display. My …
by Labdabeta 182 in Software Development ()
Member Avatar
Hello everyone, I am creating UDF using CREATE FUNCTION statement. The question is how can I make them globally accessible to all the databases, rather than specific database? Regards,
by tanha -2 in Databases ()
Member Avatar
Hi Guys, What is the scope of the exception variables when I catch them by reference. try{ throw AnExceptionObect("Exception message"); } catch(AnExceptionObect &amp;exp){ logger &lt;&lt; exp.what(); //logger is a dummy object throw; //what will happend now? is it going to be throwen by value? and what if I catch this …
by learningcpp 8 in Software Development ()
Member Avatar
Hello, please can I have some clarification to check I am not doing something very stupid? It seems sensible with all that I have read, but I'm not confident. I suspect I have memory leaks and want to make sure some fundamentals are correct before I start looking deeper. My …
by IMJS in Software Development ()
Member Avatar
Dear all I am brand new to C# and have previously only written programs in Javascript, so go easy on me ! I have written an "app launcher" program which reads a text file line by line. Each line is just a path to a program e.g. C:\Users\Matt\Desktop\Gravity.exe So far, …
by mklein in Software Development ()
Member Avatar
I have a nested class declared as: class A { class B { // members }; }; Is there a good way to avoid typing A::B every time I need to access B's members? I'd just like to do this in one .cpp file. I tried "using namespace A;" but …
by Jsplinter in Software Development ()
Member Avatar
Even after looking at a lot of books, I am not able to understand the problem in the following code: //1.c static int y=23; void abc(int a){ printf("%d\n",a); } //2.c include&lt;stdio.h&gt; include "1.c" int main(){ abc(12); printf("\n"); printf("%d\n",y); return 0; } I can understand that the functions abc is accessible …
by techie1991 26 in Software Development ()
Member Avatar
Is there any way to implement a scope change for the template keyword? I have a templated class with almost 100 different functions and my code looks disgusting with my external declarations. Is there any way to implement a scope increase for template? EG: template &lt;typename Type&gt; class TypeClass { …
by Labdabeta 182 in Software Development ()
Member Avatar
Hello all, I'm taking a intro computer science course, yet somehow I'm much better at c++ than python. My professor is essentially useless. Can anyone show me how to let these variables persist into global scope? I assumed declaring them globally would make them persist, yet it appears to not. …
by dare599z 16 in Software Development ()
Member Avatar
Hi, I'm working on a linked list filled with class objects and I've encountered a weird problem that I cannot see how to resolve. I declare 2 self-referential pointers within my 2 classes and the error: In file included from prog2.cpp:16: employeedatalist.cpp: In function âvoid getData(std::fstream&amp;)â: employeedatalist.cpp:15: error: âheadâ was …
by night2night3 in Software Development ()
Member Avatar
Nevermind, I wanted to delete this post, but did not want to bother emailing the moderator. Sorry.
by QuesoTaco in Software Development ()