|
Hmmm,
IEEE 802.1Q[^]
Right click on the list entry in Hyper-V manager and scroll down to the Network Adapter add a unique "VLAN ID" to each virtual machine. Then you can more easily measure bandwidth from your gateway and identify which virtual machine is generating the traffic.
Best Wishes,
-David Delaune
|
|
|
|
|
You need to start adding stuff to CP's Tips & Tricks streams.
Or maybe I should have phrased that "We need you to..."
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Interesting. I'm gonna have to dig into this. Thanks for the pointer.
|
|
|
|
|
The grammar for python is ridiculous to me. Significant whitespace being the leading cause of my WTF.
But I just taught myself python so i could try out some particular python code in C#
I'm looking through some examples and i find this gem:
multiple = 1024 if a_kilobyte_is_1024_bytes else 1000
Which presumably means
var multiple = (a_kilobyte_is_1024_bytes)?1024:1000;
WTF
and then there's pass.
Pass seems like it should never exist in any language.
That is all.
Real programmers use butterflies
|
|
|
|
|
Not just "significant whitespace" but "significant matching whitespace".
So two identical seeming lines can be unmatched because one uses TABs and one uses spaces.
Heck, even the editor you use is significant in Python.
I'm becoming convinced that it was designed because the author thought VB wasn't quite "Mickey Mouse" enough.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
It's a shame, because there's a lot to like about python but the grammar always turned me off of it.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: and then there's pass.
Pass seems like it should never exist in any language.
Like, a keyword?
Maybe it's there to serve as a warning...those who know, should pass on any language that has a "pass" keyword...
|
|
|
|
|
Yeah, it's a keyword. It's like a non-op used to cajole the parser into accepting a "statement" where you don't want one. Or at least that's what I've gleaned of it so far. There may be other uses.
In any case, it's ridiculous.
Real programmers use butterflies
|
|
|
|
|
Sounds like Fortran's CONTINUE statement.
Basically a NO-OP.
It was used to help structure loops or it could be the target of a GOTO.
|
|
|
|
|
honey the codewitch wrote: Pass seems like it should never exist in any language. Ha ha, I just used it today for the first time.
|
|
|
|
|
did it make you feel dirty?
Real programmers use butterflies
|
|
|
|
|
Always be wary of scripting languages.
|
|
|
|
|
Some are worse than others. Tcl is far worse than Python.
This is not an objection to your statement. Quite to the contrary. Scripting languages are bad.
|
|
|
|
|
I generally am. I haven't found one I like yet.
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: Pass seems like it should never exist in any language.
; The equivalent of Python's pass in C, C++, and C#. Most useful as a loop body when the loop construct does all of the work.
Software Zen: delete this;
|
|
|
|
|
ah, fair enough. Gosh, I don't like the look of it though.
Real programmers use butterflies
|
|
|
|
|
I always feel dirty when there's the need to do that. I usually just unravel the loop construct so there's a loop body.
cheers
Chris Maunder
|
|
|
|
|
Same here. I have an inherent distrust of while loops with more than 3 or so condition expressions, and I despise for loops with termination conditions that are unrelated to the iteration.
Software Zen: delete this;
|
|
|
|
|
The Python seems more readable that the statement with a ternary expression. I have just started learning python, but the `if/else` is very clear to me.
"'Do what thou wilt...' is to bid Stars to shine, Vines to bear grapes, Water to seek its level; man is the only being in Nature that has striven to set himself at odds with himself."
—Aleister Crowley
|
|
|
|
|
The different order of notation doesn't seem that worthy of a WTF. That's just a bit getting used to, nothing more.
The real WTFs with Python I've seen are negative notation for hexadecimal numbers instead of two's complement and the inability to find the entry point in anything remotely complex because Python doesn't have a main method, it's just a script language evaluating from the top. Doesn't help when debugging control flow.
|
|
|
|
|
HA HA HA.... Excellent.
COBOL 2 point O
What goes around, comes around.
|
|
|
|
|
Peter Shaw wrote: COBOL 2 point O One of my claims to fame is that I've successfully avoided learning COBOL, even though a couple of my positions had me skidding really close to it.
I seem to remember one of the [dis]honorable mentions in the Obfuscated C/C++ Contest was a header file that let you write 'C' in a form closely resembling COBOL. As I recall, it was voted "Worst Abuse of the Preprocessor" that year.
Software Zen: delete this;
|
|
|
|
|
Unfortunately it was pushed upon me with great vigor during my University Years. One of my programming teachers was an ex British Telecom COBOL programmer (Where talking 1994 ish here) and she was absolutely rabid about the virtues of the language.
She used to fail assignments for stupid things like putting 2 spaces in a comment line where there should only have been one, she treat code layout and formatting like it was a fashion statement and refused to even mention the names of any other languages.
Thankfully, the "digital electronics" parts of my studies covered C/C++ and my accountancy part had some Pascal parts... so that stopped me from going insane
|
|
|
|
|
honey the codewitch wrote: and then there's pass.
Pass seems like it should never exist in any language.
And the rest is a Fail.
|
|
|
|
|
As someone who taught a few CS courses...
for a NEW programmer, the Python Syntax makes MORE sense than the C style syntax.
x = 3 if I_Need_A_Small_Number else 3333
which is even cleaner in error checking:
addError("You can't have this") if X = 0
addError("You can't have this") if Y = 0
...
showErrors()
This was a feature of DEC Basic-Plus 2 (I called it an outside if) and in a world where something had to be tweaked in a block of code, and you did not want to affect program flow... Wow, it was a gift.
The C syntax is best explained as a "fake function" IIF() => X = IIF(cond, true_val, false_val);
but invariably the kids ask the correct question: Wouldn't that be BETTER/CLEARER syntax? (And I would explain that is why we have a PRE-PROCESSOR, LOL).
And again, I LOVE the PL/SQL DECODE() statement, which is "?:" on Steroids:
X = Decode(v0, V1, R1, V2, R2, V3, R3, R4) -> Where R4 (the extra param is the ELSE condition)
It is literally a CASE statement in function form!
That said. Python has ONE THING I absolutely hate. THE WHITESPACE inequity. I wish they treated a single tab as 2 spaces. Life would be simply. My editors convert Tabs to spaces. But ONLY when I edit a line. OMFG this might be bad in Python. LOL.
|
|
|
|