I am encountering some strange behavior with using the matplotlib.pyplot ginput() function to store clicked points. On the first click, the ranges of the axes of the clicked image change to add 200 on each side. The image remains with this border of whitespace until something new is plotted.
Example code:
import matplotlib.pyplot as pl...
Ok, so we're upgrading a client's legacy code from 2.0.2 to latest rails. Most of the basics were easy to fix, but I can't get to the admin screens. Every time we hit "current_user" we get a "stack level too deep" error.
I've dug deeply into the code (read: flailed around a lot at random) and I've finally narrowed it down to the ActiveR...
So I was playing with my MS SQL Server 2008 app to see how good it is protected against SQL injections. The app lets users to create views in the database.
Now consider the following:
create view dbo.[]]; drop database foo--] as select 1 as [hi!]
This creates a view with a name of ]; drop database foo--. It is valid and you can selec...
Hi,
There was a program what I could compile under 2008 for a while.
Note I can compile the program using cl and in Ultimate++ IDE.
It is a fairly large program , so I am not going to post it here.
I cannot compile it in Studio.
THere error is
1>c:\program files\microsoft visual studio 9.0\vc\include\xstring(1735) : error C2856: #pra...
Hi,
As the title states, Jquery is turning my text white in certain areas of the page. it cant be the im using to encapsulate the ajax call, because it works fine when im not calling the ajax
Its a bit difficult to post the whole script, because its huge and i dont know where its happening. I have no idea how to debug this using fire...
I'm not sure whether this bug applies to Firefox only or also to WebKit-based browsers, but it's really, really annoying.
I've got a template/framework for my CMS interface, using box-shadow on a few elements with a width of 100%. Since this causes shadow on the right side of the element, a scroll bar appears. To hide the ugly scrollba...
When i set the body element direction to rtl, in ie7 (compatability view in ie8), and hover over ul li , it shifts wierdly to the left by a couple of inches. a good example for this is the default asp.net mvc css (after adding direction:rtl to the body elemet.
anyone know this one?
the example code:
/*-------------------------------...
I have a masonry call which is working fine in all browsers but IE7 and below. Maybe its just a simple syntax issue, but maybe someone has had experience of this before. Code below:
$(function(){
$('#mainContent').masonry({
columnWidth: 200,
itemSelector: '.threadWrapper:visible',
resizeable: true,
saveOptions: true, ...
In IE8 hit F12, set the browser mode to IE8 and the document mode to IE8 also.
Then go to any web page with an button with an image overlaid on it, and notice that when you click down / mouse down on it, the button image will move left -1px and top -1px.
This affects everything from the search button on the bing.com homepage (although...
In the spirit of this question I wanted to have a sense of what is the proportion of time split between fixing bugs and implementing new features. If possible try to give an estimate for the product as a whole as opposed to individual developer stats and try to make an average over the course of a typical year. Do provide a general des...
Hello,
I'm in the process of writing a Mediawiki extension. I'm actually at a very very early stage ;). You can find the code here (okay, i can only submit one link, so imagine a github url) /eugenkiss/discussion-extension
I've got a weird jQuery problem that I just can't resolve even by utilising firebug and trying to debug my code. I...
I want an OpenFileDialog to come up when a user clicks on a cell, then display the result in the cell.
It all works, except that the DataGridView displays an extra row, for adding values to the list it's bound to. The row shows up if dataGridView.AllowUserToAddNewRows == true, which is what I want. What I don't want is for the applica...
Hello,
Question
Following code fails with a error message :
t.cpp: In function `void test()':
t.cpp:35: error: expected primary-expression before '>' token
t.cpp:35: error: expected primary-expression before ')' token
Now I don't see any issues with the code and it compiles with gcc-4.x and MSVC 2005 but not with gcc-3.4 (which is s...
I'm creating a quiz and as a timer in the quiz I have a flash movie (an animated clock). I poll the clock every second to see if the time for the quiz has run out.
The code for this functionality looks like this: (simplified)
$(window).load(function() {
var flashMovie = getFlashMovieObject(flashId);
var timeElapsed = flashMovie...
When I include a PHP script via Jumi, it seems to break the global keyword. Example:
<?php
$a = 5;
function foo()
{
global $a;
if (isset($a))
echo $a;
else
echo '$a is not set';
}
foo();
?>
When I run this PHP script (named test.php) by itself, it correctly prints 5. When I...
Hey
I'm trying to overwrite certain pieces in kernel memory (Linux 2.6.31, Ubuntu 9.10) in a virtual machine (using VirtualBox) via a kernel module.
Whenever I'm doing this I get this error
[27154.303726] BUG: unable to handle kernel paging request at 0xc05769bc
My code:
unsigned char *p = (unsigned char *) c05769bc;
p[1] = (add...
Running the following 39 lines of a minimal Windows Forms PropertyGrid shows an unexpected behavior on a Windows Server 2008 Enterprise machine:
using System;
using System.Windows.Forms;
namespace MinimalPropertyGrid
{
public sealed class SomeType
{
public Kind Kind { get; set; }
}
public enum Kind
{
...
Edit: It's not a bug as Martin pointed out. I'm just crossing the daylight saving time, hence the 1h difference.
I want to calculate the difference in days between "Mar 29 2010" and "Mar 09 2010" so i have the following code:
((new Date(2010, 2, 29)).getTime() - (new Date(2010, 2, 8)).getTime()) / 86400000
86400000 is the number of m...
I'm trying to bring to managed side (C#) a structure built in C.
Let's assume this structure (C code):
typedef struct S{
int i;
union{
TypeA a;
TypeB b;
TypeC c;
}uni;
} S;
Now, i create the C# wrapper classes:
[StructLayout(LayoutKind.Explicit)]
public class S
{
[FieldOffset(0)]
p...
I have created a custom tag that looks like this:
def textField = { attrs ->
def field = attrs.name.split('\\.')[-1]
log.error("--------- Field is ${field}")
if (attrs.bean && attrs.bean.errors.hasFieldErrors(field)) {
def className = attrs.remove('class')
def classStr = 'errors '
if (className) {
...