Johan

1

votes
2

answer
2.3k

views

JMS Sessions, “transacted” and “auto-acknowledge”

What does JMS session exactly mean? What does it mean that a JMS session can be or not 'transacted'? What does it mean that a JMS session can be or not with 'auto-acknowledge'?
Johan
1

votes
3

answer
80

views

How to upgrade groovy-all from 2.4 to 2.5 when running in OSGi?

I'm maintaining an open source library based partly on Groovy called Rest Assured. In the next version I'd like to upgrade the Groovy dependency from 2.4.x to 2.5.x. However when doing this I run into issues when running the OSGi tests. The tests are using Pax Exam they typically look something like...
Johan
1

votes
2

answer
18

views

After save call back don't update

I am trying to set a callback for my Product Model, but the product attribute's discounted_price doesn't change... I can't call self.save it raises a stack level too deep What am I doing wrong? product.rb after_save :set_discount def set_discount self.discounted_price = self.price - (self.price * se...
johan
1

votes
2

answer
25

views

chain and order from different models

I have 3 models Size that belongs_to: :product Product that has_many: :sizes and that belongs_to: :category Category that has_many: :products I want sort them in a table in my Products index by Category title, then by product title, then by size Caegories | Product | Size | ------------------------...
johan
1

votes
1

answer
44

views

unknown attribute with polymorphic association

In my online shop I have tables Product and Size, also I think I need to add a table Restocking Instead of updating a product, I guess It's better to have a Restocking table then I could track the dates where I added any new sizes, quantity, and why not the new prices (buying and selling)... and c...
johan
1

votes
3

answer
152

views

String manipulation in Java8

I have written some code in Java7 to manipulate a String. If the string size is >= 10 it will return a substring of size 10 but if the size is < 10 it will append 0s in the string. I wonder if there is a way to write the same code in Java8 using streams and lambdas. There are some question related t...
Johan
1

votes
1

answer
334

views

ADFS openid-connect from web application without OWIN

I have an existing web application that have a custom made authentication and login module. I would like to add login for some users via ADFS openid-connect but all examples I see is based on OWIN which I cannot use. My plan is to let some external users login via Azure AD and once they are authenti...
Johan
1

votes
1

answer
229

views

How to validate naming conventions in an XML Schema

We're working on naming conventions for XML Schemas (XSD) we're using inside our company. To make sure everyone will honour the conventions I'm looking for a way to validate the XSD. The IDE we're using is IntelliJ,so that should be able to use an XSD file to validate other XSD files. One way wou...
Johan Vergeer
1

votes
0

answer
47

views

JQuery GET request returns missing CORS origin

OK, I have 3 servers that need to communicate together for a GET request. But I keep getting the origin is missing error, I can see the information that I want to receive in postman (so I know that my url's and passing on information works). Server with a public website from which the request starts...
Johan
1

votes
0

answer
718

views

Create a Build Pipeline View based on Pipeline job using Job DSL plugin in Jenkins

Since there's a limitation in Jenkins Pipeline's that you cannot add a manual build step without hanging the build (see for example this stackoverflow question) I'm experimenting with a combination of Jenkins Pipeline and Build Pipeline Plugin using the Job DSL plugin. My plan was to create a Job DS...
Johan
1

votes
0

answer
237

views

Open file with spacemacs as default

I recently switched my editor to spacemacs, and i have been enjoying it so far. The only thorn in my side is when i try to choose what program to open a file type i get this error: You can't change the item '10g.fsx' to always open in the selected application. The item is either locked or damaged, o...
Johan Pedersen
1

votes
1

answer
205

views

WooCommerce Subscriptions - Only Allow user one active subscription

I am in the process of building a membership / subscription based site for a client of mine and we are using Woocommerce Subscriptions and Woocommerce Memberships plugin. Now the problem is the my client is building a few promo pages which basically allows the user to purchase an upgrade. This is f...
Johan Rheeder
1

votes
1

answer
299

views

How do I choose a folder to store files from Docker?

I've been working on this for hours, but I've mainly found answers relating to Linux. I'm running Docker in Windows 10, and I'm trying to install some distros from Linuxserver I can do a basic setup (following a guide that install Jackett a similar way) docker create --name=jackett \ --restart=alway...
Stack Johan
1

votes
0

answer
451

views

Opengraph tags (og:tags) in Django template not scraped by Facebook

I've been trying to get opengraph tags work for my django website. I use 'www.somewebsite.com' as website url during this question. I used the following static code in the header: This did not work, so I've installed django-meta (http://django-meta.readthedocs.io/en/latest/installation.html) and imp...
Johan
1

votes
1

answer
411

views

Android Studio Error Create New Project in Default Project Location After open Project in other directory

Android Studio Error Create New Project in Default Project Location Hello all, Please I need Help. I have Android Studio in my notebook and success create new project. default location project in C:\Users\RELION\AndroidStudioProjects Then, I try to open project from other location (example in D:) di...
Johan
1

votes
2

answer
219

views

Call TIBCO BW6 process from Java code

I'm looking for a way to automate testing for our TIBCO BW6 applications. There are 2 test methods I would like to use: Unit tests and BDD. For unit testing I would like to be able to call a subprocess with some in- and output, and assert the processed data. For BDD I would like to use Cucumber,...
Johan Vergeer
1

votes
1

answer
129

views

React Native Xcode build error when building duplicated target

I have a react native ios project where I have two different Targets of the app. The original target builds and archives just fine, but the duplicated and renamed target does not. I get Lexical or Preprocessor issues and React/RCTxxx.h file not found errors when buildnig or archivning. I have crea...
Johan Nordberg
1

votes
1

answer
306

views

OAuth2 webapp implementing GitHub webhooks, in .Net CORE

I am trying to build an OAuth2 web application that implements GitHub webhooks. This seems only to be possible using AspNetCore 2.1. To implement webhooks in my project I first have to reconfigure services.AddMvc() in the startup.cs to services.AddMvcCore().AddGitHubWebHooks() This generates errors...
Johan Söderlund
1

votes
0

answer
122

views

How to trigger dialog in Microsoft Azure botbuilder?

This is my code: .matches('Job roles', (session) => { lib.dialog('/HowAreYou', [ (session, args, next) => { session.send('I\'m doing well. Thanks for asking!'); builder.Prompts.text(session, 'How are you doing today?'); }, (session, results) => { session.endDialog('Good to hear that!'); } ]).trigger...
Johan
1

votes
1

answer
448

views

Move camera in Scenekit with Swift

I want to move the camera every frame automatic in the z-axis in Scenekit. I have write this code in Swift: func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) { cameraNode.position.z = cameraNode.position.z + 2 } This works only for 3 frames, after that the cam...
Johan Kornet
1

votes
0

answer
284

views

Pass extra data with zxing scanning intent

I'm integrating a barcode scanner using https://github.com/zxing. I would like to pass some additional data - uuid below - along with the barcode. Both uuid1 and uuid2 below yields null. WHat am I missing? public void startScanner(String uuid){ IntentIntegrator integrator = new IntentIntegrator(this...
Johan
1

votes
0

answer
236

views

Generate XML schema from Kotlin Enum using Jaxb

I would like to use some XML schema files from Kotlin enum classes. When I generate classes from an xml schema, this is the output: import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * Java class for LogLevelType. * * The following schema fragment specifies the...
Johan Vergeer
1

votes
0

answer
38

views

How to organize and structure pandas code?

I've gotten quite proficient using pandas, but I'm struggling to organize my code. How do you generally structure your pandas code to be readable, reusable, and easily tested? I often find myself with a function that's 30+ lines long and very difficult to test and reuse sections within. Should I try...
Johan
1

votes
0

answer
215

views

Move in the direction of the eulerAngle (with Swift and Scenekit)

I am developing an iPad spaceship (first person) game with 6 DOF (6 degrees of freedom) with SceneKit and the accelerometer. I have the accelerometer working, but how can I move the spaceship forward in the direction of the angle of the accelerometer (yaw, roll, pitch)? I use a button for the forwar...
Johan Kornet
1

votes
0

answer
32

views

Post AngularCli does not work

AngularCli folks For some reason my post of adding new object/input to my mockApi does not work, at least my Api stays unchanged. Is there something wrong with my code or why won't it work? Let me know if there are further details needed. add-to-api.component.html {{diagnostic}} Add to Api HitInf...
Johan
1

votes
0

answer
339

views

Zxing : How to embed Carriage return in a Code-128 barcode

I found in the thread below how to embed extended characters in a Code128 barcode by using the Zxing lib. Encode extended ASCII characters in a Code 128 barcode But how can i embed the Carriage Return character (Hex 0x0d) in a Code 128 ?
Johan Vetsuypens
1

votes
1

answer
307

views

Using Socket.io with typescript and react

I am working on establishing a websocket connection between a Node app and a React app. However I cannot seem to get function this.io.on() to run in my listen method in class socket. The server logs 'listen' but not 'Connected client on port %s.', this.port. My question is why it doesn't? File index...
Johan Söderlund
1

votes
0

answer
26

views

Correct use of programmatic WebApplicationInitializer

AnnotationConfigWebApplicationContext the following when calling refresh() as is suggested in the javadoc NoSuchBeanDefinitionException: No qualifying bean of type 'x' Javadoc for: AnnotationConfigWebApplicationContext#register Note that AnnotationConfigWebApplicationContext.refresh() must be calle...
Johan Sjöberg
1

votes
0

answer
21

views

Angular + meteor : observable is realy long

i'm currently try to use a module in meteor with angular 4. I want to take all data with a specific newsfeed and use this data in my application. When i subscribe the data, it takes between 1-2 minutes to make the research and give an array. this is my code : in the client folder : newsfeed-planning...
Johan
1

votes
1

answer
153

views

Is Monte Carlo Tree Search policy or value iteration (or something else)?

I am taking a Reinforcement Learning class and I didn’t understand how to combine the concepts of policy iteration/value iteration with Monte Carlo (and also TD/SARSA/Q-learning). In the table below, how can the empty cells be filled: Should/can it be binary yes/no, some string description or is i...
Johan
1

votes
1

answer
104

views

how to echo fixer.io json php

Hi I'm trying get a json from fixer.io and then for each rates echo it but cant get it to work. the code are and the result are: https://data.fixer.io/api/latest?access_key=my_fixer_key printing json foreach done printing json foreach
Johan Nilsson
1

votes
0

answer
163

views

Computational time forward-propagation vs. back-propagation in neural network?

What are the computational time differences of carrying out the dot products etc. in forward- propagation vs. the derivatives etc. in back-propagation for neural networks? Also, is the weights update procedure considered part of the backward pass computational time? Does the ratio forward pass/backw...
Johan
1

votes
0

answer
788

views

Spring Boot Resources in Docker container

I'm using Docker for a Spring Boot application and so far everything is working. I have a resource file in src/main/resources/db/data/dummydata.csv In a bootstrap class this file is used to import the dummy data into the database. private fun getDummyData(): List { var fileReader: BufferedReader?...
Johan Vergeer
1

votes
1

answer
440

views

How can I disable SVN completely in Eclipse?

Since I prefer to use the CLI instead of the Eclipse plugin I would like to disable it completely. Since I am unable to find any settings to do this, I just uninstalled through Help > Installation Details > Installed Software all SVN related plugins (and restarted my computer). After removing the...
Johan Vergeer
1

votes
1

answer
211

views

Apache camel, a way to “join” 2 routes

So long story short. At work we have our own ETL tool for integrations. However this is proving tedious and we are considering moving to Apache Camel or Spring Integration. So far so good however. In our current tool we have to option to 'join' 2 input sources into one. Here is an example with 2 fi...
Johan Fredin
1

votes
0

answer
38

views

XML signature: Verify that all required elements have been signed

I'm implementing the verification of an XML signature. In the (I wish it was more) technical document I'm using there's a distinction between (1) a verification as to whether all required elements of the message (which is specified with an xpointer through the Reference Uri) have been signed and (2)...
Johan Maes
1

votes
1

answer
93

views

ReactNavigation: Problems with DrawerNavigation

I have a setup where I have a TabNavigator and the screen for one of the tabs is a DrawerNavigation, which in turn has StackNavigators. I have a couple of problems: I can swipe from the left to open the drawer and open the StackNavigator screens, but it does not close the drawer when selecting an it...
Johan Nordberg
1

votes
0

answer
75

views

smbus access in pcie under windows

I'm looking for a way to control smbus line in PCIe slot of my PC. There's some device connected via PCIe in that slot. And I wanna access it via the SMBus line under Windows. But cannot find any API to use for that. Can you suggest me how to do that please?
Johan Zigner
1

votes
1

answer
68

views

DotNetCore Entity Framework many-to-many on the same table

I am using DotNetCore 2, and I want to achieve a scenario where I have a single model, that can contain zero or more of the same models. Consider the following scenario (for simplicity): An engine can consist of many parts (components) Each part can contain zero or more other parts (components) I wa...
Johan Aspeling
1

votes
1

answer
76

views

How to apply function to value defined in data class constructor before init method?

Let's say I have a data class like this: data class MyData(val something: Int, val somethingElse : String) { init { require(something > 20) { 'Something must be > 20' } require(StringUtils.isNotEmtpy(somethingElse)) { 'Something else cannot be blank' } } } I'd like to be able to apply a function to...
Johan

View additional