• Breaking News

    Monday, July 27, 2020

    If you are implementing a stack using a linked list, should you see the first node or the last node as the top of the stack? Ask Programming

    If you are implementing a stack using a linked list, should you see the first node or the last node as the top of the stack? Ask Programming


    If you are implementing a stack using a linked list, should you see the first node or the last node as the top of the stack?

    Posted: 27 Jul 2020 10:22 AM PDT

    Best way to automate my python app w/ dependencies. AWS? Google App Engine?

    Posted: 27 Jul 2020 08:22 PM PDT

    I have a python app and want to run a particular function once daily. It is about 100 mb zipped, 300 unzipped, so it can't go on AWS lambda, which was my initial choice. I could conceivably put it on there without it's dependencies and add a step that runs pip install, but that's not ideal.

    What do you think? Just stick it in a small EC2 instance with a cron job? Use Google App Engine instead?

    Thanks very much for your advice.

    submitted by /u/scottyLogJobs
    [link] [comments]

    Java sort uppercase first then lowercase?

    Posted: 27 Jul 2020 10:32 PM PDT

    Hi there,

    I have a set with contents: ("AZ", "az", "AB", "ab", "123", "D", "d"). And I want to sort it such that it is in the order ("123", "AB", "AZ", "ab", "az", "D", "d") with uppercase sorted before lowercase. I have tried String.CASE_INSENSITIVE_ORDER but this removes duplicates such as "AZ" and "az". Can someone help point me in the right direction on how to go about doing so?

    submitted by /u/a_wildlam
    [link] [comments]

    How to sync Google Tasks with Outlook Tasks

    Posted: 27 Jul 2020 09:30 PM PDT

    There has to be a way without paying for a premium app, I can't seriously be alone with this lol

    submitted by /u/Valiantay
    [link] [comments]

    Differential Golf Calculator?

    Posted: 27 Jul 2020 05:00 PM PDT

    ELIF please, how would I go about making a WHS 2020 golf handicap calculator? I don't really understand how the math works, and there's not much online that's easy to understand for someone without a degree. I'm using JavaScript to code it.

    submitted by /u/bwz3r
    [link] [comments]

    How would you properly map tables involving a user using Java/Spring Boot and JWT security?

    Posted: 27 Jul 2020 07:24 PM PDT

    I am using JWT security in my Spring Boot program. I have a user. The user is allowed to make several individual posts requesting rides. The requested rides has its own table linked to the user table (in order to reflect the user who made the post). I am having a hard time properly mapping the tables. Ideal, the requested rides table would automatically populate with the user id of whoever is logged in and creating the post. Do you have any tips? I have tried a one-to-many(user table) and many-to-one(requested rides table), but it will not automatically supply the username. And when I try to insert it myself, it says I am duplicating records in the MySQL database. Thanks in advance!

    submitted by /u/nerd-for-life
    [link] [comments]

    Car Database with Selenium

    Posted: 27 Jul 2020 03:28 PM PDT

    Say there's a website that features tons of cars for sale. One might create a script that navigates throughout the website and creates a database of all vehicles for sale.

    And if we do this every day and we compare each database, there might be a correlation of the cars that were sold.

    Is this legal?

    submitted by /u/FoxBearBear
    [link] [comments]

    Is there any shading language that doesn't suck?

    Posted: 27 Jul 2020 02:44 PM PDT

    I've spent last two weeks trying to find a shading language that isn't outdated as hell and could transpile into any of the currently supported languages.

    I need GLSL or SPIR-V for my current project, and I really want to avoid using GLSL directly as It's even worse than C.

    Here are some of the problems I have with the GLSL:

    • No code reuse whatsoever
    • Very verbose unnecessarily
    • Vertex and Fragment (and others) requiring separate source code loading
    • Input vars cannot be changed (leading to a lot of variable definitions that do only a few things)

    I've written my own language that addresses these things and transpiles to GLSL but I've no experience in transpiling so I feel quite uneasy with every compilation and additionally I've had to cut corners of course since I barely managed to make this work.

    So my question is has anyone ever addressed these problems and created his own language that can be transpiled into other shading languages? I have exausted all my searches and haven't found anything useful.

    Here's an example of my language:

    #version 440 #include <../../inc/ext/pack.h> #include <structs.arhsl> #include <common.arhsl> 0 ivec3 pos; // layout type name (input); 1 int ao; 2 vec2 uv; 0 sampler2D tex; // binding type name; 0 struct camera { // uniform buffer objects mat4x4 proj; mat4x4 view; } camera; 1 struct chunk { ivec2 cpos; } chunk; float fao; //used as in/out to convert int to float vert { pos += ivec3(chunk.cpos.x * 16, 0, chunk.cpos.y * 16); fao = float(ao) / 16.0; return camera.proj * camera.view * vec4(vec3(pos), 1); } frag { vec4 color = texture(tex, uv); //uv automatically infered as in/out type color.rgb *= fao; return color; } 

    It automatically renames variables to avoid conflicts, creates in / out variables, removes all unused variables/blocks/functions, manages including other files and exports a vertex and fragment shader files.

    submitted by /u/Demvamko
    [link] [comments]

    Please recommend some good books to learn T-SQL

    Posted: 27 Jul 2020 02:29 PM PDT

    I have started learning T-SQL, and I am looking for some good books for learning. I would like to know beginners and intermediate books with lots of problems.

    submitted by /u/coderZero2One
    [link] [comments]

    What storage bucket to choose?

    Posted: 27 Jul 2020 02:12 PM PDT

    Hey guys I'm trying to make a webapp for my classmates and faculty where the faculty could make Folders in the app and students could upload their assignments in it. I'm trying to add a lot more functionalities around this.

    My question is what online service can I use to store data like this. (I've tried Firebase Cloud Storage) and how should I model it?

    The requirement being that each faculty should be able to create a particular bucket in the database and students could upload their assignment files into it. Also, should I migrate to relational databases? Will that be easier for me?

    submitted by /u/Nedwize163
    [link] [comments]

    How to spy/stub/mock an object's method when that object is a class property? In other words, how to spy/stub/mock this.object.method()?

    Posted: 27 Jul 2020 05:56 PM PDT

    Looking for a way to calculate distance using lat & lon

    Posted: 27 Jul 2020 05:39 PM PDT

    Hey guys. So I am building a small Maven Java application to calculate the distances (in miles) between gas stations. The only data that I have available, aside from name and other identifiers of the gas stations, is the latitude and longitude coordinates. Does anyone know of an easy to use library that would help with this, or have any other suggestions on the cleanest solution?

    At first thought, I feel like using Google maps to some extent would be the best plan, but I haven't looked at how to interact with a Google maps API. If anyone has experience with this, any tips are greatly appreciated. Thanks!

    submitted by /u/jokerpie69
    [link] [comments]

    Will we be able to leverage AI to take a program in one language and rewrite it in other languages (thinking older financial COBOL apps to more modern languages that can more easily be maintained by today's programmers). Does anyone know of any efforts towards this?

    Posted: 27 Jul 2020 12:06 AM PDT

    Confused on determining time complexity of recursive function

    Posted: 27 Jul 2020 05:29 PM PDT

    Hi I am working on a CTCI problem where we have to count the number of paths that results in a value. I think I have an algorithm that works but I'm not sure if it matches the solution in the book. My confusion is mostly in the runtime complexity of this algorithm. I can't wrap my head around how to figure this out.

    I put my Python code here. Basically it either skips the node and recurses using the next node int he tree or it subtracts it's value from the running sum then recurses using the next node.

    I think it is O(N2 ) but at this point I am making a rough guess. Can someone help me learn how to figure this out?

     

    Edit: I just realized I did not solve the problem correctly but none the less, I'm still curious what this runtime would be

    submitted by /u/GhostofBlackSanta
    [link] [comments]

    Best websites / resources to help me brainstorm ideas for projects

    Posted: 27 Jul 2020 05:28 PM PDT

    How would I go abt running two python scripts at the same time in a cloud env?

    Posted: 27 Jul 2020 05:12 PM PDT

    I have a python file (a server) that needs to get a var from another python file. Problem is, I need both of them to be running at the same time in a cloud environment. I need to start the second one so it can some data via an API, then store it in a var. The server then needs to be up so it can start, grab the data and pass it to the front end. I think my syntax is ok, but can I do this? I tried running both locally and got nothing. Will I be able to do this on the cloud?

    submitted by /u/_Lasagnaa_
    [link] [comments]

    How much does companies spend on development tools per year?

    Posted: 27 Jul 2020 01:05 PM PDT

    like visual studio, Qt, xamarin, xcode, rad studio, etc? does anyone knows where I can find those date?

    submitted by /u/MacASM
    [link] [comments]

    General Question about App Development in 2020

    Posted: 27 Jul 2020 01:04 PM PDT

    Hello everyone, hope your pandemic is all you want it to be.

    I'm switching from full-stack web-dev to purely mobile app development for my next contract project. I'll be coding an app from scratch for iOS, specifically the newer iPhones. Here's my question - should I use React Native and knock two birds out with one stone? Or pump out an app in Swift for the client?

    What other requirements do you ya'll look at before making that decision?

    submitted by /u/mach_333
    [link] [comments]

    How to learn and build career in domain of distributed systems

    Posted: 27 Jul 2020 12:19 PM PDT

    Hi everyone,

    This is my first time posting in any subreddit. So there may be a mistake in conveying my point so sorry for that. I am an undergraduate pass out in computer science. I love computer science, and As per I know, I understand the basic concept of computer science by heart (thought lack in practical experience). I love to build software that requires complex problem solving and a deep understanding of computer science (though many times I used various concepts unnecessarily). But when I start working for the fulltime, I notice that there is no need for problem-solving and understanding these all concept, people build software without understanding the CS concept completely, and it hit me hard. I just felt like most of my understanding of the concept was for nothing. It completely makes me impassionate about my job, and in my opinion, you should try to do a job whose aspects make you happy. Note I really work hard for my job and able to land a job in one of my dream companies, and I was proud of myself when I landed the job in the company.

    After the deep down thought, I was partially able to know what I want. During my free time, I have explored various fields like Machine learning, Deep learning, and distributed systems. After giving some time to various domains, I knew that I really like distributed systems as they have many underdeveloped algorithms (which I can work upon) require an understanding of the CS concept. I really enjoyed it when I implemented various algorithms from scratch. (Though I may be wrong, I have just given only 6 months to distributed systems and learned few beginner courses)

    I know that I want to learn distributed systems and build my career on top of it. Cooperate or research I will go for it. I have tried to figure out various job openings in this field but didn't apply in any of them as most of them require 5+ years of experience. And not sure how I can have 5+ experience in the first place. I am also willing to do further studies if it requires.

    I have a lack of direction, and I am willing to do any amount of hardship as it will eventually make me happy. Any type of suggestions are welcomed, I will love to have guidance from someone experienced, If it is not proper subreddit for this question redirection to proper subreddit will also be helpful. Sorry for such a long passage I think it was required to convey the whole point.

    submitted by /u/Ancient_Ad6042
    [link] [comments]

    Mobile middleware or cloud computing

    Posted: 27 Jul 2020 01:31 PM PDT

    Hey guys, I'm going through my software engineering degree and have a reached a point where I have to choose between two courses. One is mobile middleware and the other is clould computing. I believe they're both introductory courses but will basically set me up for the courses I'll study in the future. Which of these courses would be better for me in the long run, even after graduation?

    Thank you

    Edit: "to" to "two"

    submitted by /u/vibrant_kermit
    [link] [comments]

    Handling playback of many sounds files

    Posted: 27 Jul 2020 11:43 AM PDT

    I'll get right into in then. So I have a folder with a couple hundred 2-7 second .mp3 files. My goal is to create a tool to arrange them in an user-specified order consisting of n number of these sound files and play them one by one when requested. The "twist" is that each sound needs to be accompanied with another sound. So each sound would need to have some metadata, or a way of determining its companion sound. This is a pretty gross oversimplification, but is explains the gist.

    What I have now is manually throwing desired sounds files into manually created folders, manually renaming the files by a numerical order. I have my program search the folders and present them to the user; which folder would you like to commence playback from? I identify the files with names "1.mp3", "2.mp3", etc by calculating their crc32 checksum value and comparing it with a .txt dictionary of [crc32 value : Accompanied sound, some other info].

    This is a CLI only for now, but I plan of writing GUI sometime soon. If I can somehow get rid of all the hard manual labor of moving around and renaming files that the end user must go through, it would be pretty great.

    Before I write the GUI, I need to reconsider some parts and rewrite probably most of the program. My question is, how would you approach this task? Preferably without the intensive checksum madness, thanks.

    submitted by /u/vladistev9
    [link] [comments]

    How does the permute function in this program work?

    Posted: 27 Jul 2020 11:40 AM PDT

    The purpose of the program is to print all permutations of a given string

    I've been trying to understand the program below, but I can't understand how the permute function works. What's the purpose of using the swap function twice? Why is "permute(a, l+1, r);" included?

    I researched others' solutions, and some use the term "backtracking," which confused me further.

    Link to the code: https://www.geeksforgeeks.org/write-a-c-program-to-print-all-permutations-of-a-given-string/

    ```c

    void permute(char *a, int l, int r)

    {

    int i;

    if (l == r)

    printf("%s\n", a);

    else

    {

    for (i = l; i <= r; i++)

    {

    swap((a+l), (a+i));

    permute(a, l+1, r);

    swap((a+l), (a+i)); //backtrack

    }

    }

    }

    submitted by /u/CharmingBluejay
    [link] [comments]

    Bat file for switching output devices

    Posted: 27 Jul 2020 11:15 AM PDT

    Hello!

    I've written a basic app to switch my output devices from headphones to speakers.

    It was a necessity I had, so my bat file is as simple as a bat file with a couple of options. simple but I need some improvements.

    1st I'm looking for a way to detect which output device is default right now. This way, the app will change to the other I stead typing 1 or 2 to choose one.

    2nd and most important, this file is running using a shortcut key. To do that, I'm creating a shortcut file-> properties and add the shortcut there. My problem is that I want to use this shortcut while gaming, but windows doesn't recognize it while the game window is active.

    I'm using windows 10, last update, and NIRCMD to receive my commands.

    If you have any opinion or other features to add, I'll gladly listen to your words!

    Thanks in advance

    submitted by /u/RushTfe
    [link] [comments]

    Is it still worth it to learn programming in 2020?

    Posted: 27 Jul 2020 09:24 AM PDT

    I've been studying Python, very friendly language, has been easy to understand and cool to put it on practice.

    I know that many people will say that programming is an awesome career, and it is indeed. But what about the long term? I've seen news about A.I. being developed to code, will this replace humans in coding anytime soon? Could this be a potential threat?

    In my case, I intend to learn about web development.

    Since I am still a beginner, I would be even more in a precarious situation. What are your thoughts?

    submitted by /u/usuavicom
    [link] [comments]

    Prevent employee mistake in writing out /20 or /2020?

    Posted: 27 Jul 2020 08:31 AM PDT

    Hi! I am not technical. We make human error when an employee accidentally types out /2020 or /20 (when typing out a date, ie. 07/27/20 or 07/27/2020) on a label via label printer. The software is provided by the hardware provider (Dymo). The rule is to add 2 years from today's date, ie. 07/27/2022 but a brain lapse would result in putting down today's date of 07/27/2020.

    Whenever an employee makes this mistake and starts to write out /20 or /2020, is there a way to notify or prevent this from happening, such as a pop-up warning or find /20 and replace with "WARNING"?

    Thanks!

    Edit - further context

    submitted by /u/maddyessie1
    [link] [comments]

    No comments:

    Post a Comment