Chris Chris

28500 questions
1

votes
1

answer
728

views

How do I select an ambiguous column reference? [duplicate]

This question already has an answer here: Enable case sensitivity for spark.sql globally 1 answer Here's some sample code illustrating what I'm trying to do. There is a dataframe with columns companyid and companyId. I want to select companyId, but the reference is ambiguous. How do I unambiguously...
chris.mclennon
1

votes
2

answer
9.5k

views

How to set value to Form in Angular 6 using FormControl

Group Select {{group.name}} How can I set the value of the field to Select dynamically in the Component? I looked at the docs, https://angular.io/api/forms/FormControlName#use-with-ngmodel but still no example that can help me. Attempt: this.gGroup.get('groupControl').setValue('Select');
chris
1

votes
2

answer
48

views

Having trouble with Entry variables in tkinter Python

from tkinter import * root = Tk() root.geometry('800x650') e = Entry(root, width=3, font=('Verdana', 30), justify='right') a = b = c = e a.place(relx=0.2, rely=0.5, anchor=CENTER) b.place(relx=0.44, rely=0.5, anchor=CENTER) c.place(relx=0.65, rely=0.5, anchor=CENTER) root.mainloop() Why can't I see...
Chris
1

votes
2

answer
112

views

Plotting a ggplot2 graph in a power point slide with a given size - R

I'm trying to plot a ggplot2 graph in a power point slide with the officer package. I can do it actually (printing the ggplot2 directly in the ppt), but as I need to increase the size of the ggplot2 graph (for the ppt slide), and I have understood that ggplot2 graphs are dependent on the size of the...
Chris
0

votes
1

answer
12

views

How to get hyperlink in a formula using EPPlus

I need to get the exact link inside the formula(HYPERLINK) and save it to the database. here is my code to get the link, answerList.Add(new SurveyCompetitorAnswer { MainSurveyId = id, Answer = workSheet.Cells[AnswerRowRange].Text, DateCreated = DateTime.Now, Link = workSheet.Cells[AnswerRowRange].F...
Chris May
1

votes
1

answer
218

views

Kafka Connect JDBC Sink Connector

I am trying to write data from a topic (json data) into a MySql Database. I believe I want a JDBC Sink Connector. How do I configure the connector to map the json data in the topic to how to insert data into the database. The only documentation I can find is this. 'The sink connector requires knowl...
Chris
1

votes
2

answer
87

views

In Amadeus self service APIs, is price.total inclusive of all taxes and fees?

For the Amadeus self-service rest APIs: v1/shopping/flight-offers and flight-dates, is the price.total response field inclusive of all taxes and fees? I seem to need to add total + totalTaxes to get a price that's close to the one provided by the airline directly. If there are developer docs that e...
Chris Han
1

votes
2

answer
61

views

Is there a quicker way to initialise a BigQuery client?

Using the recommended way to initialise a BigQuery client from the google documentation at Quickstart: Using Client Libraries takes 15 seconds to complete. This seems very slow - is there a quicker way? import com.google.cloud.bigquery.BigQuery; import com.google.cloud.bigquery.BigQueryOptions; publ...
chris
1

votes
2

answer
34

views

various transformations with lapply() - R

I have this df: df df Created Updated Resolved 14 2019-02-18T08:59:57.067-0300 2019-03-12T16:20:48.210-0300 2019-03-12T16:20:48.203-0300 28 2019-01-28T11:55:34.723-0300 2019-03-08T15:37:32.071-0300 2019-03-08T15:37:32.065-0300 29 2019-01-28T11:52:39.744-0300...
Chris
1

votes
3

answer
26

views

update chart data called through ajax via PHP, MySQL

My Chart data is called via ajax from a MySQL Database, when the data in the database is updated the chart does not. The chart renders correctly, just not updating. I am new to PHP and chartjs. Any assistance would be great No matter what I have tried I am unable to get the .update or .destroy to w...
Chris Binstead
0

votes
0

answer
4

views

GeoFire Query Callback Not Firing

I am trying to implement geofire into one of my firebase cloud functions and can't understand why the query callbacks are not firing. The dashboard log continues to display nothing returned or nothing documented via console.log(). Any guidance would be appreciated..below is my code: exports.test = f...
Chris
0

votes
3

answer
46

views

Passing object and function names in JavaScript

i've created an object that contains the names of several objects and the names of functions associated with creating new objects, in this case, charts. var oCharts = [{ nchart: 'chart1', fchart: 'makeChart1' }, { nchart: 'chart2', fchart: 'makeChart2' }, { nchart: 'chart3', fchart: 'makeChart3' } ]...
Chris G.
1

votes
3

answer
650

views

Modifying items in a $_POST array

I'm using CodeIgniter to validate form data, and then posting it to a third party site using the php header() function with the $_POST key-value pairs as URL parameters. So for example: 'first_name' => 'chris' 'area_code' => '555' 'phone_number => '555-5555' ... would become 'http://thirdpartysite.c...
Chris
1

votes
2

answer
4.3k

views

Return list of all nodes from xml column in sql database

I'm working on an SQL database and I need a way to return a list of all products that have a tag attached to them. Here's a quick example of my xml fee activation I also have a column for ProductType and ProductID. What I need to do is pull out all entries of a certain product type, and list off the...
Chris Hobbs
1

votes
2

answer
471

views

Quick Sort Algorithms - Many different ways of doing the same thing?

Am I correct in saying that there would be many ways to perform a Quick Sort? For argument sakes, lets use the first textbook's numbers: 20 47 12 53 32 84 85 96 45 18 This book says to swap the 18 and 20 (in the book the 20 is red and the 18 is blue, so I've bolded the 20). Basically it keeps moving...
Chris
1

votes
2

answer
1.4k

views

Save object in cassandra using spark and java

Just started working with spark and cassandra in Java and I am already stuck with saving data to my cassandra database. here is the java bean class that i have public class User implements Serializable { public User(){} public User(String username, String password){ this.username = username; setPass...
chris
0

votes
0

answer
3

views

Entity Framework Core's AddRangeAsync() doesn't work in a generic method

This works: await AddRangeAsync(myEntities); But this doesn't work: await AddEntities(myEntities); ...when I try to use this function: private async Task AddEntities(IEnumerable entities) { await AddRangeAsync(entities); } I get an error: 'The entity type 'List' was not found. Ensure that the entity...
Chris
1

votes
2

answer
1.2k

views

How do I assign something to a JQ variable I've already set in JQ?

I'm setting some variables before I run a JQ that I want to set some fields to. Like so: jq --arg user $SOME_USER '.something.user|='$user Did a thing'' But when I pipe this to a file or look at stdout it seems to pick up the variable but not replace it in the string in the JQ script.
Chris
0

votes
0

answer
16

views

UsedRange in ASP.Net

I have this codes, FileInfo filepath = new FileInfo(path); using (ExcelPackage package = new ExcelPackage(filepath)) { ExcelWorksheet workSheet = package.Workbook.Worksheets['Sheet1']; int totalRows = workSheet.Dimension.Rows; List questionsList = new List(); for (int i = 2; i
Chris May
1

votes
1

answer
546

views

Accessing resolved promise object properties

I'm having trouble accessing resolved promise object properties. Using fetch, I have a .then doing this: .then((response) => console.log(response.json())) I'm trying to access the user property of the response object by doing this: .then((response) => console.log(response.json().user)) and it's retu...
Chris Wingler
1

votes
1

answer
1.6k

views

labeling networkx node attributes outside of nodes

I am working on a small example node set belonging to two types {'human', 'machine'} and I want to label node attributes in dictionary form outside of each node in networkx graph, such as those shown in nodes c, e, j in the graph below. (I used MS Word to add dictionary-type attributes on the graph....
Chris T.
1

votes
2

answer
496

views

ValueError: Invalid endpoint: s3-api.xxxx.objectstorage.service.networklayer.com

I'm trying to access a csv file in my Watson Data Platform catalog. I used the code generation functionality from my DSX notebook: Insert to code > Insert StreamingBody object. The generated code was: import os import types import pandas as pd import boto3 def __iter__(self): return 0 # @hidden_ce...
Chris Snow
1

votes
1

answer
35

views

What brand of coroutine does Lua implement?

Can anyone tell me specifically what 'flavor' of coroutine Lua implements? I ask because Lua's coroutines seem to be well suited to a problem of mine where I want to be able to pause a function at various points, possibly within nested function calls, and then resume it later. Despite having similar...
Chris_F
1

votes
2

answer
41

views

WorksheetFunction.CountIfs giving me a type missmatch error (error #13)

I am trying to perform a CountIfs function where two criteria are met. First a line is 'Approved' and second the Appv Date is within the reporting month. The CountIfs works find when only the first criteria exists but when I add the second I get a Type Mismatch error and I am not sure why. Code: '...
Chris
1

votes
1

answer
59

views

how to fix timeout while creating a file scanner in php

Hello guys i am trying to a file scanner and add the data to be saved on the database the files are like 15,000 almost the scanner scans but just half of the directory the times up. My code looks like that
Chris Ngure
1

votes
2

answer
64

views

What's the most economical way to fill a matrix with random values?

I'm trying to find the most economical and elegant code for a simple task: fill an empty matrix with randomly sampled values (here, A, B, or C). For illustration, let's take this matrix: x
Chris Ruehlemann
1

votes
4

answer
35

views

How do I make my right-side margin equal on all resolutions?

I have a short unordered list. I basically just want to shrink the right margin so the borders don't contain the entire page. In my current resolution, I have the right margin set to 35em. This works when my window is minimized, but when I go back into fullscreen (1920x1080) the right margin is too...
Chris Lallo
1

votes
1

answer
78

views

Rspec testing Sentry's Raven capture_exception

Let's say I have this snippet of code... Raven.capture_exception(error, { extra: { error_message: message } }) end I have tried to use expect(Raven).to receive(:capture_exception).with(...) and no matter how I slice this, I can not seem to bind an expect to Raven so I can verify it was sent the logg...
Chris Hough
1

votes
1

answer
57

views

EF Core dealing with alternate primary keys

I have some EF Core models that were built using dotnet ef dbContext scaffold to produce models using a database first approach. My problem is the database uses an integer primary key, used for linking tables together but has a string based index that would be used as the sane index for searching th...
Chris Becke
1

votes
2

answer
59

views

Passing variable between PHP and JS within same HTML

I am reading data from MySQL using PHP. I am then trying to pass that data to the JS below within the same HTML, using it on OpenLayer maps. I have tried various methods including json_encode but cannot seem to pass valid data. When I set the data manually in the JS it works OK. What am I doing wron...
Chris King
1

votes
1

answer
93

views

CSP with a Service Worker

I want to implement CSP on my site, but also have a Service Worker that caches resources and provides a notice if you are offline. I have defined the following policy: style-src 'self'; object-src 'none'; script-src 'self' 'unsafe-inline'; worker-src 'self'; frame-ancestors 'none'; Google's CSP eval...
Chris
1

votes
2

answer
68

views

PhpStorm + Xdebug: Connection established, no Debug window popup in PhpStorm

I'm struggling to get PhpStorm and Xdebug to play nicely on a specific Vagrant VM. How can I effectively track down and resolve the issue in connecting PhpStorm and Xdebug for this VM? While I can see that PhpStorm and Xdebug are communicating to a degree, the connection from Xdebug does not launch...
Chris Burgess
1

votes
0

answer
7

views

microk8s untrusted dashboard - how to verifiy certificate

I am trying out microk8s following this I am getting a certificate error when browsing the dashboard(multipass ls - ip address) I guess I need to copy and verify kuberneters certificate from multipass host(macos) on macos keychain?
Chris G.
1

votes
1

answer
38

views

Slot doesnt exist in connect function in C++/Qt project? (already reran make)

I am adding a slider bar to easyPaint, which will enable a zoom function. I have the slider appearing where I want it on the screen, and the function I built for it shouldn't have any issues, but when I run it, I get a runtime error that the slot doesn't exist, when it clearly does. I have already t...
Chris
1

votes
2

answer
19

views

NuGet packages added to my project that are not referenced

When restoring NuGet packages I see that Xamarin.ios.CameraViewController is restored to my package and with it, all its dependencies. But I never referenced Xamarin.ios.CameriaViewController nor it is a dependency of my referenced packages. My csproj nuget references: 7.0.3 5.2.0 2.0.11 2.3.2 2.2.2...
Chris Fodor
1

votes
2

answer
37

views

Select the most common value of a column based on matched pairs from two columns using `ddply`

I'm trying to use ddply (a plyr function) to sort and identify the most frequent interaction type between any unique pairs of user from a social media data of the following form from
Chris T.
1

votes
3

answer
1.2k

views

How do .Net IoC's handle Exceptions in Constructors? [closed]

In this question: Examples of IoC Containers There's an answer that warns that exceptions thrown in constructors are difficult to debug/handle, because the IoC eats them. A comment follows up to say that's no longer true. How do .Net IoCs mitigate this flaw today, or are there some that still suffer...
Chris Moschini
1

votes
2

answer
50

views

Binding a string with value in Angular 2

How to concatenate string with a value as we do in JAVA 'The total pay is ' + totalPay. I want to do it in Angular 2+ like 'Hi Hello' +req.body.hello
Chris
1

votes
1

answer
17

views

Mongoose and nested arrays

My Schema let citySchema = new mongoose.Schema({ ... }); let countrySchema = new mongoose.Schema({ regions : [{ cities : [ref: 'City'] }] }); The problem - how to insert existing city into a selected (by _id) region. The _id of a region is automagically added by mongoose/mongodb, and I do not want t...
Chris
1

votes
0

answer
93

views

How do I use HTML5 form elements (e.g. <input type=“date”>) with Elm's Style-Elements library?

I have a view (I've mocked it up here) which uses Elm's style-elements library to generate a form: formEl : Model -> E.Element MyStyles variation Msg formEl model = E.column None []
Chris

View additional