Annoying prompt keeps popping up: ‘The “cc” command requires the command line developer tools.’

After 4 years of use, I decided to reset my Mac, cleaning up years of garbage in some folders. Surprisingly I was able to recover 20 GB of free space (which is a lot on a 128 GB SSD).

My workflow is quite simple, and I don’t have a lot o apps installed. Besides the built-in and 1st party apps, I have, from the App Store: BBEdit and WhatsApp; and from other sources: Matlab, Skype, TeXShop, MacTeX, and OpenVPN.

I am not a developer, so I never installed Xcode, nor the Command Line Developer Tools (CLDT). So why would my two days old fresh installation keeps bugging me to install either the full Xcode or CLDT, when I’m sure I’m not running CC (or any other compilator, for that matter).

I doubt that among my handful of apps, one may be the culprit. But does any one know of any similar behavior.

P.S.: Just to make this point clear. I’ve made a clear from scratch installation. The only thing carried over was my iCloud content. No recovering from backups of any kind.

Route.get() requires a callback function but got a [object Undefined]

Tengo este trozo de codigo en server.js

//Directorio desde donde se servian las rutas var routes = require('./routes/routes'); routes.assignRoutes(app); 

y en routes tengo esto:

var users = require('./users'); var users = require('./movie'); //var directer = require('./directer'); //var movie = require('./movie'); exports.assignRoutes = function ( app) {     app.get('/users',users.getUsers);     app.post('/users',users.addUser);     app.put('/users/:userId',users.updateUser);     app.delete('/users/:userId',users.deleteUser);      app.get('/movie',movie.getMovie);     app.post('/movie',movie.addMovie);     app.put('/movie/:movieId',movie.updateMovie);     app.delete('/movie/:movieId',movie.deleteMovie);  } 

No se por que me da este error cuando tengo en movie.js un get donde lo recojo aqui

exports.getMovie = function(req,res){   res.send(movie); } 

y me da este error

Route.get() requires a callback function but got a [object Undefined]

What is the point of VPC if instance requires public ip?

I created ec2 instances in a public subnet (auto created with vpc wizard), and realized that some of them are not able to access internet. I learned that reason behind it is they don’t have public ip address.

If instance requires public ip to connect to the internet, what is the purpose of putting them in a VPC / behind the firewall.

Isn’t ports already exposed to the internet? What am I missing here?

How would I do component testing if my component requires access to a database

I created an electron app which persists data in NeDB which displays data through the app. I’m trying to test my component which displays the data with jest and enzyme, but my simple test fails because one of my module that is imported to the file requires access to a property that is only defined when I run the electron app.

I’m new to creating electron app so my architecture might be bad.

The main issue is when I try to run my test I get the error,

 TypeError: Cannot read property 'app' of undefined    1 | const remote = require('electron').remote; > 2 | const app = remote.app; 

How would I go about fixing this? Some possible things I thought might work was to use jest to mock SchoolAPI, but I’m not sure how to go about doing this.

SchoolList.js

import React from "react"; // @material-ui/core components import withStyles from "@material-ui/core/styles/withStyles"; import List from "@material-ui/core/List"; import ListItem from "@material-ui/core/ListItem"; import ListItemText from "@material-ui/core/ListItemText"; import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction'; import IconButton from '@material-ui/core/IconButton'; import DeleteIcon from '@material-ui/icons/Delete';  import { Link } from "react-router-dom";  import * as SchoolAPI from "../../utils/SchoolAPI.js"  class SchoolList extends React.Component {     constructor(props) {         super(props);     };      handleDelete = (id) => {         SchoolAPI.deleteSchool(id).then(() => {             this.props.onLoadData();         });     };     render() {         const { classes } = this.props;         const listSchools = this.props.schoolsData.map((school, i) =>             <div key={i}>                 <ListItem button component={Link} to={`/orders/$  {i}`}>                     <ListItemText primary={school.name}/>                     <ListItemSecondaryAction onClick={() => this.handleDelete(school["_id"])}>                         <IconButton aria-label="Delete" >                             <DeleteIcon />                         </IconButton>                     </ListItemSecondaryAction>                 </ListItem>             </div>         );         return (             <List className="schoolList">                 {listSchools}             </List>         );     }; } 

SchoolAPI.js

import db from "../db.js" ...a bunch of API(e.g. db.insert(..)) 

db.js

const remote = require('electron').remote; const app = remote.app; const path = require('path'); const Datastore = require('nedb-promises');  const dbFactory = (fileName) => Datastore.create({   filename: `$  {process.env.NODE_ENV === 'dev' ? '.' : app.getPath('userData')}/data/$  {fileName}`,    timestampData: true,   autoload: true });  const db = {   schools: dbFactory('schools.db') };  module.exports = db; 

test.spec.js

describe("SchoolList component", () => {     it("renders without throwing an error", () => {         const SchoolListComponent = renderer.create(<SchoolList schoolsData={schoolsData/>).toJson();         expect(SchoolListComponent).toMatchSnapshot();     }); }); 

Design for skip vs next when next requires waiting

I have an app that serves users content which requires them to say whats on the screen. They can move on to the next piece of content only after some period of time depending on the length of the content (usually 5-10 seconds but it can be as long as a minute)

They are also given the option to skip to the next piece of content, the difference being when they click next we save that as being said and when they click skip its basically ignored that they even saw it. We later provide them with statistics on how much they said and other users (who loaded the content) can see how many people used their content.

I showed this to someone and they said its too ambiguous and not obvious what the difference is. I have a help icon that explains the screen at the top, but based on their usage I could tell many people would never bother to click on it. (I suggested maybe we could put a countdown to when Next becomes enabled but they thought that it still wouldn’t be intuitive what it was counting down to)

I thought about removing the skip button and only putting in the next button. I would then judge whether it is a ‘skip’ or ‘next’ behind the scenes based on how much time was spent on it.

However, the reservation I have with this method is that it is hiding how it works from the user which can mean that they can be confused when they look at their statistics and it seems to be way off (one option to fix this is to have next to the statistic a button saying “My stat is not accurate” or something like that)

Is there a better way of doing this?

This is a basic mockup of the screen (its for mobile)

Mockup

How would it unbalance gameplay to remove the limitation “requires a free hand to load” for hand crossbows?


Crossbow Expert: hand crossbow & shield

I’m working on stats for royal guards of a homebrew capital – using Guard Captain as template. I gave them a hand crossbow and the Crossbow Expert feat, thinking it would allow them to wield a shield in one hand and a hand crossbow in the other.

Crossbow Expert mentions on PHB p. 165:

You ignore the loading quality of crossbows with which you are proficient.

• Being within 5 feet of a hostile creature doesn’t impose disadvantage on your ranged attack rolls.

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

At first I thought that would be enough to be wearing a shield while attacking with a hand crossbow, but the Loading property actually says:

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.

So “loading” refers to loading speed, and the feat makes you faster. It’s the Ammunition property that, by RAW (PHB p. 146), doesn’t allow wielding a shield while attacking with, and reloading, a hand crossbow:

[…] Drawing the ammunition from a quiver, case, or other container is part of the attack (you need a free hand to load a one-handed weapon). […]

Related:

  • Extra Attack, Crossbow Expert, and hand crossbow: 4 shots per turn?
  • How do you load a hand crossbow?
  • How do you load a crossbow?

Question

How would it unbalance gameplay to remove the limitation “requires a free hand to load” for hand crossbows? Thematically, it makes sense, because in my setting this city is rich enough to have such fancy technology as “semi-automatic” hand crossbows (however that would work). Since my world setting allows it, it would be only fair if it’s also an option for the PCs – if they happen to acquire such a weapon and/or training. I’m mostly interested in the shield & hand crossbow combination, but if I’m overlooking other potential exploits that would unbalance gameplay please inform me.

I’m fine with allowing it for NPCs (for my guards) because I can just calculate the new CR, based on increased DPR and AC. As DM I have enough control to keep that balanced at the table. When allowing it for PCs as well though, I’m not sure which unbalanced exploits I might be overlooking. A good answer includes an analysis of mechanical costs and benefits for PCs when removing the limitation “requires a free hand to load”.

To remove this limitation, I’m thinking of three possible ways:

  1. Tweaking the Ammunition property of hand crossbows specifically.
  2. Adding a feature to the Crossbow Expert feat.
  3. Solve it through magic by making the fancy crossbows of the royal guard uncommon magical weapons that can be reloaded without having a free hand.

An amazing answer includes a game balance analysis on these possible solution as well.

Changing static method that now requires a runtime dependency

I had a simple static method which would take a value and a unit type (pounds, gallons, dollars) and would just format a string. A simplified example:

public static string Format(decimal value, UnitType unit) {     ...     if(unit == UnitType.Dollars)     {        return "$  " + value;     }     ... } 

Now, the requirements changed, as they do, and users can select different currencies. Information about the selected currency comes from UserSettingsService. I guess I could try to refactor this static method into a instance method in some “FormattingService” and inject it as dependency everywhere I need but the issue is that it is not used just in other services, it is used in simple model classes too. I want to avoid having to go through all of the code base and make sure that this is only “FormattingService” would only get called from other service.

One solution to this problem that I have thought of is to use service locator (anti?)pattern. So, after changes, Format method might look like this:

public static string Format(decimal value, UnitType unit) {     ...     if(unit == UnitType.Currency)     {        var service = ServiceLocator.GetService<IUserSettingsService>();        return service.CurrencySymbol + value; // Simplified     }     ... } 

Is this a good solution for this case? Is there something you would do differently?

Windows 10 Overrides boot settings in UEFI BIOS, requires Live CD fix to repair

I have been dual booting for years now and have problem I can’t seem to solve myself. As we all know Windows is an arrogant dick, and in my case whenever I chose to boot to it it will, automatically without asking me, alter my boot up settings in my BIOS and make itself de-facto king. Mildly annoying as all I had to do with enter setup, change the boot order and carry on.

Now however it is ALSO deleting the grub entry option in my BIOS, meaning I need to load a Live-USB and perform a boot repair (or what have you) to fix it. Long winded just to fix grub.

Now, several questions:

  1. How do I stop Windows 10 from doing this? (would fix all my problems)
  2. Else, since this never used to happen, is there a way of remaking the Grub boot option in my BIOS without a long winded string of commands to reinstall grub? (why is the grub option now not sticking around)
  3. Would I be better of not using EFI boot options if possible (all of my disks are less than 1TB) if that’s possible.

Using an AsRock Z77 Extreme 4 motherboard. Have 3 SSD’s laid out like this currently (in case my method is just wrong someone can correct me):

  1. Disk A is 240GB and used for Windows. I left 550MB free for another EFI partition and let Windows do it’s thing with the rest of the drive.
  2. Disk B is 120GB and used for root, and it has a ‘backup’ partition on there (not required by either OS on boot).
  3. Disk C can be ignored essentially, 1 partition, mounted to /home and used only by Linux.

    NAME FSTYPE SIZE MOUNTPOINT LABEL sda 238.5G
    ├─sda1 16M
    ├─sda2 ntfs 237.9G
    └─sda3 vfat 525M /boot/efi
    sdb 119.2G
    ├─sdb1 ext4 62G /media/root/Furnace Furnace └─sdb2 ext4 39.4G /
    sdc 477G
    └─sdc1 ext4 477G /home

What do now?

My iPhone app requires sellers to verify their email address and phone number, when should I do that?

I searched User Experience before posting this question. I saw a lot of related questions but not this one in particular. My organization is creating an app that permits users to sell a service or a good. The user downloads our free iPhone app. Before they can proceed to use the app, before they can do anything at all, they must create an account.

We permit oath through Facebook (permitting them to create an account with a single button press).

We also permit them to enter their name (first name and last name though we are thinking about using just one field for the user’s name), we require them to enter their email address and their phone number (for SMS).

My question is: When should we do that?

My gut instinct/intuition is that the least annoying thing to do is to ask the user to verify their email address and phone number right away, immediately before we let them do anything. We are already requiring them to make an account — why not immediately require them to verify their email and phone number before we let them do anything, even access the account.

Another member of my team feels very strongly the other way. He feels that we let them create their account (either via OAUTH via Facebook or by entering in their email and phone number), but that we do not require them to execute verification until we need it, like when they go to create a posting for the good or service they are selling through our app.

Presently there is no version of the app for consumers, just sellers, sellers use the app to communicate directly with consumers who get text messages, etc. when they sign up with the given seller (believe it or not this method and methodology works as our sellers are grateful to have our platform for delivering their goods and services and getting paid for them.)

So, should we:

A. Execute email and phone number verification right away and require that they perform email and phone number verification right away.

OR

B. When they create the account we send them email and phone number verification but we do not require them to complete it until we need it — like when they go to make their first posting.

I like requiring it right a way for a variety of reasons, including, frankly it is easier and less complicated to do first before we let them into the app.

But is it a better user experience if they can setup their account right away, get the verification right away, but do not haver to complete it until we need it (like when they make a posting)?

Help with our design issue is greatly appreciated.

MacBook Pro won’t connect to wi-fi, with correct password. Error: “The Wi-Fi network requires a WPA2 password”

I’m trying to connect to my home wifi. When I enter the correct password, I get the message “The Wi-Fi network requires a WPA2 password”. I verified the password is correct in my router configuration (http://192.168.1.254)

Details: MacBook Pro 2017, macOS Mojave 10.14.2

I restarted my modem/router combo, restarted my MacBook, tried removing the home wifi and re-adding it (under System Preferences > Networks > Advanced > Preferred Networks), and changed my wi-fi password. Nothing works. My wifi name (SSID) doesn’t have any special characters either.

I have another MacBook Pro 2015 and an iPhone that can connect to my home wifi with no problems. So, it seems issue seems to be particular to this device (MacBook Pro 2017) in combination with my home network. This device has no problems connecting to other wifi networks (my office wi-fi, airport wifi, etc.)

Anyone ever faced this issue before?