text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
‘Conjuring’ Universe Surpasses $1 Billion at Global Box Office. | 0non-cybersec
| Reddit |
Other data taking up to much space on mac, can't figure out what this other data is. <p>I found out my company's dropbox was syncing everything to my mac, I had selective sync on but somehow this changed. I then uninstalled dropbox to stop this syncing as choosing selective sync didn't seem to help. I then deleted my dropbox folder, and emptied trash can. But i still see 291 in other data being used up but that dropbox folder is gone. I have a feeling that is the dropbox data and didn't properly erase. </p>
<p><a href="https://i.stack.imgur.com/yWy3a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yWy3a.png" alt="Mac Storage"></a></p>
<p>What can i do to clean up files on macOS Catalina?</p>
| 0non-cybersec
| Stackexchange |
How to import external JS files into another JS file?. <p>I am currently trying to design my first 2D game, and am trying to clean up my syntax as much as possible. Below is the entire script that currently works. </p>
<p>Here is my problem!</p>
<p>I need to break this file up into manageable chunks and import them into a single main file that will be included in the head tag of the html. I did some research on ES6 and it seems this isn't entirely supported yet.</p>
<p>Is there anyway for me to break this script up into manageable pieces, include them in one main file that gets called by the webpage while keeping the current functionality?</p>
<p>Also, I am aware I could call multiple js files on the webpage but then I would just be calling multiple files to in the order the current script I have runs--doesn't seem like a solution to me.</p>
<p>Any and all help welcome! If you have a suggestion to make something here run better--please do! I just ask you include an example for me when you do -- it's easier for me that way.</p>
<pre><code>window.addEventListener("keydown", moveSomething, false);
//globals
var terrainLayer;
var playerLayer;
var terrainContext;
var playerContext;
var player = new Image();
player.src = "player.jpg";
var viewportWidth;
var viewportHeight;
var canvasWidth;
var canvasHeight;
var collisionID = [];
var interactID = [];
var tileSize = 32; // The size of a tile (32×32)
var playerRendered = false;
window.onload = window.onresize = function() {
////////////////////////////////////////////////////////
//window.onload = window.onresize = function() {
//canvas sizing resizing
////////////////////////////////////////////////////////
terrainLayer = document.getElementById('terrainLayer');
playerLayer = document.getElementById('playerLayer');
viewportWidth = window.innerWidth;
viewportHeight = window.innerHeight;
////////////////////////////////////////////////////////
//canvasWidth = (viewportWidth * .85);
//canvasHeight = (viewportHeight * .85);
//canvasWidth = (canvasWidth / (tileSize)) | 0; /////
//canvasWidth *= tileSize;
//canvasHeight = (canvasHeight / tileSize) | 0; /////
//canvasHeight *= tileSize;
//scales canvas based on current browser window size
////////////////////////////////////////////////////////
canvasWidth = 960;
canvasHeight = canvasWidth / 2;
terrainLayer.style.position = "absolute";
terrainLayer.setAttribute("width", canvasWidth);
terrainLayer.setAttribute("height", canvasHeight);
terrainLayer.style.top = (viewportHeight - canvasHeight) / 2 + "px";
terrainLayer.style.left = (viewportWidth - canvasWidth) / 2 + "px";
terrainContext = terrainLayer.getContext("2d");
playerLayer.style.position = "absolute";
playerLayer.setAttribute("width", canvasWidth);
playerLayer.setAttribute("height", canvasHeight);
playerLayer.style.top = (viewportHeight - canvasHeight) / 2 + "px";
playerLayer.style.left = (viewportWidth - canvasWidth) / 2 + "px";
playerContext = playerLayer.getContext("2d");
renderTerrain();
if (playerRendered !== true){
renderPlayer(0, 0);
playerRendered = true;
}else{
renderPlayer(player.xPos, player.yPos);
}
};
function renderPlayer(x, y) {
//player rendering
player.xPos = x;
player.yPos = y;
playerContext.clearRect(0, 0, canvasWidth, canvasHeight);
player.onload = playerContext.drawImage
(player,
0,
0,
246,
246,
player.xPos,
player.yPos,
tileSize,
tileSize);
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//dynamic resizing of player icon
//player.onload = playerContext.drawImage(player, player.xPos, player.yPos, (canvasWidth * 0.05), (canvasHeight * 0.1));
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
};
function renderTerrain () {
var layer_One = [79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79, 79];
var layer_Two = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 138, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var layer_Three = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, 198, 199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 213, 214, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229, 230, 231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245, 246, 247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var layer_Collision = [0, 0, 0, 0, 0, 0, 0, 81, 82, 0, 84, 85, 86, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 97, 98, 0, 100, 101, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var layer_Interactive = [0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 168, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 168, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 168, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var tilesPerRow = 30; // how many tiles per row to be rendered on canvas
function listToMatrix(list, elementsPerSubArray) {
var matrix = [], i, k;
for (i = 0, k = -1; i < list.length; i++) {
if (i % elementsPerSubArray === 0) {
k++;
matrix[k] = [];
}
if (list[i] >= 1)
{
list[i] = list[i] - 1;
}
matrix[k].push(list[i]);
}
return matrix;
}
var layerOne = listToMatrix(layer_One, tilesPerRow);
var layerTwo = listToMatrix(layer_Two, tilesPerRow);
var layerThree = listToMatrix(layer_Three, tilesPerRow);
var collisionLayer = listToMatrix(layer_Collision, tilesPerRow);
var interactiveLayer = listToMatrix(layer_Interactive, tilesPerRow);
//render layers as terrain
var tilesetImage = new Image();
tilesetImage.src = 'tileset.png';
tilesetImage.onload = drawTile;
var rowTileCount = 15; // The number of tiles in a row of our background
var colTileCount = 30; // The number of tiles in a column of our background
var imageNumTiles = 16; // The number of tiles per row in the tileset image
function drawTile() {
for (var r = 0; r < rowTileCount; r++) {
for (var c = 0; c < colTileCount; c++) {
var tileA = layerOne[ r ][ c ];
var tileRow = (tileA / imageNumTiles) | 0; // Bitwise OR operation
var tileCol = (tileA % imageNumTiles) | 0;
terrainContext.drawImage(tilesetImage, (tileCol * tileSize), (tileRow * tileSize), tileSize, tileSize, (c * tileSize), (r * tileSize), tileSize, tileSize);
tileB = layerTwo[ r ][ c ];
tileRow = (tileB / imageNumTiles) | 0;
tileCol = (tileB % imageNumTiles) | 0;
terrainContext.drawImage(tilesetImage, (tileCol * tileSize), (tileRow * tileSize), tileSize, tileSize, (c * tileSize), (r * tileSize), tileSize, tileSize);
tileC = layerThree[ r ][ c ];
tileRow = (tileC / imageNumTiles) | 0;
tileCol = (tileC % imageNumTiles) | 0;
terrainContext.drawImage(tilesetImage, (tileCol * tileSize), (tileRow * tileSize), tileSize, tileSize, (c * tileSize), (r * tileSize), tileSize, tileSize);
cTile = collisionLayer[ r ][ c ]; // collision layer
tileRow = (cTile / imageNumTiles) | 0;
tileCol = (cTile % imageNumTiles) | 0;
if (cTile > 0) // detecting objects on collision layer
{
var xD = (c * tileSize);
var yD = (r * tileSize);
xD = xD.toString();
yD = yD.toString();
aID = xD.concat(yD);
bID = parseInt(aID);
collisionID.push(bID);
}
terrainContext.drawImage(tilesetImage, (tileCol * tileSize), (tileRow * tileSize), tileSize, tileSize, (c * tileSize), (r * tileSize), tileSize, tileSize);
iTile = interactiveLayer[ r ][ c ]; // interactive layer
tileRow = (iTile / imageNumTiles) | 0;
tileCol = (iTile % imageNumTiles) | 0;
if (iTile > 0) // detecting objects on interactive layer
{
var xD = (c * tileSize);
var yD = (r * tileSize);
xD = xD.toString();
yD = yD.toString();
aID = xD.concat(yD);
bID = parseInt(aID);
interactID.push(bID);
}
terrainContext.drawImage(tilesetImage, (tileCol * tileSize), (tileRow * tileSize), tileSize, tileSize, (c * tileSize), (r * tileSize), tileSize, tileSize);
}
}
}
}
function moveSomething(e) {
var x;
var y;
switch(e.keyCode) {
case 37: //left
x = player.xPos - 32;
y = player.yPos;
if (trumpsWall(x, y) === false) {
if (collisionTile(x, y) === false){
renderPlayer(x, y);
}
}
if(interactiveTile(x, y) === true){
alert("INTERACTION!");
}
break;
case 38: //up
x = player.xPos;
y = player.yPos - 32;
if (trumpsWall(x, y) === false) {
if (collisionTile(x, y) === false){
renderPlayer(x, y);
}
}
if(interactiveTile(x, y) === true){
alert("INTERACTION!");
}
break;
case 39: //right
x = player.xPos + 32;
y = player.yPos;
if (trumpsWall(x, y) === false) {
if (collisionTile(x, y) === false){
renderPlayer(x, y);
}
}
if(interactiveTile(x, y) === true){
alert("INTERACTION!");
}
break;
case 40: // down
x = player.xPos;
y = player.yPos + 32;
if (trumpsWall(x, y) === false) {
if (collisionTile(x, y) === false){
renderPlayer(x, y);
}
}
if(interactiveTile(x, y) === true){
alert("INTERACTION!");
}
break;
}
}
function trumpsWall(x, y) {
var border = false;
if ((x < 0) || (y < 0)){
border = true;
}
if ((x > (terrainLayer.width - 32)) || (y > (terrainLayer.height - 32))) {
border = true;
}
return border;
}
function interactiveTile(xPos, yPos, interacts = false) {
xx = xPos.toString();
yy = yPos.toString();
intID = xx.concat(yy);
playerCoordinatesID = parseInt(intID);
for (var i = 0; i < (interactID.length); i++) {
if (playerCoordinatesID === interactID[i]) {
interacts = true;
break;
}
}
return interacts;
}
function collisionTile(xPos, yPos, collides = false) {
xx = xPos.toString();
yy = yPos.toString();
intID = xx.concat(yy);
playerCoordinatesID = parseInt(intID);
for (var i = 0; i < (collisionID.length); i++) {
if (playerCoordinatesID === collisionID[i]) {
collides = true;
break;
}
}
return collides;
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Query tags from InfluxDB with respect of timeFilter for Grafana variables templating. <p>We use InfluxDB tags as variables in Grafana and we would like to limit tags by time range selected there.</p>
<p>Using $timeFrame is supported for select InfluxDB queries but tags are returned by "SHOW TAGS" which doesn't support $timeFrame:
<a href="https://github.com/influxdata/influxdb/issues/5668" rel="noreferrer">https://github.com/influxdata/influxdb/issues/5668</a></p>
<p>Select can return tags only in case you return value as well and as a result, you have an array which is not supported in Grafana:
<a href="https://i.stack.imgur.com/xg0Du.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xg0Du.png" alt="enter image description here"></a></p>
<p>Does anyone know any workaround how to get tags based on time range? </p>
| 0non-cybersec
| Stackexchange |
Friendly URLs with .htaccess. <p>I'm have the following <em>.htaccess</em>:</p>
<pre><code>RewriteEngine on
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
</code></pre>
<p>My links look like this: <code>/index.php?a=track&id=3</code>. And even if I can't modify the <em>.htaccess</em> file, I would like URLs like this: <code>example.com/example.html</code>.</p>
<p>How can I achieve this?</p>
| 0non-cybersec
| Stackexchange |
Prove by induction $\sum_{i=0}^n i(i+1)(i+2) = (n(n+1)(n+2)(n+3))/4$. <p>Anyone knows how to do this? I'm having trouble after the following step:</p>
<p>Prove by induction that $\sum_{i=0}^n i(i+1)(i+2) = (n(n+1)(n+2)(n+3))/4$</p>
<p>Thanks</p>
<p>$((n(n+1)(n+2)(n+3))/4) + (n+1)(n+2)(n+3)$</p>
<p>I'm not sure how to simplify it after this step.</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
MakeGenericMethod/MakeGenericType on Xamarin.iOS. <p>I'm trying to figure out what the limitations really means when deploying for iOS from Xamarin.</p>
<p><a href="http://developer.xamarin.com/guides/ios/advanced_topics/limitations/">http://developer.xamarin.com/guides/ios/advanced_topics/limitations/</a></p>
<p>I was under the impression that you have no JIT and thus any MakeGenericMethod or MakeGenericType would NOT work as that would require JIT compilation.</p>
<p>Also I understood that when running on the simulator, these restrictions does not apply since the simulator is not running in the full AOT (Ahead of Time) mode.</p>
<p>After setting up my Mac so that I could deploy to my phone, I would except the following test to fail when running on the actual device (iPhone).</p>
<pre><code> [Test]
public void InvokeGenericMethod()
{
var method = typeof(SampleTests).GetMethod ("SomeGenericMethod");
var closedMethod = method.MakeGenericMethod (GetTypeArgument());
closedMethod.Invoke (null, new object[]{42});
}
public static void SomeGenericMethod<T>(T value)
{
}
private Type GetTypeArgument()
{
return typeof(int);
}
</code></pre>
<p>The thing is that completes successfully and I can't really understand why. Does not this code require JIT compilation?</p>
<p>In an effort to "make it break" , I also did a test with MakeGenericType.</p>
<pre><code> [Test]
public void InvokeGenericType()
{
var type = typeof(SomeGenericClass<>).MakeGenericType (typeof(string));
var instance = Activator.CreateInstance (type);
var method = type.GetMethod ("Execute");
method.Invoke (instance, new object[]{"Test"});
}
public class SomeGenericClass<T>
{
public void Execute(T value)
{
}
}
</code></pre>
<p>How can this work when there is no JIT?</p>
<p>Am I missing something ?</p>
| 0non-cybersec
| Stackexchange |
Advertisements in the TCS. | 0non-cybersec
| Reddit |
How to watch CPU time of raw sockets using BPF filtering. <p>Lets say I have a <strong>linux</strong> machine that has an infinite amount of packets coming in in one interface. I've opened a raw socket and set a bpf filter that none of the packets go through. </p>
<p>Now for every packet the kernel receives it runs the bpf bytecode and filters out the data.</p>
<p>How do I see the CPU usage that's taken by the kernel? Is it counted as time my process spends? Or somewhere else? Would I see this using top?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Dimension of subalgebras of a matrix algebra. <p>If $n$ is given and $A$ is a subalgebra of $M_n(\mathbb C)$, the algebra of $n \times n$ matrices with entries in the field of complex numbers, then what are the possible values of dimension of $A$ as a vector space over $\mathbb C$?</p>
| 0non-cybersec
| Stackexchange |
Generators of a finite CW complex. <p>My question regards a simple application of Van Kampen's theorem. Suppose $X$ is a finite CW complex with a finite one-skeleton. I have to show that X is finitely generated. I know that this is just an easy application of Van Kampen's theorem, but I'm not completely sure about the argument. </p>
| 0non-cybersec
| Stackexchange |
How can I configure a router to forward an incoming hardcoded IP address to a named DDNS address?. <p>I have an IP telephone but the IP address can only be specified explicitly, there's no way to enter a host name. The problem is that the IP address of the host name can change.</p>
<p>Two possibilities occur to me but I need a bit of guidance.</p>
<ol>
<li>I do have a Sonicwall router. I'm wondering if there's a way to have a rule such that if there's an incoming connection from a device (the IP phone) at a hard coded IP address, it could be rerouted through a "hostname" such that the IP address of that hostname would be updated automatically if the underlying IP address changes</li>
<li>If not, can I get simple router like a linksys and use that open source firmware (I forget its name) on it to do this?</li>
</ol>
<p>Thanks, in advance</p>
| 0non-cybersec
| Stackexchange |
Why did it take so long for ancient humans to transition from being hunter-gatherers to being “civilized.”. Our species, Homo sapiens, first appeared in approximately 315,000 years ago, started showing “evidence of modernity” 50,000 years ago, and developed the first known civilization in Mesopotamia about 7500 years ago.
If these humans are anatomically, genetically, and intellectually identical to modern humans, why would it take them over 300,000 years to develop a civilization? Especially in the context of how far we’ve advanced since the Sumerians in just 7500 years.
Is the process really THAT slow? Or do you think that there may have been civilizations that developed before Sumeria, but we just don’t have any concrete evidence of them quite yet?
EDIT: Quite a few people have been bringing up Gobekli Tepe, which I think is a very good example of how there were civilizations that predate the Sumerians. It seems far too large and complex to not be built by a people who have had a lot of experience in engineering, astronomy, and masonry. | 0non-cybersec
| Reddit |
How many 3rd graders do you think you could fight at once, and what would your strategy be?. | 0non-cybersec
| Reddit |
How many positive divisors of 8400 have at least 4 positive divisors?. <p>How many positive divisors of 8400 have at least 4 positive divisors?</p>
<p>I'm a little bit fuzzy on number theory, so could someone please help me out? Thanks!</p>
| 0non-cybersec
| Stackexchange |
How can I tell if my FireWire port is 400 or 800? (Linux). <p>I know this sounds very similar to <a href="https://superuser.com/questions/432549/how-do-i-tell-if-my-firewire-connection-is-running-as-400-or-800">How do I tell if my firewire connection is running as 400 or 800?</a>, but the difference is, I don't <em>have</em> a FireWire device yet. </p>
<p>The whole reason I'm asking is that I'm trying to decide between two portable hard drives - which both have USB interfaces regardless - and are completely identical <em>except</em> one has a FireWire 800 interface (and is more expensive, natch). </p>
<p>I don't know if my port/controller supports 800 MHz speeds or not. I've done a lot of internet searching and even tried <a href="http://code.google.com/p/jujuutils/" rel="nofollow noreferrer">jujuutils</a>, but that was a little <em>too</em> low-level for me to interpret the results.</p>
<p>Here's the lspci output, fwiw:</p>
<pre><code>04:00.0 FireWire (IEEE 1394) [0c00]: O2 Micro, Inc. 1394 OHCI Compliant Host Controller [1217:13f7] (rev 05) (prog-if 10 [OHCI])
Subsystem: Dell Device [1028:0494]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 64 bytes
Interrupt: pin A routed to IRQ 17
Region 0: Memory at e4b30000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [a0] Power Management version 3
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [48] MSI: Enable- Count=1/1 Maskable+ 64bit+
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [80] Express (v1) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr- TransPend-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
Capabilities: [100 v1] Virtual Channel
Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
Arb: Fixed- WRR32- WRR64- WRR128-
Ctrl: ArbSelect=Fixed
Status: InProgress-
VC0: Caps: PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
Arb: Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
Ctrl: Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
Status: NegoPending- InProgress-
Capabilities: [200 v1] Advanced Error Reporting
UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
AERCap: First Error Pointer: 00, GenCap- CGenEn- ChkCap- ChkEn-
Kernel driver in use: firewire_ohci
Kernel modules: firewire-ohci
</code></pre>
| 0non-cybersec
| Stackexchange |
[Build Help] As a first time builder, did I do it right?. Brand new pc builder here. I want to build a ~$600 rig that will be used for student activities (read: gaming). How did I do for my first build? Any horrible mistakes that I should fix before I pull the trigger?
Type|Item|Price
:----|:----|:----
**CPU** | [Intel Core i3-2120 3.3GHz Dual-Core Processor](http://pcpartpicker.com/part/intel-cpu-bx80623i32120) | $114.99 @ Newegg
**Motherboard** | [Intel DH67BLB3 Micro ATX LGA1155 Motherboard](http://pcpartpicker.com/part/intel-motherboard-boxdh67blb3) | $99.99 @ Newegg
**Memory** | [Corsair XMS3 8GB (2 x 4GB) DDR3-1333 Memory](http://pcpartpicker.com/part/corsair-memory-cmx8gx3m2a1333c9) | $35.78 @ NCIX US
**Hard Drive** | [Western Digital Caviar Blue 500GB 3.5" 7200RPM Internal Hard Drive](http://pcpartpicker.com/part/western-digital-internal-hard-drive-wd5000aakx) | $74.99 @ Amazon
**Video Card** | [Asus Radeon HD 6850 1GB Video Card](http://pcpartpicker.com/part/asus-video-card-eah6850dc2dis1gd5v2) | $129.99 @ NCIX US
**Case** | [Rosewill REDBONE ATX Mid Tower Case](http://pcpartpicker.com/part/rosewill-case-redbone) | $34.99 @ Newegg
**Power Supply** | [Raidmax 530W ATX12V / EPS12V Power Supply](http://pcpartpicker.com/part/raidmax-power-supply-rx530ss) | $39.99 @ Amazon
**Optical Drive** | [Asus DRW-24B1ST/BLK/B/AS DVD/CD Writer](http://pcpartpicker.com/part/asus-optical-drive-drw24b1stblkbas) | $25.97 @ Newegg
| | **Total**
|| $556.69
| 0non-cybersec
| Reddit |
Find area of region $y=\sin x$ and $\cos x$, $[0,2\pi]$. <p>Can somebody Find area of region $y=\sin x$ and $\cos x$, $[0,2\pi]$
I didn't know how to solve it because some of the area will be negative so how can I find it ?</p>
<p>Thanks all</p>
| 0non-cybersec
| Stackexchange |
How many possible symbols and punctuations in a password?. <p>I want to compute the possible combinations of a password consists of 8 digits of: alphabetical letters (26), numbers (0-9), symbols and punctuations.</p>
<p>In order to compute this, I have to know the total no. of possible characters and raise this to the power of length of the password. However, I do not know how many possible symbols or punctuations are there? Can any one help with a reference if possible please.</p>
| 1cybersec
| Stackexchange |
TIL in 1955 a six year old boy incredibly fought off a starving cougar while his friend ran for help taking 45 minutes before finally finding an adult who believed him.. | 0non-cybersec
| Reddit |
Ladies, amount of sex you want vs. amount of sex you actually have?. Are they more or less a match?
Edit: Ladies, almost 800 awesome posts! Wow. Thank you. | 0non-cybersec
| Reddit |
How to evaluate an integral when it comes to Cauchy's Integral Theorem. <blockquote>
<p><strong>Cauchy's Integral Theorem</strong>: Let <span class="math-container">$f:G\to \mathbb{C}$</span> be a holomorphic function in a simply connected domain <span class="math-container">$G\subseteq \mathbb{C}$</span> and let <span class="math-container">$\gamma$</span> be a closed path in <span class="math-container">$G$</span>. Then
<span class="math-container">$$
\int_\gamma f(z)\,\mathrm{d}z=0.
$$</span></p>
</blockquote>
<p>One example I struggle to apply this theorem mathematically. I have to determine the value of
<span class="math-container">$$
\int_{\partial B(0,1)}\frac{1}{(z-a)(z-b)}\,\mathrm{d}z
$$</span>
for <span class="math-container">$\vert a\rvert, \vert b\rvert>1$</span>. Here, I notice that <span class="math-container">$a$</span> and <span class="math-container">$b$</span> doesn't lie in <span class="math-container">$B(0,1)$</span>. Here's what I did cronologically:</p>
<ul>
<li><p>One of my friends once said that it's okay to use this theorem, just because that the integrand is holomorphic on the simply connected domain <span class="math-container">$B(0,1)$</span>. I didn't think about it until I read this theorem carefully [when I discovered that <span class="math-container">$\partial B(0,1)$</span> isn't contained in <span class="math-container">$B(0,1)$</span>]. So, I tried to fix the argument somehow. </p></li>
<li><p>I define <span class="math-container">$f(z):=\frac{1}{(z-a)(z-b)}$</span> for <span class="math-container">$z\in \mathbb{C}\setminus \{a,b\}$</span>. Clearly, <span class="math-container">$f$</span> is holomorphic. But then I can't use the theorem, because <span class="math-container">$\mathbb{C}\setminus \{a,b\}$</span> is not simply connected. So, I wonder, what if I make the domain "smaller" that doesn't contain "holes" such as <span class="math-container">$a$</span> and <span class="math-container">$b$</span>?</p></li>
<li>I choose <span class="math-container">$R$</span> satisfying <span class="math-container">$1<R<\min\{\vert a\rvert,\vert b\rvert\}$</span>. Then, define <span class="math-container">$g(z):=f(z)$</span> for <span class="math-container">$z\in K(0,R)$</span>. Since <span class="math-container">$B(0,R)$</span> is simply connected, and <span class="math-container">$\partial B(0,1)$</span> is a closed path that is contained in <span class="math-container">$B(0,R)$</span>, the theorem says that <span class="math-container">$\int_{\partial B(0,1)}g(z)\,\mathrm{d}z=0$</span>. I do not know if this is a valid proof.</li>
</ul>
<p>If there's a proper way to prove, please let me know.</p>
| 0non-cybersec
| Stackexchange |
Is there a way to know if a notification is expanded or collapsed in android. <p>I have an expanded view notification. If the notification is at the top of notification drawer it is expanded otherwise collapsed. Is there any way to figure out whether the notification is expanded or collapsed while clicking.</p>
<p>Pressing the notification in collapsed and expanded view is not different. </p>
<p>Is there a native way to know if the notification is expanded or collapsed</p>
| 0non-cybersec
| Stackexchange |
OAuth Authorization Service in ASP.NET Core. <p>In Web API 2, you used to be able to create an endpoint to issue a token by setting up an OAuth Authorization Server via middleware like below:</p>
<pre><code>//Set up our auth server options.
var OAuthServerOptions = new OAuthAuthorizationServerOptions()
{
AllowInsecureHttp = true,
TokenEndpointPath = new PathString("/token"),
AccessTokenExpireTimeSpan = TimeSpan.FromDays(1),
Provider = new SimpleAuthorizationServerProvider()
};
// Sets up the token issue endpoint using the options above
app.UseOAuthAuthorizationServer(OAuthServerOptions);
</code></pre>
<p>Perhaps I'm missing it, but I'm trying to figure out how to do this in ASP.NET Core. I've looked through the source (<a href="https://github.com/aspnet/Security" rel="noreferrer">https://github.com/aspnet/Security</a>) but I don't really see anything analogous. Is there a new way to accomplish this? Do I need to just create a controller and do it myself?</p>
<p>I see how OAuth Authentication can be set up via Middleware, but this regards the authorization portion where I issue claims from my API.</p>
| 0non-cybersec
| Stackexchange |
Husky Sings Along to Carol of the Bells. | 0non-cybersec
| Reddit |
Windbg for memory analysis using mimikatz ERROR. <p>I'm using windbg version 6.12 and using mimilib.dll for debugging memory. All works fine until I get following output on UI </p>
<pre><code>0:000> !mimikatz
DPAPI Backup keys
=================
Current prefered key:
Compatibility prefered key:
SekurLSA
========
[ERROR] [CRYPTO] Acquire keys
</code></pre>
<p>note: the memory dmp is of <code>lsass</code></p>
<p>Is this anything to do with symbol or respective dll /system32? Kindly suggest.</p>
| 0non-cybersec
| Stackexchange |
What is a rotation system of a plane graph?. <p><strong>I have this question on an exam. I just need explanation on what's meant by rotation system?</strong></p>
<p>Below is the rotation system of a plane graph.</p>
<p>0: -> 6 -> 2</p>
<p>1: -> 4 -> 3</p>
<p>2: -> 0 -> 4 -> 5</p>
<p>3: -> 4 -> 1</p>
<p>4: -> 1 -> 2 -> 3</p>
<p>5: -> 2 -> 6</p>
<p>6: -> 0 -> 5</p>
<p>How many faces does the graph have? Draw the graph so that the largest (incident on the
most edges) face is the unbounded outer face.</p>
<p><a href="https://i.stack.imgur.com/rkSUI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rkSUI.jpg" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
Martha Jane Burke, better known as Calamity Jane - 1864 [564x782]. | 0non-cybersec
| Reddit |
"range" action and "pipeline" clarification in text/html template package. Golang. <p>I try to get some fine points in text/html template package. I've read its documentation from golang site. It's difficult to understand what exactly means the . (dot) in general and at a certain time in the range action. What exactly means "pipeline", maybe it's difficult to understand because my English is not mother tongue):</p>
<pre><code>{{pipeline}}
The default textual representation of the value of the pipeline
is copied to the output.
</code></pre>
<p>Let's consider an example:</p>
<pre><code> data := map[string]interface{}{
"struct": &Order{
ID: 1,
CustID: 2,
Total: 3.65,
Name: "Something",
},
"name1": "Timur",
"name2": "Renat",
}
t.ExecuteTemplate(rw, "index", data)
</code></pre>
<p>Here is "index":</p>
<pre><code>{{define "index"}}
{{range $x := .}}
{{.}}
<b>{{$x}}</b><br>
<i>{{$.struct.ID}}</i><br>
<br>
# the lines below don't work and break the loop
# {{.ID}}
# or
# {{.struct.ID}}
# what if I want here another range loop that handles "struct" members
# when I reach "struct" field in the data variable or just do nothing
# and just continue the loop?
{{end}}
{{end}}
</code></pre>
<p>Output:</p>
<p>Timur<br>
<strong>Timur</strong><br>
<em>1</em><br></p>
<p>Renat<br>
<strong>Renat</strong><br>
<em>1</em><br></p>
<p>{1 2 3.65 Something}<br>
<strong>{1 2 3.65 Something}</strong><br>
<em>1</em><br></p>
| 0non-cybersec
| Stackexchange |
Password is not taking after waking up from sleep in Ubuntu 14.04. <p>When the screen is locked in Ubuntu or I manually lock using <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>L</kbd> it gets the lock. the question is when I switch on the laptop password is not taking it shows invalid password. I have to go to switch user then it is taking password correctly.</p>
<p>So for the same user, the password is invalid after suspend, but by going to 'switch user' and selecting the same user, the same password is valid.</p>
| 0non-cybersec
| Stackexchange |
Factor of the Euler Product at the Roots Of Zeta. <p>The $\zeta$ function maybe written as Euler Product:
$$
\zeta(s)=\prod_{p} \frac{1}{1-p^{-s}}=\prod_p e_p(s).
$$
Now let's substitute $s$ with $\rho_k$, the $k$th root of $\zeta$, and have a look at the individual factors. There are 2 options: 1.$|e_p(\rho_k)|<1$ or 2. $|e_p(\rho_k)|\ge1$ (<a href="http://tinyurl.com/73lym9j" rel="nofollow noreferrer">e.g.</a> $|e_{23}(\rho_1)|\approx 1.2404$, for more values, see <a href="http://tinyurl.com/6lsdu4c" rel="nofollow noreferrer">here</a>) and obviously the values less $1$ must be infintely many more than the others, otherwise it would not converge to $0$. So we can write it as:
$$
\zeta(\rho_k)=\prod_{\color{blue}{||<1}} e_p(\rho_k) \times \prod_{\color{red}{||\geq 1}} e_p(\rho_k),
$$</p>
<p>So my questions are: </p>
<ol start="2">
<li>Do these values $e_p(\rho_k)$ have a special meaning or a straight forward interpretation?</li>
<li>For a given $\rho_k$, how do these values distribute? Plots for $\rho_1$ and $\rho_2$ (not shown) show a spiral around $1+0i$:
<img src="https://i.stack.imgur.com/sUKcv.png" alt="rho_1 color">
($x$ is real axis, $y$ the imaginary, the line indicates $||=1$)</li>
<li><strong>obsolete</strong> Are there finitely or infinitely many primes $p$, where $|e_p(\rho_k)|\ge1$? Infinitely.</li>
<li>How does that distribution behave, if $\Re(s)\neq \frac{1}{2}$? Some values of $e_p(\varepsilon + \rho_k)$ should move outwards, such that $\prod_{||<1} e_p(\rho_k)$ doesn't become $0$ anylonger, if Riemann's Hypothesis is true.
$s=1/8+14.134725i$ is shown in the plot:
<img src="https://i.stack.imgur.com/UciBM.png" alt="enter image description here"></li>
</ol>
<p>Thanks for your help/comments/plots/answers...</p>
| 0non-cybersec
| Stackexchange |
Just put my two weeks in on a job that has been dragging me down for months.. I’m scared because I don’t have another job lined up yet but I couldn’t let myself be treated the way I was being treated any longer.
I’d come home so exhausted that I’d sleep the minute I washed up, skipping diner and any sort of communication with my boyfriend.
I’m just trying to focus on the fact that I’ll finally get some time to work on a book I’ve been writing since my college days!
These next two weeks are going to be a lot of application send-ins and interviews! Wish me luck!! | 0non-cybersec
| Reddit |
Remapping Capslock to Ctrl: Capslock-Shift-Tab does not work as Ctrl-Shift-Tab. <p>I remapped <kbd>Caps Lock</kbd> to <kbd>Ctrl</kbd> using gnome-tweak-tool. </p>
<p>When I try to switch tabs <em>forwards</em> in Chromium or Firefox with <kbd>Caps Lock</kbd>+<kbd>Tab</kbd>, it works fine. </p>
<p>However, when I try <kbd>Caps Lock</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> to switch tabs <em>backwards</em>, it doesn't work. </p>
<p>Using <a href="https://github.com/wavexx/screenkey" rel="nofollow noreferrer" title="screenkey">screenkey</a> I can see that the input that is shown when I press <kbd>Caps Lock</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> is <kbd>Caps Lock</kbd>+<kbd>Shift</kbd> (<b>no <kbd>Tab</kbd> input registered, and <kbd>Caps Lock</kbd> not <kbd>Ctrl</kbd></b>)</p>
<p>Seems like <kbd>Caps Lock</kbd>+<kbd>Shift</kbd> registers as a different command altogether.</p>
<p>How can I make <kbd>Caps Lock</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> behave the same as <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> in this situation?</p>
<p>I am using Ubuntu 16.04</p>
| 0non-cybersec
| Stackexchange |
to walk on waterlillies. | 0non-cybersec
| Reddit |
Update: My parents forbid me from being with my boyfriend. [This is an update from the post that I had put up yesterday] (http://www.reddit.com/r/relationships/comments/mns3w/my_parents_forbid_me_from_being_with_my_boyfriend/)
Ok so basically today, me and my sister were sitting alone in the basement doing homework. She's been weird about not studying in the same places as me this break, but because she's so busy, I didn't really think anything of it. Anyway, she decides to study in the other room in the basement, because she just wanted to be alone to work.
Anyway, my mom comes downstairs, and she makes a comment on how sad it is that this house is so broken that we can't even look at each other's faces. And then I, being confused, told her that she just went over there so she could study better. Then my mother says that it's because my sister told her that she can't handle my drama anymore and that no one in the house has anything in common with me.
She basically went on and on about how I'm the most disrespectful out of the three of us (my brother has called her a fucking bitch to her face, multiple times. They don't even know I use swear words) and that I don't love or care about the family. Just because I'm still close to him. And I'm apparently leading a double life.
She brought up a lot of things that I had told my sister in confidence, like how I really didn't know if I could handle this atmosphere that much longer. And my mother said that her behaviour (of basically not acknowledging my presence) is completely justified because m behaviour is abhorrent apparently.
My behaviour has not changed in the slightest. Before she saw my phone records, I was sweet, talked, and was very pleasant and my mom loved that. After the phone records, I was still the same person, still practicing the violin and all that fun stuff that Indian moms want their kids to do, but she didn't acknowledge that I even existed. It was honestly heartbreaking.
The fight ended with me locking myself in the room and my mother on the other side of the door, and I ended up having an emotional meltdown, akin to when I had to break it off with the boyfriend back in April. All my mother could say was "good, you deserve to cry".
It got ugly. I told my mom that I refuse to come back to this house for the holidays and that if she cared about her image so much, she could just disown me and tell the whole world that I killed myself so she could still have a good name.
Anyway, my dad comes down because he can't stand the way everything unraveled. Basically his only concern is that until I graduate, he doesn't want me to waste time. But he said that after I'm stable and on my own two feet, I have his blessing to do whatever I want. So there's that.
I should probably mention that my parents had the stereotypical arranged marriage. My parents met for a couple hours, and then they got married. My mom was apparently really interested in this guy when she was my age, but never pursued anything for fear of her parents. And now she's turned into this...
Right now I have my dad's support, but I honestly don't see myself coming back here for awhile.
TL;DR My mom's a bitch and has made my life at home unbearable, but my dad is a saving grace. | 0non-cybersec
| Reddit |
In The Time Machine (2002) When Alexander reaches outside of the machine to catch the locket, his nails grow during the time his hand is unprotected.. | 0non-cybersec
| Reddit |
How to create relative symbolic link in mac OS?. <p>How to create a relative symbolic link that would always point to original folder two levels up? I would like to create a computer-independent alias that would work on any machine, provided that the original folder exists two levels up. </p>
<p>Basically, what I want is this:</p>
<pre><code> |-- Original
|-- folder 1
|-- folder 2
|-- Original alias
</code></pre>
<p>I need this for my XCode project structure. I've tried: </p>
<pre><code>ln -s Original /../../Original
</code></pre>
<p>but it creates an alias that cannot find its original folder.</p>
| 0non-cybersec
| Stackexchange |
Randomize string in C#. <p>I am trying to randomize string elements, but my code is repeating strings. Can someone explain what is wrong with my code?</p>
<pre><code>string[] words = Console.ReadLine().Split();
//input = "Welcome and have fun learning programming"
Random number = new Random();
for (int i = 0; i < words.Length; i++)
{
int currRandomNumber = number.Next(0, words.Length);
words[i] = words[currRandomNumber];
}
Console.WriteLine(string.Join(' ', words));
//output = "have learning learning learning learning programming"
</code></pre>
<p>I am facing problems with the words repeating, and it is not randomized? If you don't understand what I mean, see the comments which I added in the code. Any help will be appreciated!</p>
| 0non-cybersec
| Stackexchange |
app.get - is there any difference between res.send vs return res.send. <p>I am new to node and express. I have seen app.get and app.post examples using both "res.send" and "return res.send". Are these the same? </p>
<pre><code>var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.type('text/plain');
res.send('i am a beautiful butterfly');
});
</code></pre>
<p>or</p>
<pre><code>var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.type('text/plain');
return res.send('i am a beautiful butterfly');
});
</code></pre>
| 0non-cybersec
| Stackexchange |
Can't share Video to Facebook in Swift. <p>I am trying to share a video on facebook using FBShareDialog.</p>
<p>But I am getting error : </p>
<blockquote>
<p>The operation couldn’t be completed. (com.facebook.sdk.share error 2.)</p>
</blockquote>
<p>I have the file path : </p>
<blockquote>
<p>file:///var/mobile/Containers/Data/Application/8FA91DC3-D039-40DE-81BD-D70936343AD2/Documents/Erudition.mp4</p>
</blockquote>
<p>And the code to share is :</p>
<pre><code> let fbShare = FBSDKShareDialog.init()
let videoContent = FBSDKShareVideoContent()
let shareVideo = FBSDKShareVideo.init(videoURL: path)
videoContent.video = shareVideo
fbShare.shareContent = videoContent
fbShare.delegate = self
fbShare.show()
</code></pre>
<p>What am doing wrong here? </p>
| 0non-cybersec
| Stackexchange |
Mayor of a Polish town Strzegom, being drunk, destroys a hotel room in a German partnership town of Torgau by leaving the room dirty from excrements. The mayor of Torgau breaks the 20 years long partnership.. | 0non-cybersec
| Reddit |
I have what?. I got married a few months ago (was a virgin before) and I've had a difficult time having sex. Everything hurts and nothing really fits up in there. My OBGYN told me I had vaginismus, prescribed lidocaine, and I started seeing a pelvic floor therapist. I went back to the doctor (I got a different NP this time) and she suspected I had granulation tissue. After nearly passing out and crying during the exam (that lasted maybe two seconds), she confirmed that this was the case. In two weeks I'm going back to get it cauterized with silver nitrate and I'm terrified. Has anyone had this done? Does it suck as bad as I think it's going to? They prescribed valium and norco, but valium doesn't do much to me. Any ideas on how not to freak tf out? | 0non-cybersec
| Reddit |
Ball growth function for $Z^n$. <p>in this book: <a href="https://issuu.com/yilongzhang/docs/piotr_w._nowak__guoliang_yu-large_s" rel="nofollow">https://issuu.com/yilongzhang/docs/piotr_w._nowak__guoliang_yu-large_s</a> in the Example 3.1.9. it is said that for group ($Z^k$,+) we have: </p>
<p>$|B(0,n)|=\frac{(2n)^k}{k!}+\frac{(2n)^{k-1}}{(k-1)!}+$ lower order terms,</p>
<p>where we consider $Z^k$ with word metric and standard generating set, B(0,n) is centred ball.</p>
<p>I don't see why is it true.<br>
Could you help me solving this problem? </p>
<p><strong>My attempts:</strong><br>
We want to know what is the number of integer solutions of inequality: $|x_1|+|x_2|+...+|x_k| \le n$, so maybe first find the number of integer solutions of $|x_1|+|x_2|+...+|x_k|=n$. Then we have possibilities:<br>
If $x_i\neq0$ then there are $2^k\binom{n-1}{k-1}$ possibilities, if $x_i=0$ for only one i, then there are $2^{k-1}\binom{k}{1}\binom{n-1}{k-2}$ possibilities and so on. So $|S(0,n)|=2^k\binom{n-1}{k-1}+2^{k-1}\binom{k}{1}\binom{n-1}{k-2}+...+2^{1}\binom{k}{k-1}\binom{n-1}{0}$. But how to sum this? Or maybe there is another, more tricky solution?</p>
| 0non-cybersec
| Stackexchange |
How to play a 'disc image file' in Windows 7 64-bit?. <p>How do I watch a 4GB film in 'disc image file' format on my computer? I tried VLC but only one "extras" clip is working but without any audio and when I click on any other options on the home screen nothing happens. I thought VLC played everything.</p>
| 0non-cybersec
| Stackexchange |
Resizing partitions; more Linux and less Windows. <p>When I installed Linux I was afraid to change to it completely, so I gave it only 50.1 Gb, while Windows got 180 GB. Now this is not enough for Linux, and I want to "take" some space from Windows and give it to Linux.</p>
<p>Here is my partition layout: ( from cfdisk )</p>
<pre><code>/dev/sda1 * 1126400 378613759 377487360 180G 7 HPFS/NTFS/exFAT
/dev/sda2 * 378613760 383422463 4808704 2,3G 83 Linux
/dev/sda3 383422464 488397167 104974704 50,1G 83 Linux
</code></pre>
<p>/dev/sda1 - NTFS for Windows</p>
<p>/dev/sda2 - swap</p>
<p>/dev/sda3 - ext4 with Linux and GRUB</p>
<ol>
<li>Is the correct method to reduce first sda1, then increase sda2, then decrease sda2, and finally increase sda3? </li>
<li>Will I not destroy the data on the disk in this way? </li>
<li>Will GRUB on the sda3 partition still boot and give me the choice of Linux and Windows?</li>
</ol>
| 0non-cybersec
| Stackexchange |
Managing HTTP Cookies on iPhone. <p>I want to port a python app that uses mechanize for the iPhone. This app needs to login to a webpage and using the site cookie to go to other pages on that site to get some data.</p>
<p>With my python app I was using mechanize for automatic cookie management. Is there something similar for Objective C that is portable to the iPhone?</p>
<p>Thanks for any help.</p>
| 0non-cybersec
| Stackexchange |
Ubuntu Server 18.04 LVM Expansion. <p>I recently built an Ubuntu server to run syslog-ng. At installation I added a second virtual hard drive in VMware. I used LVM and mounted the second disk as /var (knowing this is where the logs would be held).</p>
<p>I realised I'd made it too small and want to expand the volume from 50G to 100G, but am unable to do so. From the installation, the 50G disk I mounted at /var has no partitionas on it. This is because it is dedicated to /dev/vg1/lv-0, which is mounted to /var.</p>
<p>If I try vgextend, it says there is no free space to use. pvcreate deosnt seem appropriate either. Every guide I can see online involves creating a new partition on an expanded disk (e.g. if sdb1 & 2 were part of vg1, extend the disk and create a new partiton sdb3 and add it to the vg1). I can't follow this because there is only sdb, no sdb1 & 2.</p>
<p>I'm sure I'm missing something, can anyone point me to the answer?</p>
<p>See below for disk info:</p>
<p><strong>df -h</strong></p>
<p>Filesystem Size Used Avail Use% Mounted on
udev 967M 0 967M 0% /dev
tmpfs 200M 1.1M 199M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 3.9G 2.8G 937M 76% /
tmpfs 997M 0 997M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 997M 0 997M 0% /sys/fs/cgroup
/dev/mapper/vg1-lv--0 49G 547M 46G 2% /var
/dev/sda2 976M 145M 765M 16% /boot
/dev/loop0 90M 90M 0 100% /snap/core/8268
/dev/loop1 89M 89M 0 100% /snap/core/7270
tmpfs 200M 0 200M 0% /run/user/1000</p>
<p><strong>pvdisplay</strong></p>
<p>--- Physical volume ---
PV Name /dev/sda3
VG Name ubuntu-vg
PV Size <29.00 GiB / not usable 0<br>
Allocatable yes
PE Size 4.00 MiB
Total PE 7423
Free PE 6399
Allocated PE 1024
PV UUID kqoMlf-LMiz-dEch-t10q-a3eP-gBiN-okGlWc</p>
<p>--- Physical volume ---
PV Name /dev/sdb
VG Name vg1
PV Size 50.00 GiB / not usable 4.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 12799
Free PE 0
Allocated PE 12799
PV UUID jH9TiD-KFmp-Zl0y-dX7R-o0qo-uXgn-eAYexu</p>
<p><strong>fdisk -l</strong></p>
<p>Disk /dev/loop0: 89.1 MiB, 93417472 bytes, 182456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</p>
<p>Disk /dev/loop1: 88.5 MiB, 92778496 bytes, 181208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</p>
<p>Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: DD7C344B-94EE-41A0-A6F8-0E8E4B6B72F5</p>
<p>Device Start End Sectors Size Type
/dev/sda1 2048 4095 2048 1M BIOS boot
/dev/sda2 4096 2101247 2097152 1G Linux filesystem
/dev/sda3 2101248 62912511 60811264 29G Linux filesystem</p>
<p>Disk /dev/sdb: 100 GiB, 107374182400 bytes, 209715200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</p>
<p>Disk /dev/mapper/vg1-lv--0: 50 GiB, 53682896896 bytes, 104849408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</p>
<p>Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</p>
| 0non-cybersec
| Stackexchange |
Two full years later and Bungie still has me counting down the hours until I can leave work and grind some more. GG Bungie. The last game that I was this into was probably Halo 3, or maybe Halo: Reach. I guess Bungie just gets me.
Edit: Front page, woohoo! I'm glad that so many of you are still having fun and I'm sure u/deej_BNG is too. Keep on fighting the good fight Guardians! | 0non-cybersec
| Reddit |
Creating asymmetric layouts involving rows and column in Shiny. <p>I have created multiple rows in a shiny <code>ui</code> as such:</p>
<p>shinyUI(fluidPage(</p>
<pre><code>fluidRow(
column(6,
textOutput("text_col1_row_1")),
column(6
textOutput("text_col2_row_1"))),
fluidRow(
column(6,
textOutput("text_col1_row_2")),
column(6,
textOutput("text_col2_row_2"))),
))
</code></pre>
<p>which creates a nice 4 X 4 grid.</p>
<p>It seems Shiny is geared towards allowing users to organize objects into columns.</p>
<p>I would like to see if I can organize my display into something that has two columns, yet within a column, it has two rows -- it's probably clearer if I whip up a simple illustration: </p>
<p><img src="https://i.stack.imgur.com/ysLTw.png" alt="enter image description here"></p>
<p>(This is just a general idea and there is nothing set in stone regarding column / row sizes at the moment -- just looking for the bare-bones template for this structure, so to speak.)</p>
<p>I have searched around the documentation and can't seem to find a reasonable solution. If anyone has thought about and solved this or has any ideas, I'd love to hear them. Thanks.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
What quantity does a line integral represent?. <p>I'm currently trying to wrap my head around line integrals, Green's theorem, and vector fields and I'm having a bit of difficulty understanding what a line integral represents geometrically.</p>
<p>Is it basically the arc length of a curve, for a scalar field?</p>
<p>And then when you bring the concept into a vector field, then what does it represent?</p>
| 0non-cybersec
| Stackexchange |
utorrent freeze after started. <p>When I start UTorrent on Windows Server 2008 it freezes. It was running perfectly fine after I installed it for the first time</p>
| 0non-cybersec
| Stackexchange |
The Up Series - The lives of 14 English people born in 1957, updated every 7 years. | 0non-cybersec
| Reddit |
The X-Files Palette Mock-Up! Inspired by /u/wayward_sun. | 0non-cybersec
| Reddit |
Antergos MariaDB problems. <p>I've just installed the mariadb package and doesn't work (doesn't start), I've these outputs:</p>
<blockquote>
<p>systemctl status -l mariadb.service </p>
</blockquote>
<pre><code>● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Active: inactive (dead)
</code></pre>
<blockquote>
<p>journalctl | grep mariadb | tail</p>
</blockquote>
<pre><code> action org.freedesktop.systemd1.manage-units for system-bus-name::1.110 [systemctl start mariadb.service] (owned by unix-user:velzm)
dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Unit entered failed state.
dic 04 08:17:21 nmveliz systemd[1]: mariadb.service: Failed with result 'exit-code'.
</code></pre>
<blockquote>
<p>systemctl status mariadb.service </p>
</blockquote>
<pre><code>● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; ven
Active: failed (Result: exit-code) since Sat 2016-12-03 16:44:12 CST;
Process: 1959 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUST
Process: 1906 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ]
Process: 1903 ExecStartPre=/bin/sh -c systemctl unset-environment _WSRE
Main PID: 1959 (code=exited, status=1/FAILURE)
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396413908
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816
dic 03 16:44:12 nmveliz mysqld[1959]: 2016-12-03 16:44:12 1396419816
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Main process ex
dic 03 16:44:12 nmveliz systemd[1]: Failed to start MariaDB database
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Unit entered fa
dic 03 16:44:12 nmveliz systemd[1]: mariadb.service: Failed with res
lines 1-18/18 (END)
</code></pre>
<blockquote>
<p>journalctl -xe</p>
</blockquote>
<pre><code>dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:30 nmveliz mysqld[2707]: 2016-12-03 16:56:30 1401676738
dic 03 16:56:31 nmveliz mysqld[2707]: 2016-12-03 16:56:31 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:32 nmveliz mysqld[2707]: 2016-12-03 16:56:32 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401670818
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676737
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz mysqld[2707]: 2016-12-03 16:56:33 1401676738
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Main process ex
dic 03 16:56:33 nmveliz systemd[1]: Failed to start MariaDB database
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Unit entered fa
dic 03 16:56:33 nmveliz systemd[1]: mariadb.service: Failed with res
dic 03 16:56:33 nmveliz sudo[2649]: pam_unix(sudo:session): session
</code></pre>
| 0non-cybersec
| Stackexchange |
Old server is being retired, but need the web address that pointed to it to redirect to new server. <p>I've inherited an intranet site that gets hit by hundreds of different users per day. They all know how to get to the page, simply type <a href="http://oldservername/site" rel="nofollow noreferrer">http://oldservername/site</a> and enjoy. We've got the site moved over to the new server and all is well. The problem is that the old server is getting retired, and they want to do it ASAP. The guy that built the site and ran it was supposed to be getting this done in March, but put it off until he left the company and now the admins are all over me about it due to deadlines.</p>
<p>Here is my dilemma. If we shut down the old server, <a href="http://oldservername/site" rel="nofollow noreferrer">http://oldservername/site</a> (the site everyone has bookmarked and has been running for over 10 years and is listed in all kinds of random documentation and SOPS), no longer works. They would have to use <a href="http://newservername/site" rel="nofollow noreferrer">http://newservername/site</a> to get to the same page. I told the admins this is far from ideal and asked for some DNS love and got shutdown.</p>
<p>They don't want to cname, they don't want to leave the old server on once the new server is deployed, and they don't care much because this was supposed to be done in March.</p>
<p>I just found out about it all this week and going back in time is not an option. So without a cname, the old server still running with a warning page & redirect, or a time machine, what are my options?</p>
| 0non-cybersec
| Stackexchange |
Unresolved reference: viewModelScope - Android KTX. <p>I'm trying to use the new <code>viewModelScope()</code> function provided by the new android ktx library. </p>
<p>In the gradle file, I've added:</p>
<pre><code>implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.0.0'
implementation 'androidx.core:core-ktx:1.0.2'
</code></pre>
<p>but when I tied to access the <code>viewModelScope()</code>, I got <code>Unresolved reference: viewModelScope</code> error:</p>
<pre><code>class MainViewModel(application: Application): AndroidViewModel(application) {
fun fetchData(){
viewModelScope.launch{
}
}
}
</code></pre>
<p>I don't understand what the problem is. Any idea? Thanks.</p>
| 0non-cybersec
| Stackexchange |
What is E.T. short for?. Because he’s got little legs! | 0non-cybersec
| Reddit |
beamer with numbered theorems not working with cleveref. <p>A want to use cleveref in a beamer presentation. The document defines multiple theorem environments <em>sharing</em> the same counter as follows:</p>
<pre><code>\documentclass{beamer}
\usepackage{cleveref}
\newtheorem{thm}{Theorem}
\newtheorem{cor}[thm]{Corollary}
\begin{document}
\begin{frame}
\begin{cor}
foo bar
\end{cor}
\end{frame}
\end{document}
</code></pre>
<p>This results in the following error:</p>
<pre><code>! Undefined control sequence.
\endbeamercolorbox ->\ifdim \beamer@colbox@sep
=0pt\else \vskip \beamer@colb...
l.14 \end{frame}
</code></pre>
<p>Note that the example works fine if a separate counter for <code>cor</code> is used, i.e. if the 6th line is replaced by</p>
<pre><code>\newtheorem{cor}{Corollary}
</code></pre>
<p>I could not find any useful information about this. Any ideas how to get the original example working?</p>
<p><strong>Note:</strong> This is <em>not</em> a duplicate of <a href="https://tex.stackexchange.com/questions/167422/no-cleveref-in-beamer">this question</a>. Cleveref <em>does</em> work together with beamer as long as separate counters are used. I could even add <code>\label</code> to the corollary and <code>\cref</code> it later and everything works fine.</p>
<p>However, if the two theorem environments use the same counter (as in my original example) the error occurs, even if no <code>\label</code> or <code>\cref</code> is used at all.</p>
| 0non-cybersec
| Stackexchange |
Android Studio Shows Error Running App: no target device found. <p>List of things I have already done, but the problem persists:</p>
<ol>
<li>Enabled USB debugging option in mobile developer options, didnt work so i also enabled allow installing apps via usb, but nope.</li>
<li>Changed the USB cable.</li>
<li>Installed three types of drivers:
<ol>
<li>OEM USB driver</li>
<li>Universal USB driver</li>
<li>SDB driver 2.0
In the device manager each of them recognized my device as Android device and also showed Android composite ADB interface, but because my Android Studio was not recognizing I still installed and uninstalled all of them.</li>
</ol></li>
<li>Changed USB connection from MTP to PTP.</li>
<li>In Android Studio troubleshooting device connections, it says found <code>6 usb devices not recognized as android devices</code> and among it is my <em>Redmi Note 5 Pro</em>.</li>
<li>Restarted ADB server which comes in the same troubleshooting option.</li>
<li>Updated Google USB driver in SDK tools.</li>
</ol>
<p>Apart from all of these if you have any suggestions please answer.</p>
| 0non-cybersec
| Stackexchange |
Help! Eyeshadow keeps fading. Hello everyone, I'm having a problem. I did this look today using the Juvia's Place "The Magic" palette. I first used MAC's paint pot in painterly, then set it w/ the shade "Kesi" everywhere until my lid was velvety smooth. But still, it seems like after awhile it didn't take long for the shadow in my crease to start fading. I'm not sure if it's because I have smaller, hooded-ish eyes, but it's really frustrating!
Could anyone please help? I'd really appreciate it! | 0non-cybersec
| Reddit |
Never Sleep Again - The NOES Documentary. Am re-watching this for the umpteenth time and just wondering if anyone else on /r/horror [1] has watched this and what you thought of it?
| 0non-cybersec
| Reddit |
Are constant $\infty$-sheaves constant on connected components?. <p>Let <span class="math-container">$C$</span> be an <span class="math-container">$\infty$</span>-category endowed with a Grothendieck topology <span class="math-container">$J$</span> and consider the <span class="math-container">$\infty$</span>-topos <span class="math-container">$\infty\text{Sh}(C, J)$</span>. There is a
natural geometric morphism to <span class="math-container">$\infty\text{Grpd}$</span> whose left adjoint is
the constant sheaf functor <span class="math-container">$\Delta : \infty \text{Grpd} \to \infty\text{Sh}(C, J)$</span>.</p>
<p>In the 1-topos case, <span class="math-container">$\Delta$</span> acts as follows: Take a set <span class="math-container">$S$</span> and take the
constant presheaf on <span class="math-container">$S$</span>, then sheafify. The resulting sheaf has the property that <span class="math-container">$\Delta(S)(U) = S$</span> for <span class="math-container">$U$</span> connected. Is this also true in the <span class="math-container">$\infty$</span> case, or do we need <span class="math-container">$U$</span> to be contractible? What even is <span class="math-container">$\Delta$</span>??</p>
| 0non-cybersec
| Stackexchange |
I used the woman's restroom yesterday.. [No Regrets]:
I really needed to take a dump last night, and I walked in the men's room. The toilets were shitty and had piss all over them. I proceeded to inspect the woman's toilet without hesitation, and noticed the hygiene was immaculate. I immediately took my pants off and dumped my load. It was midnight so no one would walk in on me. Best. Shit. Ever.
| 0non-cybersec
| Reddit |
Running multiple instances of Tornado gives ioloop is already running error. <p>This is how my code looks like, (have excluded some details that aren't really relevant)</p>
<pre><code>from multiprocessing.pool import ThreadPool as Pool
class GetUsers(BaseTask):
def foo(self):
pool = Pool()
try:
pool.map(self.bar, users)
finally:
pool.close()
pool.join()
def bar(self, users):
uuid = users[0]
ioloopInstance = ioloop.IOLoop().instance()
isInExperiment = self.isInExperiment(uuid, ioloopInstance)
log.info(str(uuid)+str(isInExperiment))
def isInExperiment(self, uuid, ioloop):
isInExpTag_response =ioloop.run_sync(lambda: self.
fetch_isInExperiment_response(uuid))
if len(isInExpTag_response.body) > 0:
return True
return False
@gen.coroutine
def fetch_isInExperiment_response(self, uuid):
response = yield baz
raise gen.Return(response)
</code></pre>
<p>When I run this, I get <code>ioloop is already running</code> error.
I feel that this is because several process running are trying to access the same instance of Tornado and so this error is seen.
I have tried reading the documentation of tornado and seen other resources online trying to tackle the same error, but could not find anything helpful.</p>
<p>Can anyone please help me out? </p>
| 0non-cybersec
| Stackexchange |
The "ain't nobody got time fo dat" lady is clean, good for her!. | 0non-cybersec
| Reddit |
How to connect two computers via internet with ssh?. <p>I want to connect another computer via internet that doesn't have a public IP.
Is there any away to do this?</p>
| 0non-cybersec
| Stackexchange |
Shmi Skywalker and Anakin arrive on Tatooine by Chris Trevas. | 0non-cybersec
| Reddit |
add script will not return intended output. <p>I want a script to calculate the sum of the numbers entered by the user.</p>
<p>so far I have:</p>
<pre class="lang-bsh prettyprint-override"><code>#!/bin/bash
add() {
sum=0
for num
do
sum=$((sum +num))
done
}
echo "$sum"
</code></pre>
<p>the command I use is:</p>
<pre><code>add 4 -3 9 12
</code></pre>
<p>the return is: blank line - not the words just a blank line
username~/folder:> </p>
<p>what am I missing?</p>
<p>permissions are <code>rwxr xr x</code>
I'm running an interactive shell with the folder in my path, I'm at a loss.</p>
| 0non-cybersec
| Stackexchange |
It's not much for Rory McIlroy, but it's something this kid will remember his entire life. | 0non-cybersec
| Reddit |
How can I avoid wasting vegetables?. I shop just for myself, and it seems like every week I have to throw away a vegetable that's gone bad because I couldn't eat it in time. I buy very few groceries and even those according to planned recipes, so it's not that I'm buying too much per se. It's just that even the smallest portions for sale will last me long enough to go bad before I can eat them! This happens to me with:
Packaged spring greens
Bags of snap peas
Bean sprouts (it's like they're never ending)
Bunches of herbs
Etc. I love eating fresh veggies but I can't justify buying them to waste them. How can I keep them fresh longer, buy them smarter, or prepare them more efficiently so I stop throwing stuff in the compost bin once a week? | 0non-cybersec
| Reddit |
FTP app that can monitor a local folder. <p>I recently switched to another text editor from Coda. The feature I miss most from Coda is that it can monitor any folder and publish any changes made with a click of a button. I have been looking for an FTP application that offers this functionality, but haven't found anything. Most apps will "synchronise" a remote and a local folder by scanning them and looking at the size and/or timestamp of each file. Since many of my projects contain thousands of projects and I'm on a slow connection, this is not a good solution for me. So I'm looking for an app that can:</p>
<ul>
<li>Monitor files in a local folder (don't care about remote changes)</li>
<li>"Mark" these when they are changed</li>
<li>Offer to upload the files that have been changed since the last upload</li>
</ul>
<p>I only need to watch for local changes. I am the only one editing these files. So I can safely overwrite anything on the server when it has been changed locally.</p>
<p>I can not use Git or any versioning protocol because most projects are running on cheap shared hosting, without shell access. However I am fairly experienced using the shell so if there's a solution there that's also an option, although I would prefer an app with a GUI.</p>
| 0non-cybersec
| Stackexchange |
Christian Conservatives reveal a lot about what they actually believe whenever they complain about being taxed.. If you believe that your purpose in life is to worship God and to spread his message, the amount of money that comes and goes out of your bank account should not be a concern of yours whatsoever, and yet it's one of their primary concerns in life. Except of course when the tax dollars go towards the military and war. They don't seem to mind that whatsoever, strangely enough. | 0non-cybersec
| Reddit |
20 Simple Ways to Eat Healthy on a Budget. | 0non-cybersec
| Reddit |
Koenigsegg Regera and Agera RS - 2016 Geneva. | 0non-cybersec
| Reddit |
Open URxvt tab with shift-down, not with ctrl-t. <p>On Debian, <kbd>Shift+Down</kbd> in URxvt opens new tab. But recently I started using another machine with Fedora, and here it has no effect; here <kbd>Ctrl+T</kbd> does that. But neither one works on both, so I'm doomed to think of where I am. Plus, I need <kbd>Ctrl+T</kbd> in some programs (Vim, MOC...).</p>
<p>Inspired by a <a href="https://wiki.archlinux.org/index.php/rxvt-unicode" rel="nofollow">document on ArchWiki</a>, I tried to add <code>URxvt.keysym.Shift-Down: perl:tabbedex:new_tab</code> to <a href="https://github.com/AloisMahdal/mydots/blob/master/dotfiles.config/Xlib/global.Xdefaults" rel="nofollow">my ~/.XDefaults,</a> but that did not have effect. (But even if it <em>did</em> work, I'm not sure if it would release <kbd>Ctrl+T</kbd> for other use.)</p>
<p>Any ideas?</p>
| 0non-cybersec
| Stackexchange |
[FRESH] Migos - Money Counter. | 0non-cybersec
| Reddit |
What are your best "street smarts" tips for other women?. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
[FRESH] Rae Sremmurd - Powerglide (feat. Juicy J). | 0non-cybersec
| Reddit |
Is there enough detail to tell what kind of old car this is? Saw it while kayaking and was curious.. | 0non-cybersec
| Reddit |
Which private key file in private-keys-v1.d directory belongs to which key?. <p>Since GnuPG 2.1 (<a href="https://www.gnupg.org/faq/whats-new-in-2.1.html" rel="noreferrer">https://www.gnupg.org/faq/whats-new-in-2.1.html</a>), private keys of GnuPG are stored in the <code>private-keys-v1.d</code> subdirectory. After experimenting with key creation etc., I found that I have several <code>*.key</code> files in this directory:</p>
<pre><code>$ ls .gnupg/private-keys-v1.d
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.key
yyyyyyyyyyyyyyyyyyyyyyyyyyyy.key
zzzzzzzzzzzzzzzzzzzzzzzzzzzz.key
...
</code></pre>
<p>The file names (x+, y+ and z+) looks like fingerprints etc., but are not equal to any of my existing public keys. How can I find which key file in this directory belongs to which key visible with <code>gpg --list-keys</code>?</p>
| 0non-cybersec
| Stackexchange |
Can’t wait till Spooktober 24th. | 0non-cybersec
| Reddit |
Is the empty function always a bijection?. <p>Let $f_A:\emptyset\to A$ be the empty function with range $A$. The definition of a bijection as applied to this function is:</p>
<p>$$\forall x,y \in \emptyset (x=y \implies f_A(x)=f_A(y))$$</p>
<p>negating you get:</p>
<p>$$\exists x,y \in \emptyset (x = y\land f_A(x) \neq f_A(y))$$</p>
<p>Which is obviously a false statement since there are no elements in $\emptyset$ at all.</p>
<p>I got troubled by this question when considering the empty set as an inital object of the category Set and the following theorem:</p>
<p>"if I is an initial object then any object isomorphic to I is also an initial object."</p>
<p>but since every empty function is a bijection and thus an isomorphism it follows that all the objects in Set are initial which is obviously false.</p>
<p>What did i miss? </p>
| 0non-cybersec
| Stackexchange |
What are the new features available to bash 4?. <p>I was using bash3 up to now, and just got a copy of the latest version</p>
<pre><code>$ ./bash --version
GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$
</code></pre>
<p>What are the major changes/feature additions in version 4 over version 3?</p>
| 0non-cybersec
| Stackexchange |
Hozier -- Take Me to Church [Indie]. | 0non-cybersec
| Reddit |
How this owl fits in it's hole (x-post from r/Superbowl). | 0non-cybersec
| Reddit |
Help me follow Food Rules. So I'm trying to eat healthier. I just read In Defense of Food and Food Rules. I like the ideas and I want to try them. I've never been a very healthy eater and I know it'll never work to try make huge changes to my entire diet at once, but I want to give it a shot, maybe one meal at a time. Is anyone else trying to follow some of these rules, especially (I'm paraphrasing here) "eat mostly plants and of those plants, mostly leaves" and "don't eat anything your great grandmother wouldn't recognize"? If you are, specifically what do your meals consist of?
Since someone posted that if we want advice, we should talk about ourselves: I could best be described as a very short, very fat man - 5'3", 205 lbs who is tired of looking and feeling bad. I've been (morbidly) obese as long as I can remember. I've already done some of the basics - I avoid drinking anything with calories other than some soy milk in my breakfast and I exercise (weights and cardio, mostly presses and rows for the upper body, squats and deadlifts for the lower body and jogging) four times a week. I know that to lose weight I need a calorie deficit and not just a diet change, but I can't imagine it will hurt to eat lots of leaves instead of lots of breads.
EDIT: Fixed a small grammar error | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How do I "unpin" the kernel?. <p>Earlier this year I had to pin my kernel because an update came down the pipe that broke WINE compatibility with Win16 apps. I followed the directions here:
<a href="https://askubuntu.com/questions/178324/how-to-skip-kernel-update">How to skip kernel update?</a></p>
<p>It appears as though the issue has been fixed because tests have shown that Win16 applications once again work with later kernel builds. I've removed the changes I made, but the kernel is still not updating. What am I missing?</p>
| 0non-cybersec
| Stackexchange |
Joan Jett and Mike Tyson rocking out. (1980s). | 0non-cybersec
| Reddit |
Tonight on CSI: Moscow. | 0non-cybersec
| Reddit |
Hey everyone! I recently finished this: "The Wrath of Thoth" What do you guys think?. | 0non-cybersec
| Reddit |
Show that $x^{n-1}y^{n-1} = (yx)^{n-1}$ in a group G where $(xy)^n = x^ny^n$ for some fixed n.. <p>I'm sure there is a simple trick but I'm not sure what to do.</p>
<p>Some attempts:</p>
<p><span class="math-container">$x^{n-1}y^{n-1} = x^{-1}x^ny^ny^{-1} = x^{-1}(xy)^ny^{-1}$</span></p>
<p><span class="math-container">$(yx)^{n-1} = (yx)^n(yx)^{-1} = y^nx^{n-1}y^{-1}$</span></p>
<p><span class="math-container">$(yx)^{n-1} = (yx)^{-1}(yx)^n = x^{-1}y^{n-1}x^n$</span></p>
<p>I'm not sure where to go from here. Any hints?</p>
| 0non-cybersec
| Stackexchange |
problem concerning ideal of Z[X]. <p>let $a$ a complex number , and $f$ be an irreducible polynomial with integer coefficients such that : $ f(a)=0$</p>
<ul>
<li><p>1) Show that the set : $\{ g(a) \mid g \in \mathbf{Z}[X]\}$ is a ring isomorphic to $\mathbf{Z}^{n}$ respect to their group structure where $n=\deg f$</p></li>
<li><p>2) show that every non null Ideal of the previous ring is isomorphic to $\mathbf{Z}^{n}$ respect to their group sturcture </p></li>
</ul>
<p>Help me to solve these questions with some hints please :)</p>
| 0non-cybersec
| Stackexchange |
Some madlads hate being outdone. | 0non-cybersec
| Reddit |
Drawing a sub cubic grid inside a cubic grid (with different gray scales). <p>This is a related but very simple follow-up to <a href="https://tex.stackexchange.com/q/464249/41144">a previous question</a>, inspired by the comment of @marmot "Or do you want to use different grays for different planes?"</p>
<p>Here is what I have</p>
<p><a href="https://i.stack.imgur.com/7VQo3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7VQo3.png" alt="enter image description here"></a></p>
<p>This is a 8 x 8 x 8 cubic.</p>
<p>Suppose I like to have a 3 x 4 x 5 lattice with a darker lattice sitting at a new origin (2,2,2) of this 8 x 8 x 8 cubic. How should I do this? [It looks simple -- I just need to redraw another a 3 x 4 x 5 lattice sitting at a new origin (2,2,2).]</p>
<pre><code>\begin{figure}[h!]
\centering
\begin{tikzpicture}[tdplot_main_coords]
\begin{scope}[line width=0.01pt,black!20,xshift=5cm,scale=1.5]
\foreach \X in {0,1,...,8}
{\foreach \Y in {0,1,...,8}
{\draw (\X/2,\Y/2,0) -- (\X/2,\Y/2,8/2);
\draw (\X/2,0,\Y/2) -- (\X/2,8/2,\Y/2);
\draw (0,\X/2,\Y/2) -- (8/2,\X/2,\Y/2);}}
\end{scope}
\end{tikzpicture}
\label{fig:lattice-2}
\caption{}
\end{figure}
</code></pre>
| 0non-cybersec
| Stackexchange |
About construction of homeomorphism. <p>Let <span class="math-container">$(X, d)$</span> be a compact metric space and for every <span class="math-container">$y\in X$</span>, <span class="math-container">$g_y:X\to X$</span> be a homeomorphism. Define <span class="math-container">$f:X\to X$</span> by <span class="math-container">$f(x)= g_x(x)$</span>. Can we say that <span class="math-container">$f$</span> be a homeomorphism?</p>
<p>Please help me to know it.</p>
| 0non-cybersec
| Stackexchange |
Show that $0\cdot m = 0$. <p>If $R$ is a ring with $1$ and $M$ is a left $R$-module, how could I prove that $0_R m = 0_M$? I am using the following axioms</p>
<blockquote>
<ol>
<li>$(M,+)$ is an abelien group.</li>
<li>$(r+s)\cdot m = r\cdot m + s\cdot m$ for all $r,s\in R, m\in M$.</li>
<li>$(r\times s) \cdot m = r\times (s\cdot m)$ for all $r,s\in R, m \in M$.</li>
<li>$r\cdot(m+n) = r\cdot m + r\cdot n$ for all $r\in R,m,n\in M$</li>
<li>$1\cdot m = m$ for all $m\in R$</li>
</ol>
</blockquote>
<p>I actually did
$$0_R m = (r + (-r)) m=rm + (-r)m=rm - rm = 0$$</p>
<p>But then I realized that I made a circular reasoning, because I used this conclusion to show that</p>
<p>$$m + (-1)m=1\cdot m + (-1)\cdot m = (1 + (-1))\cdot m =0 \cdot m = 0$$</p>
<p>, which I used in the first proof.</p>
| 0non-cybersec
| Stackexchange |
Alternating series of arithmetic function values. <p>Some time ago I asked about alternating sums like
<span class="math-container">$\sum_{n\leq x}(-1)^n \phi(n)$</span> where <span class="math-container">$\phi(n)$</span> is Euler's totient
and the similar sum involving <span class="math-container">$\sigma(n)$</span> where <span class="math-container">$\sigma(n)=\sum_{d|n}d.$</span>
Certain sums of this form are of some interest e.g.
A.Ivic (1) and M.Jutila (2,3) show the importance of the alternating sum <span class="math-container">$$\sum_{n\leq x}(-1)^n d(n)$$</span>
in connection with the relation between the error term in the mean value formula for <span class="math-container">$|\zeta(\frac{1}{2}+it)|^2$</span>
and the error <span class="math-container">$\Delta(x)$</span> in Dirichlet's formula for the average order of the divisor-function <span class="math-container">$d(n)$</span>.
Using <span class="math-container">$\sigma(2n)=\sigma(2)\sigma(n)-\sigma(n/2)$</span> (n even) and <span class="math-container">$\sigma(2n)=\sigma(2)\sigma(n)$</span> (n odd) we get
<span class="math-container">$$\sum_{n\leq 4x}(-1)^n \sigma(n)= -\sum_{n\leq 4x}\sigma(n)+6\sum_{n\leq 2x}\sigma(n)-4\sum_{n\leq x}\sigma(n).$$</span>
Denoting <span class="math-container">$\sum_{n\leq x}\sigma(n)$</span> by <span class="math-container">$S(x)$</span> then <span class="math-container">$$S(x)=\zeta(2)x^2/2+xR(x),\quad R(x) =O(\log^{2/3}x).$$</span>
So if our sum is denoted by <span class="math-container">$A(x)$</span>, <span class="math-container">$$A(4x)=-S(4x)+6S(2x)-4S(x)\mbox{ so } A(x)=\zeta(2)x^2/8+xR'(x)$$</span>
where <span class="math-container">$$R'(x)=-(R(x)-3R(x/2)+R(x/4))/4=O(\log^{2/3}x) (=O(\log x)).$$</span>
Is it possible that a better result holds ?</p>
<p>What about <span class="math-container">$\Omega$</span>-results ?
We know <span class="math-container">$R(x)=\Omega(\log\log x)$</span>. Doesn't a corresponding <span class="math-container">$\Omega$</span>-result for <span class="math-container">$R'(x)$</span> hold?
Hardy and Wright Theory of numbers p.353 prove that an infinite sequence of <span class="math-container">$X$</span>s exists
such that <span class="math-container">$\sigma(X)>K.X\log\log X$</span>, <span class="math-container">$K,K'$</span> etc absolute constants.
Suppose if possible <span class="math-container">$R'(x)=o(\log\log x)$</span>. Then <span class="math-container">$$|R'(x)|<\epsilon \log\log x$$</span>
for all <span class="math-container">$x >$</span> some <span class="math-container">$x_0(\epsilon)$</span> and arbitrarily small <span class="math-container">$\epsilon$</span>.
<span class="math-container">$$A(x)-A(x-1)=\pm \sigma(x)=K'x^2-K'(x-1)^2+x(R'(x)-R'(x-1))+R'(x-1)$$</span> with <span class="math-container">$K'=\zeta(2)/8$</span>.
So <span class="math-container">$$\sigma(x) \leq \ 2K'x+K'^2+x(|R'(x)|+|R'(x-1)|)+O(\log x)$$</span>
and <span class="math-container">$$\sigma(x)/x \leq |R'(x)|+|R'(x-1)|+O(1)$$</span> as <span class="math-container">$\log x<x$</span> if <span class="math-container">$x\gt 1$</span>
Take <span class="math-container">$X_0$</span> to be the first <span class="math-container">$$X\gt \max(x0+1,\exp\exp (K/\epsilon)).$$</span> Then <span class="math-container">$$\sigma(x)\leq 3\epsilon x\log\log x$$</span>
for <span class="math-container">$x\gt X_0$</span>, a contradiction. Hence <span class="math-container">$R'(x)=\Omega(\log\log x)$</span>.
What's wrong with this ? </p>
<ol>
<li>Aleksandar Ivic, Uniform Distribution Theory 1(2006), 125-135.</li>
<li>M. Jutila, Riemann’s zeta-function and the divisor problem, Arkiv Mat. 21(1983), 75-96 and II, ibid. 31(1993), 61-70.</li>
<li>M. Jutila, On a formula of Atkinson, in “Coll. Math. Sci. Janos Bolyai 34, Topics in classical Number Theory, Budapest 1981”, North-Holland, Amsterdam, 1984, pp. 807-823.</li>
</ol>
| 0non-cybersec
| Stackexchange |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.