New to Java, need to implement a hashmap, treemap, and binary search tree. Head is spinning. Ask Programming |
- New to Java, need to implement a hashmap, treemap, and binary search tree. Head is spinning.
- MySQL seems to choosing a poorly-optimised execution plan for a simple query. Can I force it to do it a better way?
- Hello! I think genetic algorithms are neat but I could use some help understanding them
- Theoretical question that came into my mind at 3am
- Storing a password in a cookie, is it safe?
- Exercise 26.2.3: Find the Winner (CodeHS Data Structures Challenge Problems - Connect Four - Find the Winner)
- Trouble with makefile
- Reading Telegram messages
- Why use CNAME instead of Alias?
- How does someone write down project ideas on paper (or somewhere) to manage the project ?
- Small cross platform desktop UI framework
- Who's API is better?
- I need help with OOP Design problem (C++)
- [NOT ENDORSING, HONEST INQUIRY] Is it sus to include black-hat-ey projects in my portfolio site?
- How to maintain the Policy v/s Mechanism philosophy during development?
- Bootcamp reviews
- Been given a task to have a select box change textbox when 'other' is selected, and have it work on mobile as well as pc. I'm not a Dev, but would like to try and fix it.
- How to copy GitHub SSH url in web browser using a keyboard shortcut?
- Whatsapp Web Mirror App?
- How to programmatically generate Anki cards?
- Can somebody ELI5 me what Postman, Jenkins, Jira, Selenium, Docker Kubernetes are?
- Replace files in a strange way?
- How to programmatically settle bets of different sports?
New to Java, need to implement a hashmap, treemap, and binary search tree. Head is spinning. Posted: 13 Apr 2021 04:55 PM PDT As part of an assignment, I need to "Store the pairs of each state and its capital in a Map using the HashMap function. Display the content of the Map, then use the TreeMap class to sort the map while using a binary search tree for storage. " I am very much a layman when it comes to Java. Individually I understand the three concepts vaguely. Should I store my 50 key-pairs in a HashMap, then populate a TreeMap from my HashMap data to sort it, then create a binary tree from my TreeMap? Or use the HashMap to create both? Or redundantly create all three independently? Sorry for how ignorant I am, I am sure I am completely off on every concept here by a wide margin. [link] [comments] |
Posted: 13 Apr 2021 08:19 AM PDT I've got a large-ish table - well, 19 million rows, slimmed down from 160 million rows. Its primary key consists of an integer (
To get the latest information, I have a view which refers to another view, one which returns the latest
This query is very slow (e.g. a few seconds; it's a lifetime!). I tried a simplified version and got the server to EXPLAIN it: https://i.imgur.com/hTpA3vq.png I also tried the following query which returns instantly: https://i.imgur.com/2SHffZh.png If I can get the date back instantly from the second query, just by ORDERing and LIMITing, why can't the Is there any way to force/rewrite the first query to operate in a similar way? I tried [link] [comments] |
Hello! I think genetic algorithms are neat but I could use some help understanding them Posted: 13 Apr 2021 09:49 PM PDT I've been enamored with the idea of a problem solver program with a success condition that randomly generates classes to evaluate the functioning ones, seeing which bring it closest to the outcome which fulfils its condition. Those closest are kept and replicated with variation of a set optimal percentage found by testing the process. Evaluation of that set, repeat forever until success. I'm a noob to coding and I only really know how to code on a basic level in Java. Really any if I have the internet for their api/documentation but then again I guess that means I'm as qualified as the average Joe. I learned genetic algorithms exist, but looking them up only really returned programs that simulated the idea or perhaps laid out the architecture of it. Classes that, when run, would create many instances of an object containing simple variables that were easy to make vary via pseudorandom number generation and conditions based on their results. Given that I'm an amateur I'm sure I'm either romanticizing the capabilities of the process or I'm fixated on some old news that's actually really basic they did on an etch-a-sketch in the 70s. I need help to imagine what java code could execute that would result in the generation of many at least pseudorandom (functionally random thought right?) programs. Basically with randomized code. (Or maybe randomized selections of existing useful functional code fragments now that I think). Creating many functional ones in a decent time period. By the end of writing this I am more confused, know less, have unlearned basic typing skills along with inheritance and Excel all while also worried I answered my own question which is really basic and just requires work and it all to be tediously mapped out in detail to understand. So if nothing else hello Australia reddit. Do you think perhaps Australia will evolve to be tech capital of the world? The logic is all there that eventually the country would be entirely programmers. Id think natural selection favors Australian kids who avoid going into the Australian outdoors, which is commonly known to be territorial and unnecessarily venomous. TLDR: Essentially how to generate random code that isn't always garbage. [link] [comments] |
Theoretical question that came into my mind at 3am Posted: 13 Apr 2021 04:55 PM PDT A stupid but interesting question just came into my mind: What would happen if you remove all regex out of all code in the world? I would imagine that all searchengines would stop working and maybe some color coding in programs also wouldn't work but I am sure that there are a lot of things I didn't think of so I figured i would post this here and see what you guy can come up with. [link] [comments] |
Storing a password in a cookie, is it safe? Posted: 13 Apr 2021 09:31 AM PDT Ofcourse not! But how about if the cookie is encrypted (and decrypted when the app is started up) using a pin provided by the user? The problem I am trying to solve is authenticating to a wordpress + woocommerce site, which don't support oauth by default. The user will need to enter his credentials in order for the app to be able to create content on the website. I dont want to store any user data in my database. So I want to try to save the password in the client in a safe way. [link] [comments] |
Posted: 13 Apr 2021 06:15 PM PDT Exercise 26.2.3: Find the WinnerProgram ResultFind the Winner
I need help on this one please I don't even know where to start [link] [comments] |
Posted: 13 Apr 2021 05:57 PM PDT Here is my makefile https://i.imgur.com/BPBkQMF.png Everything was fine until I added token.h / token.o. I get an error saying "No rule to make target 'token.o', needed by 'main'. Stop. This makes sense because there is no object file to make for token since I don't have a token.c. I tried removing token.o from "SHARE" but then I get a massive list of compiler errors. I'm now confused by my makefile and I don't know how it really works or how to fix it. Everything else works fine, I just don't know how to add a header file only to this makefile. [link] [comments] |
Posted: 13 Apr 2021 01:25 PM PDT I'm trying to read all the messages from a certain Telegram channel so as to chart their data. I have no idea how to read Telegram messages with say C++ or Java, is this something that can be easily done? If so, are there any resources available where I can learn how to do so? Thanks! [link] [comments] |
Why use CNAME instead of Alias? Posted: 13 Apr 2021 04:07 PM PDT What are situations where you will choose CNAME over Alias? [link] [comments] |
How does someone write down project ideas on paper (or somewhere) to manage the project ? Posted: 13 Apr 2021 11:36 AM PDT Hello everyone, hope you are doing well. I was wondering what are some different methods to write down our vague project idea on paper and organize it in such a way so that they can start following what is written on the paper and just write the code to represent it in real life? To give you some more context, I did many projects in school and during my job, BUT for school, the projects were never big enough (they were complex but not a massive project) so that we have to plan the whole thing in a complex way and write all those plans and communicate with many different people to bring the idea to life. They were pretty straightforward and had to follow the instructions and create a program that respects what was asked. When I started working in a full-time job I realized that there are SOOO many more steps to bring this simple project to the public, many things to consider, and with all these extra steps I have seen people using different methods to represent those vague ideas on paper (or computer) and making them more concrete. I have many different ideas to make many apps BUT they are soo vague to me that when I start to do the wireframing I just get stuck because they are not organized at all and I don't have the full picture of what I want exactly. Then if by any chance I do make the wireframe for the app in question I'm never sure how should I write the tasks that need to be done (Like user stories ?) for the front-end and Back-end. So what I am trying to ask is to
I did try searching on the web, but... there wasn't much about all this stuff and I think I needed to search with particular terms which I do not know. Anyway thanks in advance for your time. [link] [comments] |
Small cross platform desktop UI framework Posted: 13 Apr 2021 03:02 PM PDT Does anybody know of a small UI framework that is cross-platform. I know Qt is quite popular, but the compiled app comes to around 30MB. Are there any frameworks that offer a smaller UI framework for making a cross-platform app? [link] [comments] |
Posted: 13 Apr 2021 11:01 AM PDT Last summer, I deployed an API for retrieving Wikipedia tables in JSON. I could not find any existing tool like this at the time so I was happy I was able to fill that gap. The app does get users, believe it or not. Recently, I found another API that was deployed a few months after mine (found it via indiehackers). It does the same thing but the API endpoints are different and the returned JSON is formatted differently. I'm interested in who's API is better. Which one is easier to use? Which one has better formatted JSON? Could mine be improved? Questions like that. [link] [comments] |
I need help with OOP Design problem (C++) Posted: 13 Apr 2021 02:36 PM PDT I made Menu class which has 3 methods. First is print() which prints menu text in console. Second reads user input and check if it is valid or not and the third one has switch with several cases all representing one option. In main() I made Menu object. Now when I call the third method which is basically this: I have a problem here. I want to be able to call some methods from other classes when I enter certain case, For example in case 1 I would like to call Authentication.login() and in the case 2 I would like to call Crawler.getJSONdata(). Is there any was for me to do this without including Authentication and Crawler within Menu class, but rather including them in main and instantiating objects there. I could pass the pointer to a function as a parameter in the third method in Menu class, but determining which method should be called is done in switch case. Any suggestions how I can do this or some advice on how to design this better? [link] [comments] |
[NOT ENDORSING, HONEST INQUIRY] Is it sus to include black-hat-ey projects in my portfolio site? Posted: 13 Apr 2021 02:34 PM PDT Under the guise of rule #4, I would like to preface this post with a quick disclaimer. I am in no way condoning, encouraging, inquiring about, or explaining any unethical or illegal activites. I do not intend to encourage or explain any inquiries regarding my experiences if asked - I seek advice, not discussion. Soooo - I'm trying for a legitimate, pretty-looking salary career right now. About to configure, customize, and deploy some template on GitHub pages. Planning on linking it to my custom-coded Elastic Beanstalk/AWS integrated web app - just gotta give the template a domain name, SSL, the whole shebang. As I'm going through messing with the front-end of this template, I'm noticing the 'experience' and 'projects' sections -- and drawing a complete blank. The whole reason for, well, me knowing what I do about programming, security, unix, linux, docker, blahblahetcetc. is due to my - say - less-than-honorable experiences. Scrapers, stuffers, scanners, sites for groups - all that shiz. I have a few legitimate projects that I've worked on, but nothing that I'd consider to be too special. So, this may be a really, really stupid question, but, would it be utterly stupid of me to include some of these projects, the lighter-hearted ones, maybe some streaming bots or something, in my portfolio? Where should I draw the line? I feel like some of my experiences may be attractive to employers, but also run the chance of landing a jail cell, not a job. [link] [comments] |
How to maintain the Policy v/s Mechanism philosophy during development? Posted: 13 Apr 2021 05:00 AM PDT There is the Unix philosopy of implementing mechanism and pushing policy to the upper layers. While software development I try to follow this philosophy. But lately I have been struggling a bit to achieve this. How do you stay on course with this philosophy when developing medium to large scale project? [link] [comments] |
Posted: 13 Apr 2021 09:58 AM PDT Hi all, I'm trying to find credible reviews about bootcamps. Sites like switchup and coursereport are probably bullshit. Can anyone offer suggestions of how I might find honest feedback about the all the various bootcamps out there? And please don't bother trying to convince me that paid bootcamps aren't worth it or try to sell me on one particular bootcamp. Thank you!!! [link] [comments] |
Posted: 13 Apr 2021 09:50 AM PDT Hello, I have got a simple JS to take a option from a select box, and change it to a input text box that was created by someone else who has now left. My goal here is for this to work on Desktops, as well as mobile devices in the same way. The site is a simple form site to fill out and submit info. The JS code we are using is: and our select boxes look like I hacked together the onblur, onclick, and onchange, as the original code only has onchange. This is probably not the best way to code this I know, but it almost works for exactly what I need. This would work on pc, but on iOS, onchange would not work. So I changed it to onblur. This worked great for ios, but android and PC you would have to click out of the element and back into it to type your input. Adding onblur, then onclick. Works perfectly for iOS and PC, but android still has to click off, then back into the input box to type. Adding onchange, breaks iOS, and does not change the box at all, and it works great for PC and android. All that I need this to do, is be able to select the option 'other' Have the box change from a select box, to the text box, and focus on that box so you do not have to click back into the input field for each device. I'm not a programmer by trade, but have taken on this task to try and get this problem solved, so if anyone has some ideas for me to try, I would appreciate the help. I've spent hours on stackoverflow and reddit looking for hints to what I could try to do to get this to work across all devices. [link] [comments] |
How to copy GitHub SSH url in web browser using a keyboard shortcut? Posted: 12 Apr 2021 10:31 PM PDT GitHub SSH url: Usecase: I clone a lot of repositories from GitHub and having to click "Code" button then copy the url is not convenient. What I expect: A Keyboard shortcut that that whenever I go to GitHub repository and upon using that shortcut key, the GitHub SSH url should be copied to clipboard. Additional Context: My guess is chrome extension or userscript could help. OS: Windows 10 Browser: Chrome [link] [comments] |
Posted: 13 Apr 2021 05:52 AM PDT Hey so i was wondering. Many companys offering a multichat of WhatsApp use a method that instead of using the WhatsApp Business Api its just like a normal whatsapp web but with the difference that can be opened in multiple computers at the same time. Basically its a Mirror App for whatsapp web. So latley i was thinking if it would be possible to make a whatsapp web mirror using nodejs. What do you think? Do any of you have an idea of how could i make it? [link] [comments] |
How to programmatically generate Anki cards? Posted: 13 Apr 2021 05:31 AM PDT Hello. Anki is a spaced repetition flashcard app that is used for memorization of words, facts etc. If I have a list of words with definitions, how can I create Anki cards programmatically? Does anyone know which programming language or framework could do the job? To give you more information, I need to enter the word in some text input and it's definition in another text input in the app, then hit the create the card button. Or maybe there is something that can be directly used for the creation of Anki cards? [link] [comments] |
Can somebody ELI5 me what Postman, Jenkins, Jira, Selenium, Docker Kubernetes are? Posted: 13 Apr 2021 07:53 AM PDT |
Replace files in a strange way? Posted: 13 Apr 2021 01:29 AM PDT Hello, I need help? I need to replace textures in my game with new ones and I cant figure out how to keep the directory structure on replace, for example: My new textures:
+2026 more textures need to be replaced with the ones already in my game directory but that directory has folders and my replacement textures are in one big folder with no organization. My old textures:
+2026 more textures basically I need to replace them but keep the directory structure intact, thank you if anyone manages to figure this out. I've been trying for hours... :/ [link] [comments] |
How to programmatically settle bets of different sports? Posted: 13 Apr 2021 06:25 AM PDT I'm building a sports betting website, I'm getting odds from betsapi.com and results also. but the results have scores, stats and events in the game only they don't have outcome bet markets settled. Is there an easy way to automatically settle bets of different sports? or do I have to write code for each betting market for each sport? Upcoming Games Format : https://betsapi.com/docs/samples/bet365_upcoming.json Prematch Odds Format : https://betsapi.com/docs/samples/bet365_prematch_odds.json Results Response : [link] [comments] |
You are subscribed to email updates from AskProgramming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment