Latest News
- New In Last Half Hour
Vote! finding date difference I have 2 dates in the database:
created_date: 2010-09-01 22:21:00 expiry_date: 2010-09-07How to find the difference between the two and find expiry days left?
expiry_days: 6
stackoverflow.com - Today
Vote! List of highly-regarded PHP style guides? I've recently been shaking up my coding habits and have been toying with various approaches to coding style... things like using a space between method call parentheses and the parameters they contain, how to deal with multi-line array definitions and method calls, etc.
I'm wary of creating my personal flavor of everything, though, and want to skim through some well-regarded "authoritative" style guides. Which ones should I look at? I've had a hard time finding much other than the Zend guide.
stackoverflow.com - Today
Vote! Recursive JPA query? Does JPA 2 have any mechanism for running recursive queries?
Here's my situation: I have an entity E, which contains an integer field x. It also may have children of type E, mapped via @OneToMany. What I'd like to do is find an E by primary key, and get its value of x, along with the x values of all its descendants. Is there any way to do this in a single query?
I'm using Hibernate 3.5.3, but I'd prefer not to have any explicit dependencies on Hibernate APIs.
stackoverflow.com - Today
Vote! Stopping Javascript execution on loaded page? Hi All,
There is some problem code in a website I don't have source access to. Upon loading the page, something goes wrong (in my version of Win and FF at least) such that axaj calls are made repeatedly instead of just once. This quickly locks me out of firebug and pretty much everything else so that all I can do is close the tab.What I want is a simple button that I can quickly hit to stop executing scripts... yet for all my googling and poking about I can't seem to find one?? I can't set a break point in firebug as I get locked out really quick as it struggles with all the ajax calls...
Surely I'm missing something simple here?
Lyle
stackoverflow.com - Today
Vote! explanation about push ebp and pop ebp instruction in assembly.. hi.... i used stack in assembly but i didn't got idea about push ebp and pop ebp.
.intel_syntax noprefix .include "console.i" .text askl: .asciz "Enter length: " askb: .asciz "Enter breadth: " ans: .asciz "Perimeter = " _entry: push ebp # establishing stack-frame mov ebp, esp sub esp, 12 Prompt askl GetInt [ebp-4] # length Prompt askb GetInt [ebp-8] # breadth mov eax, [ebp-4] # eax = l add eax, [ebp-8] # eax = l + b add eax, eax # eax = 2 * (l + b) mov [ebp-12], eax Prompt ans PutInt [ebp-12] PutEoL mov esp, ebp pop ebp # unwinding stack-frame ret .global _entry .end
stackoverflow.com - Today
Vote! Javascript adding two numbers incorrectly Global.alert("base: " + base + ", upfront: " + upfront + ", both: " + (base + upfront));
This code above outputs this:
base: 15000, upfront: 36, both: 1500036Why is it joining the two numbers instead of adding them up?
I eventually want to set the value of another field to this amount using this:
mainPanel.feesPanel.initialLoanAmount.setValue(Ext.util.Format.number((base + upfront), '$0,000.00'));...and when I try that now it turns the number into the millions instead of 15,036.00. I have no idea why. Any ideas?
stackoverflow.com - Today
Vote! Hendle elements after innerHTML() or html(). Java-script. I'm adding new element through html() function of JQUERY. THen I want to handel it... Is it possible to do that in way you see here:
$("#renamePlaylist").click(function(){ var aa = ''+ ''; $("#playlist_header").find('span').html(aa); }); $("#renameCurrent").click(function(){ alert('hello') });
stackoverflow.com - Today
Vote! Third party service to trigger web service I am looking for a third-party service or tool that can trigger or hit a web page at scheduled times. Does anyone know of any? I currently use my windows scheduler to hit these pages, but there are gaps in this since I don't run my computer 24 / 7.
stackoverflow.com - Today
Vote! jQuery combine statements? (follow up) Thanks for the help on my previous post, @AndyE, your solution works great.
now for my follow up, same idea, different function(s)...i tried to implement your previous solution, but couldnt get it to work right...:
$(document).keypress(function(e) { if (e.which == 27) { $('#timeline-2010-1').hide(); $('#timeline-2010-2').hide(); $('#timeline-2010-3').hide(); $('#timeline-2010-4').hide(); $('#timeline-2010-5').hide(); $('#timeline-2010-6').hide(); $('#timeline-2010-7').hide(); $('#timeline-2010-8').hide(); $('#timeline-2010-9').hide(); $('#timeline-2010-10').hide(); $('#timeline-2010-11').hide(); $('#timeline-2010-12').hide(); $('#timeline-2010-13').hide(); $('#timeline-2010-14').hide(); $('#timeline-2010-15').hide(); $('#timeline-2010-16').hide(); $('#timeline-2010-17').hide(); } }); $('a.close').click(function() { $('#timeline-2010-1').hide(); $('#timeline-2010-2').hide(); $('#timeline-2010-3').hide(); $('#timeline-2010-4').hide(); $('#timeline-2010-5').hide(); $('#timeline-2010-6').hide(); $('#timeline-2010-7').hide(); $('#timeline-2010-8').hide(); $('#timeline-2010-9').hide(); $('#timeline-2010-10').hide(); $('#timeline-2010-11').hide(); $('#timeline-2010-12').hide(); $('#timeline-2010-13').hide(); $('#timeline-2010-14').hide(); $('#timeline-2010-15').hide(); $('#timeline-2010-16').hide(); $('#timeline-2010-17').hide(); return false; }); });
stackoverflow.com - Today
Vote! Scala: invoking superclass constructor. I am experiencing a weird behavior by Scala handling of superclass constructors.
I have a really simple class defined in the following way
package server class Content(identifier:String,content:String){ def getIdentifier() : String = {identifier} def getContent() : String = {content} }and a simple subclass
package server class SubContent(identifier:String, content:String) extends Content(identifier, content+"XXX")){ override def getContent():String = { println(content) super.getContent } }What's really strange is that in the subclass there are duplicates of the superclass attributes, so if i create a new object
var c = new SubContent("x","x")the execution of
c.getContentfirst prints out "x" (The valued provided to the subclass constructor), but returns "xXXX" (The value provided to the superclass constructor).
Is there any way to avoid this behavior? Basically what I'd like to have is that the subclass does not create its own attributes but rather just passes the parameters to the superclass.
stackoverflow.com - Today
- next >

