Recent Questions - Stack Overflow

most recent 30 from

Latest articles

Why can logging on to Oracle leak memory?

I am writing a service to send SMS. A separate thread is launched periodically for this. I connect to SQL server, get fresh messages, send them to Oracle SMS server database for further processing and then disconnect from both databases. My problem is that, if I connect to Oracle and then disconnect, total memory consumption increases overtime (not...

How to open multiple windows of the same file in Tkinter?

I have a simple application in python. When I click a button it should open up the same file multiple times. However, after two times the program won't open any more windows. Here is my code so far for file1: from tkinter import * root = Tk() root.geometry("600x600") def newWin(): import file1 button = Button(root, text="Open...

SwiftUI onAppear called multiple times because of NavigationLink

SwiftUI onAppear gets called multiple times when inside of a navigation link. In the example I have provided, it gets called 5 times. This also triggers its StateObject initializer to get called 5 times as well. If you comment the Navigation Link out, it performs as expected. This has been tested with both Xcode 12 GM and Xcode 12.2 with iOS 14 GM...

How do I save list values in a list in python?

I am controlling a few servos, trying to record the commanded values, then play them back. In my code I add the commanded values to a list when I hit a button on my gamepad, then playback the list when I hit a second button. For some reason, when I print out the playback list, I get a list with the correct timestamp values, but the servo values are...

I need to change input string "welcome" to ewclmoe

I want to convert "welcome" string to "ewclmoe" in java. How can I do this?

How do you access data in a text file in a specific line in Python?

Some background - I am creating a bot for Discord. This command, claim, will be used to claim a "job", or essentially tie their discord username to the job. The command will use the line number as the identifier for the job. The problem I am having is that I can only access the first line in the job.txt file using this 'for' function. When I try to...

Why does the if statement return true when the condition is a number? [duplicate]

For example, if 1: print ("True") prints True as if if 1 is if True. What is the rationale behind allowing that?

MySQL: item count not same as selected items

I have two tables, shop and categories: shop as s categories as c --------- ---------------- -itemId -itemId -itemName -categoryId -... The following query returns the correct items, which are belonging to category 1 and 11 (in my test case 4 items were returned): SELECT s.itemId, s.* FROM shop AS s INNER JOIN categories...

How to make Box appear in html using script?

$(document).ready(function() { var gift; var present =[ 1,2,3 , 4,5,6 ] iniGame = function(num){ gift = num; TweenLite.killTweensOf($(".board_on"));$(".board_on"), 0, {css:{rotation:rotationPos[gift]}}); TweenLite.from($(".board_on"),5, {css:{rotation:-3000}, onComplete:endGame,...

Why is my bootstrap carousel not working in angular?

I have installed jquery and bootrap using npm install jquery --save and npm install bootstrap --save and they are found in the node_modules. I added the scripts to my angular.json file under "scripts" as following: "scripts": [ "node_modules/jquery/dist/jquery.min.js", "node_modules/bootstrap/dist/js/bootstrap.min.js" ]...

Discover, share and read the best on the web

Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters! Get unfiltered news feeds or filter them to your liking.

Get Inoreader
Inoreader - Subscribe to RSS Feeds, Blogs, Podcasts, Twitter searches, Facebook pages, even Email Newsletters!