Nick Nick

11321 questions
1

votes
1

answer
1k

views

Scrolling credits text in Android

I need to make a credits screen (Activity) in my game. It would be just a vertically scrolling text lines without any images. Scrolling is to be performed automatically and no user interaction is allowed. Just like movie credits that goes from bottom to top. After the last text line has disappeared...
Nick
1

votes
0

answer
15

views

Keep objects centered in place without moving

I'm trying to keep things centered in the browser without it stretching my divs and moving my videos.. when I stretch my browser it moves my images and objects around.. I want to keep objects inside the divs & have everything stay in place.. Is that possible using just css or do I have to use flexbo...
NICK
1

votes
1

answer
500

views

Associated models and a nested form with validation not working

Update2: I've cleaned up the code, which seems to have solved some of the problems. I've posted the new code as a new question here. Update: Organization and User have a 1:many relationship. My question concerns a joined signup form where both an organization and user are required. After maxcal's he...
Nick
0

votes
0

answer
17

views

How to add two elements in single list view row without using custom adapter?

I am working on a project , where i don't have much time to create a custom adapter's for my list view . Can anyone here help me, how to add two elements values in a single row , without custom adapter Earlier Reply is appreciable .
NICK
0

votes
2

answer
20

views

Convert a Deedle Dataframe into a C# List of Custom Class

I receive data from an external API as a Deedle dataframe. I need to take this data and convert it to a List of a custom class to be inserted into a database via Entity Framework. Would anyone be able to point me in the right direction? I've not used Deedle before and am having trouble finding the b...
Nick
3

votes
3

answer
38

views

Unite Collection of Collections into Collection in a method in Java

I've created a Collection class that extends ArrayList to add some useful methods. It looks like this: public class Collection extends ArrayList { //some methods... } I want to be able to unite a Collection of Collections to a single Collection, like this: {{1, 2}, {2,3}, {1}, {2}, {}} -> {1, 2, 2,...
Nick
1

votes
0

answer
5

views

Matching CryptoJS.SHA256() with hashlib.sha256() for a JSON

As a part of IEFT standard, I need to hash the body of a JSON request. I have a reference code in JS that is known to produce the right hash, but now I'm stuck with matching the result in Python. The JSON body: body = {"description":"Test ticket"} The JS code: bodyHash = CryptoJS.SHA256(body).toStri...
Nick Slavsky
0

votes
0

answer
12

views

Confused on how this code to compute the powerset works

I found this function on geeksforgeeks to find all subsets of a given set. I'm just not sure what the if statement in the nested for loop is checking. I understand that its using the bitwise AND operator, but I'm confused as to how it helps know which elements to include or not include during any it...
Nick Heiting
1

votes
0

answer
9

views

Closure returning reference to Enum variant content

I have a function that accepts a reference to an enum, which I need to parse by matching the enum and reading its content. One of the variants of the enum (not in the simplified minimal working example below), may contain as value the type of the enum itself, therefore I may need to recursively call...
Nick
1

votes
2

answer
1.5k

views

Not able to import the intl package for dart

Hi I am trying to use the intl package in my flutter project. The packages get command runs successfully but when I import the package it shows error. For the import in the my dart file I am using the following import import 'package:intl/intl.dart'; I have also upgraded flutter from the terminal us...
nick.tdr
1

votes
1

answer
343

views

How to fix Flutter dropdown button overflow issue?

I create a Flutter Form and I build a dropdown button with flutter. I am losing local son data into dropdown. Some of my items in dropdown button is long. I use SafeArea and ListView and I am getting overflow on right. partial solution not mentioned in the other question, and I get the answer here....
Nick
1

votes
1

answer
56

views

How to avoid code duplication when comparing two enums' variants and their values?

I need to compare two serde_json::Values: enum Value { Null, Bool(bool), Number(Number), String(String), Array(Vec), Object(Map), } The comparison will return another enum: enum Diff { Equal, Different, NotFound, } I started writing the code structured as follow: fn compare(val1: &Value, val2: &Valu...
Nick
0

votes
1

answer
41

views

How to make this border bottom curve on every section?

I am setting up a new website layout, But I don't have no knowledge how to make this border bottom curve on every section, please look at this image, can anyone provide me some idea about it? I had tried to crop all the background image out from each section, but it doesn't fit to all resolutions. h...
Nick Lim
-2

votes
0

answer
41

views

How do I pass all vector elements separated by comma into function in C++?

I have been reading this website for quite a while now but have just registered. I have also used search which did not seem to be very helpful. Here it is: As I am having fun with C++ I come along "lazy evaluation" conception on the Internet. I am interested in creating something like a "lazy vector...
Nick M
0

votes
0

answer
3

views

Passing Client-Side user information into Server-Side TFS Plugin

I am working on creating a TFS Server-Side plugin for code review policies. The issue I am facing is trying to get the workspace of where the checkin is coming from. Ultimately it is to get the local filepath on the users machine of each of the pending changes to confirm the files last modified date...
Nick
1

votes
2

answer
1.3k

views

DB-ref in mongoose without Schema.ObjectId?

in my code people can follow other people. So far everything is ok apart from this fact: in the userScheme I have this field. , following: [{ type: Schema.ObjectId, ref: 'Users' }] Since every user has an username, it's more versatile for me to use dbref with the username. is there a way to do somet...
nick
0

votes
0

answer
6

views

How to get Google Sign in for Android working with Hosted Domains

I am having trouble working with Google Sign in for Android when setting the Hosted Domain parameter. When it is set, there is no restriction on what domain the user can sign in with, which contradicts the documentation. I am expecting what Google does on a browser when the HD parameter is set on t...
Nick
0

votes
0

answer
11

views

Merging Two csv files with different column lengths with R

I am trying to merge two files in R in an attempt to compute the correlation. One file is located at http://richardtwatson.com/data/SolarRadiationAthens.csv and the other at http://richardtwatson.com/data/electricityprices.csv Currently my code looks as follows: library(dplyr) data1
Nick Leonard
1

votes
4

answer
65

views

Need help writing a regex pattern

I am trying to find a pattern in a string that has a value that starts with ${ and ends with }. There will be a word between the curly brackets, but I won't know what word it is. This is what I have \$\\{[a-zA-Z]\\} ${a} works, but ${aa} doesn't. It seems it's only looking for a single character. I...
Nick
1

votes
3

answer
2k

views

htaccess FilesMatch to deny but allow a specific file after

I have an htaccess rule in a folder that disallows php scripts: Order allow,deny Deny from all Require all denied That works just fine. The problem is that there is a specific php script I do want to be able to call (via ajax), so I want to add another rule after the deny that says "but if it is thi...
Nick
0

votes
0

answer
6

views

How to block access to wp-admin directory for all domains other than X via htaccess

I have a wordpress multisite, and we have a dev to production pipeline. I am attempting to disable all access to the wp-login.php and wp-admin directory from all other domains other than my-beta-site.com. I have had issues getting this to work using the custom 404 pages within wordpress. I have a fe...
Nick McCally
1

votes
3

answer
1.7k

views

Selenium IDE - Waiting for modal to disappear

How can I have Selenium IDE to wait for a modal layer to disappear before continuing to fill in the form and click on the button to move to the next step?
Nick Realdini
1

votes
1

answer
302

views

Will aws Cognito count every getid call made for unauthenticated users as a MAU?

AWS Cognito doco states that its pointless to store the ID that will generated for an access request by an Unauthenticated user. Their pricing states that charges are based on Monthly Active users i.e active identities received via credentialsProvider.getIdentityId() call. So I were to implement it...
Nick
1

votes
1

answer
745

views

How Can I Unit Test Swift Timer Controller?

I am working a project that will utilize Swift's Timer class. My TimerController class will control a Timer instance by starting, pausing, resuming, and resetting it. TimerController consists of the following code: internal final class TimerController { // MARK: - Properties private var timer = Time...
Nick Kohrn
1

votes
1

answer
558

views

MongoDB and Mongoose: Nested Array of Document Reference IDs

I have been diving into a study of MongoDB and came across a particularly interesting pattern in which to store relationships between documents. This pattern involves the parent document containing an array of ids referencing the child document as follows: //Parent Schema export interface Post exten...
Nick Suwyn
1

votes
4

answer
638

views

How to classify data to different levels?

R.3.3.2 Imagine a vector a
Nick Dong
1

votes
3

answer
373

views

Replacing current Storyboard with a new Storyboard in iOS

I'm building an app and I've decided to build my user interfaces in multiple Storyboard files. Each Storyboard is a group of similar actions. For example, LogInStoryboard contains views for logging in and for registering a user. I've run into a bit of problem with navigating to a new Storyboard and...
Nick Alexander
1

votes
1

answer
175

views

Stripping non printable characters from a string in python?

So currently I am trying to find out how many times a specific word appears on a page. My Python code has this: print(len(re.findall(secondAnswer, page))) 0 Upon careful analysis, I noticed that print(secondAnswer) is giving me a different answer "Pacific" from print(ascii(secondAnswer)) 'Paci\u...
Nick L
1

votes
1

answer
46

views

iOS App Store Submission Requires a Street Address

I'm submitting my first app to the App Store, so I'm working through the form on iTunes Connect. Under the "General App Information" section, it asks for a street address. I do not have a company under which I am submitting the app, so the only address I would have to put there is my home address. D...
Nick Foster
1

votes
2

answer
335

views

Firebase Cloud Function - Push a notification to iOS device when document is added to firestore

I have been reading multiple articles and stack overflow posts on how to send a push notification. I have tried using collection listeners on my firestore collection, but it ends up sending notifications for all documents when the app closes. Then, I've tried firebase cloud functions and there alway...
1

votes
2

answer
522

views

CSS: Scale font-size to fit parent block element height

Almost every question and answer I have found talks about the viewport size; this isn't really my issues. Take this Pen... https://codepen.io/njt1982/pen/pZjZNM I have a very basic Bootstrap 4 grid like this: A B ... ... A B ... ... ... ... And some CSS to make these into squares (using the padding-...
Nick
1

votes
1

answer
315

views

How to send or receive xml file in Flutter?

I can send and receive JSON, string data with Flutter. But I cannot find any information how to send and receive xml file with Flutter. I am looking good documentation and basic hands-on-example. Any help please?
Nick
1

votes
2

answer
42

views

Customize Devise SessionsController create action

I want to add a feature that will redirect a user with an expired password to the reset password page. My controller looks like this class Users::SessionsController < Devise::SessionsController def create user = User.find_by(email: params[:user][:email].downcase) if user.password_expire? raw, enc =...
Coder_Nick
1

votes
1

answer
35

views

libgdx getHeight() does not cover the whole screen

I am new to libgdx and have been practicing using the ShapeRenderer. I am trying to place a rectangle at the bottom of the screen but the Gdx.graphics.getHeight() function is returning a value that does not cover the whole length. If I set the rectangle's coordinates to (0, screenHeight), it only go...
Nick Hudson
1

votes
2

answer
54

views

Android - automatically scroll within AlertDialog TextView

I am using an AlertDialog to track a logFile which is updating in real time, and need to automatically scroll to the bottom of the view whenever an extra line is added. I am able to cast the AlertDialog to a TextView (and e.g. using this TextView alter the text size) but any methods involving scroll...
nick_j_white
1

votes
3

answer
5.5k

views

3 row layout, header and footer fixed height and fluid content but scrolling

Judging by earlier questions and their lack of answers, I'm not sure there will be a good answer for this. Fortunately, we only need to support newer browsers. Looking for a layout to let us have a 3 rows with a fixed-size header and footer, but the center row is fluid with the height of the browser...
Nick Spacek
0

votes
0

answer
6

views

Rails prepend_view_path with fallback

In Rails it is possible to override the default view paths to another directory, for example: class ApplicationController < ActionController::Base before_action :set_view_path private def set_view_path site = "whatever.example.com" prepend_view_path "#{Rails.root}/app/views/#{site}" end end I would...
Nick M
0

votes
0

answer
16

views

Duplicating range while replacing values in one column

I have two ranges, One with item details, another range with a list of vendor codes. I need to duplicate the item details to each vendor code. Say i have a range, 3 columns, 10 rows. (Rows could be "ProductID/Name/VendorCode") as following Each item in the table is supplied by 3 different vendors....
Nick Razzleflamm
1

votes
3

answer
309

views

Sql Group By Max Value in one column

I've been pulling my hair out all day on this, could anyone help me. I think it's probably pretty simple but I can't quite get exactly what I want. The data in the table looks like this CallId ProblemDescription CurrentAction CurrentEngineer EventNumber CON-00002 R...
Nick Williams
1

votes
2

answer
807

views

Iterate over numpy array in a specific order based on values

I want to iterate over a numpy array starting at the index of the highest value working through to the lowest value import numpy as np #imports numpy package elevation_array = np.random.rand(5,5) #creates a random array 5 by 5 print elevation_array # prints the array out ravel_array = np.ravel(eleva...
Nick Jones

View additional