error

Error when adding value to array

hey guys, when i run: with open('file00.txt') as f00: for line in f00: farr=array.append(float(line)) print "farr= ",farr i get: farr=array.append(float(line)) AttributeError: 'module' object has no attribute 'append' does anyone know why I get this? do I have to import something? am I doing it compl...

I'm having trouble opening a Python file :(

I saved a file as DictionaryE.txt in a Modules folder I created within Python. Then I type: fh = open("DictionaryE.txt") I get this error message: Traceback (most recent call last): File "<pyshell#17>", line 1, in <module> fh = open("DictionaryE.txt") IOError: [Errno 2] No such file or directory: 'DictionaryE.txt' What am I d...

INSERT - PHP & SQL Server

I don't know what is going on, but it just doesn't want to work. I keep getting this error when I submit my form: Array ( [0] => Array ( [0] => 22001 [SQLSTATE] => 22001 [1] => 8152 [code] => 8152 [2] => [Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated. [message] => [Microsoft][SQL Serve...

"class, interface, or enum expected." Error when compiling java files.

First, the code in question: package net.foo.server; import at; import ay; import bi; import bj; import bl; import ck; import cw; import da; import dp; import ds; import dt; import dw; import ep; import fa; import fd; import fi; import fl; import ge; import ho; import ht; import java.awt.GraphicsEnvironment; import java.io.File; import...

Correct approach to handle data verification

I have an employee class in my application. The constructor for the class takes an employee ID. The way I try to check if the employee ID is valid is something like this Employee emp = new Employee("E11234"); if (emp.IsValid()) { // do whatever is required } else { // show an error message } In the constructor, I try to access...

MySQL syntax error (in SELECT query)

I have two MySQL tables: Group(gr_id, gr_name, gr_description, parent_id) Group_has_User(User_id, Group_id) I'm trying to execute the query: SELECT group.gr_id, group.gr_name, group.gr_description, group.parent_id FROM group, Group_has_User AS gu WHERE (group.gr_id = gu.Group_id) AND gu.User_id = 1 It gives an error: You have an err...

javascript check if img src is valid?

I have something like: document.getElementById('MyPicture').src = 'attempted.png'; If the client cannot get that resource, I would like to replace it with: document.getElementById('MyPicture').src = 'error.png' I know I can put onError=function() in the image tag, but how can I pass the Id to onError, so that I can have one onError...

NSUserDefaults BOOL returning (null)

Hi guys, I'm trying to pull an NSUserDefaults value from a Settings.bundle into my application. When I load up the NSUserDefaults on application load, though, an NSLog reveals that my BOOL value returns "(null)" and my String value returns the number 39540360. The weird thing is that the documentation on NSUserDefaults specifically state...

SharePoint & Visual Studio 2010 - Can't create a SharePoint project

Hi, I'm currently in trouble setting up a SharePoint 2010 project. Today, I installed VS2010 on our new SP 2010 test-server with my domain account, which was prompted with administrator rights on the Server and SharePoint before. But now I'm failing to create a SharePoint project in Visual Studio. The SharePoint Customization Wizard te...

Static class keeps throwing "Error #1063: Argument count mismatch"

I've created a static class in Flash which works as the inventory delegate for this game. Flash though keeps giving me this error: ArgumentError: Error #1063: Argument count mismatch on Inventory(). Expected 1, got 0. at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip(...

ASP.NET UpdatePanel library reference errors

I am having a problem with VS 2010 apparently losing it's ability to load an UpdatePanel in the middle of development and it is driving me crazy. I am using VS2010 and building a user control with .NET 3.5, targeting DNN 5.x. I have created a control to be used on a DNN website that utilizes an update panel. When I develop the control...

Getting rid of a notice in PHP

Hello everyone, I am creating a from using the Zend Framework version 1.10.7. But I am getting an annoying notice of which I want to get Rid. The notice means that somewehere i have a problem with an array. I just can't find out where it is. Any Help, idea's? Notice: Array to string conversion in /var/www/Zend/ZendFramework-1.10.7...

Exception: “Missing key value on ‘Storyboard’ object.” with styled triggers

I'm restyling a button, and that includes providing a controlTemplate and also adding some triggers (for mouseenter and mouseleave). My XAML is as follows: <Style TargetType="Button"> <Style.Resources> <Color x:Key="ForeColour" R="128" G="128" B="128" A="255"/> <Color x:Key="BackColour" R="211" G="211" B="211" A="...

Error while compiling C++ file using clang

After building CLang on the linux environment I tried to build it on Windows using Visual Studio. Everything went right but when I tried to compile this classic Hello World! program #include <iostream> int main() { std::cout<<"Hello World!"; } I got many errors C:\Users\SUPER USER\Desktop>clang++ a.cpp In file included from a.cpp...

Ubuntu just-in-time debugging

Good Morning everyone I'm currently facing a segfault at random on a little piece of software, however, It appears only when not started with an attached debugger (due to a possible memory error, where values are initialized in a safe interval when started with a debugger). Is it possible to attach an debugger only in case of an segfau...

Strange IE8 problem with a select that runs AJAX

I've got a strange error with IE8 and postcode lookups. It may not be postcode lookups as such that's causing it - just an AJAX call that modifies a select. I've set up a test page here. If you click on Find Address, and then double click (quite quickly) on one of the addresses that is within the boundary of the red-bordered div, you see...

Objective C: Inline function - symbol not found

Hi! I have a library which uses an inline C function, and is compiling just fine. When another library references that library, it still compiles fine. But if an actual app references the library, it fails to compile, saying that the _functionNameHere (yes, function name beginning with underline) - symbol is not found. If I remove the i...

Get Flex modules from ASP MVC

Hi, We´re developing an ASP MVC application witch the View (aspx) has a Flex embed. This aspx/flex view is composed by a flex application and several modules. So, when we call the application url (http://localhost:9090/MyProject/Flex/Index), the server invoke the method the will return the ActionResult that represents this action, in ...

PHP Append to empty string without error.

Hey folks, I have got the following issue, my function appends code to a string $string ($string .= bla), but in the beginning the string is empty, so I get this error message A PHP Error was encountered Severity: Notice Message: Undefined variable: $string Filename: libraries/file.php Line Number: 90 Of course if I define...

Delphi Error E2283 Too many local constants

Hi everyone, this is my first post here, so please be gentle if I am missing something out ;-) I am having a compilation problem with my code in Delphi 2006. I am using a static String array: fsi_names : array [0..FSI_NUM_VARS-1] of string; In a procedure I call at the start of the program, I assign values to this array. This code i...