Joe Joe Joe

12325 questions
0

votes
0

answer
13

views

Hibernate Could not fetch the SequenceInformation from the database but still works fine

I have 2 entities User And UserRole. if I make UserRole entities like this with a role as id everything works fine but this is bad because I can't have 2 different users with the same role: @Entity @Table(name = 'USER_ROLES', uniqueConstraints = @UniqueConstraint( columnNames = { 'ROLE', 'USERNAME'...
Patches Joe
1

votes
1

answer
160

views

How to know IF a line segment intersects a triangle in 3d space?

I have a triangle defined by 3 points in 3d space. I also have a line segment defined by 2 points in 3d space. I want to know if they intersect. I don't really need to know the point of intersection. I don't know any calculus but I know some trig. I know some about matrices but I understand vectors...
Joe Cool
1

votes
3

answer
31

views

How can I get the file size from a link without downloading it in python?

I have a list of links that I am trying to get the size of to determine how much computational resources each file need. Is it possible to just get the file size with a get request or something similar? Here is an example of one of the links: https://sra-download.ncbi.nlm.nih.gov/traces/sra46/SRR/00...
Joe B
1

votes
2

answer
35

views

gdb: make a breakpoint on a class function in c++

Assume the following class: class a { public: int getA(int a){ return 5; } int getA(int a, int b){ return 6; } }; int main(){ a cA; std::cout
Joe
1

votes
2

answer
51

views

Find and replace '000L' from all rows

I'm trying to remove certain letters from part numbers but I'm having difficulties trying to get it working correctly. This is where I'm at right now. It's non functional. SELECT REPLACE(`part`, '[0-9]L', '') FROM `table` WHERE (`part ` LIKE '%[0-9]L') Essentially say I have these five items: D39J02...
Joe
1

votes
1

answer
61

views

Checking if an ArrayList exists in a map

My football team has 5 different teams and I am trying to make a program to keep a track of which players are registered with each team. I want to be able to add a new player but first the program checks if that player is already registered. I would also be able to add new teams in the future and ag...
Joe Pasquale
0

votes
0

answer
2

views

How Spring Transaction behaves differently in different layer(service/repository layer)

Hi I need the following clarification on spring transaction. Seen is like: Service1.java @Service @Repository public class Service1 { @Autowired EmployeeRepo employeeRepo; @Autowired Repo repo; @Transactional public void m() { employeeRepo.save(new Employee(5, 'N3', 33, 3000)); repo.m1(); //M1 //m1...
Joe
0

votes
0

answer
4

views

Karate: How to configure karate mock-servlet using a YAML file instead of application.properties?

We have a Spring Boot project which uses an application.yml file to configure the spring context for things like datasource, rabbitmq etc. The yml file can be loaded in the karate-config.js to pick-up the baseUrl and that works fine. function fn() { var env = karate.env; // get system property '...
joe
0

votes
0

answer
17

views

JavaFX setOnKeyPressed() event not being called?

Currently my setOnKeyPressed() method is not being called in my application. this.getRoot().setOnKeyPressed(createKeyHandler()); this.getRoot().requestFocus(); The above code is being called in my class. this.getRoot returns the root VBox of GUI application. private EventHandler
Joe
1

votes
1

answer
34

views

How to get RequestCachePolicy to respect max-age

I am confused about how time-based cache policies work when using HttpWebRequest. I am calling a GET method of a WebAPI that returns JSON content together with a Cache-Control header similar to: Cache-Control: public, max-age=60 The intention is that the content should be considered to be stale afte...
Joe
1

votes
2

answer
33

views

apply count() to every factor variable in a dataframe

I can use purrr::map() to get the mean of every column in a dataframe. Can I use any of the map functions in combination with count() to get counts for each categorical variable in a dataframe? library(dplyr) library(purrr) mtcars %>% map(mean) mtcars %>% mutate(am = factor(am, labels = c('auto', '...
Joe
1

votes
1

answer
23

views

MessageBrokerServlet with XmlWebAppInitializer approach

I want to remove my web.xml file from my Spring boot project. I'm trying an hybrid approach (as this guide). I've this MessageBrokerServlet define in my web.xml as follow: MessageBrokerServlet flex.messaging.MessageBrokerServlet 1 MessageBrokerServlet /messagebroker/* This servlet uses a services-co...
Joe Taras
1

votes
2

answer
52

views

columns in SQL Server

I have a sample table below: Flight Airport Datetime 123 AID_X_YZ 5/5/2018 12:52:00 AM 123 AID_X_YZ--> NRT_X 5/6/2018 5:50:00 AM 123 NRT_X 5/6/2018 7:06:00 AM 123 NRT_X--> SEA 5/7/2018 8:46:00 AM I would like to displ...
joe
1

votes
1

answer
77

views

Session Store IQueryable in HttpContext

I am migrating project from Net MVC to MVC Core 2. How do I set IQueryable in Sessions? In Net MVC it was the following, public ActionResult CurrentOwners_Read([DataSourceRequest]DataSourceRequest request, int propertyID) { if (propertyID == 0) { throw new ArgumentNullException('propertyID'); } IQue...
Joe Smith
1

votes
1

answer
23

views

D3: data update “enter” selection is empty

I'm trying to use the data, update, enter pattern in D3 to update some data. I've been following this example: https://bl.ocks.org/mbostock/3808218 I've got two sets of data, one with an extra value: const data = [ { weekId: 'w-1', start: 100 }, { weekId: 'w-2', start: 200 } ]; const updatedData = [...
Joe
1

votes
3

answer
58

views

Returning a C++ reference variable VS returning a variable

Assume the following function in C++: #include int& change(int& a){ a = 6; return a; } int main(){ int a = 5; int b = change(a); std::cout
Joe
0

votes
1

answer
19

views

Python Flask - how to make it run forever (even after server reboot)?

I have a running Flask app that is working fine on a Linux (CentOS) server. To make it work in the background - I started it within a screen session (so that can monitor as well when needed). There is a scheduled downtime of a server every night but then next day - all screen sessions are gone (kill...
Joe
0

votes
0

answer
10

views

How to dynamically change filename in SQL Server Reporting Services When exporting to Excel

I used SQL Server Reporting Services to export an Excel file attached to an e-mail, I want to dynamically change the file name as current date (ex: 20190422.xlsx). How can I do that?
joe
-1

votes
0

answer
13

views

jdbcTemplate Mockito unit testing

I'm trying to perform unit testing and write a test for jdbctemplate.query. I need the code coverage for the below method. Code: ` public List UserInfo(final Long runId){ jdbcTemplate.setFetchSize(10); List userList = jdbcTemplate.query(con -> con.prepareStatement(GET_USER_INFO) , (rs, rowNum) -> {...
joe
12

votes
1

answer
130

views

Do Clustered Columnstore Indexes Affect SSAS Query End User Performance

Do Clustered Columnstore Indexes affect SSAS Performance querying for the end-user, and how could to fix this? Read an article below here how Sort order affects SSAS query customer user performance. Is there any way to resolve this issue? Would rebuilding SSAS indexes/aggregations work? Already kn...
Joe Smith
2

votes
1

answer
18

views

How can I view these values in the database after I insert them so that I can access them later?

I'm currently setting up a dungeons & Dragons mobile application in android studio and I want to be able to view the values for the character that I am currently saving into a Database 'CharacterDB'. How can I implement that in such a way that will let me find the values to pull them for later use?...
Joe Harkins
1

votes
1

answer
59

views

python cookielib error:403 Forbidden

I am learning python networking. I had learnt socket and now I want to learn python HTTP to connect to HTTPServer, extract cookies etc. I am facing this problem with cookie extraction. Tried google but didn't found a solution, here is the code: import cookielib import urllib import urllib2 ID_USERNA...
joe
1

votes
1

answer
152

views

order list of data depending on newest date or older date in ioni2 angular2?

I have json format data : [{date: 2017-10-18T03:00:00+03:00 , name : 'A'}, {date: 2017-11-18T03:00:00+03:00 , name : 'B'}] so how to display these data from the newest date to the oldest date. the result will be : B A because B is newest
Joe Sleiman
1

votes
2

answer
53

views

Excel VBA to Remove Opt-Outs

I am a military recruiter and am trying to use autofilter to filter out a range from another range. I got this from another stackoverflow page but can not figure out how to change that string strSearch to a range like [email protected], [email protected], [email protected], etc. We get lists of leads but I'd like to keep t...
Joe
1

votes
0

answer
172

views

TypeError when installing jupyter in windows10 OS

When I installing Jupyter notebook in my Windows10 OS, but I catched TypeError, and I don't have Anaconda, I just install it via pip in my cmd window, the description following, Exception: Traceback (most recent call last): File 'c:\program files\python36\lib\site-packages\pip\basecommand.py', line...
Joe Young
1

votes
0

answer
89

views

Matrix operations on labeled arrays

I have a system with a linearised set of equations, such that the time-update operation can be performed by a matrix multiplication, y' = Ay, but I would also like to be able to index y using the names of the state variables, e.g. y['vel']. Is there a way to index in this way without losing the abil...
Joe H
1

votes
1

answer
507

views

Is it possible “disable-web-security” on Chrome for only selected web sites?

When you hit the bloody pre-flight error ( at those XHR requests during your development), the recommended solution is this: open -a Google\ Chrome --args --disable-web-security --user-data-dir Well, I do not want that do this cause Chrome is my default browser for browsing the Net and my developmen...
Average Joe
1

votes
0

answer
41

views

What's most elegant/secure/recommended way to solve “Response to preflight request ” issue

I've done a research on SO on this, but to my surprise, lots of SO answers on this recommending a quick and dirty solution which is to turn off chrome's security! I cannot believe we've got this as recommend solution. There must be a better way. The error is this: Response to preflight request d...
Average Joe
1

votes
0

answer
130

views

Missing Git menu on right click

For some reason I dont know why I couldn't see this menu when I make a right click: Git Add all files now Git Commit Tool Git History Git Gui Git Branch Git Bash What I have right now : What I am looking for (inside the red rectangle) : The softwares that I installed : Git-2.15.1.2-64-bit.exe Tortoi...
Joe
1

votes
1

answer
26

views

How do I pause execution in Matlab, but allow Copy\Paste via the keyboard

My question is similar to this: Wait for gui to finish - matlab But, the uiwait(f) doesn't work - when the user hits Ctrl-C it closes the app rather than doing a copy. Here's the situation: We're compiling MATLAB, and running WPF on top to provide the UI. However, we need to block the MATLAB executi...
Joe
1

votes
0

answer
76

views

Created firebase app with wrong bundle id, how can I move the data to the correct bundle id?

I've looked on SO and it seems that there is no way to move data to a different bundle ID with firebase. This is an issue since I have analytics data for the app going to the incorrect bundle id which causes issues with push messaging. Is there any way I can change the bundle id or export the data...
Joe Scotto
1

votes
0

answer
372

views

python telnet and put the message in a particular log file

hi I am coding the python script to login telnet and it has to write log file to op.txt the absolute path is /netperf/mntpt/array1/home/prg_use/op.txt the python code ptlog.py import getpass import sys import telnetlib import time host ='12.12.1.123' user ='user_name' passwd ='telnet_password' tn =...
joe
1

votes
1

answer
58

views

How do I get values from CIRowAverage filter?

I'm trying to use Apple's CIRowAverage Core Image filter to compute the average value per row of an image. When I run the filter and try to read out the values, I don't get the average at all: from what I can tell where ever a row has a value, it returns 255 and where ever a row has no values (i.e.,...
Joe
1

votes
1

answer
81

views

Difficulties with displaying success message after form is sent [duplicate]

This question already has an answer here: AJAX form not displaying succes or error message 3 answers I'm still learning the code languages that I used to create my form with. So I can't seem to figure out what seems to be the problem. Here's my code: HTML:   --Onderwerp-- * Kennismakingsgesprek Me...
Joe
1

votes
1

answer
132

views

how to unwrap PostgreSQL connection from the IBM WSJdbc41Connection

I have been trying to unwrap PostgreSQL connection from the IBM JNDI (WebSphere liberty ) and have had no luck please any help with that : Context ctx = new InitialContext(); DataSource dataSource = (DataSource) ctx.lookup('jdbc/indi'); Connection cnx = dataSource.getConnection(); I get this excepti...
Joe Kel
1

votes
2

answer
71

views

Dynamically change top position on resize

I'm trying on resize the window to change the position top of the image so the image to be fit in the box, because it's changing on resize and the image is going too much outside. I'm not sure do I need the height of the box and the image and then to do something with position top. $(window).resize(...
jOE
1

votes
0

answer
185

views

Embedded images sent via sp_send_dbmail are not working in gmail or Outlook 2013 for OSX

I'm having a problem where emails sent through Sql Server are not properly being embedded in some mail clients - notably gmail and Outlook 2013 on OSX. (Outlook 2013 on PC is fine) Here's a sample call that will demonstrate the problem in my environment: declare @body varchar(4000) set @body = ' Emb...
Joe Zack
1

votes
1

answer
63

views

Missing customer name/address information in SquareUp Console using Square.Connect.Api

We are creating a Square 2.0 transaction but when we login to our Square account, the customer name/address information is missing. We are creating a customer address object and populating the properties but they are not showing up in the Square console. Here is our code: using Square.Connect.Api;...
Joe Murray
1

votes
0

answer
76

views

Is there a way to make a firebase auth token for development?

Background I am building a react native app that posts data to a node server that then posts data to a firebase via the admin firebase library. To post data I am bypassing the app entirely and using postman for speed. Problem My routes are now using an authentication header that should contain a fi...
Joe Lloyd
1

votes
1

answer
128

views

Resizing Window in Kivy Android App on softkeyboard with SDL2

I am currently working on an Android App using the Python and the Kivy Framework. The majority of the screen's real estate is used by a text_input widget. I would like to resize this text_input when the android soft keyboard pops ups so that the text_input ends right at the top of the keyboard. To...
Just-Joe

View additional