• Breaking News

    Sunday, December 26, 2021

    Regarding to OAuth identifying user Ask Programming

    Regarding to OAuth identifying user Ask Programming


    Regarding to OAuth identifying user

    Posted: 26 Dec 2021 05:44 AM PST

    I'm learning OAuth and user identifying but the resources on the web don't answer all my questions.

    Let's say I have this situation: I'm developing a simple todo app with facebook login. The flow goes as follows with these roles:

    todo-app-ui (browser application) todo-app-server (server side, api) facebook-api

    1. User logs in using facebook login and todo-app-ui gets the 'code'.
    2. todo-app-ui gives the 'code' to todo-app-server
    3. using the code, todo-app-server retrieves the access token from facebook-api.
    4. I assume I need a DB for users to link todo items to their users. I use facebook-api using the access token to get let's say this user data:

    { user_id, name, email }

    Now I don't get what data I should store to the DB? I could store the email as a primary key. But what if the user changes the email of its facebook account? Then I couldn't identify the same user anymore right?

    Another option is to identify the user by the user_id. But what if facebook returns coincidentally same user_id for user x that google api returns for user y?

    I have no idea how this is usually being done.

    submitted by /u/another-bite
    [link] [comments]

    From mac/linux dev env to a windows dev env?

    Posted: 26 Dec 2021 08:07 AM PST

    I am a (web) full stack developer. For many years my dev machines where either running macOS or some Linux distro. At my new job I have to use a Windows machine.

    For programming languages there are migration guides like JS for Java developers.

    Is there something similar for migrating from a Linux to a Windows development environment.

    I guess the most important things are the same like browsers and IDEs. I also know that there is a Linux Subsystem for Windows...

    Are there more things to know that help to ease the transition?

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

    I want to make a gallery like this video but I am not sure If I can

    Posted: 26 Dec 2021 07:39 AM PST

    Hi ! I don't know if this is the good place to ask XD I am an artist and I am trying to make a portfolio page on my website ! I would like to make a gallery like this video : https://www.youtube.com/watch?v=dkLpo4shS6c&t=66s

    The thing is that I am using Bigcartel but they sadly don't host images and javascripts files. I have to use another host like dropbox etc.

    I really like his version of a gallery because it is interactive. So I was wondering if it is possible to use this with pictures and scripts hosted somewhere else like dropbox ?

    Thank you ! :D

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

    What is difference between run-time polymorphism and compile time polymorphism

    Posted: 25 Dec 2021 04:59 PM PST

    Although the words, are self explanatory, still I am looking for deep answer....

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

    How does one avoid over-engineering a project (without a project manager or similar)?

    Posted: 25 Dec 2021 06:31 PM PST

    Gotta say, a part of me kind of misses my early days of programming, when everything I wrote was a buggy, unmaintainable, spaghetti mess of code and duct tape. Despite being absolutely terrible to look at, I still somehow managed to get stuff done.

    Nowadays, I find myself spending weeks or sometimes months just picking a good set of tools or frameworks, or forking a project into yet another library for later reuse, or refactoring the same few files of code to a shiny polish, only to realize it's been 6 weeks and I have literally nothing to show for it. I always find myself thinking of a cleaner way to do something and I spend all my time redoing the same pieces of code to be the absolute best they could be.

    How do you avoid this type of thing without some kind of project manager looking over your shoulder? (Mostly because I've only ever worked as an hobbyist so I've never worked in a team or had supervision or similar)

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

    How can I start making a site-based database like WhoSampled?

    Posted: 25 Dec 2021 03:48 PM PST

    Hello! Sorry for the long post but here's some context:
    I am in a Discord group with about four hundred people and we collect some kind of information about video game songs samples and store it as much as we can in a few separate Excel files.

    I considered that this was not very effective in the long term and together with other members we finished a draft for a database schematic to take care of all the discoveries.

    We thought it was an excellent idea to try to show everything we found on a website similar to WhoSampled to show it to people, so the only thing left would be to get someone to do the user interface / purchase the domain / hosting / etc.

    One of my plans was to make a Office Access file to experiment before paying a professional to handle, but I also thought that since I live in Argentina it would be hard to contact a web developer for such kind of task.

    Sorry about my ignorance I don't really know about programming (only know how to read and use C# / Python code). I really want to make steps forward with this project for the sake of videogame history preservation but I don't know where to start! Any advice will is appreciated.

    TL;DR: I have designed the schematics for a database, how can I make a site like WhoSampled from it?

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

    Calling a super() in an init function?

    Posted: 25 Dec 2021 04:49 PM PST

    I'm reading code for a CNN using PyTorch and they do something like:

    class CNN(nn.Module):
    . def __init__(self):
    . . super(CNN, self).__init__()

    What does Line 3 do? Is it just calling the init function of itself or the init function of the nn.Module? In either case, what does that do?

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

    Can I create wallet for my user using Stripe/Stripe Connect?

    Posted: 25 Dec 2021 09:20 PM PST

    currently working on my project to develop e wallet app. where the user could top-up their wallet, send money to other wallet, and pay merchants. If there any possible way, could anyone direct me to the direction? thnx

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

    Backend for Flutter Apps

    Posted: 25 Dec 2021 08:25 PM PST

    Django vs NodeJS, which one do you prefer for Flutter apps? and why?

    submitted by /u/Direct-Guide-9435
    [link] [comments]

    Need help with pointers and segmentation error in C

    Posted: 25 Dec 2021 07:52 PM PST

    Hi guys, I've watched so many array of struct vids and tried so many different things to no avail. Hoping someone can help me here.

    I am trying to add lines from a file to the array of struct Book(bookList) which is within the struct Library.

    Problems:

    1. I am not sure if I am passing in the right argument when I call the function readBooks in the Init func part below.

    2. Segmentation core dumped error due to the fgets line.

    structs:

    typedef struct _book { char title[40]; char author[40]; int available; } Book; typedef struct _library { Book *bookList; int numBooks; int maxBooks; } Library; 

    Init function:

    void initLibrary( char *bookFile, Library *theLibrary ) { theLibrary->maxBooks = 12; theLibrary->maxBorrowed = 4; FILE *file; file = fopen("books.txt","r"); if (file == NULL){ printf("Error\nBook file does not exist: %s\n",bookFile); exit(0); } readBooks(file, bookList); fclose(file); return; } 

    adding to list of available books func:

    int readBooks( FILE *books, Book *bookList ) { int numBooks = 0; while (!feof(books)){ fgets(bookList[numBooks].title, 40,books); fgets(bookList[numBooks].author, 40,books); numBooks += 1 } return numBooks; } 
    submitted by /u/sedistic
    [link] [comments]

    Security Concerns?

    Posted: 25 Dec 2021 03:38 PM PST

    Creating an app where people can query football stats by compounding increasingly constraining conditions in a madlibs type of way. For example, a person could first add that they want to search for a player, and select their name from a drop down, and further say they want to know how this player has played in all games against a certain team, when coming off of a win. All these conditions would then be translated to an SQL query, which will then be executed on the backend.

    I feel like this might be dangerous? I'm only allowing SELECT conditions to take place, so there's no manipulation, but letting a user practically build queries, even if only restricted to the options given through dropdown menus, still feels sketchy. Any thoughts?

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

    Help with learning Java on my own before my semester starts soon

    Posted: 25 Dec 2021 07:16 PM PST

    Hi everyone,

    im starting a new semester at my college soon, and i wanted to have enough time to do all the preparation work before it starts so i can follow along and hopefully be a step ahead in some lectures. Situation is that my Java professor has a steep learning curve with his curriculum and is proud of his +90% of failing students as a proof of him not letting anyone to cheat his way through or to easily pass his "intro" to Java course he's teaching. I've heard multiple stories from former students who either passed (after going through his class at least two times) him or failed his class, that he is hard and by that they mean hard! Im not letting fear of him do any toll on me, but the reality is that if i don't prepare myself in advance, I'll have trouble with passing his class.

    I've been browsing this sub and looking for tips and i found that doing mooc fi java course from Finish university is a good starting point. A lot of people said that going through that course helped them a lot with both learning programming and learning Java. I will start with this course and hopefully learn a good enough amount of theory before starting my own class in almost two months, as my semester starts around mid-to-end of February. Consistency in learning is the key factor, so i don't find that 2-month period to be small for me to learn enough. My college Java class is mostly project based as we are building an app throughout the semester, but we have both weekly assignments to turn in before the next lecture and on top of that after each lecture we have a mini exam based on our assignment that we had to turn in before. Main problem is the time during the semester as i have other classes and must really focus as much as possible on Java to pass it relatively "easily", so that's why i want to start as soon as possible with learning it on my own.

    I would like to know if any of you have any recommendations on some other learning material for a complete noob, some sort of video tutorials that are better than mooc fi java course or that would be good for me to watch as a suplement to mooc fi's course? Any tips whatsoever, i would appreciate it so much. Sorry for the long post :(

    Thank you!!

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

    Finding images that scale down overtime using pyautogui

    Posted: 25 Dec 2021 06:54 PM PST

    I am trying to write a script for the HumanBenchMark visual Memory test. I am using the

    list(pyautogui.locateAllOnScreen('White Square.png', confidence = .99)) 

    to find all the white squares. However, My issue is that the squares turn smaller as you progress. How can I make it so pyautogui.locateAllOnScreen is able to detect the images that are also just a scaled-down version?

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

    No comments:

    Post a Comment