The Official Status Thread
-
@dcon said in The Official Status Thread:
I meant under-withholding
Ah, yes, that makes much more sense.
-
@HardwareGeek said in The Official Status Thread:
@dcon said in The Official Status Thread:
penalty for over-withholding
WTF You give the government an interest-free loan of the excess taxes that were withheld from your pay, and then have to pay a penalty for loaning them too much??? When did they pass this bit of utter stupidity?
The fun part of doing taxes over here in Germany is the little known fact that if you're not required to do your taxes you can postpone doing so for about four years.
Yes, not everyone who works needs to file - self-employed people obviously are required to but a bog-standard employee does not have to in quite a number of cases. Of course many people will want to because of tax deductions but you do not need to.
Now, of course I can hear you asking: If you want to do your taxes because you'll likely get money back - why would you ever think of postponing them?
Easy: Because the state is required to pay interest on them. And not at a bad rate either - if you wait the full four years you'll get interest for 38 months at 0.5% per month (example: your rebate would be 2500€ * 38 * 0.5% = 475€ which however are subject to taxes again (but of course!) and thus you'll end up with more like ~350€, i.e. a total of 2850€).
This works out to about 3.3% per year. Not bad for a 100% reliable outcome (most other savings plans with a 100% guarantee currently barely manage to pass the 0% mark...)
Oh, the wonders of the German tax code.
-
@Rhywden The fuck? TIL!
Unfortunately I don’t get back enough in taxes to make this worthwhile.
-
Status: What kind of BIOS can boot from USB flash drives, but not USB CDROM drives?!?
-
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
-
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
-
@Tsaukpaetra said in The Official Status Thread:
I've not encountered
From the context, I'd guess you have now.
-
@HardwareGeek said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
I've not encountered
From the context, I'd guess you have now.
Indeed.
-
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
-
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
Well, now I have a Windows 10 installer CD and a Windows 10 installer Flash drive (both virtual), so... win?
-
@Tsaukpaetra said in The Official Status Thread:
so... win?
Not if you need to reinstall Windows 10 that many times.
-
@Tsaukpaetra said in The Official Status Thread:
Windows 10 ... so... win?
The only winning move is not to play.
-
@Tsaukpaetra said in The Official Status Thread:
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
Well, now I have a Windows 10 installer CD and a Windows 10 installer Flash drive (both virtual), so... win?
Yes, win. Specifically win32.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
Well, now I have a Windows 10 installer CD and a Windows 10 installer Flash drive (both virtual), so... win?
Yes, win. Specifically
win32WoW64.
-
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
Well, now I have a Windows 10 installer CD and a Windows 10 installer Flash drive (both virtual), so... win?
Yes, win. Specifically win32.
Actually, yes.
@loopback0 said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@Tsaukpaetra I'm pretty sure CD drives are a separate USB device type that have nothing in common with HDDs/flash drives in terms of driver-hardware interface.
Sure, but I've not encountered a BIOS that supported booting from a USB drive that didn't also support booting from a USB CDROM.
There's a first time for everything.
Well, now I have a Windows 10 installer CD and a Windows 10 installer Flash drive (both virtual), so... win?
Yes, win. Specifically
win32WoW64.
Actually, no.
Filed under: Edge from 2015 sux donkey balls...
-
-
-
TFW
sscanf
is literally the best way to solve the problem, but C# doesn't have it.
-
@Gąska said in The Official Status Thread:
doesn't have it.
Looks like you'll need to implement it by hand.
Does this help?
-
@Gąska What's the problem such that you need sscanf? Also:
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] static extern int sscanf(string str, string format, __arglist);
-
@pie_flavor said in The Official Status Thread:
@Gąska What's the problem such that you need sscanf?
A file format that consists of fixed line prefixes followed by several data fields (strings, ints, floats, or a combination thereof, depending on which line it is), separated by a random amount of assorted whitespaces. It looks like it was specifically designed to be easy to parse with
scanf
.Also:
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Ansi)] static extern int sscanf(string str, string format, __arglist);
Didn't think of doing P/Invoke for that. Thanks!
-
Status: an API request has made its way into my list of "top sites"
That's okay, I only have to visit a site like 3 times for it to claim one of the last slots.
-
@Gąska said in The Official Status Thread:
A file format that consists of fixed line prefixes followed by several data fields (strings, ints, floats, or a combination thereof, depending on which line it is), separated by a random amount of assorted whitespaces. It looks like it was specifically designed to be easy to parse with scanf.
Unless windows deviates from the standard,
sscanf
of untrusted input, especially for string output, is always a security problem.Have you considered simply splitting the string on whitespace, then parsing the fields?
-
@topspin said in The Official Status Thread:
@Rhywden The fuck? TIL!
Unfortunately I don’t get back enough in taxes to make this worthwhile.I may be looking at getting about 1500€ - after all, our schools don't provide us teachers with a proper working place for doing preparatory work. Thus I'm allowed to designate one of my rooms at home as a working space and deduct the costs for that area. Plus, any kind of stuff I'm buying for that room which is used for work related reasons can also be deducted (you just have to give a percentage of how much is work-related). Plus, you're allowed to deduct travel costs for travelling to and from work - there's no lower limit anymore and it also doesn't matter how you travel to work (bike, public transport or car). And of course, saving for retirement can also be deducted.
It all adds up, even for a single guy like me ;)
-
@PleegWat said in The Official Status Thread:
@Gąska said in The Official Status Thread:
A file format that consists of fixed line prefixes followed by several data fields (strings, ints, floats, or a combination thereof, depending on which line it is), separated by a random amount of assorted whitespaces. It looks like it was specifically designed to be easy to parse with scanf.
Unless windows deviates from the standard,
sscanf
of untrusted input, especially for string output, is always a security problem.School work.
Have you considered simply splitting the string on whitespace, then parsing the fields?
That's what I ended up doing (because I couldn't figure out the right P/Invoke declaration for
swscanf
). It's absolutely disgusting and so brittle you can make it fall apart just by looking at it. Yes, I could have spent more time on it - but then I'd be spending more time on file parsing than on actual task at hand.
-
@Rhywden I walk 3 minutes to work, so there’s no way I get over the 1000€ standard deductions, even if I deduct questionable things like my phone as “for work”. Not sure if I could pull off the “home office room” thing, but it’d be fraud so I’d rather not.
-
@Gąska said in The Official Status Thread:
@PleegWat said in The Official Status Thread:
Have you considered simply splitting the string on whitespace, then parsing the fields?
That's what I ended up doing (because I couldn't figure out the right P/Invoke declaration for
swscanf
). It's absolutely disgusting and so brittle you can make it fall apart just by looking at it.Surely, so would
sscanf
be?
-
@Gąska said in The Official Status Thread:
That's what I ended up doing (because I couldn't figure out the right P/Invoke declaration for
swscanf
). It's absolutely disgusting and so brittle you can make it fall apart just by looking at it. Yes, I could have spent more time on it - but then I'd be spending more time on file parsing than on actual task at hand.Not sure about C++, but in C:
char buffer[4096]; char *saveptr; char *ep; while( fgets( buffer, sizeof buffer, fp ) ) { char * cmd = strtok_r( buffer, " \t", &saveptr ); if( !strcmp( cmd, "brillant" ) ) { char * arg1_str = strtok_r( NULL, " \t", &saveptr ); char * arg2_str = strtok_r( NULL, " \t", &saveptr ); char * arg3_str = strtok_r( NULL, " \t", &saveptr ); if( ! arg3_str ) { fprintf( stderr, "Not enough arguments!\n" ); } if( strtok_r( NULL, "", &saveptr ) ) { fprintf( stderr, "Too many arguments!\n" ); } double arg1_dbl = strtod( arg1_str, &ep ); if( *ep ) { fprintf( stderr, "Could not parse floating-point value: %s\n", arg1_str ); } int arg2_int = strtoul( arg2_str, &ep, 0 ); if( *ep ) { fprintf( stderr, "Could not parse integer value: %s\n", arg2_str ); } /* Use the results */ } else if( !strcmp( cmd, "fubar" ) ) { /*...*/ } else { fprintf( stderr, "Invalid command %s\n", cmd ); } }
Depending on the amount of valid prefixes and how often you have the same argument types, you may want to add wrappers for strtok_r+strtod and strtok_r+strtoul. We've got quite some of this kind of thing going on in our codebase.
Also, note this gets you significantly better error reporting than you could get out of scanf().
-
@Gąska said in The Official Status Thread:
the right P/Invoke declaration for swscanf
[DllImport("msvcrt.dll", CallingConvention = CallingConvention.Cdecl, CharSet = CharSet.Unicode)] static extern int swscanf( [MarshalAs(UnmanagedType.LPWStr)] string ws, [MarshalAs(UnmanagedType.LPWStr)] string format, __arglist);
?
-
@topspin said in The Official Status Thread:
@Gąska said in The Official Status Thread:
@PleegWat said in The Official Status Thread:
Have you considered simply splitting the string on whitespace, then parsing the fields?
That's what I ended up doing (because I couldn't figure out the right P/Invoke declaration for
swscanf
). It's absolutely disgusting and so brittle you can make it fall apart just by looking at it.Surely, so would
sscanf
be?sscanf
wouldn't crash on missing space after:
inkey: value
.
-
Well, I could find something that would piss people off real good, and post it. But, what would be the point, really.
-
-
@Gąska I posted that first.
-
@pie_flavor said in The Official Status Thread:
@Gąska I posted that first.
No, you pissed
sscanf
, notswcanf
!
Filed under: Yes I know he said sscanf, doesn't make me wrong
-
@Tsaukpaetra said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
@Gąska I posted that first.
No, you pissed
sscanf
, notswcanf
!
Filed under: Yes I know he said sscanf, doesn't make me wrong
He what?
-
-
-
@Gąska said in The Official Status Thread:
@pie_flavor said in The Official Status Thread:
@Gąska I posted that first.
And I thanked you too!
Yeah, people on this forum, gosh!
-
@loopback0 said in The Official Status Thread:
He what?
Autocorrected
posted
topissed
, because somehow that was more likely to follow the wordhe
for some reason....
-
@Tsaukpaetra said in The Official Status Thread:
Autocorrected
posted
topissed
Duh.
@Tsaukpaetra said in The Official Status Thread:
somehow that was more likely to follow the word he for some reason....
I don't wanna know what you're normally typing about.
-
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
somehow that was more likely to follow the word he for some reason....
I don't wanna know what you're normally typing about.
I do! I have almost ten possible topic streams I need to pour over to see what kind of water failed to flow under the bridge. Probably sports, people get angry over that for some reason...
-
Status: Maybe I should get out of the habit of running things off of network drives...
Edit: Oh! There's that C000006 error again!
-
@Tsaukpaetra said in The Official Status Thread:
almost ten possible topic streams I need to pour over
-
@pie_flavor
Don't worry. In the category of "The most boneheaded way to do string parsing in C#" we'd share the prize collectively... and promptly getAccessViolationException
, because we forgot to pre-allocate our name strings.
-
Status: Pondering the merits of trying to upgrade this PC's memory and drive to something less shitty.
But I don't know if I have any DDR2 SO-DIMMs...
Hmm...
-
@Tsaukpaetra said in The Official Status Thread:
But I don't know if I have any DDR2 SO-DIMMs...
Yep, you're SOL. Even "Download More RAM" doesn't stock those anymore.
-
Status: You all know the feeling.
https://i.imgur.com/szbwH8A.png
-
@loopback0 said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
almost ten possible topic streams I need to pour over
Urine trouble now
-
Status: And the final room I had time to clean during my week off was the upper floor common area. Meaning just the bedrooms remains. Combination of kitty little box and full carpet is bad, I think it got a permanent spot of kitty litter embedded in itself now. Put a kitty litter carpet in front of the box, should hopefully catch most of it.
Also figured I want something to store kitty accessories in, but existing furniture I could move there has a problem: It's either too long or too wide to go where I want to put it. Need to check Ikea for something that fits.
-
@Applied-Mediocrity said in The Official Status Thread:
@Tsaukpaetra said in The Official Status Thread:
But I don't know if I have any DDR2 SO-DIMMs...
Yep, you're SOL. Even "Download More RAM" doesn't stock those anymore.
*drags kit out* Let's see,,,
- SDRAM, 64 MB sticks, 4 count
- DDR1, 256 MB sticks, 4 count
- DDR2, 512 MB sticks (What I already have) 6 count
Well, damn...