• Breaking News

    Friday, October 1, 2021

    What is the idea of synchronous/synchronized vs. asynchronous/asynchronized? Ask Programming

    What is the idea of synchronous/synchronized vs. asynchronous/asynchronized? Ask Programming


    What is the idea of synchronous/synchronized vs. asynchronous/asynchronized?

    Posted: 01 Oct 2021 09:42 PM PDT

    I see this word thrown around a lot in the contexts of threads/mutexes/interrupts/signals, and they seem to mean different things in different contexts.

    For example, in concurrency-land, mutexes are used to synchronize threads. But in signal/interrupt-land, the subset of synchronous signals are called synchronous because they happen within the context of the process.

    From the 30,000-foot view, what do the multiple uses of this word have in common? Is it given the same definition when used in these various contexts?

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

    Is there a load balancer for load balancers?

    Posted: 01 Oct 2021 09:35 PM PDT

    And does a load balancer for load balancers have a load balancer? And so on.

    Also, is this the same case for message queues? Where message queues have a message queue that distributes the incoming request among message queues?

    At the end of the day, is load balancers or message queues just a single instance?

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

    Computer engineer to Consultant? - Please help

    Posted: 01 Oct 2021 12:52 PM PDT

    Hey guys,

    First time posting here, I didnt know who else to ask.

    I am in a programming position at a gaming company right now, 1 year in right out of school. I just got an offer from a Cloud consultant company (same pay, dealing more with clients).

    I was wondering if anyone else had any experience with someone that doesnt see himself 100% programming for the long term and what avenues I can take.

    Thank you and sorry for the messy post.

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

    Any ideas why Eclipse still seems to be the standard IDE for students?

    Posted: 01 Oct 2021 04:12 AM PDT

    Maybe this is some confirmation bias, but all of my college courses used Eclipse, and I am consistently seeing people (that seem to be asking beginner questions) using Eclipse.

    Once I switched from Eclipse to IntelliJ, the difference was pretty astounding. Not only that, but the IntelliJ community version is free, so I don't really see a reason to use Eclipse over it.

    Additionally, most professionals that I've known who write Java are exclusively using IntelliJ.

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

    Want to switch career to software development but entry level salaries are less than my current job. Need advice.

    Posted: 01 Oct 2021 09:05 AM PDT

    I always loved programming since school but made a series of bad career choices and ended up in a management job (which I hate). I have been learning programming in my free time and have picked up a bit of C#.

    However when I check the salaries for entry-level C# programmers, the salary is 55%-65% of my current job. I am the only earning member of my family so I was hoping to earn at least the same pay.

    Can you suggest a path for me? Maybe a different technology in software development? I love programming so I am ready to consider other options besides C#, as well.

    Thanks

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

    Best language to learn quickly/easily to interact with an API?

    Posted: 01 Oct 2021 12:23 PM PDT

    Ok, I haven't written code for 30 years, and it was Turbo C back then.

    I want to pull in some formatted csv files and push them to an API for a system. Every code fragment I've found either is broken or doesn't work due to age/version/etc.

    So I'm going to have to learn something quick and dirty to do the tasks.

    What language would be the easiest to learn and write to talk to an API: Python or Perl, or something else?

    Thanks.

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

    Can someone help me with this exercise in Python?

    Posted: 01 Oct 2021 08:01 PM PDT

    Exercise: Finding how many sequences of steps I can take to get from house A to house B.

    Note:

    • I can go to (i+1)th house or ( ( i + j/2) mod j )th house to get to point A to B.
    • B is always greater than A
    • I can't visit the same house in a sequence

    Inputs:

    • i is the number of the house I am.
    • j is the number of the house I need to go.

    Outputs:

    • Number of different sequences that can take me from house A to house B.

    Example1:

    • i = 2
    • j = 3
    • output = 1 sequence

    Explanation:

    As I am in 2nd house and I need to go to 3rd house, there would be just one sequence

    That is : 2 -> 3 (house 2 to house 3)

    Example2:

    • i = 2
    • j = 7
    • output = 2 different sequences

    Explanation:

    As I am in 2nd house and I need to go to 7rd house.

    Sequence 1: ((2 +7/2)mod7) = 5.5

    Sequence 2: ((5.5 +7/2)mod7) = 1.5

    That is : 2 -> 5.5 -> 7 (house 2 to house 5.5 to house 7)

    Hence 2 sequences.

    Note: If someone can help me understand why the second example has two sequences only, I would be so grateful. Thinking naively, at least 3 different sequences are available (If I go from house 2 to house 7 using i+1).

    I gave all the information I have, unfortunately, I don't have more details or examples.

    Thank you so much in advance!

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

    C Opinion: Where to declare variables

    Posted: 01 Oct 2021 10:11 AM PDT

    Between the way I learned in school, work, and "Code Complete 2" there are three primary locations to declare variables, what is your opinion on how to do this ...

    1. At the top of functions

    int main() { int a; int b; int c; a = 5; ... b = a + 5; if(a < b) { .... c = 6; .... } ... a = a + b; ... return(0); } 

    2) At the beginning of code blocks

    int main() { int a; int b; a = 5; ... b = a + 5; if(a < b) { int c; .... c = 6; .... } ... a = a + b; ... return(0); } 

    3) Close to usage

    int main() { ... int a; a = 5; ... int b; b = a + 5; if(a < b) { .... int c; c = 6; .... } ... a = a + b; ... return(0); } 
    submitted by /u/wulfhalvor
    [link] [comments]

    How can I make an if else statement that checks if the average is 60 or above = (passed) else if = (failed).

    Posted: 01 Oct 2021 07:54 PM PDT

    #include <stdio.h>

    #include <cs50.h>

    const int TOTAL = 4;

    int main(void)

    {

    //For loop to input four numbers

    int array[TOTAL];

    for(int i = 0; i < TOTAL; i++)

    {

    array[i] = get_int("Scores: ");

    }

    //Adds the TOTAL then Divides it by four

    printf("Average %i\n", (array[0] + array[1] + array[2] + array[3]) / TOTAL);

    }

    submitted by /u/Vxbe-
    [link] [comments]

    Tools for logging information and errors from your applications, easily viewable with phone and notifications, etc.?

    Posted: 01 Oct 2021 12:17 PM PDT

    I maintain a few automation scripts that are constantly running, and wondering if there are any tools that I can use to log stuff if my program notices something wrong so I can fix it. You could just log it to the console but then you would have to ssh in all the time to check it. I know LOTS of people use a Discord server and just use a webhook for logging any warnings or errors that pop up, then that means its all viewable from your phone and you can get notifications, but this feels weird as it wasn't really designed for that purpose. Is there any such tools designed for exactly this?

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

    What exactly is Jooq?

    Posted: 01 Oct 2021 07:32 PM PDT

    Never understood what Jooq is and what its supposed to do. Can someone shed some light?

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

    Retrieve an old browser game files.

    Posted: 01 Oct 2021 01:05 PM PDT

    Hello!

    I'll get straight to the point, there's this game that I want to get the files from, it's a browser game, but the issue is that the game was discontinued in 2015 and when you try to see the source of the website, you can't see nothing, the code there is simply an image.

    Any suggestions on where and how to get the game's source code and files?

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

    What are some alternative to degree and bootcamp?

    Posted: 01 Oct 2021 07:03 PM PDT

    What are some alternative in getting qualifications to land on your first job as a self taught programmer?

    I don't want to take another four year degree course and bootcamps are quite expensive

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

    need help in testing my app on heroku

    Posted: 01 Oct 2021 12:41 PM PDT

    So i built a web app , that i wish to deploy on heroku for testing. My tech stack is node , express and mysql . I want to know if there are free hosting's available for mysql database that i could use and connect to my app on heroku ?

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

    Automatic compiling / running of tests on git push

    Posted: 01 Oct 2021 01:53 PM PDT

    At my previous job, whenever I pushed my code to git, the git server would compile my code and run my tests, and the results would be visible online.

    However, I don't know what was on that git server that handled all of that automatic compiling and running tests.

    Do you know what typical software is used to do this operation on the server? I forgot what we used, and I want to learn more about it.

    Edit: I found out gitlab has it's own CI.

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

    Link three lists with many to many relationship and visualise them (perhaps graph form)?

    Posted: 01 Oct 2021 09:32 AM PDT

    I could use some help here as I'm stuck in this problem for a while. Is there a tool that I can use to visually connect the items of three long lists based on my knowledge and can visualise what's connected to what in a dynamic way, some kind of cross filtering that when I click one item, shows all connected items in other lists? Please help! Where else can I get a solution to my quest if not here?

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

    Web development or Mobile App development, which is more in demand?

    Posted: 01 Oct 2021 07:46 AM PDT

    I am looking and gathering resources online to learn to programming and I am confused as to which path I should choose first.

    I am guessing that web development has more opportunities than mobile app development, but I want to know others' opinion on this.

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

    Need help with finding and extracting assets from a mobile game

    Posted: 01 Oct 2021 11:00 AM PDT

    I want to extract images from a mobile game (the art for buildings, decorations, maps, etc. in Cookie Run: Kingdom) but I'm not quite sure how to do that. I have the game files on my PC, but I'm uncertain on how to both discern the files and on how to extract the images from said files once I figure out which file is which. Could anyone help me with this?

    I don't know if this is the right subreddit, so let me know if I should repost this somewhere.

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

    How do you manage type definitions across languages?

    Posted: 01 Oct 2021 05:42 AM PDT

    I haven't thought about it until finding myself constantly trying to manually mapping Java type definitions to Typescript classes, to python objects, to Rust structs, etc, when several applications have shared entities. It's really hard to maintain.

    Is there something like a standard type definition in, as I imagine, the format of Json or XML specifications as a single source of truth?

    Or how do you handle it?

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

    Help with SDFlash!

    Posted: 01 Oct 2021 07:10 AM PDT

    I'm working SDFlash at my job and it's not recognizing the target. I beleive it's because I'm using a USB-->Parallel cable instead of just a normal Parallel cable. Is there a way to change this? Sorry if it's unclear, this is not what I was actually hired for lol

    This is where I got it from http://spectrumdigital.com/sdflash/

    submitted by /u/AOW-Zach
    [link] [comments]

    Is there a way to develop a cross-compatible app that works on apple and android smart watches?

    Posted: 01 Oct 2021 05:39 AM PDT

    I want to develop an app for all smart watches. But if there is nothing that provides this functionality, I will probably just start with the Apple Watch first.

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

    Find the time taken to run tasks

    Posted: 01 Oct 2021 04:34 AM PDT

    I am given an array, where the ith index represents the time taken by the ith task to run. I am also given an integer k, such that it is possible to run k tasks simultaneously. As soon as one task is done, we can begin processing the next task in line. The tasks have to be processed in order. Return the time taken to run the tasks.

    For example, it k=2 and tasks=[1,2,3,1], the total time taken would 4.

    How do I approach this problem? Let me know if the question isn't clear I will explain it further in the comments.

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

    Getting a "source not found" when debugging into a class in my java project on eclipse.

    Posted: 30 Sep 2021 11:16 PM PDT

    The project is able to find the .class file when I run the program normally, however when I attempt to step through the program and debug into a method in the MethodsToAnalyze_data.class file in eclipse I get the "source not found" message. I tried all the suggested fixes on this stackoverflow page but nothing has worked. I imported all the files in the project directly into the project folder on eclipse. Here's what the project looks like in eclipse, and here's what the project directory looks like in my file explorer, the class file that isn't being found by the debugger is highlighted.

    submitted by /u/14thCluelessbird
    [link] [comments]

    Updating headers of an Axios request object

    Posted: 01 Oct 2021 04:06 AM PDT

    Hi everyone, I'm stuck in a problem where I need to update the headers on an already initialized Axios client created with axios.create method. Initially, I set the authorization header when the app loads (both for logged-in and guest users) but when the user logs into his account I need to change the authorization header's value. Here is the code.

    import axios from "axios"; export const getAuthToken = () => localStorage.getItem("MY_AUTH_TOKEN"); export const getAuthBearer = () => `Bearer ${getAuthToken() || ""}`; export const apiClient = axios.create({ baseURL: "http://localhost:8000/api", headers: { "Content-Type": "application/json", Accept: "application/json", "Access-Control-Allow-origin": "*", Authorization: getAuthBearer() } }) 

    I know on which event I need to edit but don't know how to edit the Axios request client. 😥

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

    Javascript: How much better is it to use objects over nested arrays?

    Posted: 30 Sep 2021 10:23 PM PDT

    Besides the organized format objects offer over nested arrays, is there much of a difference?

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

    No comments:

    Post a Comment