Sandwich

0

votes
0

answer
4

views

typscript compiler (tsc) throws error, but only when used in yarn script, otherwise works fine

So if I execute: tsc Everything compiles, no issues. Picks up patterns in tsconfig.json # inside package.json scripts: { "build" : "tsc" } $ yarn build Throws error. error TS6307: File '***' is not in project file list. Projects must list all files or use an 'include' pattern. error Command faile...
Sandwich
1

votes
2

answer
377

views

Should sidebars be inside <main>?

I'm unsure about the element's relation to a site's sidebar, and would appreciate some guidance, or at least communal majority consensus. ;) Given the following page elements: Logo and stuff Main Nav ... Copyright blah How should the element and a sidebar element be arranged, if replacing the ...?...
Sandwich
1

votes
1

answer
122

views

Get Featured Image from different Model

I have 2 model objects, Business & BusinessImage as so, listed with views and index.html. I am trying to list the business's featured image, but it's not happening. I am getting the following error: 'QuerySet' object has no attribute 'businessimage_set' How can I get the business featured image for...
ham-sandwich
3

votes
1

answer
845

views

OSX Status Bar Image Sizing - Cocoa

So i'm having a problem with the image of a NSStatusBar item, it seems like the image is pushing away from the rest of the menu items as you can see in this picture. But when the menubar is inactive (as in i'm on my other monitor or not in the app) the problem doesn't happen as you can see in this p...
Bolt Sandwich
2

votes
1

answer
464

views

How do I convert a sprite image into JSON for a Starbound mod?

In a game that I play called Starbound I'm trying to create a modded item. In the game, the item code is based on JSON strings. An example of a string on an item that I created uses the following JSON to distinguish a drawable item in game: [{ "image":"/particles/ash/3.png?setcolor=090909", "positio...
Sandwich
3

votes
3

answer
747

views

How does one properly handle keypresses and repainting of a JComponent in the context of moving a ball around a screen?

I thought I would try and write a program that would paint a ball, and when the arrow keys are pressed, would move the ball around the screen in the direction pressed. First I started off to try and make a program that would just do "UP" arrow key motion. I've looked around for a solution, and just...
T Sandwich
2

votes
2

answer
1.1k

views

Prevent paragraph from increasing the width of a floated parent

I often find myself using code blocks for inline article images like the following: ...article text. Potentially long image caption More article text... Or, the more succinct HTML5 version: ...article text. Potentially long image caption More article text... Since I use a CMS that processes images o...
Sandwich
4

votes
3

answer
64

views

How to use an exist property in object [duplicate]

This question already has an answer here: Self-references in object literals / initializers 21 answers I'm trying this var a = { "a" : "Hey", "b" : this.a + "!" }; console.log(a.b); ==>"undefined!" but if I use this it works fine. var a = {}; a.a = "haha"; a.b = a.a + "!"; console.log(a.b); ==>"hah...
Hero Sandwich
1

votes
1

answer
289

views

(PostGIS) Merge two tables based on multlinestring geometry

I'm completely new to PostGIS (and databases in general), so apologies if I use terms incorrectly. I have two tables with multilinestring geometries, and I want to copy one field from one table to the other based on geometries. The geometries don't overlap, so I want to find the closest geometry. I'...
Sandwich
4

votes
3

answer
1.7k

views

Ansible with Github: Permission denied (Publickey)

I'm trying to understand the GitHub ssh configuration with Ansible (I'm working on the Ansible: Up & Running book). I'm running into two issues. Permission denied (publickey) - When I first ran the ansible-playbook mezzanine.yml playbook, I got a permission denied: failed: [web] => {"cmd": "/usr/bin...
Sandwich Heat
1

votes
2

answer
56

views

Remove all escape sequences in specific code block

I have an HTML snippet which looks like the following: \n object.__getattribute__\n \n and\n \n super.__getattribute__\n \n peek\nin the\n \n __dict__\n \n of classes on the MRO for a class when looking for\nan attribute. This PEP adds an optional\n \n __g...
ham-sandwich
1

votes
2

answer
1.8k

views

What's the specific permission to allow an AWS IAM group access to change an S3 object's metadata?

I want to grant an AWS IAM group permission to upload, view, modify, and delete objects in a single bucket, through the Management Console. I've got most of it down, but I'm getting reports that users in that group are unable to modify object metadata - they're getting the "Sorry! You were denied ac...
Sandwich
3

votes
3

answer
4.6k

views

Fibonacci Algorithm in Java

I'm trying to solve a homework problem for an algorithms class and I keep getting an out of bounds index array for the code I've written below. I've been trying to play around with it in Python since I'm pretty comfortable with that, but I seem to be getting a similar exception. Can anyone give me a...
Sandwich Heat
2

votes
2

answer
386

views

Stop pure CSS tabs from scrolling to top of page on selection

I have a tabbed information box in CSS/HTML which works perfectly, apart from the tab row scrolling to the top of the web page whenever the tab is changed. It appears that this is a feature of # targets. I have searched for ways to supress this and the consensus appears to be that it can only be...
Sandwich
2

votes
3

answer
519

views

window.open force new JavaScript thread

Does anyone know if there is a way to force a new JavaScript thread for a new window? I have an ExtJs application whose render steps are slaughtering user interaction. I can't toss the whole Ext application right now, so I've devised a way to make use of localStorage to manage passing events between...
Sandwich
3

votes
1

answer
2.6k

views

pip install mod_wsgi fails in virtualenv

I'm trying to install mod_wsgi using pip in python 2.7.10 on mac os 10.12 inside a virtualenv. I intend to use it in a a Django 1.10.3. When I run "pip install mod_wsgi" I get the following output: Collecting mod_wsgi Using cached mod_wsgi-4.5.7.tar.gz Complete output from command python setup.py eg...
A_Sandwich
2

votes
0

answer
218

views

Passing a SparkR dataframe into a user-defined function

I know that to apply a user-defined function to a SparkR dataframe, one can use dapply/gapply. I wonder if it's a good practice to pass a SparkR dataframe directly into a UDF? e.g., first create a dataframe df
sandwich
3

votes
1

answer
75

views

Why does the label element have a form attribute?

In the HTML standard, why does the HTML label element have a form attribute defined for it when it already has the for attribute? What purpose does it have? If I have a label element where either the child contents are an input type or the for attribute is used what purpose does the form attribute h...
5

votes
2

answer
996

views

Difference between fitting algorithms in scipy

I have a question about the fit algorithms used in scipy. In my program, I have a set of x and y data points with y errors only, and want to fit a function f(x) = (a[0] - a[1])/(1+np.exp(x-a[2])/a[3]) + a[1] to it. The problem is that I get absurdly high errors on the parameters and also different v...
3

votes
0

answer
1.5k

views

Webstorm 10 mongoose unresolved function with mongoose-DefinitelyTyped installed

I recently reinstalled my MEAN stack development environment. I cannot for the life of me get mongoose functions to resolve in Webstorm 10. I have mongoose-DefinitelyTyped and mongodb-DefinitelyTyped installed and checked. My node.js application runs fine and is usable. I'm using mongoose to do my...
Sandwich
3

votes
3

answer
1.6k

views

Favorite IDE/Code Editor for Mac OS X? [duplicate]

Possible Duplicate: Mac text/code editor What's your favorite Code Editor or IDE for Mac OS X? Note: An associate and myself found a newer Code Editor, WYSIWIG style, about a month ago, and cannot recollect it's name or find it anywhere on the net. It was referred to in several articles as the 'Dr...
Sandwich
6

votes
1

answer
3.9k

views

C++/CLI Inheriting from a native C++ class with abstract methods and exposing it to C#

I've been googling around in circles trying to find an fully fledged example to this but to no avail. I have a C++ API that presents a number of classes that contain pure virtual methods for the developer to extend from. What I'm attempting to do is provide this interface to C# via the C++/CLI. I'v...
2

votes
0

answer
109

views

PHP_CSV_Utilities Cannot find CSV_Reader Class

Does anyone have experience with the PHP CSV Utilities library ( http://code.google.com/p/php-csv-utils/wiki/Documentation )? I've tried to install it on my Mac--I'm running XAMPP and editing with Aptana 3. I followed the instructions and copied the CSV folder over to my project file so the organiza...
Sandwich Heat
8

votes
3

answer
19.2k

views

Django/Python Runtime Error: Maximum recursion depth exceeded

I am trying to add a blog app to my Django project. When I put everything together, I can see my blog posts page, but something with the blogapp/urls.py file is causing me to get a maximum recursion error somewhere and I'm having a hard time finding it. First, here is the error message in full: Runt...
Sandwich Heat
2

votes
1

answer
83

views

Inverse of JavaScript Object.assign

I have a flat JavaScript object called dictionary that I want to update based on other flat objects. Sometimes I want to add every property of an object to dictionary and sometimes I want to delete every key in dictionary that exists in another object. I'll be using the values of those properties la...
crass_sandwich
2

votes
2

answer
65

views

Trouble changing control visibility from control

In my application, I've got a stackpanel I'd like to keep hidden (or collapsed, whatever keeps it out of sight until it's needed) and it is to be made visible when the user clicks a button. The issue I've run into, using my rudimentary knowledge of the MVVM technique, is to have the stackpanel's vis...
Sandwich
2

votes
1

answer
715

views

QTableView / QTableWidget: Stretch Last Column using Qt Designer

I am trying to stretch the last header of my QTableView / QTableWidget in PyQt. Multiple questions have been asked about this topic already by hard coding the value into the file such as: Qt table last column not stretching to fill in parent How to stretch QTableView last column header But how can t...
ham-sandwich
1

votes
2

answer
87.1k

views

Excel: if cell 1 contains X or Y or Z, then cell 2 should equal W

As from the title, I need Excel to auto-populate the B row cells based on the corresponding A row cells content. So if cell A1 contains X or Y or Z, then cell B1 should equal W, or if A1 contains G or H or J, cell B1 should equal W.
knuckle_sandwich
15

votes
2

answer
37.1k

views

Useradd using crypt password generation

I am working on what I thought was a very simple script to dynamically create an FTP user using 'useradd' There are several parts of this process I am unfamiliar with, and an entire day's research has not gotten me too far. Here is what I have: password="pass" pass=$(perl -e 'print crypt($ARGV[0], "...
Sandwich
0

votes
1

answer
176

views

Aptana Python stdlib issue with virtualenv

I recently started working on a project using just vim as my text editor with a virtualenv setup. I installed a few API's on this virtualenv from GitHub. Eventually, the project got a little bigger than vim could handle so I had to move the project to an IDE.       I chose Aptana Studio 3. When...
Sandwich Heat
-1

votes
1

answer
134

views

Can overlapping colspan on table cells shrink-to-fit?

I can’t figure this one out for the life of me. Take a table that has 2 rows, each with 2 cells. The top-right and bottom-left cells are set to colspan="2" (so the table really has 3 columns). If the non-colspan cells have a 100×100 image inside, and the colspan cells have a 200×100 image, you...
Sandwich