networking – EC2 instance doesn’t show up in AWS Systems Manager

I am trying to create an EC2 instance (Amazon Linux, so I shouldn’t have to configure the SSM agent as it should be autoconfigured) in a private subnet, and want to be able to SSH into it. According to this post I have to use AWS Systems Manager for this. I’ve done quite a bit with codestar/beanstalk before, but now simply want to be able to create and delete everything via the AWS CLI manually for learning purposes.

Here are the commands I’m able to run fine (the ec2 instance is created succesfully with my role)

aws iam create-role --role-name ec2-role --assume-role-policy-document file://roles/ec2-role.json
aws iam attach-role-policy --role-name ec2-role --policy-arn "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
aws iam create-instance-profile --instance-profile-name ssm-instance-profile-for-ec2-instances
aws iam add-role-to-instance-profile --instance-profile-name ssm-instance-profile-for-ec2-instances --role-name ec2-role

// Creating the EC2 instance
aws ec2 run-instances --image-id ami-0db9040eb3ab74509 --count 1 --instance-type t2.micro --key-name key-pair-for-instance1 --subnet-id <my_valid_subnet_id> --iam-instance-profile Name=ssm-instance-profile-for-ec2-instances

I took parts of these commands from this post.

My json file for ec2-role:

{
  "Version": "2012-10-17",
  "Statement": (
    {
      "Effect": "Allow",
      "Principal": { "Service": "ec2.amazonaws.com"},
      "Action": "sts:AssumeRole"
    }
  )
}

Unfortunately this instance isn’t visible in the SSM (Systems Manager):

aws ssm describe-instance-information
{
    "InstanceInformationList": ()
}

I have been following the main documentation on SSM and from what I understand from the page below is that all you would need is the AmazonSSMManagedInstanceCore policy:
https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-getting-started-instance-profile.html

The web console hasn’t been any help so far, according to this page it treats roles and instance-profiles as the same thing.

What am I missing here to be able to use the aws ssm command to start an ssh session?

javascript – Need to get data from product page to a cart as a slider side panel and have mysql database data show up my fields

products page -> goes to Cart page From(Add to Cart button) When pressed, it sends customer to Cart Page which should be visible as a slider panel which holds the Cart Data for Add to Cart Entry includes quantity, price, picture thumb, and total price with a checkout button going to Paypal Checkout. Working with mysql database (products table) and PHP and javascript / CSS as my landing pages.

plugins – Implemented InnerBlocks but WordPress didnt support it; now the block doesnt show up

Hey Guys I am trying to get a hold on Gutenberg and I tried to follow some course online about it. Instead of adding the blocks in one return render I saw that I can use Innerblocks templates. I tried to implement this feature but I got an error that showed up and cant find again. I cant find it because of my custom block that is not showing up. I tried to turn of my plugin and turned off the innerblocks and used RichText again but that didnt work.

This is my edit.js

/**
 * Retrieves the translation of text.
 *
 * @see https://developer.wordpress.org/block-editor/packages/packages-i18n/
 */
import { __ } from '@wordpress/i18n';

/**
 * React hook that is used to mark the block wrapper element.
 * It provides all the necessary props like the class name.
 *
 * @see https://developer.wordpress.org/block-editor/packages/packages-block-editor/#useBlockProps
 */
import { RichText, useBlockProps } from '@wordpress/block-editor';
import { InnerBlocks } from "@wordpress/block-editor/build/components";


// const MY_TEMPLATE = (
//  // ( "core/image", {} ),
//  ( "core/heading", { placeholder: "Giveaway Title" } ),
//  ( "core/paragraph", { placeholder: "Giveaway Description" } ),
//  ( "core/button", { placeholder: "Call to Action" } )
// )

/**
 * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.
 * Those files can contain any CSS code that gets applied to the editor.
 *
 * @see https://www.npmjs.com/package/@wordpress/scripts#using-css
 */
import './editor.scss';

/**
 * The edit function describes the structure of your block in the context of the
 * editor. This represents what the editor will render when the block is used.
 *
 * @see https://developer.wordpress.org/block-editor/developers/block-api/block-edit-save/#edit
 * @param {Object} (props)           Properties passed from the editor.
 * @param {string} (props.className) Class name generated for the block.
 *
 * @return {WPElement} Element to render.
 */
export default function Edit( { className, attributes, setAttributes } ) {
    return (
            <div className={className}>
                <RichText
                    tagName="h2"
                    placeholder="Giveaway Title"
                    value={attributes.title}
                    onChange={ (title) => setAttributes( {title}) }
                    style={{color: attributes.titleColor}}
                />
                <RichText
                        tagName="p"
                        placeholder="Giveaway Description"
                        value={attributes.description}
                        onChange={ (description) => setAttributes( {description}) }
                        style={{color: attributes.descriptionColor}}
                />
            </div>

            // <div className={className}>
            //      <InnerBlocks template={MY_TEMPLATE} />
            // </div>
    );
}

My attributes are located in index.js

registerBlockType( 'create-block/mienshao-giveaway', {

    /*
        TODO: Custom Gutenberg slider in the making

        attributes: {
            slider: {
                source: html,
                selector: div,
                default:{
                    arrows: false,
                    circles: true
                }
            }
        }

     */

    attributes: {
        title: {
            type: 'string',
            source: 'html',
            selector: 'h2'
        },
        titleColor: {
            type: 'string',
            default: '#333'
        },

        description: {
            type: 'string',
            source: 'html',
            selector: 'p'
        },

        descriptionColor: {
            type: 'string',
            default: '#333'
        },
        accounts: {
            default: {
                twitter: false,
                tweet: false,
                youtube: false,
                facebook: false
            }
        },
        // define twitter object. Only allow the user to edit text and account attributes
        twitter: {
            default: {
                text: '',
                account: ''
            }
        },
        tweet: {
            default: {
                text: '',
                message: '',
                url: ''
            }
        },
        youtube: {
            default: {
                text: '',
                url: ''
            }
        },
        facebook: {
            default: {
                text: '',
                url: ''
            }
        }
    },

I would like to know why my Gutenberg block isnt even recognized or doesnt want to render either variations.

calculus – Show that $lim_{epsilonrightarrow0}y_epsilon(x)=delta(x)$

For $y_epsilon=frac{e^{frac{-x}{epsilon}}}{e^{frac{2}{epsilon}}}(e^{frac{2}{epsilon}}-e^{frac{2x}{epsilon}})$ prove it converges to dirac’s delta as ${epsilonrightarrow0}$.
Answer:
It is sufficient to prove $frac{1}{epsilon}lim_{epsilonrightarrow0}int_0^x y_epsilonphi(x)dx=phi(0)$, for any $phi(x)in(0,1)rightarrowmathbb{R}, phiin C_c(mathbb{R})$.
The $frac{1}{epsilon}lim_{epsilonrightarrow0}int_0^x y_epsilon dx=1$, after some calculations. Therefore I can take $frac{1}{epsilon}lim_{epsilonrightarrow0}int_0^x y_epsilon(phi(x)-phi(0))dx$.
But can I use continuity? How can I know that $lvert x-0rvert<delta$?

complexity theory – Show that NL ⊆ P

$textsf{PATH}$ is in $textsf{NL}$, because to solve it, you just need to keep in memory the current vertex you are in, and guess (non-deterministicaly) the next one on the path until you reach your destination. Since you keep the current vertex $v$, numbered from $0$ to $|V| – 1$, you need a memory space corresponding to the binary encoding of $v$, which is at most $1 + log_2(|V| – 1)$. You also need to keep the potential adjacent vertex of $v$, next in the path.

All in all, a Turing Machine solving this problem would only need $O(log |V|)$ additionnal space memory (the memory of the graph and of the starting vertex and the destination vertex of the path you are guessing are not considered in the memory used, because they are part of the input).

$textsf{PATH}$ is $textsf{NL}$-hard, because to solve any $textsf{NL}$ problem, you have to determine if there exists a sequence of possible transitions from the initial configuration to an accepting configuration in the Turing Machine of the problem. If you consider a graph of the possible configurations (where there exists an edge from a configuration $alpha$ to a configuration $beta$ if and only if one can go from $alpha$ to $beta$ in one transition in the Turing Machine), then solving the $textsf{NL}$ problem is the same as solving $textsf{PATH}$ in the graph of possible configurations.

You then need to prove that the graph of configurations can be constructed in logarithmic additionnal space. This can be done, because if a non-deterministic Turing Machine works in space $s(n)$, then the number of possible configurations is $2^{O(s(n))}$. Considering the binary encoding of those configurations, one can determine if there exists an edge between two configurations in deterministic space $O(s(n))$.

Now, since $textsf{PATH}$ is solvable in polynomial time (with a graph traversal algorithm, for example), that means that any $textsf{NL}$ problem is solvable in polynomial time (via the $textsf{NL}$-completude of $textsf{PATH}$), so $textsf{NL}subseteq textsf{P}$. This stands true, because if a Turing Machine uses $s(n)$ space memory, then it has at most $2^{O(s(n))}$ configurations, and exploring all of them takes time $2^{O(s(n))}$. Since $s(n) = log n$ for problems in $textsf{NL}$, the total time is indeed $n^{O(1)}$.

kql – Show a filtered document library from Sharepoint site to another site (same intranet)

I’m trying to design a site in our intranet to show documents related to our department. I want to show documents in libraries/folders/lists from the main site on our site and be able to filter them depending on the Properties (columns in the libraries/folders/lists) they are defined with (for example “Process”, “Document Type” & “Target Group”).
I try to use a Higlighted Content web part and write a query with KQL. However i cannot access them as i hoped, for example:

Process: "Standards"

I’ve read that they must be Queryable and such, but how do i find that out? I have no admin access to the main site and cant seem to find the info.

dnd 3.5e – Should I show the health of enemies?

Levels of injury should be what you describe as rule. Almost all of the answers so far describe perfectly fine ways to do this.

Regarding the question of exposing exact monster stats (HP, etc.) the answer should generally be an emphatic “NO!” to showing or telling HP, AC, or stats for one very specific reason — you completely lose the ability to fudge combat numbers as a DM.

This ability is of the utmost importance to having a fun session.

Running a game, you will inevitably run into a situation where something has gone wrong and combat is too easy or too difficult. Usually, this is because:

  • Players misinterpreted or overlooked something essential to the encounter.
  • Someone makes a series of REALLY bad rolls.
  • There is a serious “Oops!” regarding the difficulty of the monsters or villain.
  • There is a serious “Oops!” regarding the combat abilities of one or more player
    characters or friendly NPCs.

You will need to correct this by fudging. You can, of course, introduce a third party, power or situation to assist the players or NPCs, but if you do that more than a few times, you players will notice and it will decrease their enjoyment of the game.

Exposing exact HP or monster stats at any time makes this preferable kind of number fudging essentially a non-option. You are stuck “playing by the rules” all the time. This creates a significant lack of control over your own game.

DM (sighing) : “Nope, Phil, your dead. I rolled a 20, you can see the dragon’s combat bonus, and you only had 10 HP left. Sorry.”

If you choose to hide stats so you can fudge numbers, however, you have a number of benefits, including:

  • Relieving unintended tedious combat via quick monster kills (Lowering HP or mild AC fudging.)

  • Protecting weak or unlucky characters/ non-party NPCs/needed villains (Lower monster combat bonus/HP fudging/mild AC adjustment)

DM : “It looks like a small, magic ring…very easily missed…”

  • Increasing action — It’s much less boring AND far more rewarding to describe a character’s last ditch effort to run up the back of a dragon to stab it in the eye, instantly killing it than it is to listen to a player bemoan the fact his or her character can only do 1d8 + 5 damage, and the dragons HP is still a 100 points to the good. (No fudging HP or AC! We all know the stats!)

  • Increasing tension — Don’t keep players hovering on the brink of death for every encounter but do push them a little once in a while. If your players have been smacking up on a monster, and the monster has been giving it right back to them, let them sweat a little bit. Adjust the monsters HP slightly so they have a small run of bad luck (a quick scare – can we kill it after all?) before letting them settle things with a mighty final blow.

  • It doesn’t mess with XP — Adjusting monster quantities on the fly can lead to experience imbalance (for or against players) as well as combat issues (merciless slog or legendary calkwalk). Adjusting HP, AC, and other monster stats during combat gives you the option to run your encounter with the exact creatures and XP amounts you intend WITHOUT radically altering difficulty or having to recalculate or fudge XP — MUCH more important topics to players than subtly juggling a few monster stats.

  • It creates interest — As a DM, don’t be opaque. If players encounter a werewolf and have no silver, a simple acknowledgement they need silver weapons (“Yeah, Phil, you need a silver weapon”) can save a lot of frustration. But throw them a curve ball by making a werewolf with higher than normal HP or have an almost full immunity to anything other than a particular kind of silver. If you expose the increased HP or better saves,however, you destroy some of the aura the players are likely feeling fighting a “new” old creature.

The only caveat to this is that frequent, almost non-stop fudging is usually a sign of poor encounter construction (you’re new to running a game, you’re terrible at math e.g. figuring out how much damage characters and NPC monsters can do to each other, or you’re deliberately building encounters heavy — 4e has this issue built in if you follow strict WotC printed rules).

Remember that fudging is not a substitute for well balanced game numbers and abilities! (player stats, monster stats and ALL in-game AC/DCs). Monsters with abilities to alter AC, regenerate HP, etc. also deserve special consideration since they do a sort of in-game fudging of initial stats already.

With all that said, you may get a majority of players that want open HP or monster stats… in which case you should give it to them. Good DMs listen to players.

But you should be absolutely clear (in your own mind, anyway) that this is a bad habit that brings down game play in general unless you or your players genuinely care more about rolling than most other things. Genuinely stat-focused players care mostly about their ability to be very successful, and monsters can have 10 HP or a 1000 HP… so long as stat-focused players can bring down a 1001 HP meteor to crush their enemies, they won’t care. Open monster stats, especially HP and AC, only make players worry more about stats and less about the world they are creating with you as DM.

You should be aware that often the people who root for open stats aren’t familiar with the advantages of hidden stats (such as the DM favoring them when they make a bad roll), are people who don’t trust the DM generally (players vs. DM style games, not the DMs well-though out world) or those who are rule lawyers who simply want an tweak/exploit advantage over the DM (“No, my character DOESN’T get hit because I have a +1 racial bonus for being a giant dick!”). This leaves you with a choice – play with hardcore math nerds (no judgements, many of these players are really nice people and like this play style) or show your players,though hermit-like with monster stats, you can be fair, honest, trusted to empower their characters, make the game fun and make combat descriptions as fun as stat juggling in the game. More importantly, remember open stats hinder everyone, not just the DM. So if a player expresses a wish to do open stats, you may consider exploring why a player feels this way. There are DM screens for a reasons.

Unfortunately, player perceptions of you as a DM, your game, or their characters will suffer more in all cases if you can’t fudge numbers OR if players are certain you are fudging (e.g. they can verify it with open HP, AC, bonuses or stats.) Worst case scenarios will yield copious complaints by the players, with vows against their character sheets, swearing at monsters stats, condemning random dice rolls, questions about your “skills” as a DM as well as final, solemn resolution NEVER to play again…

On the other hand, with hidden stats (and some DM rolls), minimal judicious fudging, and well planned encounters, you generally get happy players who want to actually play in another game you are hosting, assuming you aren’t crafting monster stats specifically to hammer them.

The bottom line is you can empower players MORE (without them knowing) if you hide stats. It also allows you to craft better stories or encounters on the fly. Some players may hem and haw, but if you are a good DM and can convince them to take a hidden stat approach that makes them feel a bit little more powerful than your creatures, in the end, you will find few players complain.

So you decide… which is better?

As for your second question, descriptiveness is a great tack here. But rolls and fudging work too.

DM : “You pierce the creatures skin, but watch in horror as its wounds close almost instantaneously… like magic.” (Your first hint.)

After a few turns, and a goodly number of hints later, if the players still haven’t gotten the idea to use magical weapons, either tell them fairly directly (“None of you are certain, but you suspect that perhaps, maybe, an enchanted weapon might harm the creature.”) or allow Wisdom checks of some kind (Intelligence can work as well).

Note this assumes no one is actively using magical weapons. Make sure to give them any enchanted weapons you want them to have. If they are using the proper magical weapons, you should make every attempt to exaggerate and highlight a successful hit. A great part about hidden monster stats here is that, again, if you wish, you can fudge a successful hit with a magic weapon to demonstrate it is the only one that does damage by ignoring AC for a minute. This is literally impossible to do if the players know the monsters AC upfront. Smart players will figure its general AC out through a few successful rolls, but this is not the same thing as knowing definitively.

How add a custom layout to show in the select of page ( Custom Layout Update)

i have a page with URL my-name and create a block, but where create a file in /app/design/frontend/Vendor/theme/Magento_Cms/layout/cms_page_view_selectable_my-name_myname.xml i need relationship the block with my page in that select page.

How to show all formulas (Sum, Avg, count) in Google Sheets when you select multiple cells

Currently, when you select multiple cells, only 1 function is shown on the bottom right corner, either SUM or MIN or MAX or COUNT.

How can I make it so that I quickly see all functions at once?

inequality – For $a,b gt 0$, show that if $a^3 gt b^3$ then $a gt b$ (without using the difference of two cubes formula)

For $a,b gt 0$, show that if $a^3 gt b^3$ then $a gt b$.

I can see that one approach is to use the formula for the difference of two cubes (coupled with a field property).

E.G.

$a^3 gt b ^3 implies a^3 – b^3 in P$, where $P$ is the set of positive real numbers.

$a^3 – b^3 = (a-b)(a^2+ab+b^2)$.

$a^2+ab+b^2 in P$, which means that $a-b$ must be as well.

However, I am hoping someone could provide a different method just so I can see how people play around with inequality proofs.

I tried to build a chain of inequalities to carry out a transitivity argument, but I am not having any luck.

Thank you ~