I'm writing a web application (in Python, not that it matters). One of the features is that people can leave comments on things. I have a class for comments, basically like so:
class Comment:
user = ...
# other stuff
where user is an instance of another class,
class User:
name = ...
# other stuff
And of course in my...
As part of answering another question, I came across a piece of code like this, which gcc compiles without complaint.
typedef struct {
struct xyz *z;
} xyz;
int main (void) {
return 0;
}
This is the means I've always used to construct types that point to themselves (e.g., linked lists) but I've always thought you had to name t...
Continued from here: http://stackoverflow.com/questions/2906847/create-variable-from-array-actionscript-3
I'm usually not this rushed, but I have to have this project finished by tonight... so any help is appreciated. The poster there gave me the following code, which gets "access of undefined property i" on the second line. All the ite...
Alright, PHP is throwing this error (only in the logs):
Error
PHP Notice: Use of undefined constant department - assumed 'department' (line 5)
PHP Notice: Use of undefined constant name - assumed 'name' (line 6)
PHP Notice: Use of undefined constant email - assumed 'email' (line 7)
PHP Notice: Use of undefined constant message - as...
I run rake and I get this error. What's that supposed to mean? Sorry I'm newbie to RoR sb please help. Thanks a lot.
undefined method `reserved=' for #<FriendlyId::ActiveRecordAdapter::Configuration:0x2b1ae5c2ec70>
...
I have two double data elements in an object.
Sometimes they are set with a proper value and sometimes not. When the form field from which they values are received is not filled I want to set them to some value that tells me, during the rest of the code that the form fields were left empty.
I can't set the values to null as that gives...
Let's suppose you have this class:
class A
{
public:
A () {}
A (double val) : m_val(val) {}
~A () {}
private:
double m_val;
};
Once I create an instance of A, how can I check if m_val has been initialized/defined?
Put it in other words, is there a way to know if m_val has been initialized/defined or not? Something along the li...
When a is undefined, then a || 1 will throw an error, but a = a || 1 will not. Isn't that a little bit inconsistent?
irb(main):001:0> a
NameError: undefined local variable or method 'a' for main:Object
from (irb):1
from c:/ruby/bin/irb:12:in '<main>'
irb(main):002:0> a || 1
NameError: undefined local variable or method...
var Model,node;
document.getElementById('sedans').innerHTML='';
var thismodelabbr,prevmodelabbr;
for(var j=0; j<xmlDoc.getElementsByTagName('data').length; j++){
node = xmlDoc.getElementsByTagName('data')[j];
thismodelabbr=node.getAttribute('model');
if(prevmodelabbr!=thismodelabbr){
...
Having problem with this bit of code qith jQuery. it should pick the values from current form and then submit them, but when I try to get them with jQuery they always turn up undefined.
I know the SQL results are fine since they show correctly in HTML table, so it must be my inferior javascript skills.
New with jQuery and I'm at loss :(
...
Inside of a jQuery plugin I made I have:
$.getJSON(base_url,{
agenda_id:defaults.id,
action:defaults.action+defaults.type,
output:defaults.output
},function(json){
return json;
});
And in a separate JS file (yes, it comes after the plugin):
json = $('#agenda-live-preview').agenda({action:'get',type:'agenda',output:'js...
I am trying to add an init() function to a MovieClip, but when I run the function from scene1 the variables that were set in the MovieClip are not defined yet... The MovieClip was dragged to the stage from the library.
scene1:
mc.init(null);
MovieClip:
var _default = 5;
function init(num) {
if(num == null) {
trace(_d...
Hi,
I get the following problem with some openssl (yeah, I know it's poorly documented, but I wish to use it any way) code in a project of mine (written in c, on osx and tested in ubuntu):
Undefined symbols:
"_BIO_new_socket", referenced from:
_main in ccG3cvyw.o ld: symbol(s) not found collect2: ld
returned 1 exit statu...
What settings to change while setting up php WAMP so that undefined variable error is not encountered. I changed setting of register_globals = on but it did not help.
...
I'm getting this weird runtime crash when instantiating QVAriantAnimation or QPropertyAnimation. It appears this happens when the program doesn't link appropriately the class. But I have double checked my simple project and can't see anything wrong.
#include <QtCore/QVariantAnimation>
#include <QtCore/QEasingCurve>
class MyAnimacion : ...
Hi, I have a problem with retrieving attribute values via E4x in javascript.
Suppose a list of XML nodes like the following as the XMLObject:
<node att1="value1" att2="value2" att3="value3" att4="value4">
<nodeChild><!CDATA[/* ... */]></nodeChild>
/* more node childs */
</node>
I properly accessed the nodes (in a loop) and i...
I am getting this error 'Cufon' is undefined on my blog http://microreviews.org The error comes on Line 20, char1.
I also get the error 'dtsv' is undefined on Line 57 and character 3.
The errors comes only on IE7 and IE6 and no other browser. I donot really care for IE6 but the error on IE 7 is a major source of concern. What can be d...
Goal: read in the current value of a set of text boxes. if the value is "None" replace the value with the value provided. Once a value is changed stop.
When I use span and .text() instead of a textbox and .val() everything works. However, the textboxes are part of a form.
Any idea why it would return as "undefined"?
(basically i'm ma...
I have defined a function called is_logged_in? in a user defined library stored in the /lib directory, however when I try to use it in one of my views (in this case a _menu.html.erb view) I get a "undefined method `is_logged_in?' for #" error. I had assumed that if the method was available within the /lib directory then it would be acces...
In this file (localization.php):
<?php
session_start();
header('Cache-control: private'); // IE 6 FIX
if(isSet($_GET['lang'])) {
$lang = $_GET['lang'];
// register the session and set the cookie
$_SESSION['lang'] = $lang;
setcookie("lang", $lang, time() + (3600 * 24 * 30));
}
else if(isSet($_SESSION['lang'])) {
$l...