## According to the Rules Compendium can I charge through a square that would hamper my movement as long as it isn’t difficult terrain?

Relevant text

INITIATING A CHARGE

If you don’t have line of sight to the opponent you want to charge at the start of your turn, you can’t charge that foe. To charge, you must move at least 10 feet (2 squares) and can move up to double your speed. You must be able to reach the closest space from which you can attack the designated opponent. This movement must occur before your attack. If any line from your starting space to the ending space passes through a square that blocks movement, is difficult terrain, or contains a creature (not a helpless one), you can’t charge. You can’t charge if the ending space is occupied or blocked. Since you move to charge, you can’t take a 5-foot step during the same turn. You provoke attacks of opportunity as normal for your movement.
(Rules Compendium p.27)

It seems that squares that aren’t difficult terrain, that only hamper movement but not block it are legal.

This would include Obstacles, Poor visibility (Any time you can’t see at least 60 feet in the prevailing conditions of visibility), and Squeezing.

Also some spells cause hampered movement that isn’t difficult terrain.

## re: Square – Take payments with a customized UI

it states: "use the Square Payment Form and Transactions API to add a PCI-compliant payment form to your own checkout page. Customize the Square Payment Form with CSS and HTML, and add a digital wallet support with Apple Pay, Masterpass, and Google Pay buttons.

Square Payment Form encodes the payment card information in a secure token that you send to your own server-side…

re: Square – Take payments with a customized UI

## cheap Square Tin Box

0.23MM Printing: 4 color printing varnish, coated with food grade gold oil, do wrinkle oil, explosive oil, dumb oil and other process printing. Embossing: Available Spot glossy: Available Class：Square Tin We are professional Square Tin, Square Tins, Square Box,…cheap Square Tin Box

## Cube not square and being clipped horrendously, color doesn’t apply

I’m trying to create my own object-oriented graphics library and use it to make a ping-pong game. I am following some tutorials online, and one uses old-style code with individual calls to glVertex, and the new stuff uses VBOs.

I have a project you can clone; it’s available here:

https://github.com/awildtechno/ping

pingpong.py is the entry point. Run pip install -r requirements.txt, python pingpong.py to see the issue. The box seems to be deformed to the aspect ratio and it’s clipping severely. It also doesn’t use the color I passed in.

In line 31, if you switch VBOGameLoop for just GameLoop, you will get a nicely formed colorful cube using the same vertexes. There are a lot of trash files hanging out as a result of the switch, so I’ve cut out the code below. The relevant files are Shape3D.py, Rect2D.py VBOGameLoop.py, and of course pingpong.py.

This is a trimmed down version of the relevant PyGame/PyOpenGL code:

Setup:

# PyGame Init pygame.init() gameDisplay = pygame.display.set_mode((WIDTH, HEIGHT), pygame.DOUBLEBUF|pygame.OPENGL) pygame.display.set_caption('Ping Pong') clock = pygame.time.Clock()  drawables = {cube(1, Point3D(-.5, -.5, .2))}  # Point3D is just a wrapper for vectors. glEnable(GL_POLYGON_SMOOTH) # glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST) glEnable(GL_BLEND) glEnable(GL_DEPTH_TEST)  # initial translation/camera angle glTranslate(0., 0., -2)   glRotate(0., 0., 0., 0.) 

Main loop:

    gluPerspective(0, (display.get_width() / display.get_height()),                    .05,                    100.)     glClearColor(.2,.2,.2,1)      # Main Loop #####################################     self.exit_flag = False     while not self.exit_flag:         for event in pygame.event.get():             if event.type == pygame.QUIT:                 pygame.quit()                 quit()             if event.type in self._event_handlers:                 self._event_handlers[event.type](self, event)          # clear the screen         glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT)          # Render all the things         for d in self.drawables:             verticies, shader, mode = d.to_renderable()             vbo = VBO(verticies)             try:                 # Add the VBO to gfxcard memory                 shaders.glUseProgram(shader)                 assert not glGetError()                 try:                     vbo.bind()                     glEnableClientState(GL_VERTEX_ARRAY)                     glVertexPointerf(vbo)                     glDrawArrays(mode, 0, len(verticies))                 finally:                     # Release the VBO memory in the graphics card                     vbo.unbind()                     glDisableClientState(GL_VERTEX_ARRAY)             finally:                 # Remove the shader                 shaders.glUseProgram(0)           pygame.display.flip()         clock.tick(clock_rate) 

Raw vertex data being passed into VBO:

[[-0.5 -0.5  0.2]  [-0.5  0.5  0.2]  [ 0.5  0.5  0.2]  [-0.5 -0.5  0.2]  [ 0.5  0.5  0.2]  [ 0.5 -0.5  0.2]  [-0.5  0.5  0.2]  [-0.5  0.5  1.2]  [ 0.5  0.5  1.2]  [-0.5  0.5  0.2]  [ 0.5  0.5  1.2]  [ 0.5  0.5  0.2]  [-0.5 -0.5  1.2]  [-0.5 -0.5  0.2]  [ 0.5 -0.5  0.2]  [-0.5 -0.5  1.2]  [ 0.5 -0.5  0.2]  [ 0.5 -0.5  1.2]  [-0.5 -0.5  1.2]  [-0.5  0.5  1.2]  [-0.5  0.5  0.2]  [-0.5 -0.5  1.2]  [-0.5  0.5  0.2]  [-0.5 -0.5  0.2]  [ 0.5 -0.5  0.2]  [ 0.5  0.5  0.2]  [ 0.5  0.5  1.2]  [ 0.5 -0.5  0.2]  [ 0.5  0.5  1.2]  [ 0.5 -0.5  1.2]] 3 GL_TRIANGLES (4) 

    color=(.5, .5, .5, 1.0)     # irrelevant stuff         # Create the C code for the vertex shader.         vshader = shaders.compileShader("""#version 120         void main() {             gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;         }""", GL_VERTEX_SHADER)         # Create the C code for the fragment shader.         fshader = shaders.compileShader("""#version 120         void main() {             gl_FragColor = vec4""" + self.color.__str__() + """;         }""", GL_FRAGMENT_SHADER)         # Have openGL compile both shaders and save the result.         self.shader = shaders.compileProgram(vshader, fshader) 

I presume I’m misusing something about gluPerspective?

## Square root of fraction returns mathematical error

The error I get from the calculation

When I try to calculate the square root of a fraction using a calculator, I get a mathematical error. (see link to image) Why is this an apparently invalid operation?

## Solving recurrence relation with square root

I am trying to solve the following recurrence relation :-

$T(n) = T(\sqrt{n}) + n$ using masters theorem.

We can substitute $n = 2 ^ m$

$T(2^m) = T(2 ^ {\frac{m}{2}}) + 2^m$

Now we can rewrite it as

$S(m) = S(\frac{m}{2}) + m$

The complexity of the above recurrence will be $O(m)$

Hence, $T(n) = T(2^m) = S(m) = O(m)$ .

So we can say that $T(n) =O(\log n)$ as $n=2^m$ .

But the answer is $O(\log\log n)$ . What is wrong with my approach ?

## What is topology of all Square matrices such that matrix times it transpose is diagonal

What is the topology of the subspace $$X_n\subset M_n(\mathbb R)$$ consisting of all non-zero $$n\times n$$ matrices $$A$$ such that $$A^t A$$ is diagonal ? For example $$X_2$$ is the product of a torus and an interval. Is $$X_n$$ a manifold ? Reference sought.

## Find 4 points which form a square with the biggest area

I have set of points on the coordinate plane. I need to find the 4 points which form a square with the biggest area.

I’m new in JavaScript so I’d like to get any suggestions about code style, patterns, code idioms, etc. Thank you in advance!

"use strict";  /*  * Point  */  (function() {     function numbersEqual(a, b) {         return Math.abs(a - b) < Number.EPSILON;     }      function Point(x, y) {         this.x = x;         this.y = y;     }      Point.distance = function(a, b) {         return Math.sqrt((a.x - b.x) ** 2 + (a.y - b.y) ** 2);     }      Point.equal = function(a, b) {         return numbersEqual(a.x, b.x) && numbersEqual(a.y, b.y);     }      Point.pointsFormsQuadrangle = function(a, b, c, d) {         if (Point.equal(a, b) || Point.equal(a, c) || Point.equal(a, d))             return false;          if (Point.equal(b, c) || Point.equal(b, d))             return false;          if (Point.equal(c, d))             return false;          const center = new Point((a.x + b.x + c.x + d.x) / 4, (a.y + b.y + c.y + d.y) / 4);          const ac = Point.distance(a, center);         const bc = Point.distance(b, center);         const cc = Point.distance(c, center);         const dc = Point.distance(d, center);          return numbersEqual(ac, bc) && numbersEqual(bc, cc) && numbersEqual(cc, dc);     }      Point.pointsFormsSquare = function(a, b, c, d) {         if (!Point.pointsFormsQuadrangle(a, b, c, d))             return false;             const ab = Point.distance(a, b)         const ac = Point.distance(a, c);         const ad = Point.distance(a, d);         const triangle = [ab, ac, ad].sort((a, b) => a - b);          return numbersEqual(triangle[0], triangle[1]);     }      window.Point = Point; })();  /*  * Square  */  (function () {     function Square(a, b, c, d) {         this.a = a;         this.b = b;         this.c = c;         this.d = d;     }      Square.prototype.area = function() {         const findSquareDiagonalLength = (a, b, c, d) => {             const ab = Point.distance(a, b);             const ac = Point.distance(a, c);             const ad = Point.distance(a, d);              return Math.max(ab, ac, ad);         };          const d = findSquareDiagonalLength(this.a, this.b, this.c, this.d);         return d * d / 2;     }      window.Square = Square; })();  /*  * Solution  */  function formSquaresFromPoints(points) {     let squares = [];      for (let a = 0; a < points.length; a++)         for (let b = a + 1; b < points.length; b++)             for (let c = b + 1; c < points.length; c++)                 for (let d = c + 1; d < points.length; d++)                     if (Point.pointsFormsSquare(points[a], points[b], points[c], points[d]))                         squares.push(new Square(points[a], points[b], points[c], points[d]));      return squares; }  function sortSquaresByArea(squares) {     squares.sort((a, b) => {         if (a.area() > b.area())             return 1;         else if (a.area() < b.area())             return -1;         else             return 0;     });      return squares; }  const POINTS = [     new Point(1, 1),     new Point(1, 3),     new Point(3, 1),     new Point(3, 3),     new Point(1, 6),     new Point(6, 1),     new Point(6, 6),     new Point(1, 9),     new Point(9, 1),     new Point(9, 9),     new Point(4, 5),     new Point(4, 8),     new Point(7, 8),     new Point(7, 5),     new Point(6, 3),     new Point(5, 3),     new Point(5, 1) ];  const sortedSquares = sortSquaresByArea(formSquaresFromPoints(POINTS)); const squareWithBiggestArea = sortedSquares[sortedSquares.length - 1];  console.log(squareWithBiggestArea); // Gives: {(1, 1), (1, 9), (9, 1), (9, 9)} 

## Absolute difference of sum of diagonals in a square matrix [on hold]

WHY IS THIS NOT WORKING? Please review this code

#include<stdio.h> #include<stdlib.h>  int main() {     int n,i,j;     int sum1,sum2 = 0;     int diff; 

Input for the size of array

    scanf("%d\n",&n);      int arr[n][n];      for(i=0;i<n;i++){         for(j=0;j<n;j++){ 

Inputs to the array

            scanf("%d\n",&arr[i][j]); 

sum of primary diagonal elements

            sum1 += arr[i][i]; 

sum of secondary diagonal elements

           sum2 += arr[i][n-1-i];           }     } 

This calculates the absolute difference

    diff = abs(sum1-sum2);      printf("%d",diff);     return 0; } 

## square root of 9 said to be a natural number

I have seen a lot of references of the fact that the square root of nine is a natural number. On the account that the square root of nine is 3.

However, in “my book”, the square root of nine is plus or minus 3 and that is not a natural number. Is there anything wrong with my statement?

Thanks, elsvieta