Hi,
I have written the following jquery sitting in the head tags of my HTML
It is supposed to bring the image that is being hovered over to full opacity and slide another image over it from the right, then return when un-hovered.
<script type="text/javascript">
$(function() {
$('ul#img-nav li').css({
"opacity": .5
});
$('ul#img-nav li').hover(function() {
$(this).stop(true).animate({"opacity":1});
$(this).children('.overlay').stop(true).animate({"left" : "18px" });
}, function() {
$(this).stop(true).animate({"opacity":.5});
$(this).children('.overlay').stop(true).animate({"left" : "180px" });
});
});
This works fine in Safari, Chrome, IE (7,8) but not in FF 3.6.
Any suggestions why this might be?
Many thanks
Running a webserver 2003 SP2 (x86) with IIS 6 and asp.net 2. The box is running mostly dynamic asp pages connecting to a sql 2008 server.
At any given time there is over 1 gig of memory available out of the 2 gig in the box. It seems like there would be a way for it to make better use of the free memory. It is using a default machine.config file and default http.sys.
I would like to maximize incoming internet connections and database connections. Is there something I can do to make better use of the available memory?
When I open Developer Tools in Google Chrome, I see all kinds useless crap like Profiles, Timelines, not to mentions Audits but basic functionality like being able to set breakpoint both in js files and within html javascript code is missing!. I tried to use javascript Console which itself is buggy ( like when once it encounter JS error, cannot get out of it unless refresh the whole page useless when ajax is involved). I am surprised google engineers still have not figured this out if these features still not available. If they are and there is some twisted way to do this, can some one help?
I have a weird issue (weird because it is specific to one component) with applicationComplete in a fairly simple application. All the UI components are declared in MXML. I can access them all in applicationComplete, but not a spark.components.TextArea component, named taStatus here; it is null in the handler.
MXML looks sort of like this (there are lots of other components, but nothing special)
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="710" minHeight="640" applicationComplete="onApplicationComplete(event)" width="710" height="640">
<mx:TabNavigator left="15" right="15" top="15" bottom="340" paddingTop="0">
<s:NavigatorContent label="General" width="100%" height="100%">
<s:Label x="93" y="71" text="Label" id="lblTest"/>
</s:NavigatorContent>
<s:NavigatorContent label="Status" width="100%" height="100%">
<s:TextArea id="taStatus" width="100%" height="100%" text="Startup." editable="false"/>
</s:NavigatorContent>
</mx:TabNavigator>
<fx:Script source="main.as" />
</s:Application>
Here is the handler in main.as
protected function onApplicationComplete(event: FlexEvent) : void
{
lblTest.text = 'abc789'; // OK
taStatus.text = 'abc789'; // Fail
}
TypeError: Error #1009: Cannot access a property or method of a null object reference. So taStatus is null... What is so special about this TextArea?
I'm already a professional J2EE developer by day, and Rails developer by night. I'm planning on adding Python to my list of skills. I'm already convinced a language is just a tool, so I'm not interested in a religious war. I agree with the Pragmatic Programmers that learning one language/year is a good thing for your professional development
So, in your considered opinion, what kinds of applications does Python hit the sweet spot? And why? What advantages does it have, and why do these advantages outweigh the costs in adopting Python?
ADD: I also plan on learning a pure functional language like Scheme.
say I have the following code:
char[5][5] array;
for(int i =0; i < 5; ++i)
{
for(int j = 0; j < 5; ++i)
{
array[i][j] = 'X';
}
}
Would there be a benefit for initializing each row in this array in a separate thread?
Imagine instead of a 5 by 5 array, we have a 10 by 10?
n x n?
Also, this is done once, during application startup.
I'm trying to prove the following in Coq:
Goal (forall x:X, P(x) /\ Q(x)) - ((forall x:X, P (x)) /\ (forall x:X, Q (x))).
Can someone please help? I'm not sure whether to split, make an assumption etc.
My apologies for being a complete noob
Hi,
I'm writing a light remoting app to assist in debugging a problem with remoting communication. This app mimics much of what a larger application does:
Periodically sends a heartbeat to
another peer application, and
periodically verifies that a heartbeat
has been received within some time
threshold.
What we're seeing is in our big application, the heartbeats seem to get dropped. One peer will go for long periods of time without seeing heartbeats from another peer, until the peer that is "dead" is restarted. The big application is responsive in all other ways. We believe it has something to do with the network setup. We were able to repro the problem locally, and fixed it by making some configuration changes to our test environment.
To help our customer diagnose the issue, the mini-remoting app needs to log as much information as possible.
So, is there a way to get the underlying socket for the remoting connection? I'm aware that I could write a custom sink for this, but I'd like to keep the actual remoting process as close to what is implemented in the big app as possible.
Also as an aside, any ideas why the big-app might be "dropping" heartbeats?
Is there a place where I can add code that will be executed before unit initialization?
The reason I want to do this is I need to change the DecimalSeparator, this has to be done before the initialization of some units. I have put it in the project source, before Application.Initialize but it is too late by then.
As I see it the only choice I have is to put it in the initialization of the unit that needs the DecimalSeparator to be changed, is this the case?
Thanks in advance for any advice.
What's the story behind the ::'s sometimes token name
T_PAAMAYIM_NEKUDOTAYIM
I'm mainly interested in knowing if
This is an abbreviation for something else
This is a phrase in a language other than English, and if so what's the language and what's a rough translation
This is some obscure-to-me programming term
Drunk Developers
Thanks!
I was wondering if anyone can tell me if MongoDB or CouchDB are ready for a production environment.
I'm now looking at these storage solutions (I'm favouring MongoDB at the moment), however these projects are quite young and so I foresee that I'm going to have to work quite hard to convince my manager that we should adopt this new technology.
What I'd like to know is:
1) Who is using MongoDB or CouchDB today in a production environment?
2) How are you using MongoDB/CouchDB?
3) What problems (if any) did you come across when you adopted this new storage mechanism (and how did you overcome them)?
4) How did you deal with any migration issues that you had to deal with?
5) Do you have any good/bad experiences with either of these solutions that you'd like to share?
Thanks.
Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.
Please email me at [email protected]
For a database I'm building, I've decided to use natural numbers as the primary key. I'm aware of the advantages that GUID's allow, but looking at the data, the bulk of row's data were GUID keys.
I want to generate XML records from the database data, and one problem with natural numbers is that I don't want to expose my database key's to the outside world, and allow users to guess "keys." I believe GUID's solve this problem.
So, I think the solution is to generate a sparse, unique iD derived from the natural ID (hopefully it would be 2-way), or just add an extra column in the database and store a guid (or some other multibyte id)
The derived value is nicer because there is no storage penalty, but it would be easier to reverse and guess compared to a GUID.
I'm (buy) curious as to what others on SO have done, and what insights they have.
I just deployed an application to a new server, and although I'm using virtualenv, I had to install a new environment on the production server, which has a different architecture.
Anyway, I received no TemplateSytaxErrors in development, but on the production server, I get:
Exception Type: TemplateSyntaxError
Exception Value: Caught SyntaxError while rendering: invalid syntax (views.py, line 25)
The offending line is:
{% url admin:password_change as password_change_url %}
Upon removing that line, the TemplateSyntaxError hops to the next line that has a colon in it (and lets other template tags work fine).
So my question is this: is there some discrepancy in versions of Python/Django that would allow or disallow the namespacing syntax?
The template tags are in django-grappelli (http://code.google.com/p/django-grappelli/), so I'd rather not go through their code and rewrite all the template tags.
Development server:
32-bit Debian
Python 2.5.5
Django 1.2.1
Production server:
64-bit CentOS
Python 2.4.3
Django 1.2.1
Any ideas?
I am trying to reproduce a SQL query using a LINQ to Entities query. The following SQL works fine, I just don't see how to do it in LINQ. I have tried for a few hours today but I'm just missing something.
SELECT
h.ReqID,
rs.RoutingSection
FROM ReqHeader h
JOIN ReqRoutings rr ON rr.ReqRoutingID = (SELECT TOP 1 r1.ReqRoutingID
FROM ReqRoutings r1
WHERE r1.ReqID = h.ReqID
ORDER BY r1.ReqRoutingID desc)
JOIN ReqRoutingSections rs ON rs.RoutingSectionID = rr.RoutingSectionID
Edit***
Here is my table scema-
Requisitions:
ReqID PK string
ReqDate datetime
etc...
ReqRoutings:
ID PK int
ReqID FK
RoutingSection FK int
RoutingDate
ReqRoutingSections:
Id PK int
RoutingSection string
The idea is that each Requisition can be routed many times, for my query I need the last RoutingSection to be returned along with the Requisition info.
Sample data:
Requisitions: - 1 record
ReqID 123456
ReqDate '12/1/2012'
ReqRoutings: -- 3 records
id 1
ReqID 123456
RoutingSection 3
RoutingDate '12/2/2012'
id 2
ReqID 123456
RoutingSection 2
RoutingDate '12/3/2012'
id 3
ReqID 123456
RoutingSection 4
RoutingDate '12/4/2012'
ReqRoutingSections: -- 3 records
id 2
Supervision
id 3
Safety
id 4
Qaulity Control
The results of the query would be
ReqID = '123456'
RoutingSection = 'QualityControl' -- Last RoutingSection requisition was routed to
I'm looking in to Magento's filtering options (Ecommerce System and PHP Framekwork with an expansive ORM system). Specifically the addFieldToFilter method. In this method, you specify a SQLish filter by passing in a single element array, with the key indicating the type of filter. For example,
array('eq'=>'bar') //eq means equal
array('neq'=>'bar') //neq means not equal
would each give you a where clause that looks like
where field = 'bar';
where field != 'bar';
So, deep in the bowels of the source, I found a comparison type named
'moreq'
that maps to a = comparison operator
array('moreq'=>'27')
where field >= 27
The weird thing is, there's already a 'gteq' comparision type
array('gteq'=>'27')
where field >= 27
So, my question is, what does moreq stand for? Is is some special SQL concept that's supported in other databases that the Magento guys wants to map to MySQL, or is it just "more required" and an example what happens when you're doing rapid agile and trying to maintain backwards compatibility.
I have a verb conjugation app that displays verb translations in the first cell of a table. At present the translation list is just a string (comma-separated list) but I'd like to change it to have clickable buttons. I had a play around adding buttons to the cell view without too much success but my only experience with custom cells has been using specific positioning so I'm unsure as to how to achieve a dynamic list of buttons (varying widths) within a cell.
Any help greatly appreciated.
Cheers.
We are doing a migration of our Sybase database that has a utf8 encoding to a server with iso 1 encoding. We are just using char and Varchar for our strings. Will doing backup and restore not truncate any strings? I was thinking that Char and Varchar are just single byte characters.
Consider the following code:
List<double> l = new List<double>();
//add unknown number of values to the list
l.Add(0.1); //assume we don't have these values ahead of time.
l.Add(0.11);
l.Add(0.1);
l.ToArray(); //ultimately we want an array of doubles
Anything wrong with this approach? Is there a more appropriate way to build an array, without knowing the size, or elements ahead of time?
I want to detect an extended mousedown.
The following code works in Firefox and Safari...
var mousedownTimeout;
$('#testButton').mousedown(function(){
mousedownTimeout = window.setTimeout(function(){
alert("Hey, let go.");
}, 2000);
});
$('#testButton').mouseup(function(){
window.clearTimeout(mousedownTimeout);
});
... but not on the iPhone because (quoting quirksmore.org)...
The iPhone fires the mousedown,
mouseup and click events in the
correct order on a click (tap), but it
either fires all three or none at all.
Is there a way around this?
I'm trying to change the framebuffer object from GL_ARB_framebuffer and force it to use GL_EXT_framebuffer since my system is not compatible with the first one. Where in the solution do I need to implement this and how?
more information on my problem
whenever I create a new Windows OpenGL project from Visual Studio using MonoGame i get the error "cannot find entry point in glbindframebuffer in opengl32.dll" since the framebuffer it uses is GL_ARB_framebuffer which is only supported in Opengl 3 so in a github post i read Gihub post where they suggest this patch that in order to patch you need to force the frame buffers to use GL_EXT_framebuffer but I dont know how to force them to use the EXT instead of the ARB , btw Im using Opengl v2 Mobile intel 4 series card, which is Opengl v2 and ARB needs Opengl v3.
I have a node in Drupal with a few comments. Is there an easyish way to get the CID of every comment within the node? Also, is there a way to sort them by various parameters, chronology, karma of the comment etc. Thank you.
I develop websites for corporate clients, so we see the ®, ™, etc. chars a whole lot. Sometimes I paste in huge blocks of copy, which might even contain pretty quotes (“ ”) or other strange characters from word processors.
So, my question is this: Does anyone know of a vim plugin or script that can, in one fell swoop, convert all these characters to html entities?
I think this covers all the bases of the entities it would be nice to have:
http://web.forret.com/tools/charmap.asp
So, for the characters above, they would be replaced with ®, ™, “, ”, etc.
I tried the htmlspecialchars vimball (http://www.vim.org/scripts/script.php?script_id=2377), but no dice. It only performs its replacement like the PHP htmlsepcialchars function, replacing html-conflicting characters, and doesn't cover any additional special characters.
In my plugin code I would like to perform a WP_Query (or similar) which returns all posts matching a given query string, as if the user typed that same string into the WordPress search form. Perhaps I'm just being dense, but I cannot seem to find a way to do so. I would expect to have a special parameter for WP_Query, such as matching, but I see no evidence of one.
I'll start going through the WordPress codebase to see how it's done internally, and I'll post the answer here if I find it. I just thought someone might happen to know offhand.