• Breaking News

    Wednesday, June 24, 2020

    I am making a bank program in java, I'm trying to generate unique bank account numbers Ask Programming

    I am making a bank program in java, I'm trying to generate unique bank account numbers Ask Programming


    I am making a bank program in java, I'm trying to generate unique bank account numbers

    Posted: 24 Jun 2020 02:30 PM PDT

    So I'm doing homework for a class and I have to make a banking system where you can sign up and make an account. However I have difficulty trying to create an account number that wont repeat itself. Can anyone help me with this please?

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

    Is Hackerrank good for a resume?

    Posted: 24 Jun 2020 10:04 PM PDT

    I don't have a lot of job experience (or any) to put on my resume and it looks very barren so i'm looking for things to fluff it up. I'm working through the java challenges right now but don't know when/if this becomes something I can show off to recruiters.

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

    Should I keep learning c# or try out python

    Posted: 24 Jun 2020 04:09 AM PDT

    Hi,so I'm a high school student and have been dabbling in some Unity c# game development for some time.I've stopped programming for about a month and want to try getting back into it.I've hit a roadblock in c# where I'm starting not to understand some concepts and I think it might have something to do with me starting off in Unity(the tutorials generally tell us to ignore some sections of c# as it isn't used in game development)Should I relearn c# from the basics or should I try learning another language like python?I'm not intending to dive back into game dev soon so compatibility with game engines isn't important.Do you guys have any opinions on the matter?

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

    Video Lectures for Functional Programming in PHP

    Posted: 24 Jun 2020 09:40 PM PDT

    What are the best video lectures to learn functional programming in PHP.

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

    As a CS major, is knowledge of web dev important/required?

    Posted: 24 Jun 2020 09:13 PM PDT

    Im a high school senior about to go into college as a CS major. I'm not interested in web dev at all, I just took the CS50 course and tried out the web dev track just to check it out. I hate it. However, I'm unsure whether I should just quit it or continue doing it so I can learn the skills for college. They may be required to make a website for a startup I might make, my website resumè, etc.

    What I'm really interested in is taking the CS50 AI with Python course. So I'm wondering, is the web dev knowledge(the course covers basics of HTML/CSS/JS/Flask) worth a few weeks time investment or can I just jump right in to the other course?

    Note: I do know I'll be making an app sometime or the other in my career for a startup I wanna try and I know web dev -> app dev is the appropriate flow so I'm also considering continuing learning for that reason.

    I'd like a lot of perspectives so I can kind of average them out and make a decision.

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

    Website template for project showcase?

    Posted: 24 Jun 2020 08:42 PM PDT

    I want to host a static website through github pages showcasing all my projects. Only, I suck at web design. Does anyone know of a slick template I can use?

    I want to be able to have a grid/list of projects, with screenshots, descriptions, a link to the project github, etc.

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

    Eclipse Error: The selection cannot be launched, and there are no recent launches

    Posted: 24 Jun 2020 08:29 PM PDT

    I have been searching everywhere for help on this error, but I cannot figure out how to resolve this issue. From what I've seen on Stack Overflow, I am supposed to click on the Run Configurations link on the drop down menu, but I have no idea what I'm supposed to do once I reach that menu.

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

    Npm shortid

    Posted: 24 Jun 2020 06:46 PM PDT

    How does it always generate unique ids? Are they truly unique?

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

    How do I get permission to create directories and files in root for WSL2?

    Posted: 24 Jun 2020 05:47 PM PDT

    As a quick preface, I've been using MacOS for the past decade-ish, so just assume that I know absolutely nothing about Windows.

    I recently got a Windows computer and have set up WSL2. So far, everything's been going smooth and the transition was fairly seamless so far. However, I've hit a hiccup. After doing much research, apparently, it's much better to store files within WSL itself, rather than on, say, my C drive. Thus, I went ahead and ran a cd /, which took me to the root directory, whose contents look exactly the same as the contents over on wsl$ in the file explorer (opened with explorer.exe). With that said, my assumption is cd / takes me to where WSL2 is located in my system (please correct me if I'm wrong).

    Now, my issue is that I am unable to create files or directories within this location. For instance, I tried to run a mkdir my-projects, which is the directory where I usually pull projects off from GitHub and create my own projects and whatnot, and it resulted in this message:

    mkdir: cannot create directory `my-projects`: Permission denied

    So, I tried to manually create one via the file explorer, and this is the message I got:

    ``` Destination Folder Access Denied

    You need permission to perform this action

    Ubuntu-20.04 ```

    Have I got this all wrong? I just want to use WSL2 as optimally as I can, but it won't play along with me :(

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

    When you come back to a tab where a video was left on pause for a long while, it usually cannot resume playing despite it having buffered the rest earlier. Is this due to a socket timeout or some other issue with the video player?

    Posted: 24 Jun 2020 04:58 AM PDT

    Inspired by my frequent leaving of tabs whilst watching a tv show then coming back to it much later and having to refresh the page to continue watching.

    My intitial thought was a socket timeout, the timer for which is started when no data is being sent (otherwise it would simply timeout on very long videos). How does the video player know when to start the timeout timer? - does it start it when you 'leave' the page or is there something else?

    Edit: quite confusingly, the same online video player that triggered me to ask this question just played like normal after I left it closed for 5+ hours lol

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

    Empty NodeList

    Posted: 24 Jun 2020 05:14 PM PDT

    Object.values(respuestaJSON.rates).forEach ( (valor) => {
    const valores = document.createElement("th")
    valores.textContent = [valor]
    valores.classList.add("valores")
    console.log(valores)
    })
    const probando = document.querySelectorAll(".valores")
    console.log(probando)

    When I do the console.log (probando) it returns an empty NodeList. I can't figure out where the error is. It should return all the elements class = "valores". Any help?

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

    How do I get permission to create directories/files in "/" (root) in WSL2?

    Posted: 24 Jun 2020 05:13 PM PDT

    As a quick preface, I've been using MacOS for the past decade-ish, so just assume that I know absolutely nothing about Windows.

    I recently got a Windows computer and have set up WSL2. So far, everything's been going smooth and the transition was fairly seamless so far. However, I've hit a hiccup. After doing much research, apparently, it's much better to store files within WSL itself, rather than on, say, my C drive. Thus, I went ahead and ran a cd /, which took me to the root directory, whose contents look exactly the same as the contents over on wsl$ in the file explorer (opened with explorer.exe). With that said, my assumption is cd / takes me to where WSL2 is located in my system (please correct me if I'm wrong).

    Now, my issue is that I am unable to create files or directories within this location. For instance, I tried to run a mkdir my-projects, which is the directory where I usually pull projects off from GitHub and create my own projects and whatnot, and it resulted in this message:

    mkdir: cannot create directory `my-projects`: Permission denied

    So, I tried to manually create one via the file explorer, and this is the message I got:

    ``` Destination Folder Access Denied

    You need permission to perform this action

    Ubuntu-20.04 ```

    Have I got this all wrong? I just want to use WSL2 as optimally as I can, but it won't play along with me :(

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

    How to Parse Tables from .html files

    Posted: 24 Jun 2020 04:40 PM PDT

    I'm working a cleanup project and I have lots of reports that were delivered as .html files, each report is the result of an audit performed by Belarc Advisor and lists the installed software on a desktop pc in multiple tables. I need to inventory the licenses installed in each which is in a table in the output. I have to pull from these html files as that is all I have and all I'm getting. I was gonna use beautiful soup to parse the data but I'm not sure how to use with a html file as the source and not a url. I've never used it before. Is there a html parser that can work on files saved to my pc when there is no url (I have no idea why reports were saved as html files). Do I have to cover these to xml? There are a couple hundred and I need it all in a spreadsheet at the end. Thanks.

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

    Is there a industry standard way to store images in a data structure in C/C++?

    Posted: 24 Jun 2020 02:48 AM PDT

    Hello, I'm trying to plan out an app that requires manipulation of images within C++. Before starting to do so, I want to ask is there a industry standard way to store images, because I always thought of images as 2d arrays of pixels, if not are there any libraries you recommend which would hold such data efficiently?

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

    Please give me app ideas...

    Posted: 23 Jun 2020 10:30 PM PDT

    I am learning Android Development. Some apps I've made so far are:

    Hello World

    Simple Calculator

    Geometry Calculatory (perimeter, are, volume of 2d and 3d shapes yada yada)

    However, I'm not very creative, and want some challenging ideas to make an android app

    (a fully functioning Android app, not just some java code) so please don't point me to sites like HackerRank.

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

    Good link to learn regex expressions?

    Posted: 24 Jun 2020 03:12 PM PDT

    I'm learning Java/Python and searching up regex expressions just isn't cutting it for me, I dont get the syntax. Maybe my googling skills are weak. Where is a good place to learn regex exp?

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

    how do i get javascript?

    Posted: 24 Jun 2020 02:44 PM PDT

    so i want to learn and use javascript for windows 10.

    but i can't find anything that's good and free.

    any suggestions?

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

    How do I enable my language to allow a program to be written on multiple lines?

    Posted: 24 Jun 2020 06:58 AM PDT

    I'm currently writing a language in Haskell, https://github.com/EdONeill1/HENRYGCL, and I'm having trouble in figuring out how to allow for a program to be written on multiple lines. Take the following loop that adds 1 onto x until it reaches 10.

    Henry > x := 1

    Henry > ;Do <x<10>-> x := <x+1> Od

    I would like the second line to be in the form of:

    ;Do <x<10>->

    x := <x+1>

    Od

    I'm unsure in how to carry out this. Any help would appreciated !

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

    Old-school Php/CodeIgniter/jQuery guy looking to go newschool without going full Angular

    Posted: 24 Jun 2020 02:21 PM PDT

    A few months ago I took over an application written in Node/Angular/Nest even though I have never worked with Angular or TypeScript and it has been a nightmare. The function of this single-page-application is to serve as a rapid development test-bed to fill in gaps in our core product. I inherited it half finished with no documentation or prior experience with Node, TypeScript, Angular, Nest, GraphQL, or any of the dozens of node modules they rely on. I am the sole person on this project and own it from ideation and design to development, deployment, and support.

    I have done Udemy courses on Node and TypeScript and have been preparing to do one on Angular and Nest, but that this point I run into so many bugs that I have spent more time trying to understand the application than I would have simply rewriting it. Probably by an order of magnitude.

    Today I let my boss know that I'm done with this and I'm going to rewrite the application from scratch using what I know, and I what I know is php and javascript (front end JS, I've never worked with Node before this).

    All the application does is:

    • Login is handled via SSO using cookies/JWT. All I really do is make an API call to get a JSON object and that object returns who the user is and what projects they have access to.
    • A list of reports is shown and you can edit/create/delete reports based on the projects you have access to. Reports are stored in MariaDB with some meta data like who owns them as well as a JSON object that defines the report parameters.
    • Reports are then saved back to the DB and/or the JSON is sent to an Amazon SQS queue to be processed by a Spark process I don't manage.
    • Once the reports have been processed and are saved back to MariaDb they are able to be viewed in a simple table.

    That's it. Super simple single page application.

    I am currently trying to determine if using CodeIgniter is the right move or if I should try to use something written in Node/TypeScript. I like what I've learned of Node and TypeScript so far, but the application as I inherited it is over-engineered and acts more as an academic exercise than a practical testbed for rapid iteration and deployment. It's just me, not an entire team. So spending the time writing custom types and interfaces is just a waste of time. What I need is really just an easy-to-understand framework with a task runner that at the very least handles routing and includes an ORM.

    Ideally what I'd like is CodeIgniter written in Node/TypeScript, but that seems like a very specific and niche request.

    My main goal here is to be effective and able to rapidly iterate. Secondary to that though, I'd like to take advantage of a more modern language or framework without having to relearn everything I know. I get that Angular is awesome, but it's too much for me to learn while also being effective.

    What I'm asking is: If any of you have wisdom to share, please do.

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

    Reduce if / else statement

    Posted: 24 Jun 2020 07:32 AM PDT

    How reduce if / else statement with AND / OR ?

     if ((!LOCAL && ((ON && !OFF) || (!ON && OFF)))) { return 'danger'; } else if (LOCAL && !(ON || OFF)) { return 'info'; } else if (LOCAL || ON || OFF) { return 'warning'; } else { return 'default'; } 
    submitted by /u/hanyska
    [link] [comments]

    I have a serious question about something that is really bothers me. Why does the whole industry tote the glories of Java as the language of choice so much everyone converts to it. Then they all radically switch up and call it Python is the new norm? What exactly is going on here?

    Posted: 24 Jun 2020 01:20 PM PDT

    The reason I ask is I disagreed to begin with the idea of switching from conventional to proprietary, third party, potentially breathable unknowns. But what do you do?

    People massively bandwagoned, flocked and through time they worked it out. Now Java is mainstream. So they change it. This seems unstable, dangerous, concerning, and wrong. You cannot build a via mainstream corporate engine like that.

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

    Looking to create a chat bot that interacts with an excel spreadsheet -- is this possible?

    Posted: 24 Jun 2020 12:56 PM PDT

    Hello!

    I've had this idea for a while to construct my own budgeting/personal finance spreadsheet, and one of the main components would be tracking income/expenses as they happen. One method I've considered is creating or installing some sort of chat bot that reacts to commands entered by me. For example, spending at the grocery store would be something along the lines of:

    !out 20.55 GroceryStore Groceries MasterCard Date

    The bot would capture each portion of the expenditure (!out, as opposed to !in) as Amount, Payee, Category, Account, Date in that order and add the entry to a row in an Excel spreadsheet.

    Is something like this feasible? My first thought was using Slack, but really anything could work if it supports bots -- Discord & Telegram are other options.

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

    What's the best terminal for Windows?

    Posted: 24 Jun 2020 12:12 PM PDT

    So, I just switched over from Mac to Windows, and I've got WSL going. Back when I used a Mac, I used to use a program called "iTerm2", which was a godsend of a terminal to use. I'm wondering what the best terminal that I can download for Windows is. I found Hyper, but just randomly by chance. I don't know if it's the best, but it seems pretty cool.

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

    Facebook API: How to get names of commenters on video?

    Posted: 24 Jun 2020 07:45 AM PDT

    Hoping that someone here might be familiar with the Facebook API.

    I use the /comments edge to retrieve comments on the live video on my page. I display this in my broadcast software so I can read comments while I'm doing my broadcast.

    https://graph.facebook.com/v7.0/$video_id/comments?access_token=$access_token&appsecret_proof=$appsecret_proof

    This works, but only contains names when I or my page wrote the comment. If a viewer wrote the comment, it's just the comment with no name.

    The video is public (i.e. any logged-in Facebook user can see the names of commenters on the web) and I am an admin on the page.

    I have tried to use live_filter=no_filter and filter=stream which did not change the symptoms.

    Any suggestions for how to attach names to comments would be appreciated.

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

    If i dont use THROW in C++, then ALL my functions must be NOEXCEPT???

    Posted: 24 Jun 2020 12:00 AM PDT

    I really need mark ALL my functions noexcept?? Or may be if i use NEW in function then i cant ensure, that memory will be allocated

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

    No comments:

    Post a Comment