Nick Nick

15072 questions
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
1

votes
1

answer
41

views

SEO friendly URL is not working

In my .htaccess file, a have plenty of SEO friendly links. And now I'm trying to apply SEO friendly link to a subfolder. (these files are in 'latvia' folder) Here is a content of .htaccess file: RewriteEngine on ErrorDocument 404 /404.php RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST...
Nick
1

votes
0

answer
52

views

HashMap of Firebase queries for simultaneous execution

So when I want to write multiple values on different points on my Firebase database at the same time I use a HashMap. Here is an example: HashMap friendsMap = new HashMap(); friendsMap.put('TABLE_1/' + currentUser.getUid() + '/' + displayingUser + '/date', currentDate); friendsMap.put('TABLE_1/' + d...
Nick
1

votes
0

answer
94

views

MessagingStyle.Message setData method not working in the notification

I am working on my SMS/MMS app and using the android messaging notification style. I want to make it so that when a user sends an image I can add it to the notification using the MessagingStyle.Message.setData(uri, mimeType) method. The issue is that when I do this nothing happens. I am giving it th...
Nick Mowen
1

votes
0

answer
63

views

Rendering different content for each eye in Mixed Reality

I'm currently looking to see if there is a way that within a Windows 10 Universal App, that is intended for Mixed Reality, to display different content for each eye? What would ideal is if this could be done entirely in XAML, for example... ... ... I know this can be done in a Unity App but I want t...
Nick
1

votes
2

answer
333

views

Postgres: how to convert a bytea field into c internal string char*

I'm writing an extension for postgres in C. This function will receive a bytea from hexstring, convert bytea into char* then do some operations on this char*, finally return a number. In SQL level, I have something like: select my_function(decode(**hex_string**, 'hex')) AS result; In C level, I have...
nick
1

votes
0

answer
124

views

Eureka Form Custom Header disappearing / not reloading after navigating back from PushRow

I have a Custom Header from xib file that is displaying fine. But when I load a PushRow, make a selection, and the form comes back into view, the header is blank - no longer displaying the custom header view. If I scroll the form to where the header is off the screen, then scroll back to where heade...
Nick
1

votes
0

answer
1.3k

views

API key with IP restriction vs HTTP Referrer restriction

i have a google maps api key set to 'HTTP Referrer restriction' with also enabled geocode api and which is used in three plugins. But another plugin (booking) requires also geocode api but with 'IP restriction' and that's why i get an error: ' API keys with referer restrictions cannot be used with t...
nick papas
1

votes
0

answer
511

views

match statement borrowed value does not live long enough [duplicate]

This question already has an answer here: “borrowed value does not live long enough” seems to blame the wrong thing 2 answers Is there any way to return a reference to a variable created in a function? 2 answers What is the optimal way to convert a `usize` to a `&str`? 1 answer I want to conv...
Nick ODell
1

votes
0

answer
209

views

I can't get Flask-Bootstrap to render columns correctly

I'm copy/pasting code from the Bootstrap site and even so, I can't get anything to render. Instead of: column______________column________________column I get: column column column __init__.py from flask import Flask from flask_bootstrap import Bootstrap app = Flask(__name__) bootstrap = Bootstrap(ap...
Nick Bonne
1

votes
0

answer
99

views

Three.js - why does computeVertexNormals behave differently when combined with mergeVertices?

I am creating shapes with geometries and material with three.js (in a-frame) I am animating the geometry vertices by updating their position in the tick function. In order to achieve a smooth transition of the material as the vertices update, I use .computeVertexNormals(); in the tick function - Th...
Nick
1

votes
1

answer
21

views

Is it possible to find files or directories in a Git repository while physically on the remote?

We have just shy of 200 git repositories on a server, and I'd like to search them for files or directories, e.g. git ls-files | grep foobar I'd be looking to do this directly from the server these live on (via SSH). Going to the directory on the remote and running most git commands doesn't result in...
Nick
1

votes
0

answer
57

views

Extracting Organization and EC2 informations using javascript aws-sdk

I am using express to make a light application that will display information about an organizations accounts and eventually EC2 instances. As of now I just want to save Account Id's into an array and print that array on a page. My code is: // service/myjavascript.js function orgs(req, res) { var ac...
Nick Ruha
1

votes
0

answer
62

views

Is it possible to add custom build tool to IntelliJ IDEA?

I'm currently working on some projects using the Eta programming language. It is a new purely functional programming language that runs on the JVM. Because of this, sometimes it requires to write Java code to make wrappers. Currently, I'm working using Emacs, but for Java, I think that IntelliJ is t...
Nick Tchayka
1

votes
1

answer
43

views

Grouping Daily data into Weekly data but incorrect grouping when year changes

I have a basic table with daily dates and numeric value for each day. However, after the necessary filters, some dates are missing. I would like this daily data (while missing random days of the week) grouped weekly where beginning of the week would be sunday and ending of the week would be saturday...
Nick Momin
1

votes
1

answer
401

views

How to create new zoom buttons in Open Layers?

I have created two buttons (using Bootstrap) for zooming in and out: I have also turned off the default zoom buttons for Open Layers: var map = new ol.Map({ controls: ol.control.defaults({ zoom: false, }) }) Now my question is, how can I make my two buttons work for zoom-in and zoom-out? Thanks!
Nick
1

votes
1

answer
19

views

Control Active Constructors Based on Index

I want to be able to control constructors with their id (location in array) I am not sure if it is possible to kill a single constructor's process but that is what i am looking for. I need to be able to stop and start constructors with their index in the list. class Worker { constructor(id, fname, l...
Nick
1

votes
2

answer
106

views

How to fold all the second level section in Sphinx?

I'm using the readthedocs theme for a personal sphinx documentation project. Everything works fine except the display of the left frame of the content list: It display all level of section headings, without showing any hierarchy. How to let it show levels as in most readthedocs documentation project...
Nick
1

votes
1

answer
502

views

Nested function can't access global variable

CODE: public loaderShow = false; Onsubmit(form:any):void{ this.startLoader(this.endLoader); } public startLoader(ender) { this.loaderShow = true; setTimeout(ender, 2000); } public endLoader() { this.loaderShow = false; return this.loaderShow; } What I want to happen: On submission of the form -> r...
Nick Harper
1

votes
1

answer
42

views

How to leverage browser cache globally on Easyapache4?

This article explains how to configure Apache2 with directives in either .htaccess or in httpd.conf to work globally. However in EasyApache4 httpd.conf is automatically generated, it says that modifications should go in include files, and it lists the following three files: /etc/apache2/conf.d/incl...
Nick W
1

votes
2

answer
53

views

Play video on image mouseover causes trempling glitch

I am trying to play video while hovering over images at the same div in my website's img-gallery but obviously i am doing something wrong. The supposingly hidden image over which the video should play on mouseover starts trempling. I think its something obvious but i don't have enough experience to...
Nick Johnson
1

votes
0

answer
262

views

Node.js cannot find module that is globally installed on MacOS

I have installed selenium-webdriver globally using nmp install -g. I have also made sure that path to the global node_modules is present in the NODE_PATH environment variable. However when I try to execute a simple .js script, node fails to find the nodule. I feel I'm missing something rather simple...
Nick Slavsky
1

votes
1

answer
230

views

What contract is used in Istanbul consensus mechanism in JP Morgan Quorum?

In '7nodes' installation example from JPMorgan Quorum github is used such a genesis file ('istanbul-genesus.json'): { 'alloc': { '0x0000000000000000000000000000000000000020': { 'code': '0x606060405236156100c45760e060020a60003504631290948581146100c9578063284d163c146100f957806342169e481461013057806348...
Nick Kernel

View additional