|
I have an error which says "expected an indented block" Could you please guide me on how to deal with this error. Thank you:)
Code example:
for ch in f: ( translatedToken = english_hindi_dict[ch] ) if (ch in english_hindi_dict) else (translatedToken =...
Started by mgj on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Idea to give the code and explain what the expected behaviour was and how that related to the actual_dict[ch] if ch in english_hindi_dict else ch
Both should run just fine, and I expect the second an IndentationError: expected an....
|
|
How do you test if compiled code returns the expected output or fails as expected?
I have worked out a working example below, but it is not easily extendable. Every additional test would require additional nesting parentheses. Of course I could split ...
Started by Jean on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
TextBaz.out would then contain the expected output is represented by a bash script....
You can then use a simple with 0) while testBar.exec would contain 1 .
As the pattern and then create some additional files that encode the expected result.
|
|
I tried to compile this example:
#include <stdio.h> #include <stdlib.h> #include <stddef.h> main(){ size_t distance; struct x{ int a, b, c; }s_tr; distance = offsetof(s_tr, c); printf("Offset of x.c is %lu bytes\n", (unsigned long)distance...
Started by tsubasa on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
To use the same name for both the tag and the typedef, since they live in separate namespaces.
|
Ask your Facebook Friends
|
First Off: If any of my colleagues are reading this, I am not thinking of leaving anytime soon :D
Following a discussion with a friend, attrition rates within software companies (or companies with programmers) came up. Here in the UK it is often "frowned...
Started by Rob Cooper on
, 18 posts
by 18 people.
Answer Snippets (Read the full thread at stackoverflow):
Most of my friends and colleagues split neatly into the 'work to live' and 'live.
In this microcosm "mininum term there full time.
Which live on the crumbs of third or fourth level outsourcing.
|
|
Six months ago I got a new job at a medium sized software company. Previously I had been developing software for a company as part of a small agile team, I enjoyed the work, it was interesting and I was passionate about creating a quality product but ...
Started by mat690 on
, 25 posts
by 25 people.
Answer Snippets (Read the full thread at stackoverflow):
No point in stressing out over work that can't possibly be accomplished their expectations from you are and how you and they should expect to fulfill them (don't be outright are and how you are expected ....
Be expected of me.
|
|
I'm working on a page has an ol with nested p's, div's, and li's. Internet Explorer 6 and 7 both render the numbers for the ol tag after the p element at the end (at the very, very bottom of the li tag) rather than at the top of the outermost li as expected...
Started by A. Morrow on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
You should provide a snippet reproducing the problem, or a live Web page.
It shows correctly.
|
|
This example is from php.net:
<?php function Test() { static $a = 0; echo $a; $a++; } ?>
And this is my code:
function getNextQuestionID() { static $idx = 0; return $idx++; }
And I use it in JavaScript:
'quizID=' + "<?php echo getNextQuestionID...
Started by SyaZ on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The static var only lives as long as the....
", " getNextQuestionID();
And you will see what I mean.
", " getNextQuestionID().
Try this code and you may understand better:
echo getNextQuestionID().
I believe you misunderstand what static vars do.
|
|
Dear folks,
I enabled gzip compression on my website, and tested with the following tools:
http://www.whatsmyip.org/http_compression/ http://www.gidnetwork.com/tools/gzip-test.php http://web-sniffer.net/ Though, Firefox and all its extensions (Firebug...
Started by pestaa on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Try the Live Http Headers firefox.
The testing scripts will surely send that but your browser might not .
The answer you might expect, but did you try not compressing out data with PHP, but with Apache.
|
|
Ok.... I know there are quite a few posts about "tips for beginning programmers." I'm looking for a bit different flavor of an answer here. I've done a lot of reading, but still am a bit overwhelmed with all the "knowledge required"....
Not in IT at all...
Started by Sheldon on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Beyond that, I don't think companies that specifically hire new-grads expect.
Encountered a lot of companies that expect a skilled knowledge worker intern like a programming intern in your coursework at school.
|
|
If you are over 50, are you where you thought you would be when you were young? Are you working at the job you envisioned? Do you live where you thought you'd be? Did your life turn out as you expected?
If I had seen a snapshot of my current life when...
Started by Doc on
, 37 posts
by 29 people.
Answer Snippets (Read the full thread at gunbroker):
But thats ok working at the job you envisioned? Do you live where you thought you'd be? Did your life turn out as you expected?
If I had seen....
Nothing turned out as expected.
Live where I swore I never would.
Of a 25 yr old.
|