Picking a domain

Hello guys! I have purchased domains before, but I was wondering how do you pick domain names for your projects online? Do you buy multiple TLD's to redirect your audience to one website? What TLD is best for memorability? Thanks!

Mobile phone is picking up 13 bluetooth devices and not sure what they are?

I have a particular problem with a potential security breach. I bought a new device today that connects to my phone via Bluetooth. Nothing strange about that.

Surprisingly when I turned Bluetooth on with my phone and set it to search for discoverable devices, it came up with 12 Bluetooth devices that I have no idea what they are.

I entered one of the MAC addresses into a MAC address database, and none of the addresses was recognised. Wondering if I had made a mistake, I put the MAC address of the mobile phone, and it correctly showed that it was made by OnePlus.

I’m somewhat concerned about why there are so many Bluetooth devices around my computer working area and would love to hear some advice on what I can do to try and discover what they are and what they are doing? I wouldn’t be so concerned if their MAC addresses resolved to a legitimate manufactorer but showing not found concerns me.

How would it unbalance gameplay to rule that Weapon Master allows for picking a fighting style?


For a new campaign I’m building a protector aasimar Kensei. We’re using the Point Buy system, so being an unarmored monk I managed to raise my default AC to 15 (17 with Agile Parry), at level 3 through: STR 10 DEX 15 CON 14 INT 8 WIS 16 CHA 10

At level 4 I was thinking of taking the Weapon Master feat, because I read online that it increases my Dexterity by 1, and let’s me gain a fighting style from the fighter class. So, by picking the Mariner fighting style at level 4, I could raise my AC with 2 in just one level-up! This fighting style, from Unearthed Arcana: Waterborne Adventures, grants:

As long as you are not wearing heavy armor or using a shield, you have a swimming speed and a climbing speed equal to your normal speed, and you gain a +1 bonus to AC.

(Yes, the DM allows UA playtest material)

Now, unfortunately(!), we just discovered that according to the books Weapon Master actually doesn’t let you pick a fighting style… The Player’s Handbook states on page 170 about Weapon Master:

You have practiced extensively with a variety of weapons, gaining the following benefits:

  • Increase your Strength or Dexterity score by 1, to a maximum of 20.

  • You gain proficiency with four weapons of your choice. Each one must be a simple or martial weapon.


Both the DM and myself agree that, by RAW, Weapon Master is rather underwhelming as a feat. So intuitively, the unofficial addition of the fighting style doesn’t seem to be gamebreaking to us. If anything, it makes the Weapon Master feat actually worthwhile in specific cases (instead of almost never really being worth taking it). I would say the improved Weapon Master would be comparable to the Magic Initiate feat, because by RAW the latter offers options to “obtain useful class features without multiclassing”.

We think that taking a feat should be an investment worthy of not increasing ability scores with an additional point (especially when using the Point Buy system). However, we are unsure about how it could unbalance gameplay in ways we don’t foresee right now.


How would it unbalance gameplay to rule that Weapon Master allows for picking a fighting style, instead of four weapons?

To be clear, what does the DM need to keep in mind regarding encounter balance and player character options, when he allows the following emphasised addition to the feat:

You gain proficiency with four weapons of your choice. Each one must be a simple or martial weapon. Instead of gaining proficiency with four weapons, you may gain a fighting style of your choice from the fighter class.

A good answer addresses mechanical implications that makes this houserule balanced or imbalanced: in comparison to how Weapon Master functions by RAW, and compared to other feats. A good answer addresses this in the context of our specific table.

An excellent answer also shares experience from a table that allows this houserule, covers potential exploits and how it effects their game mechanically.

Possibly relevant details

  • I won’t be the only melee combatant in this party, composition so far: barbarian, monk (me), war cleric, wizard.

  • We start at level 3. If our characters survive, we’ll get to level 5 in just a few sessions (through milestones). After level 6 I’m seriously considering to multiclass into fighter, rogue or cleric. I plan to never wear any armor or a shield, so just wield the Kensei weapons.

  • The DM wants this setting to be leaning towards a “Ragtag band of adventurers”. He also prefers to keep mechanics balanced at the table, both for the players and him as DM. The campaign will be heavy on combat: we are holy crusaders.

Picking up environment-variables on Ubuntu vs. macOS

The brief hello.py

import os from flask import Flask from dotenv import load_dotenv  app = Flask(__name__) dotenv_path = os.path.join(os.path.dirname(__file__), '.env') load_dotenv(dotenv_path)   @app.route('/') def index():     SECRET_KEY = os.environ.get("SECRET_KEY")     DATABASE_PASSWORD = os.environ.get("DATABASE_PASSWORD")     return SECRET_KEY + DATABASE_PASSWORD + os.linesep 

picks up its environment from a .env file

export FLASK_APP=/home/ubuntu/tough/ export SECRET_KEY=ABCD export DATABASE_PASSWORD=EFGH 

After launching the server (using either flask run or gunicorn), asking for curl localhost:8000 reports the expected ABCDEFGH, the two env-vars picked up from .env.

So far so good.

Now we ask supervisor to launch hello.py for us

[program:hello] command=/home/ubuntu/venv/bin/gunicorn -b localhost:8000 hello:app directory=/home/ubuntu/tough/ user=ubuntu stdout_logfile=/home/ubuntu/tough/logs/hello_out.log stderr_logfile=/home/ubuntu/tough/logs/hello_err.log autostart=true autorestart=true stopasgroup=true killasgroup=true  [supervisord] logfile=/home/ubuntu/tough/logs/hello-supervisord.log pidfile=/home/ubuntu/tough/supervisord.pid 

Everything is perfectly fine on macOS (High Sierra). The two environment variables are picked up fine. But on Ubuntu (18.04) I get

File "/home/ubuntu/tough/hello.py", line 14, in index     return SECRET_KEY + DATABASE_PASSWORD + os.linesep TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType' 

What might be the difficulty of picking up env-vars on Ubuntu, one that doesn’t show up on Darwin?

Picking a random point along the edge of an area

I’m writing a Diffusion-limited aggregation simulation, and need to pick a random point along the edge of an area defined by a dimension pair of [width, height]. The point shouldn’t be deep within the area; it should always be on the border of one of the sides. This is the intended behavior:

(let [rand-gen (Random.)       dims [21 11]]    (dotimes [_ 25]     ; I'm casting to int so the output it legible     ;  I actually need doubles     (println       (mapv int (random-edge-coord dims rand-gen)))))  [13 0] [0 8] [15 10] [8 10] [20 0] [0 6] [20 2] [0 5] [7 10] [0 7] [0 10] [20 1] [6 0] [20 0] [0 2] [20 10] [15 0] [14 0] [7 0] [0 7] [12 0] [20 7] [20 4] [20 8] [20 4] 

This is the mess I came up with:

; These two functions are just for the sake of a MCVE (defn- random-boolean [^Random rand-gen]   (.nextBoolean rand-gen))  (defn- random-double [min, max, ^Random rand-gen]   (let [r (.nextDouble rand-gen)         spread (- max min)         rand (* spread r)]     (+ rand min)))  (defn random-edge-coord [dimensions, ^Random rand-gen]   (let [[w h] dimensions         vertical? (random-boolean rand-gen)         start? (random-boolean rand-gen)          x (if vertical?             ; Pick either the left or right edge             (if start?               0               (dec w))              ; Else, pick a random point along the top/bottom egde             (random-double 0 w rand-gen))          y (if vertical?             (random-double 0 h rand-gen)              (if start?               0               (dec h)))]      [x y])) 

The redundancy is killing me though. I can’t think of how to clean it up. I feel like this should be fairly straightforward to generalize, but I’m stuck. I figured I could clean it up introducing some anonymous functions:

(defn random-edge-coord [dimensions rand-gen]   (let [[w h] dimensions         vertical? (g/random-boolean rand-gen)         start? (g/random-boolean rand-gen)          edge #(if start? 0 (dec %))         rand-edge #(g/random-double 0 % rand-gen)          x (if vertical?             (edge w)             (rand-edge w))          y (if vertical?             (rand-edge h)             (edge h))]      [x y])) 

But that’s not a huge gain.

Any input here would be appreciated.

Facebook not picking up meta data and sharing logos from a different domain

We’re having an issue getting facebook to share the correct logo associated with the correct domain when we/followers share our content.

Currently we have these tags set up on our default drupal 7 domain.

<meta property="og:title" content="Permaculture Association"> <meta property="og:description" content="Change your World."> <meta property="og:image" content="https://example.com/sites/default/files/pa_logo_wide_1.png"> <meta property="og:url" content="https://example.com/"> 

However, this is what facebook is picking up: different logo file is picked up

This is from a different subdomain: https://foobar.example.com (we’re using the domains access module)

Has anyone experienced this issue and found a solution?

Kubuntu not picking up extender

Got a problem with kubuntu with not being able to connect to the Wi-Fi at times. It seems to be off and on but that it just due to the modem’s signal performance.

The issue is that while I have an extender much closer to my PC, all the OS can see is a feint signal (~4% at worse) and so will be unable to connect to the internet/Wi-Fi. I’d like to know how to get kubuntu to recognize its existence.

It’s not a problem with the extender or the adapter as both my phone and windows on the same PC work just fine. Hope you have some ideas, and thanks in advance.

EDIT: I may have been getting the same problem in Arch linux a few weeks ago that I was never able to solve the problem too there either…if that helps any.

Optimize color picking part of code for Minesweeper game in Windows forms app

I am making a minesweeper for school in c# windows forms app. The problem that i have is that i can’t find a way to optimize my code. The program works. I just need some help with optimizing the code. This is code I currently have:

This part is used to determine which buttons get what color. I start with making a list of all buttons that need a color. Then I get the number off 4 buttons randomly for the color red. Which I then use to calculate what 4 buttons around 1 red number they have. After that i give them the right color.

private void ShuffleMines()     {         //makes list of all buttons in groupbox         List<Button> listButtons = new List<Button>         {             button1, button2, button3, button4, button5,             button6, button7, button8, button9, button10,             button11, button12, button13, button14, button15,             button16, button17, button18, button19, button20,             button21, button22, button23, button24, button25         };          //makes a new random         Random rnd = new Random();         //selects randoms button numbers from list         int red1 = rnd.Next(listButtons.Count);         int red2 = rnd.Next(listButtons.Count);         int red3 = rnd.Next(listButtons.Count);         int red4 = rnd.Next(listButtons.Count);          int orange1Def1 = red1 - orange1;         int orange1Def2 = red1 + orange1;         int orange1Def3 = red1 - orange2;         int orange1Def4 = red1 + orange2;          string orange1DefString1 = orange1Def1.ToString();         string orange1DefString2 = orange1Def2.ToString();         string orange1DefString3 = orange1Def3.ToString();         string orange1DefString4 = orange1Def4.ToString();          var orange1Button1 = string.Format("button{0}", orange1DefString1);         var orange1Button2 = string.Format("button{0}", orange1DefString2);         var orange1Button3 = string.Format("button{0}", orange1DefString3);         var orange1Button4 = string.Format("button{0}", orange1DefString4);          int orange2Def1 = red2 - orange1;         int orange2Def2 = red2 + orange1;         int orange2Def3 = red2 - orange2;         int orange2Def4 = red2 + orange2;          string orange2DefString1 = orange2Def1.ToString();         string orange2DefString2 = orange2Def2.ToString();         string orange2DefString3 = orange2Def3.ToString();         string orange2DefString4 = orange2Def4.ToString();          var orange2Button1 = string.Format("button{0}", orange2DefString1);         var orange2Button2 = string.Format("button{0}", orange2DefString2);         var orange2Button3 = string.Format("button{0}", orange2DefString3);         var orange2Button4 = string.Format("button{0}", orange2DefString4);          int orange3Def1 = red3 - orange1;         int orange3Def2 = red3 + orange1;         int orange3Def3 = red3 - orange2;         int orange3Def4 = red3 + orange2;          string orange3DefString1 = orange3Def1.ToString();         string orange3DefString2 = orange3Def2.ToString();         string orange3DefString3 = orange3Def3.ToString();         string orange3DefString4 = orange3Def4.ToString();          var orange3Button1 = string.Format("button{0}", orange3DefString1);         var orange3Button2 = string.Format("button{0}", orange3DefString2);         var orange3Button3 = string.Format("button{0}", orange3DefString3);         var orange3Button4 = string.Format("button{0}", orange3DefString4);          int orange4Def1 = red4 - orange1;         int orange4Def2 = red4 + orange1;         int orange4Def3 = red4 - orange2;         int orange4Def4 = red4 + orange2;          string orange4DefString1 = orange4Def1.ToString();         string orange4DefString2 = orange4Def2.ToString();         string orange4DefString3 = orange4Def3.ToString();         string orange4DefString4 = orange4Def4.ToString();          var orange4Button1 = string.Format("button{0}", orange4DefString1);         var orange4Button2 = string.Format("button{0}", orange4DefString2);         var orange4Button3 = string.Format("button{0}", orange4DefString3);         var orange4Button4 = string.Format("button{0}", orange4DefString4);          //makes the buttons name from the random button numbers         var redButton1 = string.Format("button{0}", red1);         var redButton2 = string.Format("button{0}", red2);         var redButton3 = string.Format("button{0}", red3);         var redButton4 = string.Format("button{0}", red4);          //set forecolor of the not selected buttons to green         foreach (Control item in groupBox1.Controls)         {             if (item.Name != redButton1 || item.Name != redButton2 || item.Name != redButton3 || item.Name != redButton4)             {                 item.ForeColor = Color.Green;             }         }          //set forecolor of the selected buttons for orange to right color         foreach (Control item in groupBox1.Controls)         {             if (item.Name == orange1Button1 || item.Name == orange1Button2 || item.Name == orange1Button3 || item.Name == orange1Button4 ||                 item.Name == orange2Button1 || item.Name == orange2Button2 || item.Name == orange2Button3 || item.Name == orange2Button4 ||                 item.Name == orange3Button1 || item.Name == orange3Button2 || item.Name == orange3Button3 || item.Name == orange3Button4 ||                 item.Name == orange4Button1 || item.Name == orange4Button2 || item.Name == orange4Button3 || item.Name == orange4Button4)             {                 item.ForeColor = Color.Orange;             }         }          //set forecolor of the selected buttons for red to right color         foreach (Control item in groupBox1.Controls)         {             if (item.Name == redButton1 || item.Name == redButton2 || item.Name == redButton3 || item.Name == redButton4)             {                 item.ForeColor = Color.Red;             }         }      }`