Proper way to name booleans that are A or B not True False
I have a field that indicates whether someone wars a commission or a fee. In sql its going to be a bit field. How should I name it? ...
I have a field that indicates whether someone wars a commission or a fee. In sql its going to be a bit field. How should I name it? ...
Let's say I have a C# variable and array: int variable_1 = 1; int[3] array_1 = {1,2,3}; How can I check if the value of variable_1 is equal to any of the values in array_1 without looping through array_1? ...
Hey guys, a quick question, I have data of the following sort: Ticker _ Date Fem Analyst (dummy 1 if true) __ Variables of that month like beta AA _ 01/04/2001 1 __ 0.61 AA _ 05/04/2001 1 __ 0.62 AA _ 08/04/2001 1 __ 0.63 AA _ 01/05/2002 1 __ 0.7 AA _ 04/05/2002 1 __ 0.71 AA _ 08/07/2002 0 __ 0.8 AA _ 07/04/2003 1 __ 0....
I have a program that I want to either hide or show certain UIbuttons depending on certain variables and all the buttons are named incrementally like 'button1, button2, button3.' So I want to iterate through the buttons but I don't know how to address the button in an assignment statement using an nsstring as a variable inside a dot not...
I disassembled the .NET 'System' DLL and looked at the source code for the variable classes (string, int, byte, etc.) to see if I could figure out how to make a class that could take on a value. I noticed that the "Int32" class inherits the following: IComparable, IFormattable, IConvertible, IComparable, IEquatable. The String and Int32...
For my programming languages class one hw problem asks: Are local variables in FORTRAN static or stack dynamic? Are local variables that are INITIALIZED to a default value static or stack dynamic? Show me some code with an explanation to back up your answer. Hint: The easiest way to check this is to have your program test the histor...
I have something like this: var test = {}; function blah() { test[2] = 'filled'; } blah(); // ! Hopefully confusion is now averted.. console.log(test); //result test -> 2:"filled" console.log(test[2]); //result undefined I don't understand why I'm getting 'undefined' in the second instance when according to the first instance...
I have a multiple language website, and I use a php get variable to set the cookie for the language setting. I have multiple subfolders (http://www.site.com/es and http://www.site.com/de) that each have a respective .htaccess file. When accessing these folders, the .htaccess file does this to "silently" redirect the user and add the ap...
I have a Document class that loads variables from Facebook with the use of stage.loaderInfo var connect:FacebookConnectObject = new FacebookConnectObject( facebook, API_KEY, this.stage.loaderInfo ); But when I change the Document class (with another one responsible for the layout of my app), and try call the above from a movieclip tha...
Is there a better way besides isset() or empty() to test for an empty variable? ...
Hi Everyone, Is it possible to get the memory address of a variable in C#. What I am trying to do is very simple. I want to declare variables of type Double, Float, Decimal and assign the value 1.1 to each of these variables. Then I would like to go and see how these values are represented in memory. I need to get the memory addres...
My jQuery code: $(document).ready(function() { chrome.extension.sendRequest({get: "height"}, function(response) { height = response.value; }); $("#id").css("height", height+"px"); }); You don't have to be concerned about the chrome.extension.sendRequest(), basically it communicates with a background page to fetch ...
Hello, I have a controller with an index function as follows: function index() { $this->load->model('products_model'); $data['product'] = $this->products_model->get(3); // 3 = product id $data['product_no'] = 3; $data['main_content'] = 'product_view'; //print_r($data['products']); $this->load->view('includes/te...
I'm finding it very convenient to pass configuration and other data that is read or calculated once but then used many times throughout a program by using Perl's use mechanism. I'm doing this by exporting a hash into the caller's namespace. For example: package Myconfiguration; my %config; sub import { my $callpkg = caller(0); ...
I have a rather long switch-case statement. Some of the cases are really short and trivial. A few are longer and need some variables that are never used anywhere else, like this: switch (action) { case kSimpleAction: // Do something simple break; case kComplexAction: { int specialVariable = 5; // ...
Here's the quick version of the code as it stands right now: function foo(attributeName, someJSObj, key, newValue) { someJSObj[key].attributeName = newValue; } Obviously this doesn't work, since it just creates a new element called attributeName. Is there an easy way to dereference the attributeName into the string that represent...
Is it possible to make php variables public and accessible anywhere on the timeline? The script I included works fine if I set it as the document class only (it won't work if I try importing it). The variables pass the text to dynamic text fields on the main timeline. The problem: It will pull the information and display it when the SW...
Hi folks, I am wondering whether it is possible to make dynamic variables in Java. In other words, variables that change depending on my instructions. EDIT Rephrasing my question, I mean variables for a class that change type depending on a given variable (stockType, for those who read on). FYI, I am making a trading program. A given...
I want to use a bunch of local variables defined in a function, outside of the function. So I am passing x=locals() in the return value. How can I load all the variables defined in that dictionary into the namespace outside the function, so that instead of accessing the value using x['variable'], I could simply use variable. ...
I have what I hope is a fairly simple question about using the value from a variable across 2 views. I’m new to the iPhone SDK platform and the Model/View/Controller methodology. I’ve got background in VB.Net, some Php, but mostly SQL, so this is new ground for me. I’m building an app that has 3 views. For simplicity’s sake, I’ll call t...