Why are there only four registers in the most common CPU (x86)? Wouldn't there be a huge increase in speed if more registers were added? When will more registers be added?
$('.box').click(function(){
$(this).find('p').toggle(
function () {
$(this).css({"color" : "red"});
},
function () {
$(this).css({"color" : "black"});
}
);
});
if i execute this script the 'p' color will change if i click on the 'p' not on the .box class why ? And how to i make it so that 'p' color changes when i click on the .box div
I'm only supporting the portrait orientation, but both the right-side-up and upside-down versions. Why do my subviews not resize appropriately? There's a status bar sized black space at the top of the view. If I change tabs and come back, it's corrected.
I have added my iphone as device and associate it with provisioning. Then I download the newest provisioning and install it (I have successed added ipad as test device before).
Now, in the "Organizer", I can see the iphone device but when I connect iphone device I can not find the iphone device to run my app. My software version is 4.2.1, is it the version not the latest that lead to this problem? Or what is the possible reason?
public class Test {
public static void main(String[] args){
if (5.0 5) // (5.0<5) for both case it is going to else
System.out.println("5.0 is greater than 5");
else
System.out.println("else part always comes here");
/another sample/
if (5.0 == 5)
System.out.println("equals");
else
System.out.println("not equal");
}
}
can any one explain the first "if statement" why it always come to else part
My javascript looks like the following. I don't understand why these methods are all public though?
Something.RegisterNamespace("One.ABC");
(function(ABC) {
ABC.SayHello = function() {
alert('hello');
};
})(One.ABC);
So now I can do:
One.ABC.SayHello();
I read that a few databases can be used in-memory but can't think of reason why someone would want to use this feature. I always use a database to persist data and memory caches for fast access.
Very quick question about programming practices here:
I've always used echo() to output HTML code to the user as soon as it was generated, and used ob_start() at the same time to be able to output headers later in the code. Recently, I was made aware that this is bad programming practice and I should be saving HTML output until the end.
Is there a reason for this? What is it, and why isn't output buffering a good alternative?
Thanks!
I have a script that reports the following error:
Warning: mysql_connect()
[function.mysql-connect]: Access
denied for user 'admin'@'localhost'
(using password: YES) in
C:\wamp\www\bits\includes\connect.inc.php
on line 10
Notice: Undefined variable: l_error in
C:\wamp\www\bits\includes\connect.inc.php
on line 12
Notice: Undefined variable:
l_cannotconnecttodatabase in
C:\wamp\www\bits\includes\connect.inc.php
on line 12
Why would this be?
Is an index not similar to a dictionary? If you have the key, you can immediately access it?
Apparently indexes are sometimes stored as B-Trees... why is that?
I am reading these two articles. However I still do not get --bare option. If the server has no working directory and if a new member of the team clones the project then that person will not get any content.
Any further clarification will help on why --bare is needed.
On the Apple guide, there is a step before building the AppStore version:
Open the Xcode project and Duplicate
the “Release” configuration in the
Configurations pane of the project's
Info panel. Rename this new
configuration “Distribution”.
Why this step is needed? Can I skip this step and use the "Release" configuration to build the final version for AppStore?
hi,
I don't understand why I cannot click the tags on top in IE7 on this website: http://www.sanstitre.ch/drupal/portfolio?tid[0]=38http://www.sanstitre.ch/drupal/portfolio?tid[0]=38
It says javascript error but I debugged with Firefox and I don't get any error...
Could you give me some help ?
I know the question has no practical value, but it is interesting why in some languages semicolons and {} blocks are removed although their predecessor have them.
Actually it makes me nervous to write a code in Python as there are no ";" and {}.
Also in new language Google-GO semicolons are also missing although it says that lexer uses a rule to insert semicolons automatically as it scans.
So is there any secret :) reason for this.
During a recent interview I was asked why one would want to create mock objects. My answer went something like, "Take a database--if you're writing test code, you may not want that test hooked up live to the production database where actual operations will be performed."
Judging by response, my answer clearly was not what the interviewer was looking for. What's a better answer?
I "accidentally" came across this weird but valid syntax
i=3
print i+++i #outputs 6
print i+++++i #outputs 6
print i+-+i #outputs 0
print i+--+i #outputs 6
(for every even no: of minus symbol, it outputs 6 else 0, why?)
Does this do anything useful?
Update (Don't take it the wrong way..I love python):
One of Python's principle says
There should be one-- and preferably only one --obvious way to do it. It seems there are infinite ways to do i+1