• Breaking News

    Tuesday, January 26, 2021

    Is it wrong to have a Brainfuck interpreter in my Github which is on my résumé? Ask Programming

    AskProgramming

    Is it wrong to have a Brainfuck interpreter in my Github which is on my résumé? Ask Programming


    Is it wrong to have a Brainfuck interpreter in my Github which is on my résumé?

    Posted: 26 Jan 2021 06:36 PM PST

    I don't really have past work history in software development so all I have to show is stuff on my Github.

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

    Anyone here daily driving the new macbook M1?

    Posted: 26 Jan 2021 07:11 AM PST

    Any Software engineers/ Web developers daily driving a macbook M1? how is it? What are the tools you are using and are they compatible with it yet?

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

    How to update apps to 64 bit architecture on Mac?

    Posted: 26 Jan 2021 07:59 PM PST

    Hey all.

    I am not myself a programmer, but I've seen many of my favourite apps and games become broken as they haven't been updated to 64 bit. How does a developer update their app to 64 bit from 32 bit? If I were to have all the files and code for a specific app/game, would I be able to do this myself?

    Thanks in advance for your help, and any explanation that could suit my non-coder brain would be appreciated. :)

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

    Have you ever hired a company to do a security audit of your code? Like your actual source code? Black box or white box testing?

    Posted: 26 Jan 2021 03:33 PM PST

    Do these companies exist? Did you (or your employer) hire them? What were they like? Did they impress you?

    This certainly seems like a consultancy that should exist but I've never worked on a team that hired one, and when I search for one the space is so full of companies posting marketing drivel that it's hard to know if they can do anything besides show up, recommend you install Symantec Anti-virus tools and then bounce.

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

    Best tooling/testing strategy for testing and reporting the performance of an iOS mobile app?

    Posted: 26 Jan 2021 10:09 PM PST

    My team and I are building an iOS app (social media based) and we're wondering what is the best route/tooling to go about testing the client performance of our application and have a simple way of generating a report to share amongst the team. Things/Data we'd like to track:

    • CPU performance/usage while our app is running in sessions in the foreground and background
    • GPU performance/usage while our app is running in sessions the foreground and background
    • Memory performance/usage while our app is running in sessions the foreground and background
    • FPS while our app is running in the foreground
    • Battery usage per sessions
    • Battery temperature

    Others things we may possibly want to track would be how long it takes for various pages within our app to open via cold/warm start and things of that nature.

    Some tools we've found -

    Xcode's Instruments: I've looked into this a very small bit, and though it is a powerful tool for performance tracking, I don't know if it suites our needs as Instruments appears to be a more "on-demand" type of performance testing - Meaning it seems to be more of testing in real time to see where your app is spiking and then you can decipher more from there and root-cause, while what we need is to track the general overall performance of our app in various sessions and a way to report it (I didn't see a way to cleanly report data from instruments). But again I haven't dwelled too much into instruments yet.

    GameBench: This has exactly what we need as it's able to record all the needed data we want per various sessions and export the data into a clean, sharable report, but unforutnately GameBench requires a very expensive license.

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

    What is actually in a refresh token?

    Posted: 26 Jan 2021 09:59 PM PST

    Hey. I've been looking for this information for a while, but when I try searching I get a lot of noise. Hundreds of articles defining what the purpose of a refresh token is but almost no payload examples. What is it?

    I checked out my refresh token from AWS cognito, it appears to be a jwt token but jwt.io could not decipher it. I checked the okta documentation, their refresh token is a single hashed string. What does the refresh token actually need to be? Just a random octet stream that is associated with a user? Should this information also be stored/submitted as JWT? If so, should that JWT be signed as well?

    The example okta response here shows access and the other token are encoded JWT, but the refresh token is just some string. What information do I actually need to get my user a new access or id token?

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

    Small question: Is there a term for the kind of error that results when a certain doc, ppt, etc, is read by another software or machine and all the formatting has gone messed up?

    Posted: 26 Jan 2021 06:05 PM PST

    Like say, all the textbox and pictures shifted WAAY to the right than they were supposed to be. Or pictures changed sizes compared to other object on the page/slide. But then it looks fine on the software you made it on. Is there a term people use to that?

    Sorry if this is the wrong sub to ask.

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

    TV Price lookup tool

    Posted: 26 Jan 2021 01:58 PM PST

    Hi, I know close to nothing about programming and I will probably end up shopping this out to fiver if you folks think it's even plausible.

    I would like to develop a tool where you can type in a TV's model number and it will look up the price on 3 websites (Best Buy, Walmart, and BJs) and display them. Is this possible/practical to program? What languages would be needed?

    Thanks!

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

    Broke college student, has an app that has 20-30 users. Should I abandon ?

    Posted: 26 Jan 2021 09:19 PM PST

    This app is not going to get anywhere. It doesn't have a very good feedback loop because it's too genuine and made to help people. Unlike tiktok and Instagram, where tiktok literally gives you fake likes and views to trick u into a false sense of progress and then proceed to use the 10% interaction rule to continue propagating ur vid, all this to keep ppl hooked and pumping content. I'm broke. My goal is to get rich or get a 9-5. Sadly this is the state of most apps, it feeds on the worst part of human and takes advantage of addiction. If you want to survive or succeed this is essentially the bare minimum road map. My app doesn't do any of that shit and most apps like these eventually die. Should I abandon?

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

    JWT & Postman

    Posted: 26 Jan 2021 09:16 PM PST

    Hi everyone, I am learning JWT for a project that I must submit. I tested something using the VS Code plugin REST Client and it worked, but when I try the same using Postman (in the project they ask me to use Postman) it doesn't work.

    My code is the following:

    require("dotenv").config();const express = require("express");const app = express();const jwt = require("jsonwebtoken");const posts = [{username: "John",title: "Post 1",},{username: "Joe",title: "Post 2",},];app.use(express.json());app.get("/posts", authToken, (req, res) => {res.json(posts.filter((post) => post.username === req.user.name));});app.post("/login", (req, res) => {const username = req.body.username;const user = { name: username };const tokenAccess = jwt.sign(user, process.env.TOKEN);res.json({ tokenAccess: tokenAccess });});app.listen(4000);function authToken(req, res, next) {const authHeader = req.headers["authorization"];const token = authHeader && authHeader.split(" ")[1];if (token == null) return res.sendStatus(401);jwt.verify(token, process.env.TOKEN, (err, user) => {if (err) return res.sendStatus(403);req.user = user;next();});}

    In the .env file, I wrote:

    TOKEN='71e30f718719170cf4a727a9'

    TOKEN_REFRESH='b5010378bf2bd96c3000e48e'

    Using the REST Client plugin, I created a test.rest file:

    GET http://localhost:4000/postsAuthorization: Bearer XXXX

    ###

    POST http://localhost:4000/login

    Content-Type: application/json

    {"username": "John"}

    To try it, I send the POST request and I receive the token, which I put instead the XXXX space. Then I send the GET request and it works.

    But as I said, when I try the same on Postman, it doesn't work. I do receive the token when I send the POST request, but when I use it to send the GET request, I receive an empty array. Could you please give me the instructions to do it well? Thanks a lot!

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

    Luhn Algorithm Returning Flase with a Valid Credit Card Numbet

    Posted: 26 Jan 2021 09:01 PM PST

    Hi everyone, I'm still stuck on this problem after days of trying to fix it.

    Here are the instructions for this section of the code:

    1. Starting from the farthest digit to the right, AKA the check digit, iterate to the left.
    2. As you iterate to the left, every other digit is doubled (the check digit is not doubled). If the number is greater than 9
      after doubling, subtract 9
      from its value.
    3. Sum up all the digits in the credit card number.
    4. If the sum modulo 10
      is 0
      (if the sum divided by 10
      has a remainder of 0
      ) then the number is valid, otherwise, it's invalid.

    I've been logging to the console after each step so I know the calculations are correct, the correct digits are doubled and are not doubled etc but I can't figure out why the code is returning false when I enter a valid credit card number. I can see that [j] isn't declared the concat so I declared it before but that doesn't make a difference. I'd be so grateful for some help!!

    // All valid credit card numbers

    const valid1 = [4, 5, 3, 9, 6, 7, 7, 9, 0, 8, 0, 1, 6, 8, 0, 8];

    const valid2 = [5, 5, 3, 5, 7, 6, 6, 7, 6, 8, 7, 5, 1, 4, 3, 9];

    const valid3 = [3, 7, 1, 6, 1, 2, 0, 1, 9, 9, 8, 5, 2, 3, 6];

    const valid4 = [6, 0, 1, 1, 1, 4, 4, 3, 4, 0, 6, 8, 2, 9, 0, 5];

    const valid5 = [4, 5, 3, 9, 4, 0, 4, 9, 6, 7, 8, 6, 9, 6, 6, 6];

    // All invalid credit card numbers

    const invalid1 = [4, 5, 3, 2, 7, 7, 8, 7, 7, 1, 0, 9, 1, 7, 9, 5];

    const invalid2 = [5, 7, 9, 5, 5, 9, 3, 3, 9, 2, 1, 3, 4, 6, 4, 3];

    const invalid3 = [3, 7, 5, 7, 9, 6, 0, 8, 4, 4, 5, 9, 9, 1, 4];

    const invalid4 = [6, 0, 1, 1, 1, 2, 7, 9, 6, 1, 7, 7, 7, 9, 3, 5];

    const invalid5 = [5, 3, 8, 2, 0, 1, 9, 7, 7, 2, 8, 8, 3, 8, 5, 4];

    // Can be either valid or invalid

    const mystery1 = [3, 4, 4, 8, 0, 1, 9, 6, 8, 3, 0, 5, 4, 1, 4];

    const mystery2 = [5, 4, 6, 6, 1, 0, 0, 8, 6, 1, 6, 2, 0, 2, 3, 9];

    const mystery3 = [6, 0, 1, 1, 3, 7, 7, 0, 2, 0, 9, 6, 2, 6, 5, 6, 2, 0, 3];

    const mystery4 = [4, 9, 2, 9, 8, 7, 7, 1, 6, 9, 2, 1, 7, 0, 9, 3];

    const mystery5 = [4, 9, 1, 3, 5, 4, 0, 4, 6, 3, 0, 7, 2, 5, 2, 3];

    // An array of all the arrays above

    const batch = [valid1, valid2, valid3, valid4, valid5, invalid1, invalid2, invalid3, invalid4, invalid5, mystery1, mystery2, mystery3, mystery4, mystery5];

    // Add your functions below:

    const validateCred = array => {

    newArray =[]

    for (var i = array.length - 2; i >= 0; i -= 2)

    {

    let doubleValue = array[i] * 2

    if (doubleValue > 9) {

    doubleValue -= 9;

    } newArray.push(doubleValue)

    }

    let combined =[].concat(newArray, array[j]);

    for (var j = array.length - 1; j >= 0; j -=2)

    {

    if (combined.reduce((prv, cur) => prv + cur) % 10 === 0) {

    return true;

    } else {

    return false;

    }

    }

    }

    console.log(validateCred(valid1))

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

    Help me im stuck C

    Posted: 26 Jan 2021 08:35 PM PST

    Hi im developing simple well not simple enough for me,program where u have students and admin,and admin can well do bunch of stuff,like delete,modfy,make new user etc etc,while student so far can only log in and nothing else.The problem is once I run my code,non of my admin options work,while they did work before i made login method.When i select in admin menu for example 2 option or doenst metter which one it loads for few seconds and this msg pops out of command line Process returned -1073741819 (0xC0000005) execution time : 10.539 s.

    P.S. email and password for admin are [admin@gmail.com](mailto:admin@gmail.com) admin123

    code link : https://pastebin.pl/view/cb243cbe

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

    What are the pros and cons of container technology?

    Posted: 25 Jan 2021 11:57 PM PST

    What are the pros and cons of using containers for development projects (e.g. docker)? We're developing a way that easily allows you to dockerize your projects and set up your development environment and would love the community's input on the pros and cons of containers

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

    C++ Class MultiDimensional Array Help

    Posted: 26 Jan 2021 04:21 PM PST

    C++ Class with Multidimensional Array help

    Hello guys. So I took an intro to c++ my freshman year and learned barely anything, and now 3 years later a class is finally being requiring me to use the skill that I never mastered.

    So for the first assignment I have to have the user input a matrix, and then choose whether the user wants to transpose it, reflect it, add or multiply with another matrix. So far, I have only gotten the inputting to work. I plan to have all of the operations in a separate header/implementation file, and that is where I am getting confused. I haven't written the actual functions yet so i am just having the functions return a random number just to test out whether the class portion is working.

    so here is my header file:

    #ifndef MATRIXOPERATIONS_H_
    #define MATRIXOPERATIONS_H_
    class MatrixOperations
    {
    public:
    double MatrixMult(double matrix[][100], double matrix2[][100]);
    double MatrixTranspose(double matrix[100][100]);
    double MatrixAdd(double matrix[][100], double matrix2[][100]);
    double MatrixReflect(double matrix[][100]);
    };

    No comments:

    Post a Comment