webforms – How to handle DropDown list where selected values could become invalid over time?

I use DropDowns linked to database columns where values might become outdated, such as people who are no longer Employees, or Printers that no longer exist. For situations like an issue tracking application, how should I deal with cases where a value stored in the database is no longer in the current DropDown list? In ASP.Net the application just “blows up”, which is not acceptable.

I came up with two partial options so far:

  1. For Employees, there is a table which retains old values. However, if I want to allow only current Employees to be picked when creating new data, this is awkward. I tried adding an asterisk to the start of old Employee names and sorting those to the bottom of the list. This is a list with two columns: employee ID and Name. The ID is what is stored in the database column of the Issue record, for example.

  2. For Printers, the list has only one column, so I created a “Safe DropDown” User Control that will show the invalid value at the top of the displayed list. It doesn’t blow up, and the value is available, but other users do not have it in their list of current Printers (the true list is not updated in any way). This approach would be harder to do with a two column list – what do I show as the ‘name’ of a missing entry?

I have not seen any guidance about what to do in cases like these. What is the recommended approach where old values must be displayed, but not selected for new records?

Unity Input System: How to handle input from specific device types when the binding abstraction fails?

Is there a way for Input System code to determine what kind of device generated an Input Action’s current event, so that it can be filtered based on device type?

The example I have is an Orbit Camera that is controlled by either the mouse or the keyboard cursor keys. Normally the camera is static, but rotates around a target object if the cursor keys are pressed, using a 2D Vector Composite binding. Also, if the mouse is moved, it rotates too, according to the mouse delta x & y values. Both these bindings are part of the same InputAction.

The problem occurs when I want to make the mouse move the camera only if the mouse button is pressed. But I still want the keyboard cursor keys to work regardless of the mouse button state. In this case, my code needs to know that one of the bindings on the InputAction is a mouse, and that input events from it should be ignored unless some other condition (from an InputAction bound to the mouse button) is active.

I understand that Input System is meant to abstract away a lot of the details of the input devices, and in most cases it does. But in this case, the way a human uses the mouse vs. the keyboard is fundamentally different, because the mouse is not dedicated to moving the camera, but the keyboard cursor keys are. I can’t see a standard or even simple way to implement this. The best I’ve come up with is a pair of InputActions – one for “anytime” (the keyboard cursor keys) and another for “gated” (the mouse delta), with an extra InputAction to define the gate (mouse button). Then the code filters and combines the inputs from both of these to determine the final effect. It’s not very elegant.

How feasible would it be to create a custom controller for the mouse that only generates delta movement input when the mouse button is held? Then this could be bound to the original single InputAction. Is this a thing people do with Input System?

sharepoint online – Recursive function to handle list view threshold not working

We have a list with 0.5 Million items.

The end goal is to get and handle threshold using recursive function. Followed the below article however didn’t work as per our requirement.
Rest to read more than 5000 items from document library

Code

function FilteredInvoiceNew(ColumnName,ColumnVal){
 
var dataset = ();
var FltrInv = ();
var response = response || ();
var ApprovalStatus = "";
var listName="Claimlist";
var myQuery= _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('ListName')/items?$select=ID,P_x0020_No,Inv_x0020_Date,Item_x0020_No,ProductCode,Qty,Prj_x0020_Name,
Distributor_x0020_No,Distributor_x0020_Name,Contractor_x0020_Name,Claim_x0020_Amount,YourReference,YourProductCode,YourPONumber,IsApproved,Comments";

if(ColumnName!=="" && ColumnVal!==""){
            
  myQuery+="&$filter=substringof('"+ColumnName+"',"+ColumnVal+")";      
}   

myQuery+="&$top=500";
myQuery+="&$orderby=ID desc";
 
 debugger;
 
        return $.ajax({
            url: myQuery,  
            method: "GET",  
            headers: {  
                "Accept": "application/json; odata=verbose"  
            },
            success: function(data){
                response = response.concat(data.d.results);
                if (data.d.__next) {
                    myQuery = data.d.__next;
                    FilteredInvoiceNew();
                }
              
                const lookup = response.reduce((a, e) => {
                a(e.YourReference) = ++a(e.YourReference) || 0;
                return a;
                }, {});

                FltrInv = response.filter(e => lookup(e.YourReference));
                console.log(FltrInv);
                
                $.each(FltrInv, function(index, row) {
                    
                    // SomeCode
                    
               });
   
 },
 
 error: function(error){
 
  console.log(error);
 }
 
  });// End of Ajax Call
 
}

Executing the function goes to the error section and throws the threshold error as shown below

enter image description here

Also tried nested function to include the below logic and it skips the nested function.

Would be extremely grateful if anyone could let us know if this is achievable.

Thanks in advance

dnd 5e – How does D&D 5e handle group skill checks?

I have looked at the Lost Mine of Phandelver and see many times where a skill check for wisdom is vital, I want to get my group to work together, like everyone contributing and cooperating, instead of having the guy with the highest skill mod take the lead every time.

Thus, I come to the conclusion that I want to put in a group skill check system of some kind. I saw a few people mentioning in past editions about their way:

All PC rolls, person with highest value will be the one to pass that check.

This seems alright, but I didn’t know if it fits with this edition.

I also thought it would make sense if another character could help with the search and give him an advantage on the check. 2 is better than one right? Thematically, everyone would help search.

The problem I have is that many traps, among other things require the PC to actively search. Unless, I am allowed to yell at them to make a wisdom check prior to the trap?

So how does DnD 5e handle group skill checks? Are there rules for this kind of thing already? Or does anyone have any tried and tested house rules that they’ve implemented?

The reason I’m asking is because the 5 PC in my campaigns have pretty low Wis, max of 12.

configuration – How does `drush cim` find and handle the config-directory?

where is the drush cim command specific documentation?

https://drushcommands.com/drush-9x/config/config:import/

Does cim command remove the files after they are imported

No.

where are the setting files imported from, can you provide me with a
path relative to the root (I mean, relative to where the main
index.php file of drupal is)?

The path to the configuration folder is set in settings.php file. It will look like $configuration_directories = "path/to/config/folder". This is relative to the Drupal root directory.

can we change the import path?

Yes, you can change the path in the settings.php file.

can we tell drush to just delete any (previously exported) setting files ?

Anytime you export configuration, all the old configuration files will be wiped out, and new ones created from the current active configuration in the database.

rest – Frontend/backend SPA communication: how to handle a list of string options

I have single page application with an Angular frontend and a Spring REST-backend.

What is the proper way to handle a list of string-based options in the fronted the enduser can select from, which shall all be shown and eventually slightly changes over time?

i.e. gender (‘Male’, ‘Female’, ‘Unisex’) or jobs (‘Student’, ‘Teacher’, ‘Engineer’, …)

My approach:

  • Store the lists as a key-value pair, i.e. gender (‘Male’ 0, ‘Female’
    1, ‘Unisex’ 2) and jobs (‘Student’ 0, ‘Teacher’ 1, ‘Engineer’ 2, …)
  • have an own GET-endpoint for every list (gender, jobs, …) to fetch the key/value mapping
  • backend only stores the id, mapping from id to value will be done in the frontend with the fetched list

Questions:

  • is there a best-practise for this?
  • should I use key/value pairs at all or just store the strings itself as they are presented in the frontend?
  • should I use a GET-endpoint to fetch the lists at all, or should I just hardcode them in the frontend?
  • maybe forget about all this and do it differently?

Thanks in advance!

usability – How to handle filtering on table columns?

I am currently working on a pretty complex (and convoluted, I’ll admit) table in terms of filtering. One of the options for filtering allows the user to filter on an item that is displayed as a column and I’m trying to figure out the least confusing / jarring way to update the table for it.

This is hard to describe in words, I’ll be honest so here’s a GIF showing the functionality.

enter image description here

I added blocks to hide some data so pay no mind to the floating grey boxes :).

Preview

Currently, only the selected items for that filter are shown in the table and the rest are removed. This has the benefits that the user doesn’t have to see or think about information that they don’t care about, but then they have to re-adjust to what is effectively a “new” table. The other option is to gray out the unselected columns so the information is still there but taken out of focus.

What method from the above, or some other if you have ideas, do you think would confuse the user the least?

How to handle a party’s bad choices? [closed]

Not too long ago I started a campaign in Pathfinder 2e, and at a certain point I hinted at an enemy group’s location and (superior) strength, while telling the party to go somewhere else and complete an objective. It was just foreshadowing, but the players went and tried to fight this group anyway, resulting not in a TPK (enemies are not interested in that, yet) but in the capture of the party. I will let/make the party escape, although with basically random equipment that they will recover while fleeing. But I’m sure they will do something like this again, because most of them do not think before they act. I’d like to know how I can deal with such a situation, aside from telling them directly out of game and/or railroading them.

The Scenario

There’s famine in the region, and a convoy of merchants arrives in the
characters’ walled town while pursued by undead monsters created by
this famine. The players are effectively informed of the famine, and
the de-facto leader of the town’s defenses tells them that the
priority would be to set up a trade route with another town, which is
apparently doing better. Before departing, the merchants of the convoy
explain that, on the road to get to the PC’s town, they were attacked
multiple times: first by goblins, then by bandits, and finally by the
undead. They also say that more than a third of the convoy was wiped
out between the goblins and the bandits. They then mark the positions
of the attacks on the party’s map. The party departs and decides to
follow the same route of the merchants, despite being slower (no
horses) and less in number (the merchants were dozens of people).

The PCs get near the bandits’ attack zone, and not far from it they
find a big multi-family farm. They send the rogue to scout ahead and
investigate; he notices that the farm doesn’t present any sign of
battle, but all the windows are barricaded and there’s no one outside.
He gets to the stables and sees from afar 2 people calmly tending to
two horses. He can see they’re armed, but can’t make out their
equipment exactly. He returns to the party, which decides to approach
the farm. The farm is big enough to be divided in several buildings,
so they get near one of them. They knock, no answer. They then get to
another one and see there is smoke coming out of the chimney and hear
a little noise inside. They knock and the noise stops (the people
inside are slowly and silently getting ready for a possible battle,
alerted by the knocking). They then get to the stables, but this time
not stealthily, and the 2 people inside the stables get out while
drawing their weapons.

A short dialogue commences, and the 2 people order the party to drop
their food (revealing themselves as bandits). The party lies saying
they don’t have any, then the bandits order them to then drop their
weapons and armor. The party tries to lie again to get the bandits to
think there’s an entire army unit nearby, but the far-fetched lie does
not work. The party warrior then insults the bandits, and one of the
bandits calls for reinforcements from the nearby building (the smoking
chimney one). Battle commences when the same warrior from before
charges the bandit. The party takes their turn, and the first 2
bandits "waste their first action" telling the party to surrender
while 8 more get there in 2 turns. The right arm of the bandit leader
even showed up for one turn, but said to the bandits "You can do this
on your own, you don’t need my help" and left immediately after. The
party refuses to surrender until only one of them is on his feet.


Now, the party knew the bandits were not far from where they were, had the chance to notice that something was wrong in the farm, that there were armed people inside, that those same people were too relaxed considering there were undead and bandits roaming around the zone, that the first people (the ones in the smoking chimney building) didn’t interact peacefully (or at all), they were also given 3 chances to surrender without a battle. I considered it clear that the PCs should not have tried to fight. And if it’s not clear that they should not have tried to fight, I tried to at least make it clear that they were approaching a suspicious and almost surely dangerous situation.

The general course of action I predicted was that the party should have gotten to the farm later, first talking to the major city’s authorities to set up the trade route and then cleaning it up, when they would have had more equipment, experience, and maybe allies. They could have even tried to talk to the bandit leader instead of fighting, but insulting the lackeys is not a diplomatic choice.

So, to sum it up, how do I deal with poor choices that PCs may make?

Best c# library to handle zip files

I want to know which library in c# is the best to unzip large size file about 30gb quickly.

I am having an requirement to unzip large size password protected zip file in azure blob. Need to unzip and move to other blob storage.

Any help appreciated..

Thanks in advance

dungeon world – How am I supposed to handle disruption in a Perilous Journey?

Undertake a Perilous Journey is perhaps my least favourite basic move.

The intention seems to be to abstract the specifics of a perilous journey, which is useful. My issue comes with the fact that a perilous journey seems to always require lowering the level of abstraction to deal with peril, and the move sort of breaks down leaving me unsure of what to do.

My agenda and the very text of the move itself encourage me to add some adventure into the mix: Goblin’s attack, you find a cool cave etc. So I end up with stoppages to deal with all the cool stuff. This is fine but when the encounter is handled the party usually wants to resume their journey. I am never sure if I should just complete the journey based on the stale roll from earlier or if they trigger the move again. I’ve played with both, but neither really seems to “work” for me.

This is particularly an issue because my party loves to start journeys with little or, more often, no food. So running out of food and foraging every day is not uncommon for our journeys. This creates lots of stoppages and exacerbates the issues with the move. The stoppages are fun, collecting food and exploring places isn’t a chore, especially in the perilous wilds. Its the weirdness with the journey move that gets in our way. Either you are rolling for each leg of the journey, or you end up with a really outdated roll hanging over the party for a long time.

How should this move be done? How is it supposed to interact with stoppages?