Help Bites


  • Considered Harmful

    Thanks, rubber duck.


  • Considered Harmful

    @error said in Help Bites:

    Reversi

    If your implementation is completely hardwired and based on discrete components, you're on my lawn. I just want a physical board for that that flips the pieces appropriately in a way that can be directly observed to be fair and correct, with concurrent secondary verification possible, without any possibility of tampering.


  • Considered Harmful

    @Gribnit said in Help Bites:

    @error said in Help Bites:

    Reversi

    If your implementation is completely hardwired and based on discrete components, you're on my lawn. I just want a physical board for that that flips the pieces appropriately in a way that can be directly observed to be fair and correct, with concurrent secondary verification possible, without any possibility of tampering.

    Hardwired: no, it supports multiple rulesets, and all the moves are server-side verified so no cheating is possible (if you trust the server)

    Good luck tampering with it.


  • Considered Harmful

    @Gribnit It sounds like you want peer-to-peer with blockchain verification, but this is a client-server architecture.


  • I survived the hour long Uno hand

    @error said in Help Bites:

    @Gribnit It sounds like you want peer-to-peer with blockchain verification, but this is a client-server architecture.

    Filed under: Sir, this is a Wendy's


  • Considered Harmful

    @izzion said in Help Bites:

    @error said in Help Bites:

    @Gribnit It sounds like you want peer-to-peer with blockchain verification, but this is a client-server architecture.

    Filed under: Sir, this is a Wendy's

    :patrick-star:


  • Considered Harmful

    @error said in Help Bites:

    @Gribnit It sounds like you want peer-to-peer with blockchain verification, but this is a client-server architecture.

    No, I just want a physical board with actual pieces that nobody has to flip. And LEDs that light up when stuff happens. I've had various amounts of schematics and materials lists for this from time to time.



  • New help bite: So, this is a new one for me and I'm just trying to figure where this come from so I can possibly find the proper people to yell at.

    For about two weeks now I found the Netflix app to be unreliable - sometimes it'd simply present me with a white screen and a hidden login button which only appeared on mouseover. It was a bit of a crapshoot - sometime I'd need to close and open the app six times in a row. Then I'd also get errors and massively long loading times when selecting a movie.

    Turns out that it's not the app but rather the backend which is giving those problems as trying to reach Netflix through any browser will yield "ERR_TIME_OUT" errors or similar.

    Trying to reach the website through my iPhone works as soon as I use LTE - if I use wifi (i.e. my DSL network) it shows the same symptoms. Also, my router has some basic networking tools like ping/tracert and those timeout as well.

    So, seems like there are some routing problems somewhere and with the usual "No VPNs allowed!" I'm not able to work around it.

    Anyone have an idea on where to begin to look and with what tools?

    (Oh, and, Netflix is the only site I noticed this problem with - other streaming portals and sites in general work just fine)


  • Banned

    @Rhywden I'd call the ISP and tell them Netflix doesn't work. They have a magic switch that resets everything and I found that it sometimes helps.


  • Considered Harmful

    @Gąska said in Help Bites:

    @Rhywden I'd call the ISP and tell them Netflix doesn't work. They have a magic switch that resets everything and I found that it sometimes helps.

    The reset packet. Shame it contains time info, otherwise you could just capture one and reuse it.


  • BINNED

    I'm trying to proofread a paper. I prefer not to read things like that on the laptop, but I have an iPad with a pencil so that seems ideally suited for this task, right?

    So I transfer the PDF to the iPad, open it and use the pencil to directly scribble on it with corrections. However, on the right side there is a navigation pane. I'm not particularly good at handwriting, but still it seems normal to rest your hand on the paperiPad while writing instead of hovering everything but the pencil tip in the air. So while I try to write something I hit the stupid navigation bar with my hand, all the time, making this an absolutely frustrating experience.

    This is such an extremely obvious usability problem, I can't be the only one to encounter that.
    Does anybody have any suggestions for this? I have found neither an option to move the side bar to the left (where I wouldn't have that problem) or disable it.


  • Considered Harmful

    (laughs in Surface)


  • BINNED

    (laughs in my files are where I leave them)


  • Discourse touched me in a no-no place

    @topspin said in Help Bites:

    This is such an extremely obvious usability problem, I can't be the only one to encounter that.
    Does anybody have any suggestions for this? I have found neither an option to move the side bar to the left (where I wouldn't have that problem) or disable it.

    Open it in the Books app, which still lets you do markup but without the sidebar.


  • BINNED

    @loopback0 said in Help Bites:

    @topspin said in Help Bites:

    This is such an extremely obvious usability problem, I can't be the only one to encounter that.
    Does anybody have any suggestions for this? I have found neither an option to move the side bar to the left (where I wouldn't have that problem) or disable it.

    Open it in the Books app, which still lets you do markup but without the sidebar.

    That seems to do the trick. Thanks!


  • Considered Harmful

    @topspin said in Help Bites:

    (laughs in my files are where I leave them)

    Otoh, there are OSX updates that rewrite the entire filesystem apparently just for fun.


  • BINNED

    @Gribnit said in Help Bites:

    @topspin said in Help Bites:

    (laughs in my files are where I leave them)

    Otoh, there are OSX updates that rewrite the entire filesystem apparently just for fun.

    Indeed. And since they have a non-empty set of employees in QA, the user notices nothing about it.


  • Notification Spam Recipient

    @Captain said in Help Bites:

    I am looking to buy a new power cable to use in my HP workstation. I'm trying to put a fancy 5000 CUDA core thing in it, and it runs on 8 pin pcie power. My workstation only has 6pin pcie, but is rated to provide 18A. If only I could find an adapter that can carry that much current.

    Some looking around lead me to HP part number N1G35AA. I've been looking around for it and similar, but I have not found any place that actually has it in stock.

    I've looked at Amazon, Monoprice, a few 90s style WE SELL SERVERS type sites, and ebay for the exact model number.

    That said, I'd be happy for a similar model from some other manufacturer. It just has to be rated for 200+ W. Any ideas?

    ???

    If it's actually a good 18 gauge as it says it is, each wire should support 16 amps or so.

    Edit: Hrm, I seem to have been brought to the past.

    @Captain Did you ever find the One True Cable?



  • @Captain said in Help Bites:

    I'd be happy for a similar model from some other manufacturer. It just has to be rated for 200+ W. Any ideas?

    @Tsaukpaetra said in Help Bites:

    https://www.amazon.com/Cable-Matters-2-Pack-6-Pin-Adapter/dp/B01DV1Z32Y
    Max Power Rating: 75W

    Won't do.



  • @Tsaukpaetra Yeah, I actually just got an official HP (foxconn) cable for this application in the mail. It was like $40 at cdw.com. I haven't had time to install it all. I have to set up a home brew high pressure fan cooling system for it, and I'm just about getting ready to move, so this is on the backburner for now.



  • I'm working on lighting a model railroad layout. Lots and lots of LEDs (mostly white — this is not a RGB LED all the things project). Rather than having lots and lots of toggle switches to turn the lights on and off, I'd like to have some sort of electronic control using something like an Arduino.

    The searching I've done so far has turned up Arduino modules with, at most, 8 channels (at 10A each). I need something more like 800 channels at 10mA each. Anybody know of anything that comes close? Even, say, 20 or 30 would be better than 8.



  • @HardwareGeek even professional lighting people don't want what you're asking for. They use "DMX" -- a digital multiplexing protocol to control "all" the lights on the one set of wires. And then the lights just get their own power and control themselves.

    Did you already buy the LEDs? Depending on stuff, you might just want to hook up a bunch (say, 150) of addressable LED strings in series, and just address the 150 or whatever you have on that circuit individually.


  • Considered Harmful

    @HardwareGeek said in Help Bites:

    I'm working on lighting a model railroad layout. Lots and lots of LEDs (mostly white — this is not a RGB LED all the things project). Rather than having lots and lots of toggle switches to turn the lights on and off, I'd like to have some sort of electronic control using something like an Arduino.

    The searching I've done so far has turned up Arduino modules with, at most, 8 channels (at 10A each). I need something more like 800 channels at 10mA each. Anybody know of anything that comes close? Even, say, 20 or 30 would be better than 8.

    The chip family is multiplexer / demultiplexer and it sounds like you only need to multiplex it.



  • @Captain's solution would be the easiest, but since you already bought the white LEDs (according to what you said in the other thread), that's too late.

    So, something like this?



  • @Zerosquare That would work. I don't need the high-voltage outputs, and they're a bit of a PITA (need ~12V, supply sequencing requirements for power-up/down), but so far I've failed to find a low-voltage (presumably less expensive) equivalent. I've found some other chips that would do the job, but they're more complicated to implement (need address decoders) and have higher cost/channel. Also, that's a surface-mount device, so I'd have to make a circuit board rather than use the perfboard I bought. But then I could use SMD LEDs and resistors instead of the through-hole devices I bough, which would make the whole thing even more compact.

    One disadvantage of the addressable LED strings is that it's not so compact. 144 LEDs in a strip 1 m long, vs. several hundred LEDs in a 15 x 20 cm rectangle (or less with a custom circuit board).

    I've ordered the LEDs, etc., but nothing has actually shipped, yet. I guess I could "return" them before they ship. I've never tried canceling or returning anything on eBay.


  • BINNED

    @HardwareGeek said in Help Bites:

    The searching I've done so far has turned up Arduino modules with, at most, 8 channels (at 10A each). I need something more like 800 channels at 10mA each. Anybody know of anything that comes close? Even, say, 20 or 30 would be better than 8.

    I don’t know what you mean by “channel,” but an Arduino Mega has up to 70 pins that certainly put out nowhere near 10 A.

    Aren’t you really just looking for some shift registers or the like?


  • Notification Spam Recipient

    @HardwareGeek said in Help Bites:

    8 channels (at 10A each)

    Ten amps each channel? What kind of LEDs are you driving?

    I was thinking of a "simple" shift register setup, which if you're clever enough needs only three wires and power, so long as the registers themselves can sink the appropriate current for the LEDs.

    Maybe something like this?

    Should be able to chain them too, says they work off 5V max but obviously your 800 LEDs are going to need the amps to support it (I'm assuming you have the appropriate power supply for that too?)



  • @kazitor said in Help Bites:

    Arduino Mega

    That's pretty much what I was looking for. $/pin is a bit high, though. $40 for 70 pins is $0.57/per pin.

    @Tsaukpaetra said in Help Bites:

    Ten amps each channel? What kind of LEDs are you driving?

    I was searching for "arduino gpio", or something like that, and what I found were relay boards rated for 10 A. Obviously, I don't need that for LEDs.

    That ST LED array driver is similar to what @Zerosquare posted earlier, but without the high voltage supply requirement, therefore better, and at basically the same price / LED.

    And now that I have a better idea what to look for, I found some other similar chips, although the one with the lowest cost per LED seems to be unobtanium, and the price difference is only a couple of pennies. It looks like the ST is probably the best choice. And it looks like driving the LEDs directly with the Arduino GPIOs is possible but not cost effective, although a less expensive Arduino can certainly bit-bang the serial data lines for the shift-register drivers.



  • The other issue with using Arduino GPIOs directly is that some models only support 3.3 V, which is very close to the forward voltage of white LEDs. Also, there's a limit on the total I/O current (which is less than "max. I/O pin current" times "number of I/Os"), so too many LEDs may be a problem.


  • Java Dev

    @HardwareGeek said in Help Bites:

    800 channels

    If you're driving 800 leds, I think you could instead set them up in a grid (30 source lines, 30 sink lines, a led at each intersection) and significantly save on the number of channels you need?



  • That's a possibility. But since the LEDs will only be on a fraction of the time, you need to drive more current into them to get the same brightness, so you need beefier drivers. Also, the multiplexing frequency must be high enough to avoid visible flickering.

    If the drivers can both source and sink, you can double the number of LEDs for a given number of drivers, by putting two LEDs in anti-parallel at each intersection.

    And if the drivers can also be high-impedance, you can go even further:


  • 🚽 Regular

    I should learn me some electricity.

    In theory I have in college, but in practice this has long since been evicted from cache.


  • BINNED

    @Zecc said in Help Bites:

    I should learn me some electricity.

    What’s impeding yARRRRGghhhhhhhhhh

    👀 Is it too complex?


  • Java Dev

    @Zerosquare said in Help Bites:

    That's a possibility. But since the LEDs will only be on a fraction of the time, you need to drive more current into them to get the same brightness, so you need beefier drivers. Also, the multiplexing frequency must be high enough to avoid visible flickering.

    Both true. I'm hardly an expert myself. Though I believe (unless I'm confusing different members' pet projects, which is definitely possible) he's already intending to use PWM to reduce brightness.


  • 🚽 Regular

    @kazitor

    You just couldn't resist, could you?



  • @PleegWat said in Help Bites:

    I believe (unless I'm confusing different members' pet projects, which is definitely possible) he's already intending to use PWM to reduce brightness.

    Probably confusing projects. I never mentioned PWM in connection with this project, and I don't really need variable brightness. I did mention in one of the threads about using the current-limiting resistors to set a current less than full brightness, because I don't (think I) need them that bright. PWM would be nice to have (especially for something like a fireplace with flickering yellow/red LEDs or to simulate illumination from a TV or monitor), and some of the driver chips can be programmed to do that internally, but it's not at all necessary for the basic lighting.



  • @HardwareGeek: have you bought your LED controller(s) yet?
    This one looks reasonably priced and interesting:

    This is the magic sauce in our 7-segment and matrix backpacks, now available in breadboard-friendly breakout board format. The HT16K33 is a neat little chip that has the ability to drive a multiplexed 16x8 matrix (that's 128 individual LEDs). The communication protocol is I2C so it uses only 2 pins, and you can have up to 8 selectable I2C addresses so thats a total of 8 matrices, each one controlling 16x8 LEDs for 1024 total LEDs. Unlike our LED matrix/segment backpacks, this breakout does not have holes for an existing LED module. Instead, we break out all 16 anodes and 8 cathodes as well as the I2C and power pins. You'll need to wire up the anodes and cathodes by checking out your matrix datasheet and lining up the pins. Wire up any matrix you want and use our handy library to write to the display however you wish. Note that the driver can turn LEDs on and off but does not have the ability to individually PWM dim them. This chip is rock solid, has Arduino & Pi example code written for it and is easy to use. The chip supports also reading a 3x13 keypad matrix but we do not have example code for it in our library, check the datasheet for more details about the keypad functionality



  • Anybody know what this means?

    PS C:\Windows\system32> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.844
    
    Image Version: 10.0.19042.1165
    
    Enabling feature(s)
    [==========================100.0%==========================]
    
    Error: 50
    
    The operation is complete but Microsoft-Windows-Subsystem-Linux feature was not enabled.
    
    
    The DISM log file can be found at C:\Windows\Logs\DISM\dism.log
    

    Looking at that log file, I find this:

    2021-09-01 09:56:27, Info                  DISM   DISM Package Manager: PID=38984 TID=35292 Feature Microsoft-Windows-Subsystem-Linux with CBS state 4(CbsInstallStateStaged) being mapped to dism state 4(DISM_INSTALL_STATE_STAGED) - CDISMPackageFeature::LogInstallStateMapping
    2021-09-01 09:56:27, Error                 DISM   DISM Package Manager: PID=38984 TID=35292 Parent features must be enabled before this feature can be enabled. "Microsoft-Windows-Subsystem-Linux" - CPackageManagerCLIHandler::Private_ProcessFeatureChange
    2021-09-01 09:56:27, Error                 DISM   DISM Package Manager: PID=38984 TID=35292 One or more features could not be enabled. - CPackageManagerCLIHandler::Private_ProcessFeatureChange(hr:0x80070032)
    2021-09-01 09:56:27, Error                 DISM   DISM Package Manager: PID=38984 TID=35292 Failed while processing command enable-feature. - CPackageManagerCLIHandler::ExecuteCmdLine(hr:0x80070032)
    2021-09-01 09:56:27, Info                  DISM   DISM Package Manager: PID=38984 TID=35292 Further logs for online package and feature related operations can be found at %WINDIR%\logs\CBS\cbs.log - CPackageManagerCLIHandler::ExecuteCmdLine
    

    And looking at that file, the only thing I see that seems maybe relevant is that maybe there's a reboot already pending for some other reason. Maybe?



  • @HardwareGeek Answering my own question, yes, that seems to have been the problem.


  • 🚽 Regular

    Rubber duck strikes again.



  • @Zecc In this case, not so much rubber duck as deciding to bite the bullet and put up with the inconvenience of rebooting, even though I'm not sure it's necessary, because it might be.


  • Considered Harmful

    @HardwareGeek said in Help Bites:

    @Zecc In this case, not so much rubber duck as deciding to bite the bullet and put up with the inconvenience of rebooting, even though I'm not sure it's necessary, because it might be.

    For WSL reboot makes a fair bit of sense, virtualization wants hooked pretty low-level.

    ed. perhaps he's ill.

    Of course on a real OS this wouldn't be necessary 🏍



  • Has anybody ever ported a VS2013 T4 template to a newer version of VS? I am getting build errors from my TestCase generator script. But I had Visual Studio save the generated source code, and that appears to build...



  • Actually, I fixed it. Apparently some invisible whitespace snuck in after the end of the template file and it made VS choke. :eyeroll:


  • And then the murders began.

    Ignore that I'm using WCF at all here, please. I know it's :trwtf:. Just hoping to get some .NET Core clients talking to an existing SOAP backend, instead of rewriting it.

    A typical WCF client class declaration in C# looks like this:

    public partial class BookServiceClient : ClientBase<BookService>, BookService
    

    I'd like to create a generic helper method to initialize and manipulate instance of these classes (tweaking the endpoint address & setting cookies):

    public static TClient GetWebService<TClient, TChannel>() where TClient : ClientBase<TChannel>, new() where TChannel : class
    {
        var x = new TClient();
        // do stuff
        return x;
    }
    

    Is there any way to write this method without needing to specify the second type parameter?

    It's only used as part of the constraint, it's not referenced within the method proper at all.

    (...writing this up, I suspect the answer is probably "get my DI container to create instances and then do magic, instead of new-ing them up myself." 🤔)


  • Notification Spam Recipient

    @Unperverted-Vixen said in Help Bites:

    where

    Yeah I never got to the point where I could figure that syntax out...
    Have you tried checking whether the object passed's type has the base class you're looking for? That would create a runtime error I think instead of compile error, but maybe that's what you're looking for?


  • And then the murders began.

    @Tsaukpaetra Then I'd need to use reflection to access the ClientBase fields I need to manipulate.


  • Banned

    @Unperverted-Vixen it doesn't seem there's a way to avoid it. In Java you could write ClientBase<?>, but C# has no equivalent of it. Not even DI container can help you, because you still need to specify TClient's constraint if you want to use it as ClientBase. Which is just one of many reason why not to use DI containers.

    In the process of researching the problem, I've managed to make Mono compiler throw unhandled exception. I've also discovered Ideone.com uses Mono rather than actual .NET.


  • Considered Harmful

    @Gąska said in Help Bites:

    @Unperverted-Vixen it doesn't seem there's a way to avoid it. In Java you could write ClientBase<?>, but C# has no equivalent of it. Not even DI container can help you, because you still need to specify TClient's constraint if you want to use it as ClientBase. Which is just one of many reason why not to use DI containers.

    In the process of researching the problem, I've managed to make Mono compiler throw unhandled exception. I've also discovered Ideone.com uses Mono rather than actual .NET.

    C# can't wildcard? Then how does it bounded wildcard? Can it union type?

    Also, language cannot into architecture, isn't an argument against yon architecture, but against yon language.


  • BINNED

    @Unperverted-Vixen said in Help Bites:

    where TClient : ClientBase<TChannel>, new()

    I had to look up WTF the new() does here and... that seems like really random syntax to describe some special case in a very incomplete list of possible ways to constrain types.


Log in to reply