links – scraping multiple pages with dynamic parameter

I am quite new to R and trying to scrape all advertisements of a rental website over all the different pages. The website is: pararius.nl/huurwoningen/nederland.

I have tried to make the link dynamic by adding %d, but that does not work pararius.nl/huurwoningen/nederland/page-%d.

The code below works, but not for multiple pages…

Does anyone know how I can fix it?

getlinks <- function(x) {
url <- read_html(“https://www.pararius.nl/huurwoningen/nederland”)

location <- url %>%
rvest::html_nodes(“.listing-search-item__location”) %>%
rvest::html_text()

price <- url %>%
rvest::html_nodes(“.listing-search-item__price”) %>%
rvest::html_text()

links <- url %>%
rvest::html_nodes(“.listing-search-item__title a”) %>%
rvest::html_attr(“href”)

data.frame(location,
price,
links)
}

options(max.print=10000)
offers <- purrr::map_df(1:318, getlinks)

sql server – SQL GroupBy Select min return multiple columns

I have the following sample of a SQL table, which will be filled with around 400 million rows:

enter image description here

I want to be able to return columns Id, UID, STP, A, B, C and then group by the UID and keep the one with the lowest STP values, where a date is in between the StartDate and EndDate (i.e. 23/05/2011)

This is what I have so far:

SELECT Id, UID, STP, A, B, C
FROM (drp-data).(dbo).(schedules)
WHERE StartDate <= CONVERT(date, '2011-05-23') AND EndDate >= CONVERT(date, '2011-05-23')

Microsoft SQL 2019.

game loop – The Command pattern and multiple inputs per frame?

I’m reading Game Programming Patterns by Robert Nystrom. As a test I’ve implemented the command pattern, but a little farther in he changes it to return commands, rather than instantly executing them.

An example of the first command pattern:

void InputHandler::handleInput()
{
    if (isPressed(BUTTON_X)) buttonX_->execute();
    else if (isPressed(BUTTON_Y)) buttonY_->execute();
    else if (isPressed(BUTTON_A)) buttonA_->execute();
    else if (isPressed(BUTTON_B)) buttonB_->execute();
}

Changing it to return commands:

Command* InputHandler::handleInput()
{
  if (isPressed(BUTTON_X)) return buttonX_;
  if (isPressed(BUTTON_Y)) return buttonY_;
  if (isPressed(BUTTON_A)) return buttonA_;
  if (isPressed(BUTTON_B)) return buttonB_;

  // Nothing pressed, so do nothing.
  return NULL;
}

// Executed in game loop:
Command* command = inputHandler.handleInput();
if (command)
{
  command->execute(actor);
}

My question is, how would I go about processing multiple user inputs each time input is handled? In my sample implementation, I check with an if on each button, instead of how he does it using an else if. I can see the benefits of returning the command (execute the command on any game actor you send to it), but it appears to be limited to one command process per loop.

R Highcharter – How to customize tooltips for multiple y-axes?

Is it possible to customize tooltip pointformat for multiple y-axes? In the simple example below, I have two y-axes: one for value and one for percentage. I want the tooltip to show ${point.y:,.0f} for the value series, and {point.y:,.2f}% for the percentage series.

highchart() %>%
  hc_yAxis_multiples(list(title=list(text="<b>Value<b>"),
                          showLastLabel = FALSE,opposite = FALSE),
                     list(title=list(text="<b>Percent<b>"),
                          showLastLabel = FALSE,  opposite = T)) %>%
  hc_add_series(c(seq(100,110)), yAxis=0) %>%
  hc_add_series(c(seq(1,10)), yAxis=1)

I tried to add hc_tooltip(list(pointFormat = "<b>{series.name}: ${point.y:,.0f}",pointFormat = "<b>{series.name}: {point.y:,.2f}%")), but it doesn’t work.

dnd 5e – Can you attack more than once using multiple weapons with the “loading” property?

… kind of…

The rules on loading weapons say the following (emphasis mine):

Because of the time required to load this weapon, you can fire only one piece of ammunition from it when you use an action, bonus action, or reaction to fire it, regardless of the number of attacks you can normally make.

This reads as one piece of ammunition fired per weapon. The extra attack class feature does not specify whether the extra attacks can be with one or multiple weapons. In light of this, I would personally rule that you can use multiple weapons, but it is not explicitly stated in the rules. However, this will only work once. It takes an object interaction to reload the crossbow (index refers to objects: using during combat, which suggests that reloading your crossbow costs an interact with object, requiring you to use your action if you want to do it twice in a round), which means that you can shoot both of the crossbows, but can only reload one of them in a round (or two, if you use your action). You might be able to fire twice during two turns in combat, though. If you fire both crossbows with extra attack and then spend your free interact with object to reload one crossbow, you end the turn with one loaded crossbow. Then, at the start of your next turn, you spend your free interact with object to reload the other crossbow, and fire both. You then end the turn with no loaded crossbows, and you’re back to firing one crossbow per turn.

Interestingly, the rules on two-weapon fighting are not at all helpful in this case. The rules on two-weapon fighting state the following (emphasis mine):

When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative.

If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it.

This means that two-weapon fighting doesn’t allow her to fire the second crossbow as a bonus action. Furthermore, if she is holding a light melee weapon, such as a shortsword or dagger, and a hand crossbow, she has to choose between firing the crossbow and using the melee weapon.

The only way to fire two hand crossbows in one turn (ignoring extra attack) is with the Crossbow Expert feat, which (among other things) states the following (emphasis mine):

When you use the attack action and attack with a one-handed weapon, you can use a bonus action to attack with a loaded hand crossbow you are holding.

Note that the feat doesn’t state melee weapon, which allows you to fire the second hand crossbow as a bonus action.


In conclusion, I wanted to summarize the different ways to attack using hand crossbows in 5e.

  • dual wielding two hand crossbows, without extra attack or crossbow expert. This allows you to make one attack per turn, and one attack only. Wielding a sword in one hand and a crossbow in the other allows you to choose, but you still don’t get a bonus action attack.
  • dual wielding two hand crossbows, with extra attack, but without crossbow expert. This allows you to make two attacks during your first turn, and possibly your second turn, depending on what your DM is willing to allow (technically legal using RAW, but is an obvious target of house rules)
  • dual wielding two hand crossbows, without extra attack, but with crossbow expert. This allows you one attack during your action, and one as a bonus action. Having a melee weapon in your main hand also allows you to fire the hand crossbow as a bonus action.
  • Dual wielding two hand crossbows, with both extra attack and crossbow expert. This allows you to make up to 5 attacks with your hand crossbows, 4 from extra attack, and one from the crossbow expert bonus action, depending on your class.

Your specific example is number two, allowing you two attacks on the first (and possibly second) turn(s), and only one on every turn after that.

Hosting Multiple Physical Servers On One IP Address

Say I had two servers. Server A and server B. Server A hosts “servera.com” and server B host serverb.com, how could I get these to both poin… | Read the rest of https://www.webhostingtalk.com/showthread.php?t=1823317&goto=newpost

react.js – React – form of multiple components

I need to create a form in React made of multiple components, such as <TextField>, <DropDown>, <DatePicker> where each one has a different props, some of them are common such as Id, Label

Question is how should I program this, I have come with a few ideas ->

  1. It would be easier to split it into separate arrays: dropdowns, textFields, datePickers and then render them via .map(), but it wouldn’t work as they are not in order in the form

  2. Put all of components into array and render them via .map() with if/switch/function where I would decide which component is which

 const App = (props) => {
  const forms = props.forms
  const getItem(type) {
    if (type === Type.DropDown) {
      return <Dropdown dropDownProps>
    }
    ....
  }
  return (
    forms.map(item => {
      return getItem(item.type)
    })
  )
}

Next question is how/where to store all props – there is about 10 of these fields in the form, so should I do some file like InitData.ts with

const FirstField = {id: 0, label: "FirstField"}
...

but then how would I pass props such as onChange etc?

how to handle multiple request in django web application?

how to handle multiple request in Django web application? How to make server to handle multiple request in production environment.

How to create multiple auth laravel jetstream

i run the laravel jetstream and set to livewire not vue . i usually using auth ui and custom the login in

App -> Http -> controller -> auth -> LoginController

in this LoginController i custom this redirect like this

 protected function authenticated(Request $request, $user)
{
    if ( $user->isUser() ) {// do your margic here
        return redirect()->route('user_dashboard');
    }
    elseif ($user->isSarpras()) {
        return redirect()->route('admin_sarpras_dashboard');
    }
}

but on laravel jetstream iam cant found Controller->auth . how to do best manage login and create multiple login using laravel jetstream ?

dnd 5e – Can you attack more than once using multiple weapons with the “loading” property?

… kind of…

The rules on loading weapons say the following (emphasis mine):

Because of the time required to load this weapon, you can fire only one piece of ammunition from it when you use an action, bonus action, or reaction to fire it, regardless of the number of attacks you can normally make.

This reads as one piece of ammunition fired per weapon. The extra attack class feature does not specify whether the extra attacks can be with one or multiple weapons. In light of this, I would personally rule that you can use multiple weapons, but it is not explicitly stated in the rules. However, this will only work once. It takes an object interaction to reload the crossbow (index refers to objects: using during combat, which suggests that reloading your crossbow costs an interact with object, requiring you to use your action if you want to do it twice in a round), which means that you can shoot both of the crossbows, but can only reload one of them in a round (or two, if you use your action). You might be able to fire twice during two turns in combat, though. If you fire both crossbows with extra attack and then spend your free interact with object to reload one crossbow, you end the turn with one loaded crossbow. Then, at the start of your next turn, you spend your free interact with object to reload the other crossbow, and fire both. You then end the turn with no loaded crossbows, and you’re back to firing one crossbow per turn.

Interestingly, the rules on two-weapon fighting are not at all helpful in this case. The rules on two-weapon fighting state the following (emphasis mine):

When you take the Attack action and attack with a light melee weapon that you’re holding in one hand, you can use a bonus action to attack with a different light melee weapon that you’re holding in the other hand. You don’t add your ability modifier to the damage of the bonus attack, unless that modifier is negative.

If either weapon has the thrown property, you can throw the weapon, instead of making a melee attack with it.

This means that two-weapon fighting doesn’t allow her to fire the second crossbow as a bonus action. Furthermore, if she is holding a light melee weapon, such as a shortsword or dagger, and a hand crossbow, she has to choose between firing the crossbow and using the melee weapon.

The only way to fire two hand crossbows in one turn (ignoring extra attack) is with the Crossbow Expert feat, which (among other things) states the following (emphasis mine):

When you use the attack action and attack with a one-handed weapon, you can use a bonus action to attack with a loaded hand crossbow you are holding.

Note that the feat doesn’t state melee weapon, which allows you to fire the second hand crossbow as a bonus action.


In conclusion, I wanted to summarize the different ways to attack using hand crossbows in 5e.

  • dual wielding two hand crossbows, without extra attack or crossbow expert. This allows you to make one attack per turn, and one attack only. Wielding a sword in one hand and a crossbow in the other allows you to choose, but you still don’t get a bonus action attack.
  • dual wielding two hand crossbows, with extra attack, but without crossbow expert. This allows you to make two attacks during your first turn, and possibly your second turn, depending on what your DM is willing to allow (technically legal using RAW, but is an obvious target of house rules)
  • dual wielding two hand crossbows, without extra attack, but with crossbow expert. This allows you one attack during your action, and one as a bonus action. Having a melee weapon in your main hand also allows you to fire the hand crossbow as a bonus action.
  • Dual wielding two hand crossbows, with both extra attack and crossbow expert. This allows you to make up to 5 attacks with your hand crossbows, 4 from extra attack, and one from the crossbow expert bonus action, depending on your class.

Your specific example is number two, allowing you two attacks on the first (and possibly second) turn(s), and only one on every turn after that.