Computer Science
Subforums
-
Discussion of computer problems
- 434 posts
3274 topics in this forum
-
I'm learning C++ and trying to grasp control structures. I have an array of integers and I want to iterate through it using different control structures to achieve the same result. Here's my array: int numbers[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; I would like to calculate the sum of all the elements in the array and display the result. Can you provide code examples using different control structures like for loops, while loops, and do...while loops to accomplish this task? Additionally, if there are any performance or readability differences between these approaches, please explain. I have looked online for a solution, but I want to know how to use control structure…
-
0
Reputation Points
- 1 reply
- 658 views
-
-
In a web development project, I'm dealing with two lists of data that need to be merged and displayed on a webpage. One list contains user comments, and the other list contains system-generated messages. I need to merge these two lists while preserving the order of messages and displaying them on the webpage. Here's a simplified example of the data: user_comments = [ {'user': 'Alice', 'message': 'Hello!'}, {'user': 'Bob', 'message': 'Hi there!'}, ] system_messages = [ {'message': 'System message 1'}, {'message': 'System message 2'}, ] I want to merge these two lists to create a single list that combines user comments and system messages in the …
-
0
Reputation Points
- 1 reply
- 729 views
-
-
That was, SCUBA diving instructor.
-
0
Reputation Points
- 11 replies
- 1.2k views
-
-
Apple's official site suggests their users maintain at least 1GB of free space for best performance. In fact, as far as I know, iPhone's storage is a Solid State Drive, rather than a mechanical drive. How could lack of free space affect the performance of an iPhone? By the way, when performance is said to be affected, or not at its peak state, what does it actually mean? Does it mean it will more likely to crash or make mistakes or cause data corruption? Or does it actually mean probably causing a very short delay, probably less one second that we don't notice, but everything will work just fine?
-
0
Reputation Points
- 5 replies
- 3.4k views
- 1 follower
-
-
I understand that this question may sound strange, but I have been trying to figure out how for about a month. Sorry, but I am not able to explain why, but I have my reasons. We know that when a third-party software is installed, its application is located somewhere in windows 10, usually program files (x86). Chances are its related files or data is located somewhere else, e.g. AppData I think simply copying the directory of its application and its data may not work. Is that right? I'd like to do this because I want to keep that particular version of the software, more importantly, I'd like to keep all its related data, but it is not supposed to be done dir…
-
1
Reputation Points
- 17 replies
- 1.6k views
- 1 follower
-
-
I have one or two ideas for what AI can be used for. If you have any, and would like it to be chewed over by others, post it here. Might be interesting. To start it off, I would like to see it used to "re-create" old images, making a modern very hi-def photo, from an old blurry bit of rubbish. I'm not talking about playing with contrast, brightness and colour and focus in the usual sense. What I would do is amass a database of modern, very high definition pictures, of say people, animals, cars, landscapes. Whatever subject is commonly captured. At every angle that you could. You would need a huge database, the bigger it got, the better it would wo…
-
2
Reputation Points
- 122 replies
- 10.8k views
- 2 followers
-
-
website = requests.get('https://pixabay.com/photos/') soup = BeautifulSoup(website.text, 'html.parser') with open(r"C:\Users\grays\Downloads\words.txt") as file: words = file.read().split() html = soup.find_all(words) I am having a fight with chatgpt whether this is a database or not. I won't tell which side I am on. I jut need you to resolve this by telling me what it is. the only thing I am telling you is that the words.txt is a dictionary containing a lot of words. I need you to research as much as you can and tell me what this is. Help me (I made this code) website = requests.get('https://pixabay.com/photos/') soup = BeautifulSoup(website.text, 'html.parser')…
-
1
Reputation Points
- 5 replies
- 1k views
- 1 follower
-
-
Apologies for asking such a basic question, but Google search seems incapable of addressing it correctly: Do (or will) quantum computers ever require password protection of their own? Or are they their own protection? Many thanks.
-
0
Reputation Points
- 4 replies
- 785 views
- 2 followers
-
-
Idea of making a wireless connection that is limited in range. There are standard wireless connections that cover the entire country. This means that two people in USA who are connected to those wireless connections can talk with each other, and the two people pay money for that. My idea is to make a free wireless that covers only smaller regions, for example all roads in USA, people who are connected on that wireless connection can only talk with each other and only on roads in USA, and not with other people who are connected to other wireless connections and who are not on roads in USA.
-
0
Reputation Points
- 11 replies
- 1.4k views
- 1 follower
-
-
I don't know if anyone knows this, but I have a little bit of knowlege in python and html. I was wondering if I could find a way to access a gallery of pictures with just one word describing them and with links. I need something like tihe "requests" python API but it puts the name into its database. I will than use numpy to store the pictures through links and convert them with this tool. Okay, now to the part Where You get to know what I am actually doing. I am creating a reverse stable diffusion software that turns images (whether they are ai generated or not) into prompts. Now, I am going through that proccess, and than I will use stable diffusion to merge the picture …
-
1
Reputation Points
- 31 replies
- 3.4k views
-
-
I was working trying to figure out how to map input to output and came up with this program. def create_mapping_function(inputData, outputData): mapping = [] # map the same to the same for i in range(0,len(inputData)): for o in range(0,len(outputData)): if outputData[o] == inputData[i]: # mapping position to position # this shows the mapping values. mapping.append([i,o]) return mapping inputData = input_data() outputData = output_data() mapping = create_mapping_function(inputData, outputData) # print(f) # use mapping and save them as a mapping function. inputData = ['h',…
-
0
Reputation Points
- 0 replies
- 459 views
-
-
I'm seeking assistance in exporting data from a Django model to a CSV file using the csv module in Python. I've read about the process, but I'm struggling to put together the necessary code within my Django project. Could someone kindly provide a code example or guide me through the process? Here's the simplified version of my Django model: # models.py from django.db import models class Product(models.Model): ProductID = models.IntegerField() ProductName = models.CharField(max_length=100) Price = models.DecimalField(max_digits=10, decimal_places=2) I want to export the data from the Product model to a CSV file named products.csv. How can I achieve…
-
0
Reputation Points
- 0 replies
- 1.1k views
-
-
I know C and C++ are two fast, efficient, and mature computer languages that can be used to create operating systems, applications, and games. Are Go and Rust, two fast and efficient computer languages, that are also less mature than C and C++, good, if not better, alternatives, when it comes to speed and efficiency, for programming operating systems, applications, and games? I also know C++, Go, and Rust are considered modern computer languages, while C is not.
-
2
Reputation Points
- 18 replies
- 6.4k views
- 1 follower
-
-
I have no coding skills (apart from html) and so no expertise in computing at all. But I have often tried to grapple in my mind with the relationship between the concept of software versus hardware. In reality do these phenomena overlap or is there a strict demarcation ? I can see they have to interact or nothing will happen ,so is there a region that is composed of both elements? Any software has to be written onto a physical component .Is that physical component(eg a hard drive) considered part of the hardware ? Is everything physical inside the hard drive of a computer part of the hardware? Where does the software start ? I…
-
0
Reputation Points
- 18 replies
- 1.9k views
- 3 followers
-
-
https://www.cfr.org/blog/russias-war-against-ukraine-catalyzing-internet-fragmentation?amp An interesting read on the cyber aspect, which got me thinking… If ICANN is unwilling to act, there seems precious little that could stop the US and it’s allies from utilizing Geo IP Filters to cut off access to Russia, and anyone unwilling to do the same.
-
1
Reputation Points
- 10 replies
- 839 views
-
-
If you have your phone or tablet in a protective case, additional to the tablet itself, does anyone know or have any data on how safe it is to leave the device in the case for charging or should it always be removed ?
-
1
Reputation Points
- 9 replies
- 1k views
- 1 follower
-
-
Hi folks. I recently wrote this up as a sort of reminder to myself of what it takes to successfully solve a problem. A little backstory: I was a network administrator for a company for ~15 years and left my job for personal reasons just prior to the start of the pandemic. I remained out of the workforce (by choice, no sympathy/pity needed) for three years before circumstances required me to find another job. This new job was providing technical assistance to dental offices. Knowing diddly squat about the hardware and software bits dental offices use (practice management software, imaging hardware/software, specialized scanning equipment, and so forth), I was in many sense…
-
1
Reputation Points
- 4 replies
- 1.1k views
-
-
I think they just create tens thousands topics, and wrote a standard answer for each topic. How do you think?
-
3
Reputation Points
- 102 replies
- 11.2k views
- 4 followers
-
-
High value business ideas can help people out sometimes. and some new amazing apps high value apps that would sell like crazy. Saving and memorizing the idea would help. The app is about creating and farming moons with forests on them and underground forests. An app studio would be cheap to hire or a game developer would not take much you could put the game on peoples phones for free the game could contain advertisements for product owners you can sign up for multiple advertisement display websites the game is an ecosystem factory game that produces sphere shaped tiny ecosystems. At high speeds who ever fa…
-
0
Reputation Points
- 2 replies
- 816 views
- 1 follower
-
-
Computers have revolutionized the field of science in numerous ways, offering a wide range of benefits that have significantly advanced research, analysis, and communication. Here are some key benefits of computers in science: Data analysis and processing: Computers enable scientists to handle massive datasets with incredible speed and accuracy. Complex calculations, statistical analysis, and simulations can be performed efficiently, allowing researchers to uncover patterns and insights that would be challenging or impossible to achieve manually. Modeling and simulations: Computers facilitate the creation of sophisticated mathematical models and simulations used…
-
0
Reputation Points
- 1 reply
- 664 views
- 1 follower
-
-
Hey guys, I'm working on my thesis and it would be great help if you told me which one of the two did you find harder to learn. Graph algorithms or sorting algorithms?
-
0
Reputation Points
- 0 replies
- 470 views
- 1 follower
-
-
Greetings. Too much speculation going on about what artificial intelligence A.I. will be like in the future from not clear-minded opinions. Give your grain of sand please. Will this forum survive with people or will be replaced by A.I. ? Will kids be taught QRcode at school instead of alphabet - perhaps with no teacher ? Will currency disappear ? Store clerks unemployed and people buying things talking to a display (with no need to talk) ? Yesterday went to buy a sandwich and at the register, a young 'cashier' girl behind a counter pointed me to a scanner, a credit card slot, a money slot, a receipt printer, a change vomiting machine all on the counter top …
-
1
Reputation Points
- 3 replies
- 785 views
-
-
I know the official line is that so called AI programs are nothing more than glorified TMs But is that really true ? One of the characteristics of a TM is reproducibility. That is a given input always results in an identical (and predictable in theory) output. Yet we have noted that repeating a question to, say CHATGPT, sometimes results in several quite different answers. A true TM should not exhibit this behaviour. I wonder if what is happening is that when the AI program does its data search and subsequent statistical 'pattern matching' this happens because the dataset for comparison varies each time the search is conducted or that …
-
1
Reputation Points
- 28 replies
- 3.7k views
- 2 followers
-
-
I had a long conversatuon qith Chatgpt ------------------------------------------ geometry question: Given a triangle - all sides unequal. Place a semicircle entirely inside the triangle. What is maximum possible semicircle for prescribed triangle? Describe semicircle by locations of end points and midpoint. c-------- The maximum possible semicircle that can be placed inside a triangle with all sides unequal is known as the incenter circle and is tangent to all three sides of the triangle. The endpoints of the diameter of the semicircle lie on the two sides of the triangle that form the smallest angle and the midpoint of the diameter is the incenter of t…
-
0
Reputation Points
- 3 replies
- 917 views
- 1 follower
-
-
This thread is all about programming theory. Previously, I have forged new techniques in circuitry and programming alike, but this thread is dedicated to the software, as there is an engineering section for the hardware. So, what is programming? Programming is where you type characters onto a text file and compile it to execute [operations] for you. This is a program, which you write. If you want to make a calculator, for example, you would write in, to start the program in a shell, as if it were independent of the computer's operating system, and, execute the running details of the program. This would allow you to interface with the program or run the video or sound…
-
0
Reputation Points
- 2 replies
- 1.8k views
-