Ryan-Ryan

1

votes
1

answer
1.4k

views

motion tracking javascript = html5/canvas game input/control

motion tracking with camera with javascript???? = input for game. is there a framework or something that might have this? other words...besides, keyboard, mouse, touchpad, xbox/ps3/usb joystick input i am wanting to further dig into camera motion detection, as a form of input / control for the game...
Ryan Sanders
1

votes
2

answer
269

views

Change what text editor the “Open this file in GitHub for Mac” link uses

When I click this link it opens up the file in Xcode. Unfortunately there doesn't seem to be any way to change this. I would like it to open in Sublime or Atom. I've checked the GitHub for Mac preferences menu but there is nothing there related to your default editor. I've tried changing my default...
Ryan
1

votes
4

answer
1.2k

views

convert string to multiple strings

Stuck on this little project. Can't figure out how to split a String into multiple strings inside a String[]. Example: String exampleString = "one two three four five"; String[] exmplString = {"one", "two", "three", "four", "five"}; What I have: static File interfacepath; FileReader fr; BufferedRead...
Ryan
1

votes
2

answer
264

views

Get Li3 to return JSON results as an array of objects, not an object of objects

I am trying to utilize the JSON result of a GET request to my Li3 app, but I would like the result to be an array of the returned JSON objects, rather than an object of the JSON objects. I have the following code in my view file (index.html.php): print($todos->to('json')); Which results in each row...
Ryan Schie
1

votes
2

answer
1.1k

views

Sort Collection of GPS Locations by distance to current GPS Location

Given a collection of Location objects which have a longitude and latitude, how can I sort this list based on each Locations distance to a current Location object? I have a method which can calculate the distance in meters between two Location objects. Is Collections.Sort() appropriate here?
Ryan R
0

votes
0

answer
42

views

Why is SQL hanging with specific date range?

I have a query I am running to pull data out of an order entry system database. The query runs fine (response within 500ms or so) when using the begin date of '2018-04-01' or '2018-05-01' but when I use the begin date of '2018-09-01' or '2018-10-01' or '2018-11-01' or '2018-12-01', the query will ha...
Ryan
-1

votes
4

answer
90

views

What does % do in Haskell?

I'm used to using % to mean "modulo" in other languages. In Haskell, we have to use mod x y or x `mod` y. So, what is this symbol used for in Haskell?
Ryan
1

votes
1

answer
23

views

HTML5 audio says “live broadcast” in iOS when it's a static file

For Windows Chrome (and probably many other browsers), this code works for serving an mp3 in an audio element: /** * * @param string $filename * @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory */ public function getMp3($filename) { $fileContents = Storage::disk(\App\...
Ryan
0

votes
2

answer
17

views

Why do I keep getting foreign key errors when trying to create this table? [duplicate]

This question already has an answer here: MySQL Creating tables with Foreign Keys giving errno: 150 19 answers I am trying to create tables for a database. Everything is fine except for when I try to make my last joining table, it keeps giving me a foreign key error "Create table 'refactor_test/ads...
Ryan
0

votes
2

answer
21

views

setInterval won't call function

I'm trying to create a sort of ecosystem where objects spawn over time. However, when I try using setInterval to increase the amount it doesn't work. It works when I call the function on its own, but not when I use setInterval. var plantSpawn = 5; function createPlants() { setInterval(reproducePlant...
Jason Ryan
0

votes
0

answer
4

views

Dividing two counts Oracle SQL

I am trying to write what I thought would be a fairly simple query but is proving to be harder than I thought. I want to divide the results of two select statements: Select count () from tableA where columnA = ‘A’ / Select count () from tableA where columnA in (‘1’,’2’) I am using Oracle...
Ryan Conway
7

votes
5

answer
365

views

How to code these conditional statements in more elegant & scalable manner

In my software, I need to decide the version of a feature based on 2 parameters. Eg. Render version 1 -> if (param1 && param2) == true; Render version 2 -> if (!param1 && !param2) == true; Render version 3 -> if only param1 == true; Render version 4 -> if only param2 == true; So, to meet this requi...
Ryan Gusto
0

votes
0

answer
12

views

Render a view inside a view

I have two rails scaffolds called "Image" and "Post." Image has an image, obviously, but I want to know if I can render the new.html.erb for "Post" right underneath the Image. I want people to be able to "post" a comment right under each image and link posts to images and to the post user.
Ryan Glen
1

votes
1

answer
2.3k

views

Sharing Cookies Between Two ASP.NET Core Applications

I'm using WsFederation in two separate ASP.NET Core projects. Each project has the following in Startup.cs services.AddAuthentication(sharedOptions => { sharedOptions.DefaultScheme = CookieAuthenticationDefaults.AuthenticationScheme; sharedOptions.DefaultSignInScheme = CookieAuthenticationDefaults.A...
Ryan Buening
0

votes
1

answer
15

views

VBA Show message if nothing selected Listbox Multiselect

Currently have a multi select listbox, on button press it shows options which im going to pass to SQL, how do I get it so a msg shows if none are selected Dim i As Integer With Worksheets("SQL Sheet").ListBoxes("31") For i = 1 To .ListCount If .Selected(i) Then result = result & "','" & .List(i) End...
Ryan Jacques
1

votes
1

answer
49

views

Why does moving printf() in a while loop that uses getchar() produce different results?

I'm new to C, sorry if this question is basic. I'm trying to understand the behaviour of the getchar() function. Here I have two versions of my code: The first one: #include int main() { int c = getchar(); while (c != EOF) { putchar(c); c = getchar(); printf(" hello\n"); } } when I enter 12 and hit...
Ryan
1

votes
2

answer
26

views

mongodb find() returns entire db, even with parameter

I have the following db: { "a": [{ "name": "foo", "thing": [{ "name": "bar", "lyrics": ["1", "2", "3"] }] }, { "name": "abc", "thing": [{ "name": "123", "list": ["one", "two"] }] }] } I can't seem to query it correctly. These two queries return the same thing, the entire db: db.test.find({"a.name":"...
Ryan
1

votes
1

answer
24

views

How to pass data from child route to parent (using form on submit)

I have a component which contains a list of expenses with a 'new expense' button. On click it will will go to its child route like so: New Expense This New Expense Component is a form that takes user input and creates a new expense. And then uses a service to add it to the database. The issue is the...
Ryan
0

votes
2

answer
134

views

HAProxy http passtrough proxy instead of 304 redirect

I am trying to get the equivalent of the nginx passtrough where a user would see my website url in the address bar but get all the content to be proxied from another website. At the moment the code below redirects the user to example2 by returning a 304, instead of proxying the traffic. I need it to...
Ryan
1

votes
2

answer
1.8k

views

Adding to multidimensional array from foreach loop issue

I have a foreach loop that iterates through posts and performs actions (such as setting a $distance variable for each). Through a conditional, it needs to do two things, which work independently but I cannot get them to work together. $results[] = $value; works, as it adds the array ($value) $result...
Ryan Little
1

votes
1

answer
450

views

What are concrete indices

In relation to elasticsearch, what are concrete indices. The elasticsearch docs mention them hundreds of times, but I can't find a definition anywhere. For example: count - allowNoIndices: Whether to ignore if a wildcard indices expression resolves into no ~concrete indices~.
Ryan White
-1

votes
1

answer
17

views

CSS horizontal gaps between html sections

Hello I know this question is probably quite basic but I can't seem to find the solution, I am trying to get rid of the white bars/gaps between elements on the page. here is my code and output thanks. [1]: https://i.stack.imgur.com/cv1Eu.png html [2]: https://i.stack.imgur.com/A5R0W.png css [3]: h...
Ryan
1

votes
1

answer
35

views

Requirejs load different js file inside define()

My webpage has different js components that handles different business logic. And I'm using RequireJS to manage dependencies. I want to dynamically load the component which is needed. For example: define(['something'],function(something){ var processor; if(userRole === "student"){ //I want to dynam...
Ryan Hu
1

votes
1

answer
994

views

NetSuite RESTlet Saved Search Return Limit

I have the following JSON RESTlet script being utilized to export some data. Due to the limitations, it's capped at 1000 lines, which is well under the total that I need to export. I've come across a few different solutions but JSON/RESTlet are fairly new to me so I'm looking for a bit of feedback...
Ryan
1

votes
1

answer
955

views

Eclipse error during remote debug session: sh: locale: not found

I'm really hoping to get an answer on this. I am using Eclipse to remote debug a C++ program on a (minimal) linux machine. I am aware that the linux machine does not have the locale binary installed. First off, the error received is the following in Eclipse after pressing the debug or run button: or...
Ryan
1

votes
1

answer
77

views

Issues with Date Time in C#

Having some problems with adding Date Time to my project, i have a creation form that ask for the make, model, color, lisensePlate, and then Date Time. i have the drop down box that ask the user to click the date and then enter the time the vehicle was created. After entering a date ex(10.30.2017...
Ryan
1

votes
1

answer
368

views

Send Email With Html content with all styling with gmail php api

I want to send email with all html using the gmail api. This is the preview of the html : https://docs.google.com/drawings/d/1J0nzeTol6VFr8sB1TlMDbTrSVanDncQ8FOelP_SvmY0/edit But when i send the email to my test account and then i check the email in inbox all the styling in email is lost. This is th...
Aneeb Ryan
1

votes
2

answer
272

views

How to keep leading zeros in double type in R column

I need to read a bunch of zip codes into R but they have to be in double type. I also need to keep the leading zeros for the ones that start with zero. I tried for (i in 1:length(df$region)){ if (nchar(df$region[i])==4) { df$region[i]
Ryan Stodola
1

votes
2

answer
5.7k

views

RuntimeError: dimension out of range (expected to be in range of [-1, 0], but got 1)

Trying to train a pytorch model(begginner) Im using a unet model to which i am feeding in a image as input and along with that i am feeding the label as the input image mask and traning the dataset on it. The unet model i have picked up from somewhere else, and i am using the cross-entropy loss as a...
Ryan
1

votes
1

answer
553

views

How to define Resource Policy for CloudWatch Logs with CloudFormation?

When I configure DNS Query Logging with Route53, I can create a resource policy for Route53 to log to my log group. I can confirm this policy with the cli aws logs describe-resource-policies and see something like: { "resourcePolicies": [ { "policyName": "test-logging-policy", "policyDocument": "{\...
Ryan Calhoun
1

votes
1

answer
1k

views

Pandas.read_csv “unexpected end of data” Error

I'm trying to read a dataset using pd.read_csv() am getting an error. Excel can open it just fine. reviews = pd.read_csv('br.csv') gives the error ParserError: Error tokenizing data. C error: EOF inside string starting at line 312074 reviews = pd.read_csv('br.csv', engine='python', encoding='utf-8')...
Ryan
1

votes
2

answer
624

views

Initializing the Container with API call unstated.js (React Context API)

I would like to simply initialize the Container state with data from an api call using unstated.js (a React Context wrapper). I saw one example where the Container was instantiated with a couple vars: import { Container} from 'unstated'; class WordlistContainer extends Container { constructor(...wo...
Ryan
1

votes
1

answer
429

views

trigger jenkins build on tag creation with multibranch pipeline

I've got a stage in my Jenkinsfile for building from a tag matching a tag name filter: stage('Build Release from Tag') { when { tag '*RELEASE' } In order to get tags to be discovered I've had to add tag discovery and a match for the tag name regex and to my pipeline under Branch sources > GitHub : T...
Ryan Dawson
1

votes
1

answer
121

views

SIMD for alpha blending - how to operate on every Nth byte?

I am trying to optimize my alpha blending code with SIMD. SSE2, specifically. At first I was hoping for SSE2, but at this point I would settle for SSE4.2 if it's easier. Reason being is that if I use SSE4.2 instead of SSE2, I cut out a significant number of older processors that can run this code. B...
Ryan Ries
1

votes
3

answer
56

views

Oracle SQL How to Count Column Value Occurences and Group BY during joins

I'm working on another SQL query, trying to group a collection of records while doing a count and joining tables. See below for goal, current query, and attached scripts for building and populating tables. Show all customers who have checked more books than DVDs. Display customer name, total book ch...
Ryan Cohan
1

votes
3

answer
39

views

mysqli_query not processing correctly

I'm setting up a small signup form that should be inserting the data to an existing table, return the unique ID and insert that value to a secondary table. Currently, I presume that the the first query is not running because the unique ID returned is 0. I've gone over this small portion of code, th...
JAMES RYAN
1

votes
4

answer
112

views

What's the logic behind the order the elements are passed to a comparison function in std::sort?

I'm practicing lambdas: int main() { std::vector v {1,2,3,4}; int count = 0; sort(v.begin(), v.end(), [](const int& a, const int& b) -> bool { return a > b; }); } This is just code from GeeksForGeeks to sort in descending order, nothing special. I added some print statements (but took them out for t...
Ryan A
1

votes
1

answer
53

views

How to add an additional value to a Shopify checkout URL?

My client's live Shopify setup has a feature where a URL goes to a sort of "quick checkout" that allows a customer to quickly purchase a single item. The way it works is, you first visit a URL like this: https://site1.com/cart/xxxxxxxxxxx:y and then you are immediately redirected to a URL like this:...
Ryan
1

votes
2

answer
47

views

How to create multiple objects that each load the same page but with different data in javascript?

I'm having a bit of trouble trying to create multiple different objects on the page that will all send a get request to the same url but with different parameters in the request. The server should return a page but with different data based on which object was clicked to make the request. It's kind...
Ryan O'Shea
1

votes
2

answer
42

views

How do I read the header or footer of a Word document with docx4js?

I can read the contents of the file with docx4js.load(fileName)).then(docx => { console.log("Content of the body is: " + docx.officeDocument.content.text()); }); But how do I print out the text in the header?
Ryan Shillington

View additional