error

Parse error: syntax error, unexpected ';'

Hallo I have this script: <? require("lib2/config.inc.php"); require("lib2/tpl.class.php"); require("lib2/db.class.php"); require("lib2/um.class.php"); $tpl = new template("templates", "tpl"); $db = new db($db['location'], $db['username'], $db['passwort'], $db['database']); $um = new usermanagme...

Warning: expects resource but string given

I get: "Resource id #8 Warning: mysql_fetch_array() expects parameter 1 to be resource, string given" Heres the code: $sql="SELECT password FROM user WHERE userid=$userid"; echo $password=mysql_query($sql); while($row = mysql_fetch_array($password)) { $password = $row['password']; } Any ideas? ...

Memory allocation problem C/Cpp Windows critical error

Hi! I have a code that need to be "translated" from C to Cpp, and i cant understand, where's a problem. There is the part, where it crashes (windows critical error send/dontSend): nDim = sizeMax*(sizeMax+1)/2; printf("nDim = %d sizeMax = %d\n",nDim,sizeMax); hamilt = (double*)malloc(nDim*sizeof(double)); printf("End hamilt alloc. ...

Php code not executing - dies out when trying to refer to member of static class - no error displayed

I'm having some problems with this piece of code. I've included a class declaration and trying to create an object of that class but my code dies out. It doesn't seem to be an include issue as all the files are being included even the files called for inclusion within the class file itself. However the object is not created - I tried to...

Getting mysql syntax error and cant find source

I have function that updates log table. function wslog($userID, $log, $where) { safe_query("INSERT INTO ".PREFIX."log ( time, userID, log, where ) values( '".time()."', '".$userID."', '".$log."', '".$where."' ) "); } And I have this php code: wslog($userID, 'server|'.mysql_insert_id().'', 'servers'); But I keep getting syntax e...

Invalid Memory Acess for JavaFX ScrollBar on Snow-Leopard

I created the following JavaFX script, which when run, generates an Invalid memory access on Snow-Leopard. What is it about javafx.scene.control.ScrollBar that is causing a memory failure? Stage { title: "Scroll View" scene: Scene { content: [ ScrollBar { min: 0 max: 100 ...

Call to pop failing in my java code.

public void CardToPile() { waste.push(reserve.pop); } ...

Could not access CDO.Message

How can i resolve this kind of error using vb.net 2003? Could not access CDO.Message Object ...

BlackBerry - Exception with null message when sending sms using Connector

I used code given but I am getting "IOCancelledException" and "IOException". And IOCancelledException.getMessage() / IOException.getMessage() giving null string, it does not give error message. Please help me understaing reason. class SMSThread extends Thread { Thread myThread; MessageConnection msgConn; String message; ...

Why does gcc think that I am trying to make a function call in my template function signature?

GCC seem to think that I am trying to make a function call in my template function signature. Can anyone please tell me what is wrong with the following? 227 template<class edgeDecor, class vertexDecor, bool dir> 228 vector<Vertex<edgeDecor,vertexDecor,dir>> Graph<edgeDecor,vertexDecor,dir>::vertices() 229 { 230 return V; 231 }; GCC i...

ActionView::TemplateError (integer 23656121084180 too big to convert to `unsigned int')

Hi, this is the weirdest error I've ever got on Rails. Any idea what this may be is? NOTE: the error DOES NOT come from @order.get_invoice_number, I've tried to separate the code into multiple lines and it was clear the problem is within {:host... } ActionView::TemplateError (integer 23656121084180 too big to convert to `unsigned i...

What is wrong with this C++ Code ?

Hi .. i am a beginner and i have a problem : this code doesnt compile : main.cpp: #include <stdlib.h> #include "readdir.h" #include "mysql.h" #include "readimage.h" int main(int argc, char** argv) { if (argc>1){ readdir(argv[1]); // test(); return (EXIT_SUCCESS); } std::cout << "Bitte Pfad angeben !" << std::e...

problem antlrworks code too large

In Antlrworks I get this error: [18:21:03] Checking Grammar Grammar.g... [18:21:26] Grammar.java:12: code too large [18:21:26] public static final String[] tokenNames = new String[] { [18:21:26] ^ [18:21:26] 1 error Using instead the generated code in a Java project works normally. What can be...

SSRS function returns #Error if value of field is null

Thanks in advance for any and all assistance. My code is: Public Function StripHTML(value As String) As String Return System.Text.RegularExpressions.Regex.Replace(value, "<(.|\n)*?>", "") End Function Then I call the function from a textbox. This works great unless there are nulls in the dataset. I tried to compensate for the null...

Exception in thread "main" java.lang.NoSuchMethodError: main

when i try to compile this: public class Risk { } class territory { public static void main (String[]arg) { System.out.println ("hi") ; } } I get this error message: Exception in thread "main" java.lang.NoSuchMethodError: main whats going wrong here? ...

Pylons error "No object (name: request) has been registered for this thread" with debug = false

I'm unable to access the request object in my Pylons 0.9.7 controller when I set debug = false in the .ini file. I have the following code: def run_something(self): print('!!! request = %r' % request) print('!!! request.params = %r' % request.params) yield 'Stuff' With debugging enabled this works fine and prints out: !!!...

What makes this "declarator invalid"? C++

I have Vertex template in vertex.h. From my graph.h: 20 template<class edgeDecor, class vertexDecor, bool dir> 21 class Vertex; which I use in my Graph template. I've used the Vertex template successfully throughout my Graph, return pointers to Vertices, etc. Now for the first time I am trying to declare and instantiate a Vertex obje...

GCC problem with raw double type comparisons

I have the following bit of code, however when compiling it with GCC 4.4 with various optimization flags I get some unexpected results when its run. #include <iostream> int main() { const unsigned int cnt = 10; double lst[cnt] = { 0.0 }; const double v[4] = { 131.313, 737.373, 979.797, 731.137 }; for(unsigned int i = 0; i ...

Error running openjdk with remote debug flags

I'm trying to run Tomcat on openjdk compiled on Redhat. It works fine as long as I run it without remote debug options. When I try to run it with remote debug enabled -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n, the JVM doesn't start and shows the error message: NPT ERROR: Cannot open library Sun JRE with the ...

Asp.Net : IHttpModule + m_context.Server.Transfer = session state error

I have an IHttpModule that implements IRequiresSessionState. The session state is at "on" on the page directive and I also added it to the web.config. In the method "OnBeginRequest" in the IHttpModule, I make a Server.Transfer but I get the error : Session state can only be used when enableSessionState is set to true, either in a confi...