• Breaking News

    Saturday, April 4, 2020

    what would happen if you created a closed loop in a file? Ask Programming

    what would happen if you created a closed loop in a file? Ask Programming


    what would happen if you created a closed loop in a file?

    Posted: 04 Apr 2020 09:10 PM PDT

    I was reading about vaious file systems and a small curiocity came up, We all know how files on a fat32 file system are stored in cluster chains where a pointer in each cluster points to net next cluster in the file What would happen if one where to manually edit the pointer in one of these clusters to point to a cluster earlier in the file? how would software behave? Would it just be an infinitely repeating loop of the content? Would software just really the fuck out? What would a disk repair tool think of such a file? What would windows think of it?

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

    Why's it hard to focus on learning one discipline in CS/IT world?

    Posted: 04 Apr 2020 01:24 PM PDT

    Hello, I'm a junior developer, 6 months through my first job and I'm not quite comfortable in it, specially that I work on old monolith codebase and irrelevant technology stack, and I've been assigned tasks that aren't part of my job simply because there's not much work to do, provocative Project Leader that really gets on my nerves for looking down on everyone who isn't part of his Clan. So I've been trying to train myself and get certificates in order to find a better opportunity, I started with JS earning some certificates, then I learned some react.js, I did some Angular, Spring Boot, Node.js, then I got intrigued by Data Science but turns out it's not for me so I started taking interest in Data Engineering and ETL then I learned that you can't be a Data Engineer without knowing Big Data, so I read a bit about Big Data etc...
    In the end I learned almost nothing except the basic Algorithms and Data Structures of JS and some basic react.js.
    So in your personal opinion what would be the best option for me?
    Software Engineering or Data Engineering?
    If it's Software Engineering then which technology stack should I stick to learning and becoming proficient at?
    Thanks in advance

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

    What is this logo?

    Posted: 04 Apr 2020 04:59 PM PDT

    I have completely forgotten what this logo is so please help me. Here's the picture od the logo

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

    Authentication API with a phone login like on most Chinese apps

    Posted: 04 Apr 2020 09:31 AM PDT

    I am making a mobile app for the Chinese market, using an Ionic/Angular + Node/Express stack. I don't speak Chinese so it's very difficult to find tools specific for Chinese apps.

    Especially, I'm interested in finding a tool for authentication, like Okta or Keycloak, but using phone login as its primary authentication method.

    In every Chinese app, instead of an email/password to enter, you enter a phone number, and an SMS code received a few seconds later. I suppose there must be a library of some sort that enables developers to create a system like this in a few hours, without reinventing the wheel.

    Can anyone with experience in developing Chinese apps help me?

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

    Have to make pretty PDF Reports with graphs superimposed into them - Using Python, I'm wondering if there's an approach better than making graphs with Matplotlib, and then superimposing the .png output into the PDF manually through PyPDF2 library.

    Posted: 04 Apr 2020 09:38 PM PDT

    The execution really isn't a problem because I've done something like this on a smaller scale before, and I know 100% it can be done.

    I'm just wondering if there's a more efficient way I'm not thinking of - perhaps something more suited to this exact kind of use-case.

    One issue I also noticed is that when I do plaster the .png into the PDFs, sometimes there's jagged edges at the borders. I'm wondering if this is caused by some quirk in file types I'm not aware of, because this is something that completely blindsided me.

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

    How should I go about sending my computers audio channel information (amplitude) to an Arduino over USB?

    Posted: 04 Apr 2020 04:54 PM PDT

    I am working on a project where I want a servo motor to move a robot's mouth in sync with the audio being played on my computer.

    The set up will be an audio file playing on the computer, which is attached to an Arduino over USB which will then drive the servo.

    The part I am stuck on is extracting the value of the amplitude of the volume of the computer in order to set it as a variable to then send to the Arduino.

    I'm looking for some advice on how to do this and if I am approaching the problem correctly?

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

    Can any programmer who deals with severe depression tell me know to get myself to code when I am in complete despair?

    Posted: 04 Apr 2020 09:20 PM PDT

    Everytime I get a bout of depression (typically lasts 2-4 weeks; 2-4 months occasionally) I find coding incredibly difficult. Things that once I am feeling better I find simple, are suddenly impossible.

    I am a CS student and my depression has been horrid this past semester and my grades are suffering. Currently, I've got 2 projects to do, but not only can I not focus but I can't even think of solutions. I can't describe it and this sounds like a stupid lie, but it's like I know what to do but at the same time I don't so I end up doing nothing.

    I literally stared at the screen trying to remember how to build a fucking binary tree from a ST node and I can't think of how to write the fucking basic functions or how to do the damn traversals. Normally, that would be a piece of cake, I'm made several trees and moved through them a dozen times each. Suddenly, I can't fucking do it.

    It gets worse. I tried to write one of old programs and find the shortest path through a maze without looking at my old code. I couldn't do it even though I had literally wrote it before. My mind goes blank and I can't think of what to do.

    I have the same problem doing my Calc II work. I just can't do problem solving. My mind begs me to crawl back in bed and escape.

    How the fuck can I handle this?

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

    How do I start a large(er) project?

    Posted: 04 Apr 2020 09:19 PM PDT

    I have a couple small programs that I've made, but nothing really interesting or very impressive. I want to build something larger, say something I build for a couple months or more.

    The problems are that 1. I never feel confident with any of my project ideas, or that they will just be useless/dumb in the long run, and 2. I have no idea where to begin or how to get things rolling (mostly this one).

    This is mostly a mental block that I'm stuck at, but can anyone give me some tips or resources on how to approach or think about this differently? Thanks!

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

    Beginner who wants to eventually create websites?

    Posted: 04 Apr 2020 12:53 PM PDT

    Hello, I am a complete beginner to programming. That said, my end goal is to create a really nice website. So, what language(s) should I learn in order to do this? Thanks.

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

    I enjoy the LeetCode grind of solving a bunch of data structures and algorithms puzzles - Any recommended career paths?

    Posted: 04 Apr 2020 06:57 PM PDT

    I guess one might say "any programming job" since a lot of the interview questions are based on Leetcode, especially near the bay area, where I live.

    I would like to work somewhere big one day, yes - but at the moment I'm just a sophomore who has so much more to learn.

    But are there any programming careers which would be fun for somebody like me, who enjoys the Leetcode grind?

    Thanks.

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

    Exists an API what detects if a picture is a photo or not?

    Posted: 04 Apr 2020 07:29 AM PDT

    Hi, for an web app (a personal, not commercial one) i need detect if a picture its a "photo" or no. The reason is omit any photo of real things. The images source is Twitter.

    The more similar api is "Vision AI" from Google, but i not need know what objects there are in the picture.

    I dont care about the content of the picture. Only the "general type" of picture. A photo of cute cat? i dont care. A drawing of a cat? Its not a photo, ergo the picture pass the test.

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

    When do you decide to put a new language on your resume?

    Posted: 04 Apr 2020 04:11 PM PDT

    Hello,

    I have come to a point in my Computer Science college career where I'm starting to learn more and more languages. I learned Java as my first language, and have been doing so for 2 years. I am now currently learning C and bash. It becomes easier to learn a new language (most) whenever you've already learned one. At least is has for me. So, when do you put this new language on your resume or even say that you're comfortable with it? When you can program data structures? When you make an entire program? etc.

    Thanks for taking the time to read this!

    submitted by /u/21stCenturyLuther
    [link] [comments]

    Resources for RHCSA

    Posted: 04 Apr 2020 04:09 PM PDT

    Hello everyone

    I'm wondering if anyone knows a course or resources for RHCSA certification using RHEL 8 as all courses i have found are using RHEL 7 and i would like to go for the latest exam

    Thanks!

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

    Need help choosing an algorithm that would be simple to model in a lightweight modeling language (such as Alloy)

    Posted: 04 Apr 2020 12:22 PM PDT

    Hello!

    I am currently in a formal software/systems modeling course, in which we use modeling languages to create specs of systems and test their correctness. Some examples of exercises we have done include modeling garbage collection (making sure that a garbage collection algorithm is safe and complete, for example), modeling locking algorithms and making sure that they don't lead to deadlocks or starvation, things like that.

    For our final project, we are asked to choose something to model in Alloy (a first-order logic specification language), and to test that our implementation follows whatever constraints it is expected to (for example, when we modeled garbage collection, we had to make sure that all non-garbage memory was indeed not garbage collected once our program ran).

    I'm having trouble coming up with ideas for what I could model that won't be overly difficult, seeing as I'm not super super comfortable with the language. I was thinking of modeling an algorithm that I'm familiar with, that way when it comes time to test my spec I know what I should be looking for. However, I'm not sure of what makes a specific algorithm suitable for modeling in first-order logic, and was hoping someone on this wonderful sub might be able to help.

    I'd love to have a discussion about any of your guys' past experience with modeling systems (perhaps in a course like the one I'm in) and what some good guidelines might be when it comes to choosing an algorithm or software spec to model.

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

    Need help implementing two methods and iterating a linked list

    Posted: 04 Apr 2020 03:26 PM PDT

    Hello, inside the linked list below I must implement the size() and print()(which should give the number of elements in the list as a string and display them in the console) methods. I must also use the following function:
    function getRandInt (min, max) {
    return Math.floor(Math.random() * (max - min + 1)) + min;
    to fill a linked list with 5 random numbers between 1 and 10.

    That's what I've done so far:

    function getRandInt (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } class Node { constructor(element) { this.element = element; this.next = null; } } class LinkedList { constructor() { this.length = 0; this.head = null; } add(element) { let node = new Node(element); if (this.head === null) { this.head = node; } else { let current = this.head; while (current.next) current = current.next; current.next = node; } this.length++; } size(){ return this.length; } print(){ let current = this.head; while(current != null) { console.log(current.element); current = current.next; } } } for (let i = 1; i < 6; i++) { } console.log(LinkedList); 

    I have already implemented the two methods, but I'm not sure if they are correct. I couldn't complete the "for" loop, because I don't know how to combine the linked list and the getRandInt function. Could you please tell me if the two methods are implemented correctly and if not, how to fix them and also give me directions how to complete the iteration? Any help would be greatly appreciated.

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

    Should I do a Coding Bootcamp?

    Posted: 04 Apr 2020 03:06 PM PDT

    Hello,

    I live in GA, and I've been thinking about coding Bootcamps more and more because my dream is to be a Front-End Developer! I've been looking into Georgia Tech Coding Boot Camp, General Assembly, and DigitalCrafts. I already have some experience with coding ( Mostly JS ) and I won't join the coding Bootcamp until 2021, so after I graduate high school I will spend time learning more about coding and algorithms so I won't struggle as much. I'm not sure which one is going to be the best for me? I was hoping someone could tell me about your experience with them. I'm not against college but I don't care about learning the classes that don't pertain to coding anymore. I don't want to lose my passion for coding because I believe a college degree is the only way to get a job! For the Coding Bootcamps how hard was it to get a job, how hard was it, how much did you get paid, etc.? I know some people that swear by it, and some say it's just a waste of time. I'm just a little confused about which one I should pick? HELP!

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

    When the business changes the name of a concept, do you change class and function names?

    Posted: 04 Apr 2020 10:22 AM PDT

    This is an interesting little scenario that I've come across a few times in my career. What would you do? What do you think is best practice?

    You have built an OO codebase for an online digital notice board with a GUI. Your codebase has a model called Guidance and a couple of services called GuidanceRepo and GuidanceNotifier.

    Two years later, the business asks you to change all UI references from 'Guidance' to 'Notice'. You proceed to change all front end references such as labels and page headings, but do you also change class names and functions that reference 'Guidance'? To do so would incur additional time and increase the chance of regression. To not do so would be confusing to future developers when responding to business requests which reference the 'Notice' concept.

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

    Java Command Prompt compiling issue

    Posted: 04 Apr 2020 01:50 PM PDT

    I tried to compile my class file "checker.class" into "checker.java" through the use of the javac command, planning to run it with the java command, but javac either gave me the issue of "file not found" OR "invalid flag" (when I tried to put checker in quotations.)

    I would also like to understand the issue itself better and not just know the solution. Thanks.\

    What I attempted:

    1. C:\Users\jaede\Desktop\everything>javac checker.class
    2. C:\Users\jaede\Desktop\everything>javac "checker.class"

    Results with error messages:

    1. error: file not found: Checker.java

    Usage: javac <options> <source files>

    use --help for a list of possible options

    1. error: invalid flag: Checker.class

      Usage: javac <options> <source files>

      use --help for a list of possible options

    planed to do:

    C:\Users\jaede\Desktop\everything>java checker.java

    I am aware of the non-perfect answers rule, so I will be happy with what I can get.

    *Sidenote: I probably do not have an environment variable issue, since I could run this with another class in exactly the same way.

    submitted by /u/the-youtube-watcher
    [link] [comments]

    I need very simple help with programming!

    Posted: 04 Apr 2020 01:40 PM PDT

    Hello!

    I am a complete newbie to programming, but i have an idea i could use very effectvely, it would be just for me. SO basically, when i am on a certain website, and when I press a key, then i want a premade sentence to pop up. And upon pressing another key, another sentence would pop up and so on. SO basically, instead of writing the same sentences over and over, and instead of copy-pasting, would it be possible to just kind of attach sentences to certain keys or key combinations? There would be around 10 sentences in total.

    Thank so much in advance, i hope you can solve this problem of mine :)

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

    Open Source Cognitive Search ??

    Posted: 04 Apr 2020 01:40 PM PDT

    Hi,
    I would like to know if there is any open source implementation of a ML based Search Engine for example Microsoft Cognitive Search .

    Microsoft Cognitive Search is platform as a services which works on existing data sources such as Databases or Blob Storages and uses ML algorithms to perform many types of tasks suchFor Images - Image Recognition, Image Caption Generation, OCR.For Texts - NER [Named Entity Recognition] and generate data which is then indexed in indexers and used to search content with help of tokenizing using Lucene

    My question is there any open source implementation of this project and if there is not or not exact implementation, how feasible is this idea for a personal opensource project? Like I am thinking of working on such project. And do you thing that the project is worth to be worked on?Also and once the work is done I am also thinking on publishing research on it so share your thoughts on that as well like is it a good research topic - " ML based search indexing"

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

    Discord bot help

    Posted: 04 Apr 2020 01:20 PM PDT

    Hello

    I have never programmed but I'm planning to start somewhere.

    There is this discord bot called "UnbelievaBoat" and you can use it for moderation and games, there is also an optional economy system and you can rob other server members when they haven't deposited their money. You can find out if they have their money by going to the leader board (Example: https://unbelievaboat.com/leaderboard/241361064472739840?page=1 ) and every time you click on a members name and find out how much money in cash or bank they have. As I stated earlier, you can only rob people when they have money in cash. I'm planning to make a bot or any sort of program that can give me the leader board of the people with the most amount of money in cash so I don't have to open 800 tabs and manually check who has the most money in cash

    What I just want to know is what programming software will be the easiest for a project like this or if there already is something similar to this

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

    Need advice for resources on a subject

    Posted: 04 Apr 2020 10:56 AM PDT

    Sorry for the strange title- I couldn't really figure out what to call it. For some background though, I'm trying to create an app using APIs, databases, etc. it's really nothing fancy, just an idea for a personal project that evolved into an app idea. I'm trying to have it done before I start sending out applications to colleges, and because it's a relatively simple idea, I figured it wouldn't be hard. I was very wrong.

    I'm trying to create an SQL database that pulls and writes information about different books using the google books API. Then taking that data, I'm going to display it on my app. Seems really simple, at least in theory. But I've run into a major roadblock where I'm floundering pretty hard. I'm pretty much entirely self taught, and I'm struggling with the connectivity part of this project. I don't think I've written code in about a week, with all the struggling I've been having to do just to set my environment up. I'm using Xamarin to build the app, and C# for the backend. But as of right now I'm stuck in a hole, and at this point am desperate for any resources pertaining to this subject. Anything you'd like to note about APIs, notes about Xamarin, using SQL, anything at all would be ridiculously appreciated. At this point I'm just scraping together as much data from as many places as I can to try and get this down. Thanks!

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

    What are some cool cell automatas i could implement.

    Posted: 04 Apr 2020 01:03 AM PDT

    Im a beginner programmer looking to implement some more cell automatas in a little project Ive made. Ive implemented the game of life, langtons ant and Brians brain. I skip over the 1 Dimensional ones hope you guys dont mind.

    https://cell-automata-app.herokuapp.com/

    hope is cool to put the link of it in this sub.

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

    Java - Timer - Task Scheduler - Problem Potentially in Brackets or Formatting - Need Help

    Posted: 04 Apr 2020 05:36 AM PDT

    This class is part of a desktop program that functions like Android's Clock. This is the timer class, which lets the user set a count down timer that when reaches 0, creates an alert box with a message. The code worked fine until I fixed an error in another class and added the playMusic method from the Alarm class. I got the error then on the line with the alarm class. I figured I needed to add another bracket, because the lambda expression now was longer than one line. I did, but i am still getting the same errors on compile. totalTime is being caught as an "Unknown class". Before it worked fine as the amount of time until the window of TimerAlert is displayed. Any help would be appreciated.

    package sample;

    import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; import javafx.scene.layout.GridPane; import javafx.scene.layout.VBox; import javafx.stage.Modality; import javafx.stage.Stage;

    import java.util.TimerTask;

    public class Timer {

    public static void display(){ //Creates the stage and window //Sets window to take up focus of program and disallows user to click in main window until this window is closed Stage window = new Stage(); window.initModality(Modality.APPLICATION_MODAL); window.setTitle("Timer"); window.setMinWidth(250); GridPane gp = new GridPane(); //creates and positions labels and textfields for time parameters Label hours = new Label("Hours"); gp.setConstraints(hours, 0,0); Label minutes = new Label("Minutes"); gp.setConstraints(minutes, 0,1); Label seconds = new Label("Seconds"); gp.setConstraints(seconds,0,2); TextField Hours = new TextField(); gp.setConstraints(Hours, 1,0); TextField Minutes = new TextField(); gp.setConstraints(Minutes, 1,1); TextField Seconds = new TextField(); gp.setConstraints(Seconds, 1,2); //Message to user to enter text for personalizable message in textarea Label message = new Label("Enter a message to show in the alert box when time is up."); gp.setConstraints(message, 0,3); //area where user enters personalized message TextArea MessageArea = new TextArea(); gp.setConstraints(MessageArea, 0,4); //close button and its function Button closeButton = new Button("Close Window"); gp.setConstraints(closeButton, 0,5); closeButton.setOnAction(e-> window.close()); //Button that sets the timer in motion and its code Button setTimer = new Button("Set Timer"); gp.setConstraints(setTimer, 1,5); setTimer.setOnAction(e->{ int hours1; int minutes1; int seconds1; if(Hours.getText().isEmpty()){ hours1 = 0; }else{ hours1 = Integer.parseInt(Hours.getText())* 1000 * 60 * 60; } if(Minutes.getText().isEmpty()){ minutes1 = 0; }else{ minutes1 = Integer.parseInt(Minutes.getText())*1000*60; } if(seconds.getText().isEmpty()){ seconds1 = 0; }else{ seconds1 = Integer.parseInt(Seconds.getText()) * 1000; } int totaltime = hours1 + minutes1 + seconds1; String Message = MessageArea.getText(); java.util.Timer timer = new java.util.Timer(); timer.schedule(new TimerTask() { @Override public void run() { Platform.runLater(()-> { TimerAlert.display(Message); // Alarm.playMusic("//C:/users/aleka/desktop/Old-alarm-clock-sound.wav"); }); }, totaltime}); }); gp.getChildren().addAll(closeButton, hours, minutes, seconds, Hours, Minutes, Seconds, setTimer, message, MessageArea); //code that sets the scene in motion and shows the window and disables clicking in other windows of program until window is closed Scene scene = new Scene(gp); window.setScene(scene); window.showAndWait(); } 

    }

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

    No comments:

    Post a Comment