There are some demos here:
http://paulirish.com/work/gordon/demos/
I downloaded blue.html as well as blue.swf on my local pc. But opening it I can't make it work.
Why ?
I've noticed that in c/c++ a lot of Win32 API structs need to be told how big they are.
i.e someStruct.pbFormat = sizeof(SomeStruct)
Why is this the case? Is it just for legacy reasons? Also any idea what "pb" stands for too?
Some of us just have a hard time with the softer aspects of UI design (myself especially). Are "back-end coders" doomed to only design business logic and data layers? Is there something we can do to retrain our brain to be more effective at designing pleasing and useful presentation layers?
Colleagues have recommended a few books me including The Design of Sites, Don't make me think and Why Software sucks , but I am wondering what others have done to remove their deficiencies in this area?
What are the best practices for using Java's @Override annotation and why?
It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certain programming situations that call for using the @Override and others that should never use the @Override?
I'm working my way through Graham Hutton's Haskell book, and in his recursion chapter, he often pattern-matches on "n+1", as in:
myReplicate1 0 _ = []
myReplicate1 (n+1) x = x : myReplicate1 n x
Why that and not the following, which (1) seems functionally identical and (2) more intuitive in terms of understanding what's happening with the recursion:
myReplicate2 0 _ = []
myReplicate2 n x = x : myReplicate2 (n-1) x
Is there something I'm missing here? Or is it just a matter of style?
Why are the methods contains() and indexOf() in the Java collections framework defined using o.equals(e) and not e.equals(o) (where o is the argument of the methods and e is the element in the collection)?
Anyone know the reasons of that?
I have a XSLT sample copied straight from http://www.w3schools.com/xsl/xsl_transformation.asp, which I can't seem to view in Google Chrome. However, it seems to work fine in IE.
Does anyone know why this would be?
EDIT:
The online version works fine, but the local copy does not.
Why changing Color of Default Button makes it look RECTANGLE shape ? I do not want to use custom background images for this.
I want to do this programmatically for few conditions on which I change the colors of many small buttons on screen.
Can anyone give a solution ?
Option is implicitly convertible to an Iterable - but why does it not just just implement Iterable directly:
def iterator = new Iterator[A] {
var end = !isDefined
def next() = {
val n = if (end) throw new NoSuchElementException() else get
end = true
n
}
def hasNext = !end
}
EDIT: In fact it's even weider than that because in 2.8 Option does declare an iterator method:
def iterator: Iterator[A] =
if (isEmpty) Iterator.empty else Iterator.single(this.get)
data <- read.delim("C:\\test.txt", header = FALSE, sep = "$$$$$")
Error in scan(file, what = "", sep = sep, quote = quote, nlines = 1, quiet = TRUE, :
invalid 'sep' value: must be one byte
Why there is a restriction like this? Can I overcome it?
I am learning about pmap and wrote the following function:
(pmap #((println "hello from " (-> (Thread/currentThread) .getName))
(+ %1 %2))
[1 1 1] [-1 -1 -1])
When run, the result is a NullPointerException
(hello from clojure-agent-send-off-pool-4
hello from clojure-agent-send-off-pool-3
hello from clojure-agent-send-off-pool-5
NullPointerException user/eval55/fn--56 (NO_SOURCE_FILE:11)
Why is this happening? I have understood and observed the body of a fn to be an implicit do.
I thought that in GO language, slices are passed by reference. But why the following code doesn't change the content of slice c? Am I missing something? Thank you.
package main
import (
"fmt"
)
func call(c []int) {
c = append(c, 1)
fmt.Println(c)
}
func main() {
c := make([]int, 1, 5)
fmt.Println(c)
call(c)
fmt.Println(c)
}
The result printed is:
[0]
[0 1]
[0]
while I was expecting
[0]
[0 1]
[0 1]
First I thought I've grocked that thing: It's the data source for a UITableView. But then: It does not conform to that data source protocol. Strange! Why? How can it not?
If you browse a web page through Firefox, any image on the page can be dragged anywhere on the screen—but you can't drop it. Other browsers such as IE or Chrome do not allow dragging images.
Is this a issue? Why does Firefox allow dragging?
While studying for the 70-433 exam I noticed you can create a covering index in one of the following two ways.
CREATE INDEX idx1 ON MyTable (Col1, Col2, Col3)
-- OR --
CREATE INDEX idx1 ON MyTable (Col1) INCLUDE (Col2, Col3)
The INCLUDE clause is new to me. Why would you use it and what guidelines would you suggest in determining whether to create a covering index with or without the INCLUDE clause?
Why @font-face font not looks smooth in FF 3.6 but in IE7?
see this in IE7 , it will look smooth but in FF 3.6 font will look jaaaged.
http://nettuts.s3.amazonaws.com/569_fontface/fontface/index.html
I understand why passing a null to HashTable.Contains() doesn't work, but I don't understand what the point of it throwing an ArgumentNullException is - instead of just simply returning false? What is the benefit of throwing the exception (other than to make me do null checks before calling .Contains())?
Caused By [System.ArgumentNullException]
Key cannot be null.
Parameter name: key
at System.Collections.Hashtable.ContainsKey(Object key)
at System.Collections.Hashtable.Contains(Object key)
Is it possible to compile C++ program into some intermediate stage (similar to bytecode in java) where the output is platform independent and than later compile/link at runtime to run in native (platform dependent) code?
If answer is no, why?
why do programmers say that "live" is inefficient?
So what are the alternative
methods to replicating that function
that are more efficient?
How do we measure the impact of how much it slows things down?
Apologies if the question sounds silly, I was following experts in SO and trying some examples myself, and this is one of them. I did try the search option but didn't find an answer for this kind.
class A
{
public:
A(){cout t;
t.push_back(A()); // After this line , when the scope of the object is lost.
}
Why does the destructor of the class called twice ?
I have an ASP.NET DropDownList with autopostback=true and enableviewstate = false. I have a button on the page that does nothing. If I change the selection in the ddl, it posts back , which is expected. If I click the button, the page posts back and the ddl's SelectedIndexChanged fires. Why does it get fired?
I know this may be a stupid question..............
why some website are completely floating on the left hand side of the screen?
like http://www.itv.com/
and not centered?
thanks
I'm totally new to GreaseMonkey, but I'm trying to make a little script.
// ==UserScript==
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js
// ==/UserScript==
(function() {
$ = unsafeWindow.jQuery;
alert($); // this gives 'undefined'
}());
Why does the alert give undefined and how to fix this?