Adam Adam Adam

11833 questions
0

votes
0

answer
5

views

Monk - Why do my updates only work sometimes?

I am building a web application using the MEVN Stack. I am using the npm package 'Monk' to communicate with MongoDB. I have a route that inserts a new document into a collection, and when it gets called it is also supposed to update a document in another collection. However, this only works occasio...
Taylor Adam
1

votes
1

answer
1.1k

views

Adding KVO to a Settings bundle

I’ve attempted to add KVO to my NSUserDefaults to watch for a value changing in Settings. I’ve added a breakpoint to my observeValueForKeyPath:object:change:context method but it’s never called. Here’s my code: override init() { super.init() NSUserDefaults.standardUserDefaults().addObserver(...
Adam Carter
0

votes
0

answer
4

views

How to personalize AoG push notification with custom payload

I have implemented AoG action which is sending push notifications (https://developers.google.com/actions/assistant/updates/notifications). I have single push notification, i.e. did ask for user permission once + have single Aog intent handler for custom notifications. Problem is I want to use push n...
Adam Bezecny
1

votes
1

answer
170

views

What is the reason for using single-character generic type names in java?

In java most (or all?) generic classes in the JDK have single-digit generic type names. For example HashMap's definition looks like this: public class HashMap extends AbstractMap implements Map, Cloneable, Serializable { Why is this the convention instead of more descriptive type names like HashMap...
Adam Arold
0

votes
0

answer
26

views

How to create a parameter using $ to select from data frame

I have three different data frames that are similar in their columns such: df1 df2 df3 Class 1 2 3 Class 1 2 3 Class 1 2 3 A 5 3 2 A 7 3 10 A 5 4 1 B 9 1 4 B 2 6 2 A 2 6 2 C 7...
Adam Amin
0

votes
0

answer
30

views

C++ Double dispatch with runtime polymorphism?

Is it possible to perform double dispatch with runtime polymorphism? Say I have some classes, and some of those classes can be added/multiplied/etc., and I want to store those dynamically within another class that performs type erasure at runtime. Then say I want to perform basic operations on the d...
Adam
0

votes
0

answer
7

views

Gmail not threading replies sent via API

I'm trying to send replies via the Gmail API in Python and can't seem to get the Gmail web client to thread the messages. However, they are being threaded in Outlook, which is very strange. Here's how I'm creating the messages: def create_message(sender, to, subject, message_text, reply_to, thread_i...
Adam Bowker
3

votes
0

answer
22

views

React hook rendering an extra time

My code is causing an unexpected amount of re-renders. function App() { const [isOn, setIsOn] = useState(false) const [timer, setTimer] = useState(0) console.log('re-rendered', timer) useEffect(() => { let interval if (isOn) { interval = setInterval(() => setTimer(timer + 1), 1000) } return () =...
Adam Hartleb
0

votes
0

answer
3

views

EclipseLink does not see created tables in H2 DB

For test run of the application I am using H2 database 1.4.197. The app is deployed on TomEE 7.1.0 which uses EclipseLink 2.6.4. I see in logs that during the startup EclipseLink creates tables, sequences etc. Even initialize sequence with value 0: [EL Fine]: 2019-02-13 20:25:37.442--ServerSession(1...
Adam
1

votes
2

answer
162

views

Laravel: Cannot set locale in Mailable

I updated to Laravel 5.6 and I want to use the new locale method from a Mailable class. I created a mailable class with php artisan make:mail Test --markdown="emails.test" This is my blade file: @component('mail::message') @lang('list.test') @endcomponent If I send a mail $test = new \App\Mail\Test...
Adam
1

votes
2

answer
155

views

Is the main key in package.json mandatory?

My Problem I have a repo which contains a collection of a few nodejs Serverless, Function-as-a-Service functions. The functions share the same node_modules directory, but deployed separately to our FaaS platform. npm init creates a "main": "function.js" entry in package.json. Since I don't have a si...
Adam Matan
1

votes
1

answer
36

views

What is the Full Meaning of the Discount Factor γ (gamma) in Reinforcement Learning?

I'm relatively new to machine learning concepts, and I have been following several lectures/tutorials covering Q-Learning, such as: Stanford's Lecture on Reinforcement Learning They all give short, or vague answers to what exactly gamma's utility is in the policy function. The most understandable ex...
Adam Whitehurst
1

votes
1

answer
79

views

Xamarin.Android binding invalid opcode

Recently received a new Android SDK (aar) to bind in Xamarin. When initially starting the binding I receive the error COMPILETODALVIK : Uncaught translation error : com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
Adam Pedley
0

votes
0

answer
4

views

How to create a circular multi-histogram graph using the R package circlize?

I apologize in advance since I am a beginner user in R. I have a big data file, with multiple factors (15), and multiple tested samples from various group within each factor (5). I have calculated the means for each group within each factor. To simplify the presentation of my data, I would like to c...
adam.bj
1

votes
2

answer
1.3k

views

Execute stored procedure for each line in a CSV

I am trying to run a stored procedure using tsql multiple times in a query using each CSV line for the parameters. How would I go about looping through this? Cheers
Adam Howarth
0

votes
1

answer
17

views

using multiple paramters in a min and max method

I am trying to put multiple numbers into a min and max method. I know that in a min and max method only two methods are allowed. However, I have more than two numbers and I don't have a clue what I'm doing. This code is also on reply.it: int age5 = 75; int age6 = 62; int age7 = 89; int age8 = 90;...
Adam Chen
2

votes
1

answer
25

views

What type of join to use here?

I have two tables: StorageTransactions and FutureStockUsageMaterials. The StorageTransactions table shows all the movement of the products in and out of the storage, while the FutureStockUsageMaterials table shows possible future movements of products in and out of the tables. I've written the follo...
Adam Baranyai
-1

votes
2

answer
22

views

I'm having problems getting “All” of the “named” objects in the POST after a form submit

I have a form detail.php that utilizes the POST method and processes data on action on process.php page I have a number of objects on my form (select, textarea, labels) some I get data for in the $_POST other's I do not. For example one of my selects on my detail.php page when echoed on process.p...
Adam M
1

votes
2

answer
91

views

Get element's html tag content

Is it possible to get a node's top-level tag html via the dom api? To be clear, if I have Hello I want to just get back Is a crude string matching on outerHTML the best I can do, or is there a fast and direct way to achieve what I want?
Adam Rackis
0

votes
0

answer
12

views

Regex for Matching All Strings That Contain Two Different Words from a List

I have need for a regular expression (in Java) that matches a string if and only if it contains two different words from a given list. For example, if the list of words is {blue,yellow,pink}, then the strings "blue and pink" and "yellow is the new blue" will match, but the strings "I like blue" will...
Adam Galmor
1

votes
1

answer
308

views

Will xml attributes above min API cause crashes in Android?

Or will those attributes just be ignored on devices with lower API levels? Why can't I just test this out myself by launching an emulator below the attributes min API? None of those emulators are working for me: https://code.google.com/p/android/issues/detail?id=195990 For example if I use android:f...
Adam Johns
0

votes
4

answer
87

views

How to make an object list from double values?

I have a list of doubles. List averagesAndSums = new ArrayList(); which has 20 double values. These values are average and sum values of Invoice objects. public class Invoice { private double average; private double sum; //const, getters, setters } Thus it has a structure like that index 0 = avera...
Adam Jungen
1

votes
4

answer
730

views

C# LINQ join 2 tables with where clause

I am trying to join 2 tables while filtering with where clause. The data looks like this: Category Name Selected A 0 B 1 C 0 SubCategory Name ParentCategory Selected s1 A 0 s2 B 1 s3 B 0 Expected results: ParentCatName SubCatName SubCatSelected...
Adam Cox
1

votes
2

answer
156

views

How do I evaluate a nested match in an assumption that depends on a sumbool, given a witness to that sumbool in another assumption in Coq?

I have a proof state similar to what is shown below (I've simplified it some to focus on the essence of the problem I'm having). I'm almost certain that a contradiction exists in my assumptions. However, assumption H consists of a nested match that depends on the result of the expression "eq_nat_d...
Adam Michael Petz
1

votes
2

answer
240

views

vim cd'ing to git root

I'm trying to cd into my project's git root from vim so that my Ctrl-P works properly. I often work in project's where I don't want Ctrl-P to look up to the git root so I have it set up to only look for the nearest folder with a .gitignore. On the command line I can do something like cd $(git rev-pa...
adam-beck
1

votes
4

answer
704

views

Skimage : rotate image and fill the new formed background

When rotating an image using import skimage result = skimage.transform.rotate(img, angle=some_angle, resize=True) # the result is the rotated image with black 'margins' that fill the blanks The algorithm rotates the image but leaves the newly formed background black and there is no way - using the r...
Adam Cherti
1

votes
2

answer
2.4k

views

Auto Updating Sideloaded Android App on Start

We have an Android app (.apk) published to a publicly accessible URL, any user who knows the URL can download and install the app. The app is already installed on the relevant user phones and allowing sideload option from the settings is turned on. How can I force the app, on start, to check for upd...
Adam
1

votes
3

answer
3.1k

views

Page moving left and right while in mobile browser

I'm working on a project and I'm running into a big issue. I'm using bootstrap and I need the page to be full width. I'm using container-fluid. Everything works fine on desktop but on mobile the page moves side to side as if the container is bigger than the display. There is no scroll bar but you ca...
adam g
0

votes
0

answer
5

views

What's am I doing wrong with this backup using PyODBC and SQL Express Server 2008

For details I'm running a very recent version of python and PyODBC and am trying to remotely instantiate a backup on SQL. I don't know much about SQL. I've tried googling the issue and have tried a few tricks below including using .nextset() and trying different encodings just in case. I see a large...
Adam Schulz
1

votes
1

answer
659

views

Where can I write Parse Cloud Code functions for android?

Is it possible to write a cloud code function directly into android studio? If not where could I write one? I can't find it on my parse dashboard thanks
Adam J
1

votes
1

answer
263

views

How to compose functions with compatible parmeter / result types in Kotlin?

I have an interface which looks like this: interface FontRegionTransformer { fun transform(region: R, textCharacter: TextCharacter): R } I'm not an expert in category theory but as I have learned previously this structure is a monoid (is it?) and I can combine any number of functions which take R an...
Adam Arold
0

votes
0

answer
2

views

Splitter to resize controls on CFormView/CPropertyPage

I am looking for a solution to resize a controls on the CFormView or CPropertyPage, something like a CSplitterWnd but can be used for resizing anchored controls. In Delphi i could use splitter control that does the work, but in MFC world it is Not so easy. What do you use in your projects? Hard to b...
Adam
1

votes
2

answer
151

views

Hundreds of pictures in UIImage array - memory leak

I am working on an app which creates frames out of the recorded video: var videoFrames:[UIImage] = [UIImage]() func loadImages(){ let generator = AVAssetImageGenerator(asset: asset) generator.generateCGImagesAsynchronously(forTimes: capturedFrames, completionHandler: {requestedTime, image, actualTim...
Adam Roszyk
1

votes
3

answer
1.1k

views

Unable to return JSON from Hibernate POJO in Spring Boot REST

I am trying to create a basic REST service using Spring Boot that returns POJOs created from a database using Hibernate and then are transformed into JSON and returned to the REST call. I can get regular non-Hibernate POJOs to be returned as JSON, but for Hibernate objects I am getting this error: F...
Adam P
1

votes
2

answer
354

views

django queryset select_related . values() rename key

Using python3.4 django 2.0.2 models.py class Userinfo(models.Model): useruid = models.BigAutoField(db_column='UserUID', primary_key=True) useremail = models.CharField( db_column='UserEmail', unique=True, max_length=100) userpassword = models.CharField(db_column='UserPassword', max_length=128) passwo...
Adam
1

votes
1

answer
282

views

How to use React links when rendering content with dangerouslySetInnerHtml?

So I'm developing a blog page for a react application. The page is loading data from a CMS and the content of the blog post is raw html which I render on the page with: However any links I put in the post like Home Page don't use react router and instead trigger reloading the page. Is there a way t...
Adam
1

votes
2

answer
152

views

Vapor Swift Client for a Message Queue / RabbitMQ

I'm having a play with Swift Vapor and want to build a web API using microservices. What's the best way for sending messages between microservices built with Vapor and a message queue such as RabbitMQ?
Adam Young
1

votes
4

answer
115

views

How can I make an egg shape in CSS? [duplicate]

This question already has an answer here: Explain the usage of CSS3 in an Egg Shape 3 answers How do I create a teardrop in HTML? 12 answers I'm trying to make an egg-style image with CSS but I can't get it quite right. I want to make the top of the egg come in a little more narrow. .egg { width:...
Adam B
1

votes
2

answer
44

views

Hide/mask URL when user visits

I'm looking to store pages for my website in dedicated directories to make them a little easier to manage and to store handlers alongside their pages but I don't want the user to see the directory structure when visiting these pages. e.g. If a page is stored in https://mywebsite.com/faq/faq.php and...
Adam Roberts
1

votes
1

answer
53

views

Ensuring that javascript code was not modified

Let's say we have a small javascript code, something like this: function calculate(input) { input = input + 100; // the code will send the result here to the server } As javascript code can be modified, any one can change the hard coded 100 that is in the function, to any number, thus modifying the...
Adam Baranyai

View additional