error

Parse error: syntax error, unexpected T_OBJECT_OPERATOR

I'm getting the following error when trying to add some data from myXml.xml to a string: Parse error: syntax error, unexpected T_OBJECT_OPERATOR. $xmlstr = file_get_contents('myXml.xml'); $xml = new SimpleXMLElement($xmlstr); foreach($xml->order as $order){ $replace = array(); $firstName = (string) ...

Checkbox validation - at least one selected

Hi, I have number of checkboxes and another checkbox for "Select All" I want to check if the user has selected at least one checkbox. Need modification in javascript <script language="Javascript"> function doSubmit(){ function check_checkboxes() { checked=false; var c = document.getElementsByTagName('INPUT'); for (var i = 1; i < c....

c# : Random FTP error (550) when trying to download files

Hello folks, I'm having a problem that's been bugging me for a while. I'm downloading files from a FTP server in .net, and randomly (and I insist, it is completely random), I get the following error: System.Net.WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access). Our code in .ne...

(Django) object is unsubscriptable

When I'm trying to create an extended user profile I'm getting UserProfile object is unsubscriptable. I've googled for solution, but 'your object is not a sequence' does not help here much. Here's the function I'm using, 'temp_data' is the data from my registration form : def create_user(request): data = request.session['temp_da...

C++ Mysql Real Escape String Issue

Hmm, for some reason, its only doing this on the first username (and password) and does it for how big my my vector is. Any ideas on why? int eMysql::strip(string &input) { char* from = new char[strlen(input.c_str()) * 3 + 1]; mysql_real_escape_string(&mysql, from, input.c_str(), input.length()); input = input.assign(from); ...

fsockopen not working?

I am trying to connect to an IRC server via PHP on a command line using Windows 7. Everytime when running this: $socket = fsockopen($irc_server, 6667, $errno, $errstr, 5); $errno = 0, $errstr = "" and $socket = 'Resource id #4' (using die($socket);) What is the cause of this, and how can I debug more into this. The following code: ...

Why is this array selection causing such a glitchy phenomenon?

I was loading a image in openGl with the Glaux library when I came across a very strange phenomenon with a array. Some example of what I tried and if they succeeded or not are below. The curFreeId variable is global. The extra variables I created to test with are local to the function. Since when does this effect the flow of code. ...

javascript setting custom error handler to 3rd party plugins or modules.

Hi, I am trying to set a custom error handler for 3rd party plugins/modules in my core library, but somehow, myHandler does not alert the e.message. Can somebody help me please? thank you Function.prototype.setErrorHandler = function(f) { if (!f) { throw new Error('No function provided.'); } var that = this; var g = function() { ...

out of memory error - can't find what is the reason

hi guys, i have this code that was made from tips here long time ago. var tm var tn; var rot = true; var rot2 = true; var th = 482; var tmh = 0; var $paneTarget = $('#lyr1'); var slideshow = { delay: 5000, actions:[], run: function() { if (slideshow.actions.length) { var current = slideshow.actions.shif...

Perl/MySQL "Query was empty" error, probably multithreading-related

I am writing a program to extract data from a bunch of text files and stuff it into DB. All of my commands currently have the form similar to this (with different queries): $query = "INSERT INTO relations (relation_type_id, confidence) VALUES ($reltypeid, $conf)"; print "$query\n"; $result = $conn->query($query); $relid = $result->inser...

C# GetBytes, WriteBytes and Embedded Statement Error

I have a problem. When I run my program, it comes up with an error, specifically the CS1023 error. I guess it's because I have a declaration inside a statement, but I don't know how else to write the code. Sometimes C# annoys me, because in C++ I could get away with similar things... anyway, here's the code. I would appreciate it if som...

Error trying to push a build to a first gen iPod running os 3.1.3 using SDK 4.

I just upgraded to iPhone SDK 4, I was building to the iPod running OS 3.1.3 fine untill i ugraded the SDK. When I try to build now I get the following error: Can't run 'AppName' - was built for 'armv7', but device requires 'armv6' or compatible architecture. In the project settings I have set the Architectures to Standard (armv7 armv6...

Twitter API + OAuthConsumer.framework

Hello, I am working on a test app to help me better understand the way oAuth works with the Twitter API for a bigger app I would like to write, however I am experiencing an issue posting messages to the API after successfully getting an access token. I am using the OAuthConsumer framework as it seemed to be the easiest way to work thro...

Can I centralize the RoR error into one place?

If some user encounter any errors in the application, I don't want to the user see the default error page, for example, routing error, or some others error. How can I show an error page only (for example, an "Error occur", but not showing any errors in font of the user) , and redirect back the user to main page. How can I modify my appli...

PHP eval and capturing errors (as much as possible)

Disclaimer; I'm fully aware of the pitfalls and "evils" of eval, including but not limited to: performance issues, security, portability etc. The problem Reading the PHP manual on eval... eval() returns NULL unless return is called in the evaluated code, in which case the value passed to return is returned. If there is a par...

Matlab unable to open the .dat file as data file when calling a software using 'system'

To generate an ouput file (.rwo format) containing the desired result, we have to run the executable of the report program which uses a parameter file (.rwd format). The output file is ReportBHP1.rwo, this file will contain the variable exported. Now to implement this in Matlab, below is a small script giving a gist of what I am trying ...

VB.NET - Conversion from string "11/07/2010 13:00:00" to type 'Date' is not valid.

Hi, I am getting the error: Conversion from string "11/07/2010 13:00:00" to type 'Date' is not valid. In my ASP.NET code when run on the web server. The date is valid and it can't be a US format issue because either way it would be valid. I have tested it and it seems to error when the time is > 12:00 (ie. a 24hour like 13:00 or 21:00)....

"Call to undefined method" - but I know it exists.

This line of code: echo "<strong> {$this->author->last} {$this->date->shortYear()}</strong> ..."; gives me this error: Fatal error: Call to undefined method Date::shortYear() in /f5/debate/public/libs/Card.php on line 22 Even though in Date.php (which is included in Card.php): class Date { public $day; public $month; ...

Timeout in CUDA? / fermi / gtx465

I am using CUDA SDK 3.1 on MS VS2005 with GPU GTX465 1 GB. I have such a kernel function: __global__ void CRT_GPU_2(float *A, float *X, float *Y, float *Z, float *pIntensity, float *firstTime, float *pointsNumber) { int holo_x = blockIdx.x*20 + threadIdx.x; int holo_y = blockIdx.y*20 + threadIdx.y; float k=2.0f*3.14f/0.00000005...

error: writable atomic property cannot pair a synthesized setter/getter with a user defined setter/getter

I recently tried to compile an older Xcode project (which used to compile just fine), and now I'm seeing a lot of errors of this form: error: writable atomic property 'someProperty' cannot pair a synthesized setter/getter with a user defined setter/getter The code pattern which causes these errors always looks like this: // Interf...