Recent Questions - Stack Overflow |
- How to write mysql query, where i need to put order by before group by
- Faster algorithm for lexicographic comparison of DNA strings
- I'm wondering if there is a way to access Access 2007/97 dbs using C (not C++, or C#)?
- how to do a count query when using rust diesel
- Undefined variable after using isset()function in PHP
- Collision detection and overlapping detection in same node? [part 2]
- How to get rows from a dataframe that are not joined when merging with other dataframe in pandas
- how to set up database
- MapStruct mapping OneToMany collection - not create entity from null id
- difference between pointing to the Strings and the reference of the String of the vector while iterating through the vector
- How to debug html/client side js with node server running - breakpoints greyed out
- Oracle duplicate record deletion
- TFlite model.process() sometimes needs input data TensorImage and sometimes TensorBuffer? Are there two different TFlite models?
- Remove the second number from each string in array
- Why can't my phone scan the QR code generated by Whatsapp API
- How to translate values in a column to "yes" and "no" values for a multiple regression in R
- How would I unzip a zip file in node [closed]
- How to properly use inheritance and polymorphism - Queues implemented as arrays
- Netfilter Kernel module doesn't get the ftp packets' data
- How to display months sorted in order in SQL Server?
- JavaScript - Paste the values from a defined range to the first empty cell in another column
- Cmake can't finde "XCB"
- Using IF Statements And Toggle to Clean Up TradingView Indicator?
- How to add Label inside correct "form group" in ruby on Rails form?
- how to solve : Launching My project, binary not found exe has encountered a problem in C/C++ [closed]
- Sort multiple levels of array after group in Mongo Java
- Get code coverage only for a folder in Cypress
- How to delay react-navigation action with setTimeout?
- WebdriverIO typescript mocha to get last similar classname on a table <tr><td>
- c# - Use alias in another file
How to write mysql query, where i need to put order by before group by Posted: 27 Mar 2022 12:25 AM PDT //I know that there are questions like this before, but I can't get this to work So, I have 3 tables, seats(id, type_id, hall_id), seat_types(id(PK), type_name) and taken_seats(screening_id(PK), seat_id(PK), type_id). I need to write a query where I pass a screening ID and hall ID, and get back seat_id,type_name, and isTaken (if seat is taken or not). The problem I have is that I have a query that return a duplicate if I do ORDER BY, but if I do GROUP BY I don't get correct data back because I didn't ordered it. My query: Table I'm getting back: https://imgur.com/tnmCIHi I tried to add GROUP BY and it didn't work because i didn't get ordered first. Also I tried writing a subquery but I didn't succeed in that. |
Faster algorithm for lexicographic comparison of DNA strings Posted: 27 Mar 2022 12:25 AM PDT I'm trying to find a faster way to do the following: Given a list of DNA strings x = ([s1, s2, s3, s4...]) (where the strings can only consist of the letters 'A', 'T', 'C', and 'G') and a list of index pairs y = ([[i, j], [i, j], [i, j]....]) find a function that returns whether or not x[i] is lexicographically less than x[j] for each [i, j] index pair. That is, find an algorithm that does the same thing as: but with better time complexity than the example provided. Moreover, we should assume that if len(x[i]) < len(x[j]), then x[i]<x[j] evaluates to True. Here's an example of what the algorithm takes in as input and what it provides as output: 'B' < 'BB' : True, because len('B') < len('BB') 'BB' < 'BC' : True because 'BB' comes before 'BC' in lexicographic order (the first position in both strings are the same, thus we need to compare second positions of both strings) 'BC' < 'B' : False because len('BC') > len('B') I've already tried utilizing a tester function as follows: but for whatever reason, it runs slower than the reference example that we need to be faster than. Any help would be greatly appreciated! |
I'm wondering if there is a way to access Access 2007/97 dbs using C (not C++, or C#)? Posted: 27 Mar 2022 12:25 AM PDT I'm asking as I have been scouring the internet (but Google isn't as useful as it used to be) for any information concerning accessing access databases only using C and I can't find a single useful article, not a single useful reference... etc. If anyone has any information regarding implementing a simple, connect, querying of a recordset and close that's all i need. It's deeply frustrating that Microsoft no longer keeps most of their documentation for it, and we are working with legacy so it's not by choice that I need this. |
how to do a count query when using rust diesel Posted: 27 Mar 2022 12:25 AM PDT I am doing a count query using rust when I compile the code, shows error like this: why did this happen? what should I do to fix this problem? |
Undefined variable after using isset()function in PHP Posted: 27 Mar 2022 12:24 AM PDT I facing error undefined index:facilityId before using isset()function. But after using isset() function it shows error undefined variable:facilityId Please help me to solve this problem. Thank You |
Collision detection and overlapping detection in same node? [part 2] Posted: 27 Mar 2022 12:23 AM PDT A continuation of the previous question How exactly do we detect collision from |
How to get rows from a dataframe that are not joined when merging with other dataframe in pandas Posted: 27 Mar 2022 12:23 AM PDT I am trying to make 2 new dataframes by using 2 given dataframe objects: As you could see, both df1 and df2 have column called "id". However, the df1 has all id values, where df2 only has some of them. I mean, df1 has 3200 rows, where each row has a unique id value (1~3200), however, df2 has only some of them (i.e. id=[3,7,20,...]). What I want to do is 1) get a merged dataframe which contains all rows that have the id values which are included in both df1 and df2, and 2) get a dataframe, which contains the rows in the df1, which have id values that are not included in the df2. I was able to find a solution for 1), however, have no idea how to do 2). Thanks. |
Posted: 27 Mar 2022 12:23 AM PDT I'm creating an app that tracks attendance of players in amateur football teams. And I'm just not sure how to set up the database. A bit of info: every user has a team and should only see the events within his team per season. These are the main things:
Main questions:
Thanks in advance! |
MapStruct mapping OneToMany collection - not create entity from null id Posted: 27 Mar 2022 12:22 AM PDT I have Student class with @OneToMany relationship to classes like below And class entity: I'm using MapStruct to convert dto to entity and entity to dto: StudentMapper.java ClassMapper.java These mappers extends simple EntityMapper interface Generated StudentMapperImpl.class Everything works fine when I'm trying to convert studentDTO to student entity with filled classId in studentDTO class. The problem starts when classId in studentDTO is null. Then mapper create new Class Objects and saving it into database.... And don't want this because not every student will have assigned class. I've tried everything with CascadeType in Student.class but I think the problem is in my MapStruct mapper. Eventually I can write my own mappers without mapstruct but I'd rather avoid it. Please help me. |
Posted: 27 Mar 2022 12:21 AM PDT line no. 4 shows error to use &args[indx] instead of args[indx]. please help me understand the reason behind it. |
How to debug html/client side js with node server running - breakpoints greyed out Posted: 27 Mar 2022 12:25 AM PDT I've got a small app that uses Express. I want to debug some client side js code that calls my backend, but it seems that when I try to debug my app using localhost:8888, all my client side js breakpoints go grey. I'm speculating it's something with the configuration, but I don't really know. I'm currently debugging in VSCode using ctrl + shift + p -> debug open link. With my server running, I try to debug "http://127.0.0.1:8888/frontend/frontend_3_26/web-api-auth-examples/authorization_code/public/index.html" which hits my breakpoints in js. But, when I try to debug "http://localhost:8888", my breakpoints are greyed out and my breakpoints don't get hit. Not sure if this will help, but attached is what I see in Chrome developer tools. So, maybe it's an issue that localhost can't locate the right files? I've been messing around with launch settings, but I'm lost. Could someone please help me out here? I'd greatly appreciate it. Thanks! |
Oracle duplicate record deletion Posted: 27 Mar 2022 12:22 AM PDT I have a table with main fields ArticleNo,Barcode,UnitOfMeasure etc How i can remove the duplicate records from the table if articleno and barcode and unitofmeasure are same Trying to remove the duplicate records from oracle table |
Posted: 27 Mar 2022 12:23 AM PDT Some TFlite models model.process() seems to need TensorBuffer and other rather needs TensorImage . I don't know why? First, I took a regular TensorFlow / Keras that was saved using: Then I compress and quantize this Keras model (300 MB) to a TFlite format using: I've got a lot smaller TFlite model (40 Mo) which neds TensorBuffer <input_data> when calling model.process(<input_data>) Second, I've trained and saved as TFLite model using TensorFlow Lite Model Maker and now I've got a TFLite model that needs TensorImage <input_data> when calling model.process(<input_data>). Are there two different TFlite models depending on how you build and train it? |
Remove the second number from each string in array Posted: 27 Mar 2022 12:22 AM PDT I have an array: and I would like to map through and create a new variable that will have only the first number in each string. Expected output would be: |
Why can't my phone scan the QR code generated by Whatsapp API Posted: 27 Mar 2022 12:23 AM PDT there are lots of advices on QR codes but I'm unable to find answers to my own problem. So I'm posting this question. I'm trying to use Whatsapp-web.js, a WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app. Below is the code. The problem is that the QR code generated by the Whatsapp client is not recognized by my phone. I wondered if the QR image generator was wrong, so I logged the QR string and pasted it into a QR image generating tool to see if the images were identical. To me the images looked different. But I don't know if that's the problem at all. I wish to know if there is an additional step I have overlooked before I can scan the QR image with my phone. Currently, I cannot login because phone doesn't recognize the QR image. Edit The QR code string is: 1@vFeiIVji3KTIwmxuzrWThEtLYAx1toBQ+gqPI/tpYwg7Nswvybj6z0XqIcKWAkIoQlaIG6+qAy3yfw==,EMaQav3hXijRWQ0Fo54Vi7xINEhOa8ffU1i5tqAzK1s=,cI/NK6CodxcSeyf9niE3Cg== The QR code image generated by the code is: https://i.stack.imgur.com/LHU1N.png |
How to translate values in a column to "yes" and "no" values for a multiple regression in R Posted: 27 Mar 2022 12:25 AM PDT I am doing a multiple linear regression with the following reproducible dataset (this is a small sample of my data): I have my formula for the regression here. The regression comes out just fine; however, I want to add one more variable(s), which is dnr status at day three. If the value is 3 or less, there is a DNR and if the value is over 3, there is not a DNR. I previously subsetted these values for a previous task using this code: This worked fine, but I can't really use these subsets in my regression model. I would assume to make the model work, I would need to translate every value of 3 or less (<=) in the "dnrday" column to "yes" and every value over 3 (>) to "no". Am I correct on this thinking, and if so, how would I accomplish changing those values. |
How would I unzip a zip file in node [closed] Posted: 27 Mar 2022 12:24 AM PDT I would like to unzip a .zip file in node without any external libraries. How would i go about doing this? I have tried using zlib but it returns incorrect header type Edit I have also tried using And it returned i caused the following error Uncaught Error Error: incorrect header check |
How to properly use inheritance and polymorphism - Queues implemented as arrays Posted: 27 Mar 2022 12:25 AM PDT I just needed a little help with inheritance and polymorphism. We're working on queues & stacks, and were asked to implement them as arrays so we understand them properly, instead of just using Java's methods. The task is to implement a Shuffling and Circular queue as subclasses of a general Queue class. I first implemented just the shuffling queue as a class of its own, and got it working properly. Here's the first section of code: I also have methods in there like I understand how the above works, the problem is now implementing the Shuffling and Circular queues separately as sub-classes. I know they will both inherit "extends" from this general class, and can have their own methods, but I'm stuck in how to implement it. Can't quite wrap my head around how I'm going to use the parameters like rear, front, capacity. Do they need to be public? At the moment, I've got: At the moment, the above is fine and it works as I expect it to. However, this is because I still have Any help would be greatly appreciated, and I apologise for any problem with formatting, tags or anything regarding my question; I'm only just starting to use stack overflow. Thank You! |
Netfilter Kernel module doesn't get the ftp packets' data Posted: 27 Mar 2022 12:25 AM PDT Netfilter Kernel module doesn't get the ftp packets' dataQuestionI've been trying to write a kernel module to read outgoing ftp packets' username , passwrod and cmd by netfilter.When I test my code ,I find the ftp packets' length is right,but all the data I get is CodeHere is my code. And I wirte a Enviroment
The Kernel module's Output and the Wireshark' capture:
What wired is these ftp packets.Take the fourth packet for example.
As can be seen,the ftp packet's content is As wireshark can get the correct packets, I don't think it's firewall's queseton. My quesetons are :
Any help will be appreciated. |
How to display months sorted in order in SQL Server? Posted: 27 Mar 2022 12:24 AM PDT Below is the table I have created and inserted values in it: Then I ran a query to calculate salaries paid to Employees each month: And I got the following output: As you can see from the screenshot above that I got the result I wanted. But the only issue is the month is not being displayed in order. I tried adding I even tried What minor change do I need to make in my query ? |
JavaScript - Paste the values from a defined range to the first empty cell in another column Posted: 27 Mar 2022 12:23 AM PDT I am trying to write a macro that would copy the data from range H23:I32 to adjacent columns J23:K60. Assuming there are values in J23:K60, I wish to paste the data below the last cell with data. The sheet I am working with is 'Loot'. Unfortunately, my code doesn't search for the last cell with value and always pastes the data to J23. Thefore my list gets overwritten instead of values being added to it. How do I go about fixing my code so that I have a growing list in J23:K from H23:I values? Many thanks in advance! |
Posted: 27 Mar 2022 12:25 AM PDT I am trying to install the Vulkan SDK on my Linux Mint Machine, but I have problems with building it.
Edit: It compiles at |
Using IF Statements And Toggle to Clean Up TradingView Indicator? Posted: 27 Mar 2022 12:23 AM PDT I have a toggle at the top of my indicator where I determine if I'm using a Light or Dark Color Theme: Colors: I use the colors above to display my trading window on my chart: The 2 issues I'm having is when I click on the "Style" menu in the indicator settings: #01 I have 2 checkboxes with "Background Color" displaying because I have 2 bgcolor()'s above. Is there any way to dislay only 1 instead of 2 depending on which Color theme is toggled? I tried if statements: I got the error: #02 How do I alter the Any suggestions? |
How to add Label inside correct "form group" in ruby on Rails form? Posted: 27 Mar 2022 12:24 AM PDT I'm using Rails 5.2 and have this rails form and a field for the IP address that looks like this: I want to update the default label for:
but for some reason the default and new labels show up at the same time. Please see image: and when I inspect the labels they seem to be in different divs. Please see image: 1) Does anybody know how to only show 'My NEW label' and not both labels? 2) Also, as you can see I have a tooltip that shows up under my NEW label, is it possible to add a condition on that new label so it shows only if a variable is equal to a specific value? (example: @mystring == 'some_text' Thanks a lot in advance! |
Posted: 27 Mar 2022 12:25 AM PDT Launching My project, binary not found exe has encountered a problem. And program file does not exit and error starting process show in my eclipse IDE . Currently I'm using windows 11 enter image description hereI'm trying to create a new project in eclipse IDE. My installation process done successfully but can't make Run my project because of some issues like binary not found, Launching project.exe has encountered a problem. Error starting process. |
Sort multiple levels of array after group in Mongo Java Posted: 27 Mar 2022 12:24 AM PDT I have documents with below schema I am trying to find documents that match nodeId and trying to aggregate customerCount, itemQuantity and amount for each hourZoneNumber. Below is the query Output is as below: I want the output to be sorted as : First sort by nodeId, then by endpointId within the endpoints and lastly by hourZoneNumber within hourZones. How do I do this ? I tried using sort() with all the three fields. But it did not work. Also, how do we convert this whole thing to Java ? |
Get code coverage only for a folder in Cypress Posted: 27 Mar 2022 12:24 AM PDT I am using Cypress and Nyc configurations. My folder structure looks like this: I need a solution to get inside the |
How to delay react-navigation action with setTimeout? Posted: 27 Mar 2022 12:25 AM PDT I have a navigation function that navigates inside a nested stack. The route goes:
Here's the function: Unfortunately using setTimeout in this way does not work. I would like to know how to achieve this using alternative means? |
WebdriverIO typescript mocha to get last similar classname on a table <tr><td> Posted: 27 Mar 2022 12:23 AM PDT I need to get the last classname data, the number of classname is dynamic, so the number of classname cannot be determined and it always change every time i run the automation, but I just need to get the last classname data. Need your help guys, thanks how can i get tha last classname? tried it on a page object, its showing an error on .[last()], .last() , .[-1] and others mentioned below pageObject.ts tried both of this and tried using [-1] , :last-of-type and :nth-child(-1) they all returned undefined and will not be able to check on my it method |
c# - Use alias in another file Posted: 27 Mar 2022 12:24 AM PDT Is it possible to use an alias defined in one file throughout an assembly? For eg. in Foo.cs I have How can I use the alias "IO" in FooBar.cs |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Inbox too full? Subscribe to the feed version of Recent Questions - Stack Overflow in a feed reader. | |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment