• Breaking News

    Sunday, May 2, 2021

    Probably dumb question but why do places use windows and have a VM of Linux instead of having Linux os the primary OS? Ask Programming

    Probably dumb question but why do places use windows and have a VM of Linux instead of having Linux os the primary OS? Ask Programming


    Probably dumb question but why do places use windows and have a VM of Linux instead of having Linux os the primary OS?

    Posted: 02 May 2021 12:36 PM PDT

    Is it just to use some Microsoft products?

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

    Which (FREE/CHEAP) Certificate Courses Would You Recommend?

    Posted: 02 May 2021 07:49 PM PDT

    TL;DR: Recommend cheap/free courses that you've found to be useful in landing a job, furthering education, etc. for the boys (and birds) to see and hopefully develop themselves professionally! Paid certificates are interesting also, but please, label them - if so!

    I'll throw some out first - same courses I note in my story:

    • Coursera: Cyber Security (Single FREE Coursera course provided with student status/yr.)
    • Udemy: Practical Ethical Hacking - The Complete Course (The one by zSecurity - PAID, BUT I did find this course on a certain website that provides free coupons for online courses)
    • Udemy: Learn DevOps: Complete Guide to Kubernetes (PAID, BUT same situation as above)
    • DataCamp: Career Paths (PAID, FREE 3-months with GitHub Student Dev Pack)
    • Stanford: Stanford Online Bootcamps/Certificate Courses (PAID, and not cheap. I didn't complete these, instead, I opted for some certificates offered via Harvard. My university is affiliated with HU and offers discounts for some. I'm sure that these are HQ.)

    Took a leave from uni due to COVID preventing everyone I know, myself included, from learning anything at all. Not worth the tuition. I was planning to return right as COVID wound down or schools learned how to better handle distance-learning. Now, I'm not sure. With an already relatively extensive set of skills when it comes to programming, Linux/CLI-work, and a pretty good understanding of vulnerabilities, exploits, etc. - both on OS and applications, just given my age and education level... I completed some Coursera/Udemy certs in cybersec and "ethical hacking", made use of GH Student Dev Pack and banged out the Data Engineer career pathway on DataCamp, and have one AWS cert. Working on another. So I just finished the final course out of that list three months ago, maybe? Built a portfolio site integrated w/ cloud services and connected it to my GH/LinkedIn. CRAZY how quickly I was getting offers. Today, I just made my first paycheck. Almost $8k?!?! Lol, tech can be ridiculously simple to get into if you're actually passionate and have a decent brain. Now you can see why I may not return!

    Anyways, given my experience, I've realized just how helpful these credentials prove to be. Professionally AND personally. I've even taken some business/investment courses on the side in hopes of investing in real estate soon. I was wondering if any of you had any credential courses/courses w/o creds even🤷‍♂️ that have proven useful. Professionally, primarily - but any ideas are welcomed!

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

    Can you help me understand what my professor is asking for in this assignment, please?

    Posted: 02 May 2021 12:11 PM PDT

    Hey y'all. First, I've attended Office Hours and written multiple emails and my teacher has not provided any helpful information that would help me understand what they are looking for. This is a Discrete Mathematics course, but there is supposed to be an emphasis on Computer Science. Unfortunately, this is one of the only truly CS topics we've covered and the professor is being frustratingly opaque. Can you help me understand what they are looking for?:

    1. Select a subset of the Basic programming language. Write the regular expressions for the lexical analysis of the language. Explain.
    2. Using the same subset of the Basic programming language, draw a FSM diagram for the lexical analysis of the language. Explain.

    So far, I've gathered these notes from various resources on the web (yes, my professor has zero original materials for this, not even lectures), which may or may not help you at all:

    """Recall that Σ∗ is the set of all strings that can be formed over alphabet Σ. Then, we can see that a language is a subset of Σ∗."""

    """Languages are sets, so we can apply all the usual set operations (e.g. union and intersection)."""

    """BASIC originally used numbers at the beginning of each instruction (or line) to tell the computer what order to process the instructions. Lines would be numbered as 10, 20, 30, etc., which would allow additional instructions to be placed between commands later on if needed. "GOTO" statements enabled programs to loop back to earlier instructions during execution. For example, line 230 of a BASIC program may have an "if" clause that tells the computer to jump back to line 50 if a variable is less than 10. This instruction might look something like this:

    230 IF (N < 10) THEN GOTO 50"""

    "You can force your regular expression to match a whole line by putting "^" (start of line) before the regular expression, and "$" (end of line) after it. For example, "^a+$" only matches lines that have nothing but "a"s on them."

    """letter = [a – z] or [A – Z]

    digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 or [0-9]

    sign = [ + | - ]"""

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

    Git workflows without Github

    Posted: 02 May 2021 02:34 PM PDT

    git was created for Linux kernel development, which uses a mailing list driven development cycle where patches are posted. Github simplifies this greatly but essentially removes the distributed nature of git and centralizes it.

    Dealing with a mailing list for actually posting / importing code seems tedious, but I haven't actually done it. I can see the benefits of mailing lists for communication, especially now as many more companies are allowing developers to stay remote, and in person meetings are becoming more and more rare.

    My questions are:

    1.) What are your experiences with mailing list based workflows? How does it compare to Github/Gitlab/Bitbucket?

    2.) What tools do you use?

    3.) Any other alternatives to Github/Gitlab/Bitbucket/etc based workflows?

    Some links that led me to these questions: https://begriffs.com/posts/2018-06-05-mailing-list-vs-github.html https://lwn.net/Articles/702177/ https://blog.ffwll.ch/2017/08/github-why-cant-host-the-kernel.html https://drewdevault.com/2018/07/02/Email-driven-git.html

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

    Is Kotlin something more that just syntax shugar for Java ?

    Posted: 02 May 2021 03:03 PM PDT

    Best way to show my personal projects (desktop app, websites, mobile apps) on my portfolio besides screenshots?

    Posted: 02 May 2021 08:57 PM PDT

    I'm in the process of applying to jobs but I want to create a portfolio to show some of my personal projects. They are all on git, but is there a way to make it interactive so that they can stay on the webpage but be able to interact with the apps as if they have it downloaded?

    Not sure if what I'm asking is impossible since I have a variety of projects that I've been working on. Any insight on this would be great!

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

    Can anything about Google's SEO algorithms be identified from the inspect element feature that opens developer tools and shows you the javascript, etc.

    Posted: 02 May 2021 09:10 AM PDT

    I don't know the first thing about programming, but I know you can "inspect element" on a page and it will show you javascript, html, and some other stuff that I don't understand.

    If you type in something on google and inspect the elements of the results, can a smart programmer figure out anything about how google algorithms are working to return top results?

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

    Can you understand this question my C++ lecturer assigned cause it’s confusing me especially the pseudo code

    Posted: 02 May 2021 01:56 AM PDT

    A chaotic, unpredictable behaviour sometime is caused by a surprisingly simple rule. Create two Boolean arrays of size 200, initialize every element of the first array as false except the element at index 100. Then implement the following steps: Print arr For every element in arr2 arr2[i] = (arr[i - 1] != (arr[i] || arr[i + 1])) if arr[i – 1] or arr[i + 1] go out or range, use "false" as the value of the element Copy everything in arr2 to arr Repeat this process 100 times, and observe the output, you may need to zoom out (ctrl + mouse scroll) and adjust window size to see the entire picture. Note: use cout << char(219) to print a block

    submitted by /u/Sufficient-Brush-636
    [link] [comments]

    [MIPS] Finding Factorial using Recursion

    Posted: 02 May 2021 07:10 PM PDT

     .text .globl main main: la $a0, AskInt #Asking for the integer li $v0, 4 syscall li $v0, 5 #getting the integer from user. syscall sw $v0, Int lw $a0, Int jal NumberOfTriangles nop sw $v0, Result li $v0, 4 la $a0, ResultMessage syscall li $v0, 1 lw $a0, Result syscall li $v0, 10 syscall .globl NumberOfTriangles NumberOfTriangles: subu $sp, $sp, 8 sw $ra, ($sp) sw $s0, 4($sp) li $v0, 1 beq $a0, 0, TrianglesDone move $s0, $a0 sub $a0, $a0, 1 jal NumberOfTriangles nop mul $v0, $s0, $v0 TrianglesDone: lw $ra, ($sp) lw $s0, 4($sp) addu $sp, $sp, 8 jr $ra .data AskInt: .asciiz "please enter a number and i will display the number of triangles: \n" ResultMessage: .asciiz "the number of triangles is: " Int: .word 0 Result: .word 0 

    my answer is always coming out to 268501060 regardless of what i type in

    im using the code from this video. https://www.youtube.com/watch?v=B6ky4Weahm4&t=205s

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

    Help: Github to publication

    Posted: 02 May 2021 11:05 AM PDT

    Greeting everyone. I've got a simple program on github that i'd love to deploy to other people as well. The thing is I've written the program entirely in python. I do have a "setup.py" file that developers can use to install the package but how can i make it accessible to people that just want the executable?

    1) Is it possible to provide a download link for the executable just using github?

    2) I guess i could use "pyinstaller" for the .exe file but, what should i do to deploy it in linux?

    3) Is it possible to publish updates through github? Even if the program is executable?

    I'm sorry if this is a basic question. I'm not that aware about how github can be used for distribution. To be honest, i'm not that familiar with the different ways a program can be published. Any help is really appreciated. Thanks a bunch.

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

    Help me find again a great article about reactive computation / dependency resolution

    Posted: 02 May 2021 12:32 PM PDT

    I remember reading some time ago an article about reactive computation, i.e. how to recalculate the result of a graph of computations that depend on each other in a non trivial way. Think of excel cells, or a build system.

    The article had great diagrams and presented several different algorithms to determine wich nodes had to be recalculated.

    It is a gem of clarity but I can't find it anymore.

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

    How to plot an oscilloscope power trace in any programming language?

    Posted: 02 May 2021 09:37 AM PDT

    How am i able to plot the power trace below which is a numpy array obtained from an oscilloscope , is someone able to show me how to plot them (e.g. with matplotlib or any programming language plotting library), and examine them. As I am trying to see if I can identify the AES encryption rounds in the traces through differential power analysis.

    Can someone please show me code in any language that's able to plot it with the appropriate graph (e.g oscilloscope type graph)

    Here is the power trace data (numpy array): https://pastebin.com/JgWMURMp

    Any help would be much appreciaated!

    Edited: New pastebinlink added

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

    Trying to convert a csv column to integer values but getting a ValueError

    Posted: 02 May 2021 03:19 PM PDT

    I've recently run into a problem I have with one of my menu options. I'm trying to convert the column 'age' in my csv file to integer values so I can find the averages, count certain age ranges, etc. using this code:

    import pandas as pd

    data = pd.read_csv('examplefileforreddit.csv')
    age_column = (data.loc[2:4,['age']]) # FIX ME - extend this to the whole column
    data['age'] = data['age'].astype(int)
    print(data['age'])

    I'm not sure why exactly but when I run this code it is giving me this error:

    ValueError: Cannot convert non-finite values (NA or inf) to integer

    I'm not sure how to fix this or how to extend the line " age_column = (data.loc[2:4,['age']]) " to cover the whole column, rather than just a range. There are a little over 6000 values in that column so maybe that plays a role in why the error is popping up? I know what I'm printing isn't what I'm trying to do, but I just want to figure out how to convert this columns data to integer before I try to find averages and age ranges and things of that sort.

    Any and all help would be appreciated!

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

    Functional programming for actual beginners

    Posted: 02 May 2021 07:15 AM PDT

    I dabbled years ago with learning programming but never really made it much past hello world. Recently I decided to try again.

    I work in IT but I'm not necessarily looking for a job coding. I really just want another tool to solve the problems in my live. (Plus coding is fun when I'm not trying to rip my hair out!)

    I picked python for the massive amount of resources out there and the relative ease if use. A lot of it's downsides like poor runtime performance means nothing to me.

    But something has been weighing on me.... Functional programming.

    I've done a fair bit of research and whatched enough hour long presentations (that I could barely follow) to be convinced. I want to learn functional programming.

    So my question is, how do I decide what language to learn? I'd love to learn an 'actual' FP language like Clojure or Kotlin, but I'm having a really hard time finding resources for true beginners.

    All the resources I can find assume I'm already an OOP dev, and I'm looking for something new.

    What the best option out there for someone with 0 interest in OOP?

    Is it better to just learn functional programming in python even though it isn't built for it?

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

    ASP.NET core where to start

    Posted: 02 May 2021 02:45 PM PDT

    As the post. I'm not quite just starting but for all intents and purposes you can treat my experience level as that. Just been round the houses on web stacks trying each of them out to see which one I liked best and came back to asp net because it ticks more boxes than others for me. Looking at the eco system of it seems a bit confusing because there are a number of flavours and some more different than others which makes it a bit confusing as to where to get started. There's MVC MVVM, razor pages, blazor, core web app and many others. I started off looking at razor pages, found 1 tutorial that went through the process of building a site which was quite good, but then after that the material went dry and I felt like it had covered almost nothing of what was possible to do with it. I scratched around for some more tutorials and then hit some paywalls, I guess the razor pages stuff Is still quite new if there is a lack of free tutorials on it. Other tutorials cover mvc or other flavours that I'm currently not learning. Could I just learn any of them and it would appropriate enough to use on others barring a few special bits or are each of the facets appreciably different and not transferable? Sorry if it sounds like a dumb question but it's the usual story when you start at the beginning of something, getting the first foothold on the ladder is tricky. It was hard enough just getting to this point and deciding that asp net core was the way I wanted to go lol.

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

    Buffer overflow vs out-of-bounds read/write, same thing?

    Posted: 02 May 2021 03:56 AM PDT

    I'm writing a Bachelor Thesis related to memory unsafeties, and I'm a bit confused about the terminology of buffer overflow or out-of-bounds read/write. They are related obviously, but are they sort of the same thing, or is one a more specific instance of the other? Is array always a buffer? Or when is it a buffer and when is it not? Is this both out-of-bounds write and a buffer overflow, or just one of them:

     int * list = int[10]; int[11] = 5; 

    Thank you. Hope I was clear enough in my question.

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

    Design a user data export functionality

    Posted: 02 May 2021 01:47 PM PDT

    I recently came across a question of how to design a user data export functionality in our current system e.g. Export a user's info from a website, all their comments, all their photos, activity etc. It will be a big file which will be emailed to the user once the process has finished.

    The current system contains 3 SQL databases: user profile, comments and photos. How would you design the system to do this efficiently? I'm thinking you would use an SQL query in the database and process the data inside a profile database (for future requests). If the database contains millions of rows, having a simple "SELECT * FROM table1, table2 etc, where User = my_username" would not be the most effective. So how would you split up query so that there would be multiple queries that could query different database shards/replicas? Is there something like batch processing/map reduce for SQL queries xd.

    Couple of follow up questions were how to prevent web servers timing out, what happens if a database takes a long time to respond, what happens if data processing machine goes down.

    Any advice would be appreciated!

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

    Is Python the best language for this idea? Why is it so hard to embed a program within a webpage? :'(

    Posted: 02 May 2021 05:40 AM PDT

    I want to make a text based game where the user is chatting to the computer. An actual chatbot would be too hard, so I'll restrict the user's choice to only entering a number.

    For example:

    Computer: Hi, how are you?

    Computer: 1. Great. 2. Okay. 3. Bad.

    Computer: Make a choice (1-3).

    I've coded a little of it in Python, with each choice leading to a new function and an error message appearing if the user types anything other than 1, 2 or 3.

    However, I'm having some trouble with getting the program online... ideally, I could give people a webpage and the program would spawn in an embedded box within it. The person wouldn't have to download anything.

    With Python, it seems there's no easy way to upload the .py file online so people can actually test/play the game in their browser. Flask and Django seem pretty confusing.. but would they allow this?

    Javascript: I'd happily switch to Javascript, but it seems like you can't have an embedded program running (?). Instead, for each part of the conversation, a new page would load with a question and 1-3 responses. The user would click a response option and a new page would load. That lacks the immediacy of a normal chatbot.

    Inform 7: I haven't looked much into it, but it seems like it would lack the immediacy of a normal chatbot.

    edit: My question is -- what language should I use? Is there an easy way to embed a python program in a browser? Is it possible to do so with Javascript? What I don't want with JS is a window like this: https://www.dummies.com/wp-content/uploads/492051.image0.jpg

    Thanks for any advice

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

    How do hackers hack into your phone?

    Posted: 02 May 2021 10:10 AM PDT

    Hi, my phone (Samsung s8) is currently on its last security patch this year. And I'm not sure whether or not this warrants an upgrade. I'd like to know more in depth on how hackers Actually hack into your phone and such so I know whether I'm able to control my phone's security or not.

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

    How hard was it to get a job

    Posted: 02 May 2021 10:05 AM PDT

    I wanna be a software engineer but I have no idea how hard it is to get a good job. Also is it easy to get a job fresh out of highschool

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

    What would I need to use / learn to build a thing?

    Posted: 02 May 2021 09:05 AM PDT

    I am not a programmer. I am not a coder. I might barely scrape the bottom of amateur. I am technical and I am a sysadmin but don't really write. I cannot write much code beyond "hello world" but I'vr done that in C64 BASIC, VB5/6, 1995 Object C, SQL, and COBOL II. I can usually kinda read script/code and I can copy pasta / hack my way through some scripting or light changes if needed but the skill set runs out of runway quickly.

    I have an idea for a function I'd like to make real but I don't know what I'd need to know to make it work.

    • I want to read prices from an exchange like Binance or Kucoin, etc. (many prices at once and fairly often).
    • I want to scan those prices, "make some decisions" and "do some math".
    • I may want to push some instructions back to the exchange (sell this, buy that, make me an espresso...)

    What I think I know so far

    • I'll need to read/interact with Binance API. Have diddled a little with a few API. I should be able to figure out the API syntax
    • I'll need some kind of UI. Something rudimentary but "nice enough" (this is just for me) I'd like it to be fairly easy so as to not pull all my hair out in the process.
    • I'd like the option to build it for run standalone (Windows) or served from a web server (LAMP stack or similar) <-- is this possible / too much of an ask? I don't really know so if it's over the top this can be optional/ignored.

    So the questions are:

    1. what language(s?) would I use / need to learn?
    2. what other skills might I need besides the new language?
    3. Is this something a technical but basically newbie can accomplish in (for example) 20 hours of work and study?

    Thanks

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

    How do you prevent people charging you obscene amounts for declined credit card information? (Read OP)

    Posted: 02 May 2021 08:00 AM PDT

    https://www.youtube.com/watch?v=StmNWzHbQJU&ab_channel=EngineerMan

    Context here is the coder is doing revenge against the scammer.

    The way he does it is that he discovers the scammer is using a live payment processor to test if the credit card information entered is legit.

    Now for most of these gateways the scammer gets charged 5 cents per declined credit card. The coder creates a python program which spams declined credit card info.

    If I built a cite. How do I prevent this sort of thing from happening to me even though I don't scam and am legit?

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

    How to print the whole line relevant to the given input

    Posted: 02 May 2021 07:51 AM PDT

    In this code, I am finding the data from a file and it is also giving me the result that I search. That means it only prints the name or phone number. But I want to print the whole line(s) in which a particular name or phone number is present.

    func readFile() { var searchData string fmt.Printf("Enter the name or phone number to search: ") fmt.Scanln(&searchData) content, err := ioutil.ReadFile("data.csv") if err != nil { log.Fatal(err) } suffix := suffixarray.New(content) indexList := suffix.Lookup([]byte(searchData), -1) if len(indexList) == 0 { fmt.Println("Data is not found") return } data := string(content) for _, idx := range indexList { fmt.Println("Data is found:", string(data[idx:idx+len(searchData)])) fmt.Println(data) } } 
    submitted by /u/ibilalkayy
    [link] [comments]

    Building a custom-made scheduler to plan the coming year

    Posted: 02 May 2021 06:30 AM PDT

    This is a request for ideas on what frameworks or approach you would be using, so your opinions are very welcome!

    I work at a small educational facility with 6 employees. We meet groups of younger students and their teachers and do educational activities together, for example paddling canoe or chemical experiments.

    The planning for each semester is currently done on a giant plywood board with thousands of holes, where each hole represents a single employee performing a single task on a single date. My boss puts coloured golf pegs (the thing on which you put your golf ball) into each hole and thus gets a good overview of the coming semester. In the end he double checks all the numbers so that vacations, distribution between schools and other details match up.

    He likes the haptic "feedback" of wood and the overview he gets from that giant board.

    As you might have guessed, the board has reached its limit of usefullness as our facility now provides more and more activities and we sometimes have to plan two alternative scenarios depending on what kind of budget we will receive.

    I am thinking of rebuilding that board digitally and am looking for frameworks that could ease the work while still giving flexibility in customizing our (sometimes weird) business rules.

    Drag-and-drop, zoomable and smooth graphical interfaces, tables and platform independence would be great.

    I am sufficiently fluent in PHP, JS, Python, Kotlin and am not afraid to learn new languages if it's worth the effort.

    What are your thoughts? How would you approach this problem?

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

    No comments:

    Post a Comment