error

mysql_connect()

I am trying to connect to mysql and am getting an error. I put my servers ip address in and used port 3306 whihch post should be used? <?php $connection = mysql_connect("serer.ip:port", "user", "pass") or die(mysql_error()); if ($connection) {$msg = "success";} ?> <html> <head> </head> <body> <? echo "$msg"; ?> </body> </html> ...

PyQt error: QSqlDatabasePrivate::database: unable to open database

What is the cause of following error: QSqlDatabasePrivate::database: unable to open database: unable to open database file Error opening database? Code is 100% correct, this message appeared when I have reinstalled Windows, Python and PyQt. EDIT: I have "read-only" flag in folder with .db file properties. It stays gray (half-checked) w...

WEBrick::HTTPStatus::LengthRequired error when accessing create method in controller

I have a very simple controller set up: class LibrariesController < ApplicationController ... def create @user.libraries << Library.new(params) @user.save render :json => "success!" end ... end Basically, whenever I try to access the create method of LibrariesController using HTTParty.post I get a WEBrick::HTTPStat...

(Flash CS4/AS3) Error #1007: Instantiation attempted on a non-constructor

Having a bit of a problem creating an instance of an object. Bear in mind that this is timeline based and NOT an external class… var foo:Object { var a:String; var b:String; } var new_foo:Object; function makeFoo():void { new_foo = new foo(); } function doStuff(e:MouseEvent):void { makeFoo(); } Everything runs fine ...

boost::dynamic_pointer_cast with const pointer not working ?

Hi, Let's say I have two classes, A and B, where B is a child class of A. I also have the following function: void foo(boost::shared_ptr<const A> a) { boost::shared_ptr<const B> b = boost::dynamic_pointer_cast<const B>(a); // Error ! } Compilation with gcc gives me the following errors: C:\Boost\include/boost/smart_ptr/shared_p...

javascript error "invalid XML attribute value <script language=JavaScript>\n"

i have some javascript files included in my html file for months. It used to work just fine until couple of days ago, now my scripts don't run anymore and i get javascript error "invalid XML attribute value <script language=JavaScript>\n" with firebug. Does anyone know what this error means and how to get rid of it? i guess is something...

UpdatePanel codebehind error "Page cannot be null"

Hi guys, i'm trying create a updatepanel for my controls in a codebehind. But i get the follow error: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request. My code: List<Control> novoControl = new List<Control>(); control.Controls.ForEach<Control>(c => novoControl.Add(c)); con...

javascript error listener

hi all i try using window.attachEvent (or addEventListener) to capture js errors my callback function gets only one event parameter my question is: how do i get line number and source file of the error from this event? the alternative usage window.onerror=callback; works but an event listener has other benefits thus im giving it a try...

has_many, belongs_to and comment forms

I'm having two models: Snippet and SnippetComment. These also have their own controllers, as well as views. In /app/views/snippets/show.html.erb I have a form that starts like this: <% form_for(@new_snippet_comment) do |form| %> SnippetComment belongs to one Snippet, and a Snippet belongs to one User. This means that I have this routi...

.htaccess makes php files downloadable

I have an .htaccess file with following content: AddHandler x-httpd-php5 .php For some reason, whenever I upload it to the server, Firefox then wants to download PHP files instead of showing them, I think the Apache server has some error. What's wrong? Thanks in advance ^^ ...

Rails: errors in production vs development

In Rails, is there a way to display different error messages on a production rails server (a nice graphic) vs a development server (detailed error information, stack trace, etc.)? ...

Out of memory error in java

I am getting OutOfMemoryError: java heap snippets of the method: { // step 1: I am creating a 2 dim array int totalCombination = (int) Math.pow(2.0, (double) vowelCount); // here vowelCount > 10 // step2: initializing my array // step3: and using that array } My Question: each time this method is called, that array is getting cr...

Invalid Argument IE 8 jQuery

Hi, I have this particular script that runs so that the flash elements don't show up on top of my slide out navigation. This redraws that flash element with wmode as opaque and so it shows up under the navigation. Works perfectly with Chrome and FireFox but not with IE. In IE I get an Invalid Argument in jquery.min.js code 0 Line 103 cha...

Java: "cannot find symbol" error of a String[] defined within a while-loop

Here's the relevant code: public static String[] runTeams (String CPUcolor) { boolean z = false ; //String[] a = new String[6] ; boolean CPU = false ; while (z == false) { while (CPU==false) { String[] a = assignTeams () ; printOrder (a) ; for (int i = 1...

Eclipse Could not Delete error

Hello I'm working on a project with Eclipse and by now everything was fine, but last time I've tried building it, it returned the error "The project was not built due to "Could not delete '/Torpedo/bin/bin'.". Fix the problem, then try refreshing this project and building it since it may be inconsistent Torpedo Unknown Java Prob...

Google Chrome showing javascript security error

I need help resolving this Google Chrome Error..."Uncaught Error: SECURITY_ERR: DOM Exception 18" Here is the code. //Get Cookie function get_cookie (cookie_name) { var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' ); if (results) return ( unescape ( results[2] ) ); else return null; };...

What am I doing wrong?, linking in C++

I'm trying to code a simple base64 encoder/decoder (to test my programming skill). I can compile it, but it doesn't link, I've this message error: C:\Documents and Settings\Facon\Escritorio>g++ base64.o main.o -o prueba.exe main.o:main.cpp:(.text+0x24a): undefined reference to `Base64Encode(std::vector > const&)' collect2:...

What can cause legit MySql INSERT INTO command to fail?

I can't figure out what's causing my INSERT INTO's to fail to certain table in MySql. I can manage them to other tables. The table looks like: CREATE TABLE IF NOT EXISTS `Match` ( `id` int(11) NOT NULL AUTO_INCREMENT, `match_no` int(11) NOT NULL, `season` int(11) NOT NULL, `hometeam` int(11) NOT NULL, `awayteam` int(11) NOT N...

WPF DataGrid row validation error count

Hi! I'm currently facing the problem, that I import an Excel file to a DataGrid. This works pretty fine, but after importing the table, I need to know how many rows are invalid. I have applied several validation rules for the different datatypes, and I have an icon in the row header, that shows up if the row is invalid. But since I ha...

what does this error mean in c?

#include<stdio.h> #include<ctype.h> int main() { char a,b; FILE *fp; fp=fopen("lext.txt","w"); fprintf(fp,"PLUS"); return 0; } the error i get is this /tmp/ccQyyhxo.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status ...