|
Not at all. I'm hanging out in discussion forums.
|
|
|
|
|
i have this one piece of code, and it is Bad Code(TM)
it certainly would not survive code review.
It deals with over a half dozen corner cases for disambiguating a parse of a field vs a type reference in C#
it keeps failing and I keep going back and adding another corner case.
such an anti-pattern
my hand rolled parser didn't try to handle this at all. it didn't like open typerefs with generic or array params so like
Console.WriteLine(int.Maxvalue);
Console.WriteLine(System.Int32.MaxValue);
Console.WriteLine(MyGenericType<int>.MaxValue);
This parser is supposed to handle it but it's causing it to fail on field references. sometimes.
fml
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
modified 1-Jan-20 17:52pm.
|
|
|
|
|
No wonder the parser can't disambiguate it. They look the same. I can't see how to do it without first resolving names. Within C#, it looks like a type attribute (Maxvalue) masquerades as a field. So for C#, you could probably just treat it that way and get on with life. But if you want to generate the equivalent code in another language, I can see how it would be a PITA.
|
|
|
|
|
Basically I treat them as fields until I can't, such that a type has generic arguments or something which precludes it from parsing as a field reference.
Later on i resolve it, and yes it's a pain.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
I don't know how far afield you're going with your project, but the prospect of converting C#
System.Int32.MaxValue to C++
INT32_MAX does not fill me with delight. Not in the least.
|
|
|
|
|
Luckily I'm only targeting other .NET languages so the basic libraries are all the same.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Can anyone recommend a good USB diagnostics tool for Win 10?
I'm having issues where my headphones will cut out, or I get random pauses with my keyboard & mouse. This PC is only a few months old.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
|
Try running a Linux distro from a stick.
If the problem doesn't occur then, it will confirm what the problem is.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
You got a point. Test the hardware with Linux and check if the intermittence still happens.
|
|
|
|
|
It's one of the first things I do when it looks like I've got a hardware problem.
If it works, it's the driver or a software conflict; if it doesn't, it's the hardware.
It can save you going through a lot of pointless steps.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Have you got a slideshow running for your desktop background? I found that if the 'change picture' setting was set to the 1 minute interval, then every minute the mouse/keyboard/pretty much everything froze. Setting it to 10 minutes seems to either fix the problem or I don't notice it so much now.
|
|
|
|
|
I can't be the only one who read this and thought "Woohoo! Wait, what are USB Diagnostics and how would I win one?"
It's too early in the year, wake me in Feb.
|
|
|
|
|
who_me? wrote: how would I win one? Not just ONE - I want to win TEN!
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
|
|
|
|
|
I was having a similar problem. I could right click on an item -- and it could take 30 seconds for the popup menu. All sorts of things like that. It was not every time, but frequent. It started after an upgrade and upgrading to 1909 fixed it. So, I suspect it was one of the mitigation fixes that was causing the problem -- even after Microsoft supposedly fixed the problems.
So, if you haven't upgraded to 1909 -- and it went very smoothly for all four machines here -- I would recommend it. The problem might not be with the USB ports.
|
|
|
|
|
I could use a good USB wireshark plugin....
Of course if I could win ten of 'em, that'll work too.
found on: https://wiki.wireshark.org/CaptureSetup/USB
You can capture raw USB traffic on Windows with USBPcap. The Tools page lists some other options for Windows USB capture.
|
|
|
|
|
I just completed a much-needed project on my old i5, 8GB 2014 Mac Mini: replaced the HDD with an SSD.
At first, I couldn't even get the the mac to recognize and mount the SSD so I could clone, but I finally got that working.
I tried using EaseUS cloner[^] without success.
I then tried the free version of Carbon Copy Cloner[^] and it took a bit over an hour to clone the drive but it succeeded.
Finally, I disassembled the Mac Mini following these fantastic instructions: Mac mini Late 2014 Hard Drive Replacement - iFixit Repair Guide[^]
You actually take every piece out of the Mac Mini case (main board, power supply, everything!) to get the old HDD so you can replace the SSD. It is insane!
I am very happy to report that I was able to re-assemble the thing with the new SSD. I've rebooted the machine and it is 20 times faster. Everything is so much better!!!
I'm not exaggerating here --> Previoulsy I would run a command like ls -al in a dev directory and the prompt would blink for 3 seconds before it even started to do something. XCode (iOS dev IDE) runs quite nicely now and the iphone emulator runs well too. Amazing.
This was a great New Years Day project! I like the ones that end in success, the best.
Posted via FireFox on my Mac Mini (wouldn't have even tried this before).
|
|
|
|
|
Now that you've got it nailed, it sounds like you could start a business refurbishing i5's!
|
|
|
|
|
Nice job.
Carbon Copy Cloner is what we use too.
|
|
|
|
|
Ron Anders wrote: Nice job.
Thanks, there were a couple of tricky parts. Luckily my son had a #6 Torx Security driver.
I had a #6 torx (star driver) but it wasn't the "Security" type with the hole in the middle. That is really ridiculous!
Also, check the Step 23 (in the ifixit guide[^]). You need a special wire tool to stick in those two holes so you can pry the mainboard out of the case. It is really ridiculous.
I didn't notice I needed a special tool until I got to that step and the thing was already torn apart.
I walked around the house trying to find something with wire that was the correct size that I could use and finally found a spring on an old chip clip. I cut the thing with some tin snips and somehow got it to work. That step is another ridiculous part of the tear down.
|
|
|
|
|
At first, I couldn't even get the the mac to recognize and mount the SSD so I could clone, but I finally got that working.
How did you get this working? I got hung up here doing an iFixit SSD upgrade to my macbook pro and decided to pass on the upgrade.
|
|
|
|
|
|
Thanks for the info. The kit I bought (OWC 1.0TB Aura Pro X2) had an enclosure but the enclosure only supported the old (current) drive and not the new one. I had put the new ssd in the machine and attempted to set it up using disk utility in recovery mode (or whatever that mode is) but it wouldn't recognize the new drive. After a few attempts I decided to return the drive and put the return funds toward an eventual new machine as I'm coming up on 7 years with the laptop.
Enjoy your spruced up machine!
|
|
|
|
|
If you mean after it's been formatted with APFS or HFS+, it could be you need to use the Startup Manager to tell macOS about the new startup disk... I remember having to do that when adding an SSD boot drive to my MacBook Pro back in 2010. Start booting, but press the Option key as you turn on the power and keep it pressed to get to the Startup Manager.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
No, I didn't make it that far. It was as if it wasn't there at all as far as Disk Utility was concerned.
|
|
|
|