Andrew Andrew

18012 questions
1

votes
1

answer
350

views

AVAudioPlayerNode scheduled buffers and audio route change in iOS11

I am seeing different behaviour between iOS 9/10 and iOS 11 for buffers that are future scheduled on an AVAudioPlayerNode when an audio route change occurs (e.g. you plug in headphones). Has anyone experienced anything similar and how did you resolve it? Note that I reported this issue up on Apple'...
Andrew Coad
1

votes
1

answer
150

views

Python modifying dict entries in-place during iteration

I know that in the general case, it’s unsafe to mutate a dict while iterating over it: d = {1: 2, 3: 4} for k in d.keys(): d[k + 1] = d[k] + 1 This yields a RuntimeError as expected. However, while reading the documentation for dict, I found the following (emphasis mine): Iterating views while add...
Andrew Sun
1

votes
1

answer
42

views

ggplot match color code column to another column in R dataframe [closed]

I have this simple dataframe in the form: x y tissue color_code 1 2 nerve #EEEE00 2 3 brain #33CCCC There are several thousands rows for each tissue. Each tissue will have the same color_code (e.g. all rows with nerve have a color code of #EEEE00,etc.) I would like to m...
Andrew Hamel
1

votes
2

answer
52

views

Cannot run jar on ubuntu with JFX

Good day, I am trying to run a program called graphdb-native-app-8.8.1-jfx.jar on a ubuntu virtual machine. I have the latest version of java installed, and have made sure JAVA_HOME is set to the correct java-version. java -version java version '11.0.2' 2019-01-15 LTS Java(TM) SE Runtime Environment...
Andrew Malcolm
1

votes
1

answer
29

views

Dapper can't recognize wildcard param in the single quotes

I am trying to get indexes fragmentation info from database. Here the dapper sql query: var result = await _dbConnection.QueryAsync([email protected]' select a.index_id as Id, name as Name, avg_fragmentation_in_percent as FragmentationPercent from sys.dm_db_index_physical_stats (DB_ID(N'@dbName'), OBJECT_ID(N'@ta...
Andrew
1

votes
2

answer
39

views

Can someone explain the intuition of loops when used on dataframes?

I want to fully understand what each line of code does as I am currently not 100% sure. The code is from a tutorial series I am watching from PythonProgramming.net. I believe the first 'If' statement is adding columns to the act_min_wage dataframe and then renaming them? The 'else' statement seems...
Andrew Andreas
1

votes
3

answer
58

views

Advanced symbol-macrolet

Suppose I have a class class with slots first and second. Inside my function I can bind a variable to one of those slots like (symbol-macrolet ((var (first cls))) ....) Obviously I can also bind the second slot to smth. Questions is, let's say that first and second are either some number or nil. Le...
Andrew S.
1

votes
1

answer
53

views

html2canvas captures everything except the content of an inner canvas

I've got a map rendered by means of leaflet. I need to make a screenshot of that map by using html2canvas. To make use of html2canvas, I need to provide a DOM element to capture (elementToCapture) and an optional configuration (html2canvasConfiguration). var html2canvasConfiguration = { useCORS: t...
Andrew Tobilko
1

votes
1

answer
44

views

Why does storing my regex in a variable break the comparison test? (Awk/Gawk)

I have a file called regeces containing a number of line-by-line regexes. Here's an example: The .* is .* years old I like .* with lots of .* I also have a data file very creatively called data: The car is 3 years old I like pizza with lots of pepperoni I like tacos with lots of cheese The house is...
Andrew
0

votes
0

answer
5

views

Plugin for authorization in header for wordpress api

I am creating WordPress api and i am getting error in my server { 'code': 'rest_cannot_create', 'message': 'Sorry, you are not allowed to create posts as this user.', 'data': { 'status': 401 } } but in my local machine its working fine . which plugin is used for authentication in WordPress api? i ha...
Emmie Andrew
1

votes
4

answer
7.2k

views

Remove spacing between UITableViewCells

I have UITableViewCells in the same section which have gaps between them. I coloured each cell's contentView background and did an NSLog to show that it's the same height as the cells. Still, there's a gap between them. They're definitely in the same section as each other. Any ideas as to what could...
Andrew
3

votes
5

answer
63

views

Finding all possible combinations of numbers from a vector to reach a given sum (No repetitions)

I have a vector 'numbers' and I want to find out all the possible combinations of 1,2 or 3 numbers that would sum in the range of 90 to 110. I know there are plenty of posts with ways to solve the problem, but none of them do what I need. At least not in R# numbers
Andrew
1

votes
6

answer
1.1k

views

Having trouble understanding how webpack bundles dependencies

I'm struggling to understand how webpack includes dependencies in a bundle. I built a minimal-ish demo using webpack, typescript and threejs that works fine. It's on github here The first problem is that I don't understand how threejs gets included in the bundle.js. I think it's great that it does!...
Andrew E
1

votes
1

answer
703

views

Grouping points after cut plane three js

I found all intersection points between the object and plane, as in this great example. But now I want to connect these points between themselves (dividing into separate arrays) where the plane passes and connect them again. I tried to connect them by distance, but this does not give an effective re...
Mr.Andrew
0

votes
0

answer
11

views

Iterating through Pandas groups to create DataFrames

I have a table containing production data on parts and the variables that were recorded during their production. FORMAT: Part | Variable1 | Variable 2 etc _____________________________ 1-----------X---------------X 1-----------X---------------X 2-----------X---------------X 2-----------X-----------...
Andrew Pynch
1

votes
2

answer
408

views

How to run an aggregate query via mongo_go_driver that has javascript in it?

I'm using the mongo-go-driver (https://godoc.org/github.com/mongodb/mongo-go-driver/mongo) and I'm trying to do the equivalent of db.getCollection('mycollection').aggregate([ { $lookup: { from: 'anothercollection', localField: '_id', foreignField: 'foreignID', as: 'matched_docs' }}, { $match: { 'ma...
Andrew Springman
1

votes
1

answer
57

views

GraphQL How would I write a query to find by first name

I am trying to understand Graph QL and have a basic example working. e.g. if I pass in this query I get back the match with the id. query { person(id:'4090D8F6-EFC4-42CD-B55C-E2203537380C') { firstname surname } } My data is just a static set of test data, what I would like to do now is return all u...
Andrew
1

votes
3

answer
99

views

draw line doesn't work, what might be the problem?

I want to draw the line by clicking the mouse on the first coordinate where the line should start and second coordinate where the line should end. When I run my project nothing happens. I cannot find out what my code is missing. LONG WINAPI WndProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lPar...
Andrew
1

votes
1

answer
36

views

Using automake to copy a file as part of the default target

I'm working on a project that's built with GNU Autotools. As part of the build that's done by default when the user runs ./configure && make, I want it to copy the file config/foo.conf.orig to config/foo.conf, generating an example configuration that the user can edit. What do I put in the Makefile....
Andrew Janke
1

votes
2

answer
98

views

Is there a way to define an 'int' by 'greater/lesser than' instead of '='?

I was playing around in a challenge on some website, and I met this problem. i have an unidentified integer ... only I know that it is greater that x or\and lesser that y and so on ... is there a way to define a variable based on so? ... I mean as being greater\lesser than integer .. some have not...
Andrew_Jacop
1

votes
1

answer
892

views

Is there a way for me to check if a song exists on the iPhone? [closed]

Can i see if a song exists on the phone? This is for when i'm loading up the app, so i can see if they've removed the song or not.
Andrew
0

votes
0

answer
9

views

debug between two virtual machine

I met a very tricky configuration problem these two days, and It took a whole day and I can't figure it out. Originally, I used my host(windows) and virtual machine(xp) for my kernel debugging. But windbg was l always hangs and even though I input g in my windbg, I can't control the virtual machinin...
Andrew Bao
1

votes
4

answer
469

views

Separate city and state in string?

A string, citystate, could be formatted like: 'Greenwich, CT' 'Greenwich,CT' 'Greenwich CT' How can I split the string, citystate, into two separate strings, city and state (using Python)? (such that city == Greenwich and state == CT) Thanks for the help!
Andrew
1

votes
0

answer
859

views

How Hyper-V DNS resolution works and how to fix VM registration delay?

I have created Virtual Switch in Hyper-V management console (Windows 10) connected to the internet via ICS and launched a virtual machine (Linux) connected to this switch. I named virtual machine m1 in the Hyper-V console. When it is up and running, I ssh to the machine by the assigned address (192....
Andrew
1

votes
3

answer
83

views
1

votes
1

answer
99

views

How to set the responsive width of Polymer component inside `<iron-list grid>`

Consider the following code, where always has a fixed width of 200px inside Polymer Element Test Case iron-list-grid-calc-issue .content { width: calc(50% - 32px); /* Not working */ width: 200px; height: 200px; line-height: 200px; text-align: center; border: 1px solid grey; box-sizing: border-box;...
Andrew See
1

votes
2

answer
722

views

Code for joystick on sense hat

I just got a sense hat for Christmas, and I am working through the following website: https://projects.raspberrypi.org/en/projects/getting-started-with-the-sense-hat. When doing the joystick part of the website, i typed in this code: from sense_hat import SenseHat sense = SenseHat() while True: for...
Andrew Bell
1

votes
0

answer
75

views

Is Dependency Injection with AngularJS and Webpack superfluous?

I'm working on an AngularJS application and trying to convert it from a Gulp bundling system over to Webpack. I've been searching for some time now for arguments for/against utilizing the AngularJS dependency injection in tandem with require() statements for Webpack dependency graphs. Why might some...
Andrew Craswell
1

votes
1

answer
389

views

MVC using VS2017: The name 'Model' does not exist… and other errors when I create a new controller

Hello to everybody at Stack Overflow and please pardon me if I am missing anything here! I am studying ASP.NET to prepare myself for an internship. To this end, I am following along with a Microsoft Virtual Academy course entitled 'Introduction to ASP.NET Core with Visual Studio 2017'. Specifically,...
Andrew Lau
1

votes
0

answer
48

views

Verify the expected scope of an autowired bean?

Suppose there is a bean defined as: @Component @SessionScope public class Person { private int age; public int getAge() { return age; } public void setAge(int age) { this.age = age; } } and a rest controller such as: @RestController public class PersonController { @Autowired private Person person; @...
Andrew S
1

votes
1

answer
829

views

Trying to connect to database using Postgres but it isn't able to translate the address on Amazon server to Amazon database

Getting this error when trying to connect to a database on Amazon. This is from an Amazon server. psycopg2.OperationalError: could not translate host name 'domain-stg-postgres.caxdkvuertc9.us-west-1.rds.amazonaws.com/projectname_dev' to address: Name or service not known I'm setting this here: db['h...
Andrew Alexander
1

votes
0

answer
37

views

Automate maintenance of Authorized JavaScript origins for large number of domains

We are using the google drive sdk on a large number of domains to load the google picker. In order for this to work we need to manually enter all domains in the Authorized JavaScript Origins field of the Developer Console. Additionally, when we remove or change a domain we will have to go back in to...
Andrew Hale
1

votes
1

answer
126

views

CAPABILITY_NAMED_IAM using cloud9

I am trying to do all my dev work using cloud9 template for serverless apps It complains that i don't have CAPABILITY_NAMED_IAM due to the fact that I am creating a role. How do I edit cloud9 deploy defaults to include CAPABILITY_NAMED_IAM?
andrew shved
1

votes
1

answer
30

views

Tweeting a variable or a html classes contents - Random Quote Machine - freeCodeCamp

I'm relatively new to JavaScript. I'm working on the freeCodeCamp - 'Random Quote Machine'. And trying to tweet a variable and or html .class. My code thus far: Code Pen $('#tweet').click(function()window.open('https://twitter.com/intent/tweet?text=' + quote, '_blank');}); I hope someone could give...
Andrew Raynes
1

votes
1

answer
162

views

Button that returns dataframe

I have a Jupyter Notebook that contains a button, some dropdowns, and a dataframe. Essentially, selections are made in a dropdown, and after clicking the button, a dataframe containing values selected in the dropdowns is produced. My dropdowns work perfectly. However, my button does not return the...
Andrew Louis
1

votes
1

answer
88

views

In what cases should I use UUID as primary key in Django models

What are advantages and disadvantages of UUID field? When should I use it as a primary key? When should I use default primary key? My table has many rows. Is it possible that max value of default primary key will be exceeded? I use PostgreSQL.
Andrew Fount
1

votes
0

answer
46

views

Performance issues while passing UDTT[] to postgres Function

I have created a function in postgres that takes a UDTT[] as an importing parameter, and want to eventually insert that data into a Table Example Udtt create type udtt_mytype as ( id uuid, payload int ); And then an example Function is something akin to CREATE OR REPLACE FUNCTION dbo.p_dothething(...
Andrew Moore
1

votes
1

answer
60

views

Enable sort for wpf DataGridColumn which source is converted value

In my wpf/c# project I have datatype with 3 dimensions: length, width and depth. When user inputs those in datagrid the volume for this item is calculated in 4th column using converter. What I want is to enable sort for this column. I tried to put SortMemberPath to Converter return value, but this d...
Andrew Miller
1

votes
0

answer
205

views

Angular 5: How to load multiple custom child components for a screen?

Background I'm writing an enterprise application in Angular 5. One of the large screens I'm working on has many tabs and child components. A majority of clients will get the same version of the screen, but a client or two want custom changes under a couple of tabs. Question How do I dynamically load...
Andrew
16

votes
4

answer
31.1k

views

Fortran unformatted file format

I don't understand the format of unformatted files in fortran. For example: open (3,file=filename,form='unformatted',access='sequential') write(3) matrix(i,:) outputs a column of a matrix into a file. I've discovered that it pads the file with 4 bytes on either end, however I don't really understan...
Andrew Spott

View additional