jasper jasper

5

votes
0

answer
137

views

FactoryBoy - nested factories / max depth?

I am writing tests for a large Django application, as part of this process I am gradually creating factories for all models of the different apps within the Django project. However, I've run into some confusing behavior with FactoryBoy where it almost seems like SubFactories have an max depth beyond...
Jasper
1

votes
1

answer
784

views

Create clusters using correlation matrix in Python

all, I have a correlation matrix of 21 industry sectors. Now I want to split these 21 sectors into 4 or 5 groups, with sectors of similar behaviors grouped together. Can experts shed me some lights on how to do this in Python please? Thanks much in advance!
Jasper C.
1

votes
3

answer
746

views

Alternative to using async () => in Rx Finally

My understanding is that async void, should be avoided and that async () => is just async void in disguise when used with Action. Hence, using the Rx.NET Finally operator asynchronously with async () => should be avoided since Finally accepts Action as parameter: IObservable.Finally(async () => { a...
Jasper H Bojsen
1

votes
0

answer
179

views

Django Admin, including reverse foreignkeyfields on page

I have the following two models: class Seller(models.Model): name = models.Charfields(max_lenght=500) (... more fields, but no foreignkeys to anyone) class Ad(models.Model): seller = models.Foreignkey(Seller, related_name='ads') (... more fields that are not relevant to this question ) Now I want to...
Jasper
1

votes
0

answer
101

views

Get a list of users current scopes

I have an XSA SAPUI5 app which is used in a workflow scenario by 2 roles data capturer data approver scopes and roles for each defined in xs-security.json I want to determine which scopes a user has, i can do that in an api by calling @sap/xxsec checkScope eg app.get('/isApprover', (req, res)=>{...
Jasper_07
1

votes
0

answer
28

views

No exclusive rights after removing tables

In MS Access 2007 I imported some CSV files. These imports do create import errors as some of the fields have extensive text that cannot be stored in a memo field. For these errors, MS Access creates new tables with import errors for every single file that it imports. I created a sub that deletes th...
Jasper
1

votes
1

answer
89

views

Parsing polymorphic object with objectmapper

I am trying to parse a polymorphic object (it is from the Strava api) with a jackson object mapper. The object looks like this: [ { 'type': 'latlng', 'data': [ [ 38.603734, -122.864112 ], [ 38.608798, -122.867714 ], ... omitted for brevity ... [ 38.611205, -122.870848 ], [ 38.603579, -122.863891 ] ]...
Jasper
1

votes
2

answer
234

views

Retrieving Pyomo solution without using for loop

I am struggling to find an efficient way of retrieving the solution to an optimization problem. The solution consists of around 200K variables that I would like in a pandas DataFrame. After searching online the only approaches I found for accessing the variables was through a for loop which looks so...
Jasper
1

votes
0

answer
52

views

Django: Accessing user-uploaded files in view

I have the following question: I have a listview that lists a number of user uploaded PDF files. I am creating a method that Zips them all in a .zip file and emails them (when a button is clicked). I have the following question: I am currently working locally on test data, but on our production set...
Jasper
1

votes
1

answer
370

views

Laravel, Forcing A Unique Rule To Ignore A Given ID

I am following the instructions from the Laravel Documentation but I can't seem to make the rule work. Basically, I want to add a unique rule for both email and username fields for updating the user profile, but it doesn't seem to work. Am I missing something? Here is the function for updating user...
Jasper Martin
1

votes
1

answer
204

views

TypeScript : Why allowJS option preserves 'src/**' folder structure?

I'm converting a legacy node/express codebase to TypeScript, following the Microsoft TypeScript starter as a starting reference. In this reference output is compiled to dist, however when enabling 'allowJSintsconfig.json, output is emitted todist/src` - why is that? Here is my tsconfig.json { 'com...
Jasper Blues
1

votes
1

answer
36

views

Django does not seem to account for DayLightSavings

In my models I want to update the last_edited value of the Submission object everytime the UserAnwser object is saved. To this end I've written the following code from django.utils import timezone ... class UserAnswer(models.Model): answer = models.FloatField() question = models.ForeignKey(Questio...
Jasper
1

votes
1

answer
71

views

shiny disable tables in a specific navlistPanel

every one, I want to make a shiny app, which can disable tables in a specific navlistPanel, follow is my code which can disabe all the tabs in navlistPanel: ui
Jasper Shen
1

votes
1

answer
133

views

What is the best way to set up a Provider base-state using Pact.Net and .Net Core?

In the (Ruby) documentation of Pact, there is the possibility to add a Provider base-state in the provider states. I'm using Pact.Net and use ProviderStateMiddleware, but I can't figure out how to set up the base-state with this implementation. Is it possible to do this and/or does anyone have any e...
Jasper Van Mensel
1

votes
0

answer
57

views

Does the # of objects added/updated in a writeTransaction affect file size inflation/version pinning?

Context: I have 3 RLMObjects: ModelA, ModelB, ModelC. ModelA has a one-to-many relationship to ModelB using RLMArray, and ModelB has a one-to-many relationship to ModelC using RLMArray. I am trying to persist a variable amount of objects into Realm (using v3.3.1). Objective: I need to persist all of...
Jasper Chan
1

votes
0

answer
169

views

Trouble understanding my errors when trying to create my MongoDB database connection on my javascript server using node.js

I am currently taking a web course and am almost always struggling to debug my code and the errors Node returns don't seem to help. I am creating a web server and trying to create username and password authentication with MongoDB and JavaScript. When I call my initialize function I get a wack load...
Jasper French
1

votes
1

answer
57

views

How to generalize special entities

We use Apache UIMA Ruta for processing our documents. The input documents contains all kind of patterns that we try to recognize and translate to a hierarchy of annotations. One of the things we will do with the result is to decorate the input text with links. For that it's import that we know the...
Jasper Huzen
1

votes
1

answer
541

views

Azure private DNS zone resolving

We have a private DNS zone setup for the zone project.local. For app service instances living in an app service environment, each service has its own record pointing to the load balancer in front of the service (so all have the same IP). We have an App Gateway instance linked to a public IP in fron...
Jasper
1

votes
0

answer
47

views

SoundManager.setup not running on IOS

We have a web app that works fine on both PC (Windows, Linux, OSX) and Android but is not working on IOS. After lots of debugging, we've narrowed the cause down to the soundManager.setup function. soundManager.setup({ onready: function () { startGame(); } }); There a no console error messages, on I...
Jasper
1

votes
0

answer
41

views

Apple Maps search attempt gives SIGABRT

I am using this tutorial in a project and ran into an error at the last step. Every time I type into the search field, the app crashes with error SIGABRT. I am aware that the initial code in the tutorial is outdated and I have updated it as far as Xcode prompts me to. Xcode also tells me NOT to over...
1

votes
2

answer
219

views

How to save (pickle) a model instance in pyomo

I want to create a model instance and then save it so I can load and solve at a later time (the initialization takes quite long compared to the solving). When I tried this it gave me the following error. with open('model.pickle', 'w') as f: pickle.dump(instance, f) AttributeError: Can't pickle local...
Jasper
1

votes
0

answer
25

views

Django (1.4…) 'Pincode' decryption not working

I am working on a old / outdated webapp and helping bring it into the world of 2018. The app is running on Django 1.4.19 and Python 2, both of which are slated to be upgraded to their newest LTS versions. However, before this upgrade can begin we have to fulfil some GDPR / licensing requirements....
Jasper
1

votes
1

answer
76

views

React native after window restart gives error module.js:549

i have a react project . just started with react at the moment. there are a lot of configurations and steps that i have to perform to setup react development server and while i have been working before restarting my machine app was working fine. but after restart node start struct at start packaging...
Jasper felix
1

votes
0

answer
33

views

Making class literal some kind of 'configurable'

Imagine to have this class in some library, which gets added to another project as maven dependency: class A { // What can I do to replace B.class ? @SomeAnnotation(B.class) private String someValue; } I would like to make the class literal B.class some kind of configurable for the mvn project that...
Jasper
1

votes
0

answer
9

views

Show page if OAuth implicit flow is valid

So I volunteer a bit for my local sports club by, among other things, maintaining their website. They asked me whether I could look into making a 'members only' part of the site, where you could only get by logging in. And now here's the thing. There's this service in the Netherlands called 'sportli...
Jasper
1

votes
1

answer
26

views

Connecting Two Entities in Firebase in Firebaserecycleadapter

So i have a Cardview which is working already here is the code @Override public void onStart() { super.onStart(); FirebaseRecyclerAdapter firebaseRecyclerAdapter = new FirebaseRecyclerAdapter(Model.class,R.layout.row,ViewHolder.class,mref) { @Override protected void populateViewHolder(ViewHolder vie...
Jasper Ortiz
1

votes
1

answer
24

views
1

votes
1

answer
31

views

Android studio adapter and firebase

why is my app crashing when i delete something to the firebase here is my adapter public class PostAdapter extends RecyclerView.Adapter { public Context mContext; public List mPost; private FirebaseStorage storage; private FirebaseUser firebaseUser; private StorageReference storageReference; private...
Jasper Ortiz
1

votes
2

answer
47

views

Balance objects over two columns using CSS column-count: 2 in Chrome

I have created a dashboard solution in which objects of ever changing height are stacked in two columns. The goal is to distribute the objects over the columns as follows: First object goes top left in first column Next object goes below that object, unless there is not enough space to fit the full...
Jasper
1

votes
0

answer
35

views

Excel VBA error code during first run only

I have tried several methods to eliminate my VBA error but it does not help. During the first run, there will be error code 9. Upon running again, the code works fine. I have another code with no error but does not execute the VBA code correctly the first run. Upon running the code again, it execute...
Jasper
1

votes
1

answer
46

views

VBA script for copying highest row in table

I have a table with data in a worksheet called 'DL data calculation'. I want to copy the highest row in the table (A21:E21) (after filtering) to (Y3:AC3). The problem I am facing right now is that when I declare the range try to filter, only the A21:E21 row of cells gets copied instead of the highes...
Jasper
1

votes
1

answer
43

views

Launch Summernote Popover on Other Events

Using Summernote in airMode, the popover toolbar launches on a mouseUp event. Is there a way to make it launch on other events (specifically, mouseEnter)?
Jasper Kent
1

votes
0

answer
31

views

How to get data from web service in servlet

I need to get the data passed from web service to my servlet. This is the code in my web service: if (generatedKey > 0L) { System.out.println('Response.ok(generatedKey, MediaType.APPLICATION_JSON).build();'); URI uri = info.getAbsolutePathBuilder().path('createECommerceTransactionRecord?generatedKey...
Jasper
1

votes
1

answer
12

views

How to recognize a non-rectangular image in Unity?

Context: I am trying to create a Unity app for a mobile device that can recognize big objects like cars through the device's physical camera. I was looking at Wikitude and Vuforia but they both only seem to work with small objects that can fit on a table top. Unless I am missing something? I was als...
Jasper Citi
2

votes
1

answer
86

views

FactoryBoy / Django - OneToOneField duplicate key error

I am writing tests for a large Django application with multiple apps. As part of this process I am gradually creating factories for all models of the different apps within the Django project. However, I've run into some confusing behavior with FactoryBoy Our app uses Profiles which are linked to th...
Jasper
1

votes
0

answer
47

views

Express: Asynchronous task inside request

I want to spawn an async/child task inside an express request handler. Is the following understanding correct? Incoming request will start a promise chain. For an 'async/child' process, we can start a new promise. Rather than wait for callback of the promise above, we may send the response to the...
Jasper Blues
1

votes
1

answer
417

views

Why are Maven Goals not added by IntelliJ?

I have produced a new Maven Project from gae-archetype-gwt from within IntelliJ, and everything is generated well, but the gae:... goals won't show up in the Maven View, and if I try to update Repository Indices, apart from the local repository I get errors only. When I run gae:unpack from terminal,...
Jasper
1

votes
2

answer
2.3k

views

How do I verify an xPath expression in Selenium IDE?

How would I test for the following expression in Selenium? not(//select[@id='ddlCountry']/@class) or not(contains(//select[@id='ddlCountry']/@class,'invalidValue')) true if the class attribute doesnt exist, or if it does, the attribute doesn't contain invalidValue. I've tried using the verifyElement...
jasper
1

votes
1

answer
182

views

Incorrect behaviour of the authenticate controller in the Secure controller

I know there are already articles that covered this, but I'm having an issue that hasn't been resolved, even after reading those articles. Here it goes: I have 2 controllers, a MainController with this method: public static void login(String username, String password) throws Throwable { Secure....
Jasper
1

votes
2

answer
1.3k

views

Can I count the number of pokes with the Facebook API? me/pokes returns only one poke

I found this resource: http://developers.facebook.com/tools/explorer?method=GET&path=me%2Fpokes, but that only displays one poke. Can I get more pokes? I've also found this older question; Facebook FQL / Graph - Get all current pokes, which helped, but doesn't show the number of pokes ether. I want...
Jasper Kennis

View additional