Andrew Andrew

13485 questions
0

votes
0

answer
5

views

PHP Site and NodeJS Websocket Application behind the same Nginx server/config

I have a development server that is running Nginx and serving a PHP website. Below is the working nginx config. cat /etc/nginx/nginx.conf user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; # multi_accept on; } http {...
Andrew Odendaal
1

votes
1

answer
1.7k

views

Resizing a JFrame and maintain aspect ratio?

I want the user to resize the window while maintaining the same aspect ratio (rectangle in which the width > height. In other words, if height is changed, I want to force width to change by a larger amount, and vice versa. Preferably, I want the resize to happen while the window is being resized, n...
Andrew Kor
0

votes
0

answer
28

views

Invalid JSON payload received. Unknown name “encoding” at 'config': Proto field is not repeating, cannot start list

When I try to invoke longrunning recognize with the following config: config = dict( languageCode='de', maxAlternatives=1, enableWordTimeOffsets=True, enableAutomaticPunctuation=True, model='default', encoding='ENCODING_UNSPECIFIED') I got error. How to fix it?
Andrew Fount
1

votes
3

answer
443

views

AlertDialog on Android App Startup

I'm trying to make this dialog box run when the user has first downloaded the app and then never show again. Here is my code: Thread t = new Thread(new Runnable() { @Override public void run() { SharedPreferences getPrefs = PreferenceManager .getDefaultSharedPreferences(getBaseContext()); boolean is...
Andrew Quebe
1

votes
1

answer
217

views

Is there any Method which could determine if user has access to document?

Is there any Method which could determine if user has access to document, meaning, user (or user group) exists in any of the Readers or Authors fields? Example: we have User1 we have NotesDocument in DB with docUNID, which has Readers/Authors fields, but User1 (and any of his groups) are not present...
Andrew-Gr
1

votes
1

answer
240

views

Why does GHCi complaining at where clause?

When I write a code like this: Prelude> let f = (+1) . (*k) Prelude| where k = 2 Prelude| I'm having such an error: :46:5: parse error on input 'where'
1

votes
1

answer
393

views

How do I search git history for detached heads?

I accidentally added a commit to a detached HEAD state and then I checked out master again. I no longer have the commit hash, so I can't just check out the commit. Instead, I am trying to search my git repo for all commits that I made in the last few days so that I can find it. Is there a command...
Andrew Eisenberg
0

votes
1

answer
18

views

Trying to make app for ebay seller in Python

Trying to make an app that subtracts all fees for items sold on Ebay. NetSale = 0 ListFee = 0 PayPalFee = 0 ShippingFee = 0 def int_or_float(i): try: return int(i) except ValueError: return float(i) NetSale = input("What is the Net Sale? ") ListFee = input("What is the List Fee? ") PayPalFee = inpu...
Andrew Python
1

votes
0

answer
13

views

Heroku - PostgreSQL - How to connect remotely on Windows

Before I get the negs I know there's a lot of similar posts but I've read them and used them to get to this point but I don't think they answer my question. Overview I'm trying to connect my tester heroku site https://pgtester.herokuapp.com to my PostgreSQL database. I previously tried MS Server but...
Andrew Allen
1

votes
1

answer
214

views

Eclipse Open Type: Restrict to open project

I frequently use the Eclipse "Open Type" dialog to quickly jump to classes. The problem is, as I work on more and more projects in parallel, i.e. tackling different bugs in the same source code, the dialog sorts multiple copies of the same class in different projects by how frequently they've been...
Andrew Latham
1

votes
1

answer
13

views

Error: Actions may not have an undefined “type” property

I am new to Redux, semi-new to React. I've made a few simple applications with it. I understand the basic concept of Redux (storing state in a central location) which sounds more elegant than passing things along via components/props. However, I am getting the following error: Error: Actions may not...
1

votes
2

answer
259

views

What would the deploy.sh file look like for Gitlab CI?

In the Docker registry docs on the gitlab Site they give an example where the deploy stage has: deploy: stage: deploy script: - ./deploy.sh only: - master What would the deploy.sh file look like? In either pseudo code or real code.
0

votes
0

answer
4

views

How to make UIViewController slide from bottom to top without fading previous view?

I am creating a new app with Swift, and would like to slide my UIViewController from bottom to top with UINavigationController, but my current solution fades out previous view. This annoying fade looks like this: https://i.imgur.com/wAcO9IS.jpg I am using Swift 4.2 and XCode 10. I am testing my app...
Andrew Orlov
1

votes
5

answer
43

views

mysql query exact match on json field not working

table looks like this: my_table id (int) create_time (timestamp) meta_data (json) 1 2019-01-20 18:35:42 {"my property": "123"} 2 2019-01-20 19:35:42 {"more data": "456"} I've tried querying with: SELECT * FROM my_table WHERE meta_data = '{"my property": "123"}'; S...
Andrew
0

votes
0

answer
11

views

Window.open() without url path where I called the function

I've one problem with window.open() function. I need to open each domain from this list(https://www.brandnames.net/shop) and check if it's pointed to a lander. I tried to get all domains with document.querySelectorAll... well, it doesn't matter. When I calling function window.open(domain, '_blank...
Andrew
0

votes
0

answer
4

views

How to write a CSV file from a dictionary and populate the data into individual rows, rather than all into the same cell

I am trying to write data from a dictionary into a CSV file with each column corresponding to a key in the dictionary. My first column properly has the header for the key, but all of the data for each key ends up contained as a list within a single cell under the corresponding key. How do I get th...
Andrew
0

votes
0

answer
3

views

How to config CSS Modules for Webpack?

I'm trying to write a minimal config for Webpack 4.29 and configure CSS Modules. Everything on the web suggests the config given below. Although for me it doesn't work. It gives the error Module not found: Error: Can't resolve 'style-loader'. What am I missing? module: { rules: [ { test: /\.js$/, ex...
Andrew Lukjanov
4

votes
0

answer
138

views

Debugging DNS resolutions in kubernetes

I have initialized kubernetes v1.13.1 cluster on Ubuntu 16.04 using below command: sudo kubeadm init --token-ttl=0 --apiserver-advertise-address=192.168.88.142 and installed weave using: kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')" I have...
S Andrew
0

votes
0

answer
5

views

redis.clients.jedis.exceptions.JedisDataException: ERR value is not an integer or out of range

jedis eval script error script = "return redis.call('hget', KEYS1, ARGV1) "; o = binaryJedis.eval(script.getBytes(), "hash1".getBytes(), "item1".getBytes()); redis.clients.jedis.exceptions.JedisDataException: ERR value is not an integer or out of range at redis.clients.jedis.Protocol.processError(P...
andrew
1

votes
2

answer
409

views

Is it possible to share a HashMap between threads without locking the entire HashMap?

I would like to have a shared struct between threads. The struct has many fields that are never modified and a HashMap, which is. I don't want to lock the whole HashMap for a single update/remove, so my HashMap looks something like HashMap. This works, but it makes no sense since the thread will loc...
Andrew
0

votes
0

answer
12

views

Access redux store properties from within the actions in the store itself

Currently I have events stored in my events reducer. Now I'm in my actions folder, I am trying to access the value of events which is in my reducer, how would I be able to access such value within the store itself? I need to access values stored in the Reducer file in the event.js, through the actio...
Andrew
1

votes
1

answer
115

views

Fallback content on an “unnamed” slot is never displayed

I'm trying to figure out how web components are working and can't fully understand rules around fallback content in slots: I have a web-component like: const template = document.createElement('template'); template.innerHTML = ` fallback fallback on an anonymus slot ...and more content form shadow DO...
Andrew
1

votes
1

answer
41

views

UTF-8 encoded JSON file, trying to parse with JSON module - wide character

I have a pretty simple script in Perl: use JSON; use open qw/ :std :encoding(utf8) /; #my $ref = JSON::decode_json($json_contents); my $path = "/home/chambres/web/x.org/public_html/cgi-bin/links/admin/booking_import/import/file.json"; my $json_contents = slurp_utf8_file($path); my $ref = JSON->new-...
Andrew Newby
1

votes
2

answer
52

views

Retrieving available functions in script (same order)

I'm cleaning some smeared data for which I want to automate things a bit. That is, I want a script to have some predefined cleaning functions put in order of how the data should be cleaned, and I designed a decorator to retrieve these functions from a script using this solution: from inspect import...
Andrew Naguib
1

votes
2

answer
19

views

Liquibase with Spring Boot and multiple schemas, how to specify execution order

We have an data-migration job which needs to initialize schemas A and B, in that order. We handle multiple schemas by defining multiple SpringLiquibase, one for each schema, each with its own datasource and its own master changeset. (Note, normally in Spring Boot you wouldn't need to define a Spring...
Andrew Spencer
0

votes
0

answer
6

views

Running “gulp scripts” removes code just added to .js file

I'm doing a WordPress build using the understrap theme and child theme. All has been working fine, though, when running "gulp scripts" to compile my child-theme.js into child-theme.min.js, the code I add to child-theme.js gets stripped out and it does not end up in child-theme.min.js Reviewed gulpfi...
Andrew T.
0

votes
0

answer
5

views

NLTK downloader fails in downloading new modules

I am importing the NLTK modules into my python project to do some tokenizing works, the downloader window pops up and shows that 'Errno 11004 get addrinfo failed' I tried to identify the download directory and move the nltk_data to the designated position, but the downloader still can't locate the d...
ANDREW
1

votes
0

answer
26

views

jQuery Not Implementing Requested CSS change on click

Function is as follows: function background() { Object.keys(newImages).map((key) => newImages[key] = 'url(' + '"' + newImages[key] + '"' + ')'); switch (city.file.icon) { case "11d": $("body").css('background-image', newImages.rain); document.body.style.color = white; break; case "09d": $("body").cs...
Andrew Ramshaw
1

votes
6

answer
18.8k

views

Arduino DHCP failed to configure

I am using the example ethernet sketch for a web client that comes bundled with the Arduino software without changing a thing except for the firmware address, which I changed to the one printed on the back of the ethernet shield. Whenever I connect the Arduino to my network and view the serial monit...
Andrew
0

votes
0

answer
3

views

AWS: Pointing sub-domains to different elastic beanstalk environments

Using Amazon AWS, I have two Elastic Beanstalk environments. One hosts my React client, and the other hosts a Node.js API for the client. I own some-domain-name.com and I would like to use two sub-domains: app.some-domain-name.com api.some-domain-name.com I would like app.some-domain-name.com to poi...
Andrew Daniel
0

votes
0

answer
2

views

Schema changing DB - which method is better?

I am planning to develop a website which users can customize many items on, so considering three plans. Could you tell me which method is more common? Let's assume we will make a web app for handling all processes of producing toothbrushes. { "toothbrush set": { "toothbrush": { "head": ["dyeing", "a...
Kang Andrew
1

votes
1

answer
937

views

HttpClient is sending extra cookies

Running a UWP app* So I have an HttpClient and it's associated handler. I am making a request to a website, passing in specified headers, and using a specified CookieContainer, which is empty at the beginning of the request. When I send the request, Fiddler shows extra cookies being sent that I hav...
Andrew
1

votes
2

answer
86

views

AeroGear for iOS Facebook configuration

I inherited an app, and I am trying to understand the exact configuration differences between what Facebook wants and what is currently implemented. In working to create a great Platform experience for everyone, we ask developers to ensure the apps they build comply with our Platform Policies. Your...
Andrew Alexander
1

votes
1

answer
270

views

How do I resize the border of the body as the window resizes in CSS

I just recently finished my site. http://www.willigetdivorced.com If you visit it real quick, you will notice the green border on the right, to add a little readability. If you shrink the window however, you can see it just ends up covering everything. It looks equally absurd on a mobile device scre...
Andrew Tsay
1

votes
1

answer
930

views

Correct proxy script for html2canvas

I'm trying to get html2render ( http://html2canvas.hertzen.com/ ) to work on my website. It works for the basic stuff - but none of the images show (as they are on a cdn.domain.com subdomain). I've been reading up, and it seems that it doesn't like other domains out of the box. I found a couple of P...
Andrew Newby
1

votes
5

answer
1.3k

views

DNX Install - Unable to find any runtime packages on the feed

I'm following this guide on how to get setup with asp.net 5 Running the command dnvm upgrade -r clr from the command line pulls back Invoke-Command : Unable to find any runtime packages on the feed! At C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1905 char:23 + Invoke-Command
Andrew Walters
1

votes
1

answer
547

views

Certificate pinning in Alamofire not working

I've added a .der certificate to my project, which is recognised by ServerTrustPolicy.certificatesInBundle(). I'm now creating a Manager which is then used to make API calls: private class func manager() -> Alamofire.Manager { let certificates = ServerTrustPolicy.PinCertificates( certificates: Serve...
Andrew
1

votes
2

answer
653

views

calling TaskDialogIndirect loader says ordinal 345 not found

I built the simple MS example for TaskDialogIndirect (see https://msdn.microsoft.com/en-us/library/windows/desktop/bb760544(v=vs.85).aspx) When I run it I get "The ordinal 345 could not be located in the dynamic link library COMCTL32.dll" The above page says it needs ComCtl32.DLL version 6 but C:\Wi...
1

votes
1

answer
1.4k

views

ag-grid: prorgamatically select next row from currently selected row

I'm using ag-grid in an anugular1 project. I'm trying to get the 'Next' button to select the next row in my grid. $scope.NextButtonClick = function (){ console.log("next button clicked"); var selectedNodes = $scope.gridOptions.api.getSelectedNodes(); var indexCurrentSelection = selectedNodes[0].chil...
Andrew Magerman
2

votes
3

answer
27

views

os.path.splitext(file.txt.gz) into (file,.txt.gz)

Currently, I have files that end in /path_to_file/file.txt.gz. I would like to split the extract the filename (before the .txt.gz). x = os.path.basename("/path_to_file/file.txt.gz") gives me file.txt.gz while os.path.splitext("file.txt.gz") gives me ('file.txt','.gz') Is there a function that woul...
Andrew Hamel

View additional