Programmers who can think recursively, can you share a problem or two that you think is best solved with recursion? Ask Programming |
- Programmers who can think recursively, can you share a problem or two that you think is best solved with recursion?
- If I am using WSL2 with Windows as a development environment, then am I missing anything by not switching to complete Linux (Ubuntu) as a dev environment?
- Where can the "new" keyword in JAVA be used?
- What's the best Company you have ever worked for and why?
- In the curses library, how in the world do you check for specific letter key inputs?
- question win32 api
- Which app do you use to draw flowcharts?
- Why need Netcat when I already have the WireShark?
- Best technology / solutions for document management automation?
- Deleting projects off my local machine
- Is there a way to have a random bijective map between two integer ranges without having an array of said range?
- Is it the right way for android/ios app developers to write a server-side in Golang and the front end in Kotlin/swift?
- Is 16GB For 4yrs Output Enough Or Too Much?
- Learn C++ or something else?
- [javascript] display error to user with express.js
- Best way to setup and host regular database backups and imports
- [REVIEW] A Simple Linux CLI timer based on the Pomodoro Technique
- How do you make source code save?
- Goal Tracking System
- Nodejs use import function without new keyword
- What exactly is the problem when a webpage loads but not the thumbnails or the images(or half of them)?
- Is front-end more respected now?
- C++ concepts question
- Is there still no way of opening a local path in File Explorer from Chrome?
Posted: 19 Jun 2021 04:47 PM PDT I have been doing live coding interviews lately as I near the end of a few job prospects. I have shocked and amused a few interviewers when I came up with a non recursive solution to some of their problems, like flattening an arbitrarily nested array, traversing a node tree for various reasons, or computing paths for A*. I come here seeking problems that seem easier or intended for recursive solutions to either help wrap my brain around it. It's also reddit so maybe some amusing discussion will also follow :) --edit: I'm going to include an example here since I realize this could use more context. Flattening an arbitrarily nested array - have any of you seen this as a job application task? Here's the iterative version. It's baby's first ruby script so please pay no mind to the obvious lack of idioms, architecture, etc. The flatten_array function is where the magic happens :) --edit2: here's a list of things suggested so far that I will try to keep updated. Thanks for all of the suggestions! minesweeper - done recently for a coding interview node/folder traversal - done recently for a coding interview ackermann functions generation of a maze tower of hanoi sudoku merge sort binary tree inversion [link] [comments] |
Posted: 19 Jun 2021 07:37 AM PDT For the sake of argument, assume I need Windows OS and I cannot switch. I just want to know information. As someone who has never used Ubuntu as a dev environment before, I am under an impression that when using the WSL2 terminal, all the good things of Linux like package managers is covered. Then, are there any feature or dev tools that are only possible via a complete Linux (Ubuntu) environment, and using them feature with WSL2 with Windows would be a hindrance or Not at all possible? [link] [comments] |
Where can the "new" keyword in JAVA be used? Posted: 19 Jun 2021 10:05 PM PDT Currently learning java and I have seen over time the keyword "new" used like the example below. What I want to know is how does it work in this case? I understand that the keyword "new" is used to instantiate a object reference to a class. From there we are able to access methods attributes and other things from within that class. But I can't understand what the above code is doing and why we are instantiate again? Also the word Customer is a class. New to collection's also how can a class be a field for a Linked List. [link] [comments] |
What's the best Company you have ever worked for and why? Posted: 19 Jun 2021 09:52 AM PDT |
In the curses library, how in the world do you check for specific letter key inputs? Posted: 19 Jun 2021 05:10 PM PDT In the curses library, I can detect arrow keys but can't figure out from Google how to detect for letter key inputs. Does anyone know where I might have better luck finding his out? [link] [comments] |
Posted: 19 Jun 2021 05:09 PM PDT Hi, so I play this roblox idle farming game. I thought having multiple instances of the game might give me more chances of getting items. I found a way through installing process explorer and close thread roblox's event called "singleton. I want to automate it for other people to use without process explorer. I thought I can use pywin32 for it. But the thing is I am unfamiliar with these things, like the terms "handle" "Pid" "events". I tried microsoft's docs on WIN32API but it has its difference and the example used in its docs is c++ while I only know python. Any guide/tutorial/docs to make sense of these things? [link] [comments] |
Which app do you use to draw flowcharts? Posted: 19 Jun 2021 12:58 PM PDT When working on personal projects I often desire an app that should allow me to map out the flow of the program, so coding it would be easier. Any specific flowchart apps that many programmers use? [link] [comments] |
Why need Netcat when I already have the WireShark? Posted: 19 Jun 2021 08:16 PM PDT Practical Malware Analysis: The Hands-on Guide to Dissecting Malicious Software [link] [comments] |
Best technology / solutions for document management automation? Posted: 19 Jun 2021 08:15 PM PDT I am looking to build a script that can automate information on .csv files and then produce a new CSV to be imported into scheduling software. The software will be provided a csv file containing links to hosted content and organised by category such as cats, dogs and mice. The software will contain a database of .csv files that have other information organised by category. For Example:
The script will then be provided a set of instructions.
The script will then output a CSV file containing the information organized in a format that can be used by the scheduling software. Can anyone recommend what the best way to go about this would be from a programming standpoint. [link] [comments] |
Deleting projects off my local machine Posted: 19 Jun 2021 07:09 PM PDT I have about three years worth of projects, exercises, tutorials, etc... on my laptop stored in a repo folders. And it's eating up a sizable portion the memory on my comp. So my question is, is it common place, or feasible to, just delete all of this stuff off of my local machine as the majority of it is already hosted on GitHub. Can't I just clone a project if I ever want to mess with it again? Does this make sense? Instead of having these projects eating up space on my hard drive can't I just delete them and keep them on GitHub. Sorry if this has been asked before. The answer may be obvious or maybe I'm thinking about this wrong, but I tried to look up the answer and couldn't find anything. Thanks. [link] [comments] |
Posted: 19 Jun 2021 02:24 PM PDT Hi, I think it is worthwhile to give some context to this question. This is being done in Meteor/Apollo/MongoDB/React, but the question is language-agnostic. I'm trying to create an endless feed of random user posts without repeats. This is typically done with pagination, but the issue with pagination is that it is returned in a fixed order as it appears in the database. What I am trying to achieve is random pagination. So if I have say 100 entries in my database, my current big picture idea is that I generate a random seed on the client upon page load, and send that seed back and forth for pagination, and to have a function which takes in this seed to bijectively map to an entry in the database. Here I will illustrate an example. Suppose my database has 1,000 queries (numbered & indexed 1 - 1000 for simplicity). Client A sends seed A along with the offset (0) and limit (10). The limit here will always be constant at 10, and the offset is the only changing value, which is the sum of all previous limits. Now, what should happen is I obtain 10 random unique integers in the range [1,1000], based on the seed, offset, and limit. So with typical pagination, I will retrieve the data from indices 1 to 10. But now with this seed, I need to injectively map the numbers [1,10] to a random unique selection of 10 integers within the range [1,1000]. Next, I retrieve the data at those specific indices in the DB, and send it back to client A. Now, client A scrolls down and hits the trigger to load more, so now client A sends seed A along with an offset (10) and limit (10). With the offset and limit, I have the new unseeded range, [11,20]. And this should map to a random unique selection of 10 integers within the range [1,1000] but NOT map to the integers already mapped to by the first 1-10. This means that I need to have a random bijective mapping between the ranges [1,1000] and [1,1000]. This looked like it could be solved with the Fisher-Yates shuffle which would basically give me a random permutation, and then I can predictably do this with a seeded Fisher-Yates shuffle. But it's not quite the case because I wish to avoid having to generate this array of [1,1000] on every user query. The range scales based on the number of items and once this number grows large (potentially in the millions, or more), it isn't going to be efficient having to generate it for every user query. This is a pretty interesting problem and I'd love to hear some perspectives on this. I must admit that I am trying to push the idea of this having uniqueness as far as I can, but I understand if this is the best that can be done, and then I'll have to compromise on occasional non-uniqueness. [link] [comments] |
Posted: 19 Jun 2021 12:26 AM PDT I am learning golang and done some projects in it and I am curious about the question that is it possible and the correct way for android or ios developers to write a server-side code in golang and front end in kotlin or swift. I don't have experience in mobile app development but I am curious and want to know if it is possible for two languages to work at the same time. May this will help me to shift to mobile app development without thinking that I wasted my time learning golang. [link] [comments] |
Is 16GB For 4yrs Output Enough Or Too Much? Posted: 19 Jun 2021 04:00 PM PDT I'm starting my SE degree next week and will be trading my 2015 MacBook Air for something more pawerful. I'm starting my SE degree next week and will be trading my 2015 MacBook Air for something more powerful.his sound about right? Aside from programming, I'll be using it for streaming, the odd MacOS game and remote learning. [link] [comments] |
Posted: 19 Jun 2021 11:57 AM PDT I've been doing C# and React/Angular since the start of my career. Kind of looking for something to add to my stack. Don't have many opportunities for remote working so was considering to learn Python, Go, Ruby or C++? C++ seems best for my technical skill set. All others are just another way of selling yourself quicker. Also I am in Europe. [link] [comments] |
[javascript] display error to user with express.js Posted: 19 Jun 2021 11:39 AM PDT Hi there, I'm a newbie and I'm building a weather app. const express = require('express'); response.on("data", function(data){ [link] [comments] |
Best way to setup and host regular database backups and imports Posted: 19 Jun 2021 11:34 AM PDT I have 2 psql commands that I want to run once every x days via cron jobs. What's the most efficient way of doing that? Hiring a VM on digital ocean or something similar and setting it up on that? [link] [comments] |
[REVIEW] A Simple Linux CLI timer based on the Pomodoro Technique Posted: 19 Jun 2021 09:40 AM PDT |
How do you make source code save? Posted: 19 Jun 2021 09:35 AM PDT I want to add the Google Adsense code in between <head> and </head> tags on HTML. I am a shit coder so I am unsure of how to save the source code once I have edited it as HTML, and if that is even the right thing to do. How do I save source code? or How do I paste a link in between HTML head tags and keep it there? [link] [comments] |
Posted: 19 Jun 2021 07:41 AM PDT I am asking for advice or feedback about a goal tracking system that I am planning to put together. Please leave comments in the document or on this post. Also, if you know of a group/forum that would be a good place to share this, please share it or let me know. https://docs.google.com/document/d/1X7ryTaAfBbRTLk5D0Mjbhl_MNK0cFmcJwhWU77TUtsM/edit?usp=sharing [link] [comments] |
Nodejs use import function without new keyword Posted: 19 Jun 2021 07:33 AM PDT ``` class Metadata { constructor () {} } module.exports = Metadata; const myFunc = async () => { const item = await new metadataService().get(...) } ``` how do I destructure the import so that I dont need to instantiate new every time? [link] [comments] |
Posted: 19 Jun 2021 06:57 AM PDT This is very annoying, I am guessing the server the thumbnails load from is having issues but when it happens it usually affects many websites so it must be my internet connection? but I thought the internet either works or it does not work like electricity, can it half work? [link] [comments] |
Is front-end more respected now? Posted: 19 Jun 2021 12:04 AM PDT I first started learning web dev at age 11 in the 90s and growing up I always heard that front-end wasn't taken as seriously as "real" programming and that if I wanted to pursue a career as a programmer I should learn something like C or Java. Even as recently as the last decade I've heard people say things like front-end isn't taken as seriously at places like Google and such. Fast-forward to today, it seems like front-end is front and center. I've been self-teaching for a year now and understand a lot of what used to be back-end is now handled client-side and it's such a drastic change from how I always thought of it. I never thought I'd be able to make good money with HTML, CSS, and JavaScript but here we are. To those who have been in this field for a while, is front-end still looked down upon in your opinion? Would a front-end dev at Google be taken as seriously as a C or Java dev? [link] [comments] |
Posted: 19 Jun 2021 05:48 AM PDT Reading through cppref on concepts and constraints, under Atomic Constraints I came across this example: Now I understand that they are trying to show that the temporary object S<T> created in #1 doesn't convert to a bool:
But the error confuses me. Shouldn't f(0) call #2? It specifically says (just above):
The substitution results in a non-boolean atomic constraint, therefore the constraint is not satisfied, but why does that prevent #2 from being a potential candidate? [link] [comments] |
Is there still no way of opening a local path in File Explorer from Chrome? Posted: 19 Jun 2021 04:44 AM PDT Is there no way of opening a local folder such as this in your file explorer: C:\Users\me\Desktop\Folder Directly through a link in Chrome without having to install extensions? I've tried googling and most responses seems to be many years old. Has Google not added this functionality yet? [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