error

array.sort() is not giving the desired result

iam using following function in my javascript code function AlphaSort(sort_type,cat_1,cat_2,cat_nm) { var len = dataref.totalrow; var arr_name = new Array(); for (var i =0; i<len; i++) { var t = eval('dataref.mf_scheme['+i+'].'+sort_type); arr_name[i] = t; } arr_name.sort(); if(sort_type!='scheme_name') { arr_name.rever...

Python: WindowsError when editing Registry values using _winreg on Windows 7

I am trying to execute this script by Ned Batchelder to switch .py file association between my two Python installations on Windows. This Python script uses the _winreg module (winreg in Python 3.x) to edit certain Registry values (the path and value pairs modified can be seen in the todo list in the script). I execute this script as fol...

open_basedir restriction in effect. File(/) is not within the allowed path(s):

I'm getting this error on an avatar upload on my site. I've never gotten it before and nothing was changed recently for me to begin getting this error... Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s): ...

rpmbuild error.....................

Hi, I am building an rpm please let me know where i am going wrong, My spec file is rpms.spec and the contents are: Summary: GNU indent Name: rpms Version: 1 Release: 1 Source0: %{name}-%{version}.tar.gz License: GPL Group: Development/Tools %description The GNU indent program reformats C code to any of a variety of formatting standar...

Python: TypeError: 'float' object is not callable

I am trying to join 2 strings using this code: def __get_temp(self): return float(self.ask('RS')) def __set_temp(self, temp): set = ('SS' + repr(temp)) stat = self.ask(set) return self.check(stat) temp = property(__get_temp, __set_temp) Once together, I then send a signal over a serial bus using PyVisa. However, when...

C++: Core Dump Exception

I've successfully compiled this code, but when I get around to the last for loop in the main, I get a core dump handle_exception. How do I fix this? main.cpp #include <iostream> #include <string> #include <fstream> #include <vector> #include "DRSequence.h" using namespace std; vector <DRSequence> array; int indexOfSequenceWithFirstWo...

Why does my Perl backticks complain "sh: line 1: any: command not found"?

I've never programmed before, but needed to write a very simple webapp for work. I'm trying to get this dig query to work: dig @8.8.8.8 +nocomments +nostats +noquestion +nocmd google.com any With this bit of perl: $dig = `/usr/bin/dig \@8.8.8.8 +nocomments +nostats +noquestion +nocmd $query any`; Except it doesn't seem to recogniz...

Runtime bugs due to case-sensitivity in (variable) names.

We recenly had a problem (http://stackoverflow.com/questions/1845817/antlr-cannot-launch-the-debugger-time-out-waiting-to-connect-to-the-remote-pars/1848755#1848755) where there was a runtime bug which could have been due to case-sensitivity in (variable) names and was OS-dependent. This was in ANTLR but I am wondering more generally whe...

WPF application won't execute when i add simple event

Hello! I have a window, in which i have many controls, UserControls or controls derived from other controls (and grids and frames). It works fine if i DON'T add any event to ANY of the controls i have in my window (in XAML). I have many other events that don't cause this, but if i add a new event. It will crash. Example: This is the...

c++: Operator overloading and error handling

Hi, I am currently starting to look into operator overloading in c++ for a simple 2D vertex class where the position should be available with the [] operator. That generally works, but I dont really know how to deal with errors for instance if the operator is out of bounds (in the case of a 2D vertex class which only has x and y values,...

Should I worry about "window is not defined" JSLint strict mode error?

This won't pass JSLint in strict mode: "use strict"; (function (w) { w.alert(w); }(window)); The error--from jslint.com--looks like this: Problem at line 4 character 3: 'window' is not defined. }(window)); Implied global: window 4 Do I need to tell JSLint to ignore the error, or am I seriously doing something wrong? ...

Responce.redirect error

In the login check of my personal webpage i am using Response.Redirect("~/ClientCenter/Default.aspx") and get the Property evaluation failed error I guess i should set the overloaded option endResponce = False ...but for what reason? ...

ImageConverter: Parameter is not valid for a byte array

Hi all, I am sending a string formatted data of the image from an iPhone client code to a web service. I am trying to encode that in binary64 and then convert it to a byte array. I get this problem of Parameter not valid at the following point in the code. byte[] ImgInput = System.Text.Encoding.UTF8.GetBytes(ImgInputString); ...

Why do I get a strcpy runtime error in my code?

I've been trying to make my code work on Windows (moved from the Mac) and for some reason I get a runtime error related to my strcpy call. Please help!! Cust.h /* * Cust.h * Project 3 * * Created by Anthony Glyadchenko on 11/17/09. * Copyright 2009 __MyCompanyName__. All rights reserved. * */ #include <iostream> #include <s...

reading error dialog in java

i need to read some error message in java, i tried to do this in getErrorStream and then readLine, but i got exeption. i added a link to a picture of the error message i want to read http://yfrog.com/0986806495p TNX ...

Compiler/Linking Error: Freedup

I've been trying to compile a program for hardlinking duplicate files called freedup. I did try to email the author/maintainer of the program, but it's been a long time and I haven't heard anything back from him. I'm trying to compile the program from a cygwin environment using the latest stable versions of gcc (3.4.4-999) and make (3.8...

Odd behavior of parser when trying sample grammar

I'm trying to get the feel for antlr3, and i pasted the Expression evaluator into an ANTLRWorks window (latest version) and compiled it. It compiled successfully and started, but two problems: Attempting to use a input of 1+2*4/3; resulted in the actual input for the parser being 1+2*43. One of the errors it shows in it's graphical pa...

How to force an error in a gnumake file

Hi, I want to detect a condition in my makefile where a tool is the wrong version and force the make to fail with an error message indicating the item is not the right version. Can anyone give an example of doing this? I tried the following but it is not the right syntax: ifeq "$(shell svnversion --version | sed s/[^0-9\.]*://)" "1.4...

Why is makefile shell result different than doing same in shell?

With a GNU makefile content of: SVNVERSION_NUMBER := $(shell svnversion --version | perl -lne 'print $1 if /version (\d+.\d+.\d+)/') $(error $(SVNVERSION_NUMBER)) I get a result of: Makefile:3: *** svnversion, version 1.6.2 (r37639). Stop. However, at the shell if I type: svnversion --version | perl -lne 'print $1 if /version (\...

Warning: validation was turned on but an org.xml.sax.ErrorHandler...

Any idea why this error is happening and how to fix it? I'm getting this error when trying to parse/load a config file: Error Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired. Parser will use a default ErrorHandler to print the first 10 errors. Please call the 'setEr...