|
How can I resolve this case of Useless use of a variable in a void context ?
For example:
my $err = $soap_response->code, " ", $soap_response->string, "\n"; return $err;
I get warnings like Useless use of a variable in a void context ? Why? How ...
Started by joe on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
"\n";
In case you want to concatenate the arguments....
$soap_response->string.
I guess you wanted to concatenate the string pieces to form the entire error message, so you'll have to use the dot instead of comma:
my $err = $soap_response->code .
|
|
Forget all the rants about <CapsLock> , <NumLock> is the most useless keys of them all. It's never, ever useful. You don't want to use your numpad as an arrowpad, since the arrows are 1cm away from it. Never.
There was a time when some keyboards...
Started by niXar on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
For further reading....
Instead of nothing you can remap it to any key you'd like .
You can find the scan code using xev.
Well for your first question, you can remap it to nothing with xmodmap :
xmodmap -e "keycode # = """
where # is the scan code of NumLock .
|
|
Every time I click Network, I get a message in a pale yellow drop-down box that says,
Network discovery and file sharing are turned off. Network computers and devices are not visible. Click to change...
I know that these things are turned off, because...
Started by eleven81 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at superuser):
Execute this command sc config SSDPSRV start=disabled.
Have you tried switching them from off to on and then back?
I think it is turned off by default, but Windows will probably keep reminding you to choose between on or off yourself .
|
Ask your Facebook Friends
|
Most of the times when Iphone program crash, compiler show stack with full of no's, but these no's don't make any sense to me. Very rarely it point out where the problem might be and mostly there are these useless no's. How you can make sure that when...
Started by itsaboutcode on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
By adding this flag into your executable, it will help you see... .
Things to do:
1) Debug with breakpoint on
2) Add a global breakpoint: objc_exception_throw
Then look in the Debugger window
My iPhone dev life was horrible until I found NSZombieEnabled .
|
|
Possible Duplicate:
Tools to find included headers which are unused?
I would like to check useless header file in c++ files(.h and .cpp)
During developing, There are so many relations between files.
So it cause compile time more longer.
Can you tell me...
Started by Simon Kim on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
It....
In the simplest sense, Dehydra can be thought of as a semantic grep tool .
From the website:
Dehydra is a lightweight, scriptable, general purpose static analysis tool capable of application-specific analyses of C++ code .
Have a look at the Dehydra.
|
|
I see that some programmers add code that, after all, does not do anything useful. For instance (C#):
[Serializable] class Foo { // ... string SerializeMe() { return new XmlSerializer(typeof(this)).Serialize(this).ToString(); // serialize to xml (syntax...
Started by echorhyn on
, 13 posts
by 13 people.
Answer Snippets (Read the full thread at stackoverflow):
Good Source Control means that useless code or code that is no longer required should be removed a minimal effort to read that additional....
I also think that an open it.
Is think the meaning of useless is that it cannot and will not be used.
|
|
For example, (although it's not an interface) the Stream class in .NET has an implementation provided by Stream.Null which simply discards the data. PowerShell has Out-Null.
In applications I've developed, I've often found it useful to implement an interface...
Started by Josh Einstein on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Apparently it has a name, "NullObject", but the question can have a different facet:
Right from the start my whole project... .
It's the Null Object pattern.
This pattern is often refered as "NullObject" : http://en.wikipedia.org/wiki/Null_Object_pattern
Yep .
|
|
The world is full of useless code metrics so I thought I would add one of my own I even found someone talking about revenue per line of code .
So what is the yearly revenue of the product you're working on divided by lines of code? You can choose any ...
Started by Motti on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The Trap (documentary) is a nice corollary to this kind of post .
Maybe the feature you worked on accounted for 10% of sales, maybe 70% .
Even the revenue for the contribution of one programmer is debatable .
34.59
We've got a pretty big customer base.
|
|
Please examine the following code:
if (foo->bar == NULL); foo->bar = strdup("Unknown");
I spent the last part of three hours hunting down that leak with Valgrind, feeling very silly when I discovered the bogus ';'.
I know that the above code is ...
Started by Tim Post on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Foo.c */ int main() { if (1) ; return 0; } gcc -Wextra -c foo.c foo.c: In function ‘main’: foo.c:2: warning: empty body in an if-statement
Try -Wextra
After digging deep into the gcc manual:
-Wempty-body Warn if an empty body occurs in an `if', `... .
|
|
Ok, well, thanks to people here, I figured out the portion of my js code that's rendering my links useless is what's pasted below... Still trying to figure out why, but if someone has any insight, that'd be great...
function initJumpMenus() { // Turns...
Started by n00b0101 on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You want to check if the element has an id, so simply do:
selectElements[i].id != ""
I'd like to point out that you can improve your code here and there:
1 Don't write for loops that ... .
This:
document.getElementById(selectElements[i].id) != ""
is wrong.
|