Nick Nick

15094 questions
1

votes
1

answer
198

views

Why is this Bash script not inheriting all environment variables?

I'm trying something very straightforward: PEOPLE=( 'nick' 'bob' ) export PEOPLE='$(IFS=, ; echo '${PEOPLE[*]}')' echo '$PEOPLE' # prints 'nick,bob' ./process-people.sh For some reason, process-people.sh isn't seeing $PEOPLE. As in, if I echo '$PEOPLE' from inside process-people.sh, it prints an em...
Nick Chammas
1

votes
1

answer
173

views

How to set RegionEndPoint for AWS AmazonSQSClient in C# on the App Config file

I have declared a RegionEndpoint on my app config like this And on my program i'm tryna call this AWSRegion private static string RegionEndPoint = ConfigurationManager.AppSettings['AWSRegion']; So when i declare my SQSClient i get an error that, Cannot convert from string to RegionEndPoint var SQS...
Kid_Nick
1

votes
3

answer
112

views

Image inside a container in flutter

I want to display a network image inside a card widget. I want the image to have the width of the card and some fixed height. Below is the code. ListView.builder( itemCount: events.length, padding: const EdgeInsets.all(8.0), itemBuilder: (BuildContext context, int index) { return Card( child: Column...
nick.tdr
1

votes
2

answer
162

views

ZuulException (SendErrorFilter) at first call

I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refre...
Nick
1

votes
3

answer
34

views

Regex remove replace all whitespaces and commas with a plus sign

I have a query like this 2258, Hampton Street, Columbia, SC, USA I need to replace all the white spaces and commas with a plus, so I do this: query = query.replace(/,? /g, '+'); Problem is when there are multiple commas or whitespaces it doesn't work (or if there are whitespaces or commas at the end...
nick
1

votes
1

answer
46

views

Swift and Codable: Encodable tree struct terminating in values that obey custom protocol

I am attempting to make a tree data structure obey the encodable protocol. The tree terminates in 'some object' that obeys the protocol 'Terminal'. Terminal extends Codable. Each node of the tree is a pair. It has a key, and a value. The value is either a pair, or a Terminal. There are two main iss...
Nick Jones
1

votes
1

answer
88

views

Assign event listener to dynamically created TPanel in Delphi

I created a TPanel component like this: procedure TVistaVehiculo.CrearMenu(Name: string); var Panel : TPanel; begin Panel := TPanel.Create(VistaVehiculo); Panel.Parent := VistaVehiculo.Sidebar; Panel.Width := VistaVehiculo.Sidebar.Width; Panel.Height := 40; Panel.Caption := Name; Panel.BevelInner :=...
nick
0

votes
0

answer
2

views

How can I add collision detection to my sketch to make the alien have 3 lives and reset to the top of the sketch?

I need the little alien man to 'die' when a car hits him, taking away one of three lives and resetting him to the middle top of the sketch so you can try and cross the road again like in the classic game frogger. I also need to make the game end after he dies three times and runs out of lives and to...
nick BG
0

votes
0

answer
3

views

Jquery .post error in Amazon aws-execute serverless app

I am trying to setup this self-destruct-o app I found using the instructions provided on github. I have it on my endpoint (https://n526t325k7.execute-api.us-east-1.amazonaws.com/dev), but there is a 500 error at a $.post call. I have seen some issues with Jquery using API Gateway, but this app doesn...
nick
0

votes
0

answer
3

views

How can I delete API as active subscriptions?

I am trying to test wso2 if I can turn my soap to rest api. I follow the tutorial on youtube video call 'Creating a REST API with a SOAP Back end with WSO2 API Manager'. First I give full working wsdl link and I test it and get information that my wsdl is valid. But in API definition I couldnt see a...
Nick
0

votes
0

answer
5

views

Py2app application crashes on when not run from the terminal

SO i have a rather weird problem, I have a python application built using python3.7 and PyQT5. I bundled it with py2app and when i double click it to start, it works ok but when i push a button that does a big series of commands, it crashes. Weird thing is, if i do the same but open the application...
Nick
1

votes
3

answer
54

views

Is it possible to combine these two SQL statements into one?

I am using these two MySQL statements to get all messages between two users, but I am running into a pretty big problem when it comes to manipulating the data later in the code since it's not in order by ID. Is there any way to combine these statements AND order the results by ID? $sql = 'SELECT *...
Nick Pitoniak
1

votes
2

answer
295

views

does random number in the real world follow uniform distribution

I am confused about the concept of uniform distribution and random number. Does random number follow uniform distribution or does random number not follow any distribution?
Nick Dong
1

votes
2

answer
55

views

Google Cloud SQL PG11 : could not resize shared memory segment

I recently upgraded a Postgres 9.6 instance to 11.1 on Google Cloud SQL. Since then I've begun to notice a large number of the following error across multiple queries: org.postgresql.util.PSQLException: ERROR: could not resize shared memory segment '/PostgreSQL.78044234' to 2097152 bytes: No space...
Nick
1

votes
1

answer
48

views

Translate select query to DAX expression

Im trying to convert some SQL queries to DAX, but I dont know where to start. SELECT jobid,Fullname FROM public.'Data' WHERE jobid IN ( SELECT jobid FROM public.'Data' GROUP BY jobid HAVING max(case when Userid = '21' then 1 else 0 end) = 0) ORDER BY jobid ASC; The data looks like this: I want th...
nick bijmoer
1

votes
1

answer
63

views

Correct way to handle deprecated API

There is an Obj-C file which is included into several projects with different deployment target. This file has following codeline: [[UIApplication sharedApplication] openURL:url]; When I compile project targeting iOS 10, I get a warning: 'openURL:' is deprecated: first deprecated in iOS 10.0 - Pleas...
Nick
1

votes
2

answer
90

views

Xamarin Open UWP Open file from “Documents” library

I have a Xamarin UWP app and am trying to load a file from my current users 'Documents' library. I understand that I need to add a File Type Association declaration first. I've done this and the file icon has changed to my application icon. In the app I'm then using the FilePicker plugin from here....
Nick
0

votes
1

answer
12

views

Is there a way to use non-breaking spaces in a UILabel in a launch screen?

I would like to ensure that names in a multi-line copyright string on the launch screen do not get split by line breaks on different devices. Inside a view controller with a UILabel outlet textLabel, the escape sequence '\u{00a0}' works programmatically: textLabel.text = 'Lots of text before... Firs...
Nick
1

votes
3

answer
64

views

Is my javascript regex for capturing correct? [duplicate]

This question already has an answer here: Reference - What does this regex mean? 1 answer I would like the regex to capture leading 0's and then zero or more digits after that. Example of data: 00001 0000100 02 For (1), the captured data should be '0000' and '1'. For (2), the captured data should...
Nick
1

votes
4

answer
5.5k

views

Loading one user control after another has loaded - ASP.NET WebForms

I have a UserControl A that has to be loaded first and after that completes loading, I need to load a UserControl B. I prefer to add both these user controls on the page at compile time (would like to avoid dynamic loading if possible). If I add user controls on the page at compile time and set vi...
Nick
0

votes
0

answer
3

views

Randomly copy config file on systemd start/restart

I have written a systemd file to start my VPN Service using a particular configuration file. What i would like to be able to do is have this file replaced with a randomly selected configuration file each time the service starts. So far i have tried using ExecStartPre=cp -f `ls /etc/openvpn/ovpn_udp...
Nick
1

votes
2

answer
3k

views

Change multiple dataframes in a loop

I have, for example, this three datasets (in my case, they are many more and with a lot of variables): data_frame1
this.is.not.a.nick
1

votes
1

answer
820

views

Bootstrap 4 Nav Dropdown issue if more than one dropdown

jsfiddle: http://jsbin.com/wamunoside/1/edit?html,output jsfiddle This is taken from the example given on the Bootstrap 4 docs site: just adding a 2nd dropdown to this example below the 1st dropdown found here: https://v4-alpha.getbootstrap.com/components/navbar/#navbarNavDropdown So in the jsfidd...
Nick Timmer
1

votes
3

answer
87

views

PHP simplify json array by removing empty keys

I need to get data from an array, but the output always varies so sometimes it has more empty keys etc. $id = '1'; $url = file_get_contents('http://example.com/?api={$id}'); $json = json_decode($url, true); foreach($json as $data) { echo $data[0][0]['test']; } The problem is that to print values fro...
P. Nick
1

votes
0

answer
30

views

Group by SQL (or if value is on another table)

I have a table of tournament results with points earned. I want to publish SUM of points for each player and ORDER BY SUM of points DESC. To do this I need to get all results and then group by LVID. The problem is that players LVID is on table A or table B. This is how my code looks right now: SELEC...
Nick
1

votes
0

answer
46

views

Can protobuf compiled to static python class?

I am using protobuf, I found after compiled to python file by protoc, the python classes are all dynamic, so the auto-completion is gone, it is not very convenient. I want to know if there is a way to compile protobuf to static python class, I mean with fixed attributes and methods.
nick
1

votes
1

answer
264

views

Laravel folder permission for not-yet made cache folders

I'm having an issue with directory permissions with Laravel when it comes to caching. Whenever it tries to upload a cache file to /var/www/laravel/storage/framework/cache/data/ it tells me that file_put_contents has no permissions. To fix this I always do something like chmod -R 755 /var/www/laravel...
P. Nick
2

votes
0

answer
14

views

Can Visual Studio debug Go plugins?

I have a Go project that consists of a command line tool and some Go plugins. I have a build script that builds the CLI, and then goes into a plugins directory and compiles each plugin with the -buildmode=plugin option. I would like to figure out if launch.json can be configured to selectively pas...
Nick Pollitt
1

votes
3

answer
175

views

overloading [] and , c++11

So suppose we have this expression auto x =Object.operator[][1,2,3,4]; I want my C++ code to insert the numbers 1 2 3 4 to a vector that is located inside the object my code is below. class Object{ Object operator[](int temp){ this->x.push_back(temp); return *this; } vector x; }; int main() { auto...
Nick Hughes
1

votes
0

answer
235

views

caffe2 build android Failed to configure test project build system

I want to build caffe2 on macOS. build caffe2 is every thing OK, but when I build android, use caffe2/scripts/build_android.sh the processing is to 100% and then occurred: CMake Error at /usr/local/Cellar/cmake/3.10.1/share/cmake/Modules/CheckCXXSourceCompiles.cmake:97 (try_compile): Failed to confi...
nick zhou
1

votes
0

answer
91

views

Python3 Sine Function to fit Data

I have data which I broke into 28day slices. Here is a plot of the means of each of these slices. I have to calculate some values from equation that fits the data reasonably well, and then find the correlation coefficient between those values and the means for each 28-day slice. Since I have one mea...
Nick
1

votes
2

answer
807

views

MySql missing from Services - could not open innodb_index_stats.ibd

I have Ampps 3.7 installed on Windows 10, and whilst Apache runs ok Mysql will no longer start up; It use to run ok but now has an innidb error. My issue is similar to the question here, except that I've not upgraded mysql, and the suggested solution is to delete and reinstate several inno_db tables...
Nick W
1

votes
1

answer
183

views

How to use inversifyjs container as service locator

I'm writing socket server for my IOT project (stm32f100 + WIFI esp) I have implemented communication protocol such as GET query: method=test&data[]=1&data[]=2...etc I want to implement method resolver which will fetch service (controller) by method name from inversifyjs container with it's dependenc...
Nick Muntyanov
1

votes
0

answer
78

views

Jface accelerator key not working on macOS when focus is on StyledText widget

Within a StyledText or Text widget, a single letter key accelerator is working fine on Windows. However, it is not working on macOS: All good on Windows: pressing 'A' when the text view is focused displays the pop-up (and the letter A is not output) Fail on macOS: pressing 'A' when the text view is...
Nick
1

votes
0

answer
46

views

DraftJS - change link

I use example to create/remove links. https://github.com/facebook/draft-js/blob/master/examples/draft-0-10-0/link/link.html I understand how to create and remove links. How to change link? I can check if caret on link: const contentState = editorState.getCurrentContent(); const startKey = editorStat...
Nick
1

votes
1

answer
40

views

Can I change element tag name with Polymer data binding?

I have this application which contains many types of Polymer elements that can be added to a main Polymer app element. This main element manages instances of these elements and shows them in a UI. eg. item1.html item2.html item3.html my-app.html As I add new types of items (eg. item4.html), I need t...
Nick Felker
1

votes
1

answer
361

views

C# Dictionary to C++ std::map

I have a Dictionary variable in my C# file Rec.cs defined as: Dictionary pPrepDumpLoadList This pPrepDumpLoadList is filled with keys and values like following foreach (XElement element in root.Elements()) { PrepDumpLoadItem item = new PrepDumpLoadItem(); item.Name = element.Name.ToString(); strin...
Nick X Tsui
1

votes
2

answer
663

views

TypeError: unsupported operand type(s) for +: 'NoneType' and 'float'

Trying to sum the total of excel cell data inputs ('123.111', '112.1', '123') and then divide them by a count to get the avg. I keep on getting type errors and im not sure why, unless its because the cell data type is not compatible. Also trying to work out the min and max if anyone can help total...
Nick Ramage
1

votes
1

answer
312

views

C# Checking if a service is set to Automatic (Delayed Start)

I am trying to gather data on services being run on various servers in my domain. For each server to check, I am getting a list of services ServiceController[] services = ServiceController.GetServices(server); From there, I am checking each ServiceController object in services for its ServiceStartM...
Nick Paterni
1

votes
1

answer
54

views

How to perform a join on two tables in an SSIS package, where the table names are dynamic

Just for reference, this question is more or less a follow-up to this question which I asked a few weeks ago. In that case I suspect the problem was essentially that I had picked up someone else's incomplete code and was trying to update it without completely understanding what they'd been trying t...
Nick

View additional