• Breaking News

    Saturday, March 21, 2020

    Javascript teacher posted his books free as quarantine kit learn programming

    Javascript teacher posted his books free as quarantine kit learn programming


    Javascript teacher posted his books free as quarantine kit

    Posted: 20 Mar 2020 09:36 AM PDT

    All he's asking is to help retweet or give a great amazon review.

    The books are

    HTML

    both javascript grammarbooks

    CSS visual dictionary

    Node

    and WebGL

    Link to tweet

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

    Recommended computer science courses and recommended learning order

    Posted: 20 Mar 2020 02:16 AM PDT

    I made this. But not sure if it's helpful. So please tell me.

    Map:

    Math courses:

    Physics courses:

    • Classical mechanics: RiceX mechanics part 1, part 2
    • Electricity and magnetism: RiceX Electricity and magnetism part 1, part 2

    CS courses:

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

    Tonight at 9:00PM EST I will be hosting a live programming stream where I will be tackling a common programming problem for beginners, LIVE!

    Posted: 20 Mar 2020 05:07 PM PDT

    I've never done this before but I am going to attempt to do a LIVE programming session where I will go through my thought process and program in real time my solution to this common program. I will be open for any and all questions during an after my programming attempt.


    Time: 7:00PM EST Language: C++ Problem: Average Grade Calculator

    Input: User inputs 6 grades into the program

    Output: The average grade for the student

    Link: https://www.twitch.tv/srz2


    This is geared towards students and beginner level programmers.

    If this goes well, this will be the first of many. Suggestions for future streams can be submitted here: https://forms.gle/NXnV3a6y2huCNBFm7

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

    For everyone who is self-taught and stuck in quarantine-ville: i hope each of y'all really take this time to learn and polish your resumes for when it this is all over. Don't be discouraged.

    Posted: 20 Mar 2020 05:37 PM PDT

    I was one of the people who was hoping to start job applying before all this virus stuff happened. But now even hiring has slowed even for non-programming part time jobs. As someone who is strapped for cash (and im sure many are in this position) this can cause a lot of doubt in ourselves and for the future.

    As long as we are stuck there really is nothing we can do about it but make the best of the situation. I have no doubt that competition will be tougher when things return to normal. Before that time arrive lets keep our eye on our programming/life goals and keep working at it.

    Myself, i will be finishing up my Python course, then start my React course. i hope to build at least 2 projects that i can show to someone/company that would be willing to take a change on a self taught developer :).

    So yeah, keep your head up, keep working, keep building, and stay as positive as possible.

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

    I'm a software engineer looking to better understand people's problems. I'll trade you a half hour of advice about learning to code for a half hour of hearing about your job/school/learning to code.

    Posted: 20 Mar 2020 11:56 AM PDT

    A little about me: I learned to code from books and personal projects, then got a job as a Software Engineer in San Francisco. I worked at two startups, including Coinbase. I've also made a living algorithmically trading crypto and as a sales engineer. Now I'm living in Mexico City and starting my own startup.

    I can give coding help with Python, or just talk in general about learning and getting hired. I've done hiring myself and mentored a few people through interviews.

    In return, I'd like to hear about your life and things you think could be better. I don't have anything to sell, I'm just looking for early ideas and inspiration. If that sounds like good use of your time, you can message me or just pick a time for a call on my schedule.

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

    Looking for resources on using Groovy to dynamically change Java code/create plugins at runtime?

    Posted: 20 Mar 2020 11:42 PM PDT

    A client who currently uses a Java biomedical image analysis software to analyze biomedical images had some grad students put together a Groovy script to perform a very specific and accurate detection, let's call it:

    BaneOfMyExistence.groovy

    Our system pulls the logic from a variety of other imaging software into our GUI. The core classes and algorithms from said software is implemented into our GUI, which is more streamlined, and doesn't require the end-user to have any programming knowledge to perform advanced image analysis.

    They want to pass custom .groovy scripts into our software in the same way they can in the other Java program to develop custom detections. These Groovy scripts rely heavily on the drawing tools of the initial software's GUI, which is irrelevant and not included in my package, as we're using C#.

    Note: Our software is C#, the plugin software is Java, compiled using IKVM to a .dll file that our C# program can access.

    What I Know (Context): Writing Java, Groovy, and C#.

    What I Don't Know: Using Groovy as a user-controlled scripting language. Unfortunately, I cannot find information on taking a user's Groovy script and changing my Java interface runtime behavior. I've really hit a wall with this project. The client is running scripts for an open-source Java program called QuPath, which in turn relies on ImageJ scripting capabilities.

    Where I'm Stuck: I don't quite understand how to accept a user-created custom *.groovy script file which will contain params, classes, and/or methods that may be unknown to me as the developer.

    My Drawing Board:

    • Create methods to convert references in the *.groovy script from javafx/QuPathGUI into relevant data types that can be passed to our software via JSON strings.
    • Build GroovyClassLoader to handle the script; lots of documentation here, but I won't know the specifics of the script ahead of time. The end goal is to allow users to write custom plugins using the currently included open source libraries.
    • Rewrite their *.groovy file to be specific for our application. However, this requires more work and consulting on our end, and the benefit of scripting is for users to be able to rapidly make changes to their plugins/detections in real time. Maintaining some compatibility between the original software and ours would be useful for validation, but not necessary.
    • The *,groovy script may multiple versions of a class/methods. Giving the user the freedom to name classes/methods as they see fit, I've contemplated writing some sort of "GroovyTranslator" to parse out method, variable, and class blocks that can be plugged into the software as needed.

    So far I've watched hours of videos on Groovy; basically refresher courses on the language itself. I'm concerned with dynamically interpreting the content of the groovy script, and ensuring my classpath is robust enough to handle unknown custom scripts.

    Considerations: This feature is mainly for research. The solution I go with should allow users to:

    a) have multiple *.groovy files to choose from, and
    b) make changes to their *.groovy file as they work in order to refine their results.

    I know there must be some examples of this out there. I feel as though I'm lacking a key vocabulary term that would take me to the desired search results quickly.

    At this point, I'll settle for a nod in the right direction. As long as it's not a video about Groovy syntax! I get it! Applicable source code or tutorials specific to script files being interpreted on the Java side would be great.

    Cheers!

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

    HTML, CSS and JavaScript or C++

    Posted: 20 Mar 2020 11:25 PM PDT

    I am a grade 11 high school student in Canada and I was wondering if I should learn web development or C++. I already have an advanced understanding of Java and I want to learn another language before going to university for computer science or software engineering. My question is which is more useful for university?

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

    I still like jQuery.. why do i feel bad saying that?

    Posted: 20 Mar 2020 06:09 PM PDT

    I feel like it is frowned upon nowadays to use this library but i really like it. I cant tell if the hate is the usual toxicity of reddit or if there is validity to the arguments.

    Sure, avoiding loading a library that you dont really need is certainly better but if there is a lot of DOM manipulation requires i really appreciate the concise syntax of jQuery.

    If its less verbose & more readable i think this is worth loading a file. Anyway, i wanted to throw that out here and see if anyone feels the same as i do or has strong opinions they'd like to share against jquery.

    Jquery as a luxury, take it or leave it?

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

    [Java] How do I store a a user's double value into a specific element of an array created by the user?

    Posted: 21 Mar 2020 12:15 AM PDT

    I'm having trouble figuring this one out. I ask the user to set the array size, and then later on, I calculate a value from user inputs, and then let the user choose which element of the array to put the value in.

    An example would be a manager wants to open a certain amount of cash registers for the day (the user created array). As each customer checks out (doing this in a while loop), they choose the register they are using(Could be register 1, then register 5 for the next customer, etc.). The register (element of the array) will record the amount of sales for each customer. Then, at the end of the day the manager would like to see how many sales each register.

    I have created the array, worked out my calculation, I'm just stuck on how have the user choose which element the value goes into, since the user created array can vary in size.

    When I've tried searching, I keep seeing how to enter values in the array consecutively until the end of the array is reached with a for loop, yet not skipping around in the array. It may be that I'm not finding anything because I'm not using the correct terminology but any help would be appreciated.

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

    How do you approach technologies you have never encountered before?

    Posted: 20 Mar 2020 03:15 PM PDT

    I completed many programming courses in college but I feel as if all I know how to do is learning a new language's syntax and writing algorithms to solve logical conundrums.

    Sure I know for loops and while loops, but how do I write code to monitor my network traffic?

    Sure I know recursion and 3D arrays, but how do I make a program that opens on startup and automatically dims my monitor's brightness ?

    Sure I know doubly linked circular linked lists, but how do I write a plugin for a web browser that lets you see which cookies are being used by this website?

    Sure I know how to build a neural network from scratch, but how do I write a program that streams what's on my phone to my desktop monitor over my wifi connection?

    Something I have noticed is a reliance on tools that other people have already built.

    For example: How do I make a game?

    Answer: Use a game engine!

    Okay, but what if the game engine doesn't support the features I need? How do I extend it? How do I make my own game engine that has those features? How did someone make this game engine from scratch in the first place?

    Obviously, simply knowing how to code isn't enough here. There must be some approach to find out how to do what you want to do. My question is: How do you approach utilizing technologies you have no knowledge of yet?

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

    How does streaming audio from my app, to my server for recording and processing work?

    Posted: 20 Mar 2020 11:56 PM PDT

    I'm trying to create an application where I can stream audio to the server to be recorded once the user stops streaming and then process that audio. What exactly do I need to create such a feature? Would it be websockets?

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

    Self throttling your database polls with auto throttle algorithms from web scarping?

    Posted: 20 Mar 2020 07:46 PM PDT

    I want to generate a datastream from the latest values added to a database. The only way for me to get this values is to poll the database. I cannot get events emitted from the database every time there is a value added. This requires me to keep making polls to the database every x seconds. The problem is that these repetitive polls might slow the database for other users. In web-crawling you often use auto throttling algoritms when sending requests to a website to make sure you don't overwhelm the web server. These algoritms store the response time after each response and delays the next request based on the this response time. If the webserver starts to respons slowly, the algoritm starts sending requests less frequently and if the response times gets lower you send requests more frequently. Could you use the same type of algoritm when you repeatedly poll the database. Eg if the response time when polling gets higher that indicates that another user is making queries and the polling frequency should go down. When the response time gets lower again that indicates that no other user is querying the database and you can start increasing the polling frequency again.

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

    How exactly does the JVM allow java to be ran on any operating system?

    Posted: 20 Mar 2020 11:28 PM PDT

    From my understanding compiled languages like C is just translated to assembly. You need different compilers depending on the host OS

    Whereas Java is translated to an intermediate language (JVM) which is then translated to assembly.

    However how exactly does that make it able to be ran on any OS?? Wouldn't you need a different JVM depending on the host OS?

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

    Am I the only one who kinda hates the "learn by building X" books and videos?

    Posted: 20 Mar 2020 11:28 PM PDT

    First, I've been programming and publishing my projects for many years, so keep in mind that I'm not an absolute beginner and maybe this could influence my judgement.

    So, I was watching a course on Udemy, and it is popular, very well rated, the teacher knows his stuff, explains well and in depth, and it's clearly full of juicy stuff, but it is one of those "learn X by building Y", where Y is a fairly complex project, and I'm not liking it at all. It's not the first time I approach this kind of learning material, but it's the first time I realize I really don't like it.

    I want to share my thoughts on why I don't like this mode of learning because I want to see if I just have to approach the whole thing differently, or if there is a better way to find material more similar to my learning style. I also want to make sure that my feelings are born out of true incompatibility and I'm not trying to avoid a challenge that instead I should take.

    I love both books and videos, I don't think one is better than the other, they're both great to learn stuff. I prefer videos, even advanced videos, to have things explained to me the first time and then books as a reference or to go deeper, but of course often I just take what it is available.

    Anyway, I understand that the power of programming is to put pieces together, so at first glance it seems like it makes sense to build a big application and make the student follow along to introduce new stuff.

    For example in this course I'm following I'm building an ecommerce with node+express, so there is a lot of stuff I could potentially learn from it: how authentication works in node, what library is used for the database, file handling, payments, etc etc Lot of interesting and useful stuff, and when the course begins everything is really easy.

    The problem is that the codebase grows, and when a new concept is introduced to follow along I have to implement it (aka copy and paste) into the application I'm building. When what is built in the course is small, I do copy and paste so to speak, but since the application is simple I can focus 100% on what I'm copying and pasting, and then I can also immediately experiment and try new stuff with the concept proposed, so I truly learn it and then I can put it into action in my projects. But in these "learn by building X" courses AND books, everything is built on top of the previous thing and with a growing application I need to jump among multiple files, full of code, and then I also have to often implement the front-end and many other details that I really don't care about while trying to learn a new piece of technology. What a mess! It just becomes a copy and paste exercise.

    You may say: well, you should skip to the section that interests you, especially in books it is easy, right? And that would almost be true, but if you think about it, it means that now I have to search for what I want to learn, in a codebase that is basically new to me since I've skipped sections. It may still be a good exercise, but maybe not the exercise I need in that moment.

    An alternative is that I could see what the guy does and then immediately implement the thing my own way elsewhere, but that doesn't sound like the way these materials were designed and I'm not sure it would be really efficient.

    In the end when the codebase become big, it just becomes a huge copy and paste and even if I push it to the end, it feels like I didn't retain anything.

    I'll add that I'm not against a course or a book where a lot of code is thrown at me for then focusing on specific aspects of it, but I don't want to waste time seeing the guy building the whole thing. Many think that, for learning, having a huge codebase thrown at you would be bad, but I think that to see how multiple things work together it would be really efficient: show me everything and then guide me between all the parts that matters.

    I also really like lessons where the teacher takes some very specific thing, and it explains how it works, why is used, what problems does it solve.

    Anyway I have some questions, so please share your thoughts: 1. what do you think about this? What are your experiences with this kind of material?

    1. Am I using this learning material wrong? Is there a better way to use this?

    2. If this material is not for me, what kind of material do you think would be more fit to me and how would I search for it?

    PS. in the title I wrote that I "hate" them, but it was clickbait. Teaching is really hard and requires a lot of effort and I'm so grateful people do this stuff.

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

    How do you make websites for case trackers like those for COVID-19?

    Posted: 20 Mar 2020 11:21 PM PDT

    Where and what should I start to learn to make those? Do I need a background in analytics?

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

    Video live-streaming app

    Posted: 20 Mar 2020 07:29 PM PDT

    I'm thinking of making a live streaming app for mobile devices but not sure where to start.

    Any framework suggestions, tips you guys might have, or informational pieces you've seen regarding the technology required for the backend that you could point me to?

    Defiantly a beginner in app development, so anything you guys got is helpful.

    -Thanks!

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

    i had a bug in my python game

    Posted: 20 Mar 2020 11:13 PM PDT

    import arcade

    # Constants

    SCREEN_WIDTH = 1000

    SCREEN_HEIGHT = 650

    SCREEN_TITLE = "Platformer"

    # Constants used to scale our sprites from their original size

    CHARACTER_SCALING = 1

    TILE_SCALING = 1

    COIN_SCALING = 0.5

    SPRITE_PIXEL_SIZE = 128

    GRID_PIXEL_SIZE = (SPRITE_PIXEL_SIZE * TILE_SCALING)

    # Movement speed of player, in pixels per frame

    PLAYER_MOVEMENT_SPEED = 10

    GRAVITY = 1

    PLAYER_JUMP_SPEED = 20

    # How many pixels to keep as a minimum margin between the character

    # and the edge of the screen.

    LEFT_VIEWPORT_MARGIN = 250

    RIGHT_VIEWPORT_MARGIN = 250

    BOTTOM_VIEWPORT_MARGIN = 100

    TOP_VIEWPORT_MARGIN = 100

    class MyGame(arcade.Window):

    """

    Main application class.

    """

    def __init__(self):

    # Call the parent class and set up the window

    super().__init__(SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_TITLE)

    # These are 'lists' that keep track of our sprites. Each sprite should

    # go into a list.

    self.wall_list = None

    self.player_list = None

    # Separate variable that holds the player sprite

    self.player = None

    # Our physics engine

    self.physics_engine = None

    # Used to keep track of our scrolling

    self.view_bottom = 0

    self.view_left = 0

    # Keep track of the score

    self.score = 0

    # Load sounds

    self.collect_coin_sound = arcade.load_sound(":resources:sounds/coin1.wav")

    self.jump_sound = arcade.load_sound(":resources:sounds/jump1.wav")

    arcade.set_background_color(arcade.csscolor.CORNFLOWER_BLUE)

    self.setup()

    def setup(self):

    """ Set up the game here. Call this function to restart the game. """

    # Used to keep track of our scrolling

    self.view_bottom = 0

    self.view_left = 0

    # Keep track of the score

    self.score = 0

    # Create the Sprite lists

    self.player_list = arcade.SpriteList()

    self.wall_list = arcade.SpriteList()

    # Set up the player, specifically placing it at these coordinates.

    self.player_list = arcade.SpriteList()

    self.player = arcade.AnimatedWalkingSprite()

    self.player.stand_left_textures = []

    self.player.stand_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_1.png"))

    self.player.stand_right_textures = []

    self.player.stand_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_1.png", mirrored = True))

    self.player.walk_left_textures = []

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_1.png"))

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_2.png"))

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_3.png"))

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_4.png"))

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_5.png"))

    self.player.walk_left_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_6.png"))

    self.player.walk_right_textures = []

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_1.png", mirrored = True))

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_2.png", mirrored = True))

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_3.png", mirrored = True))

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_4.png", mirrored = True))

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_5.png", mirrored = True))

    self.player.walk_right_textures.append(arcade.load_texture("sprites/soldat-walk/soldat_6.png", mirrored = True))

    self.player.center_x = 200

    self.player.center_y = 300

    self.player_list.append(self.player)

    # --- Load in a map from the tiled editor ---

    # Name of map file to load

    map_name = "maps/coolmap.tmx"

    # Name of the layer in the file that has our platforms/walls

    platforms_layer_name = 'ground'

    # Read in the tiled map

    my_map = arcade.tilemap.read_tmx(map_name)

    # -- Platforms

    self.wall_list = arcade.tilemap.process_layer(my_map, platforms_layer_name, TILE_SCALING)

    # -- Coins

    # --- Other stuff

    # Set the background color

    if my_map.background_color:

    arcade.set_background_color(my_map.background_color)

    # Create the 'physics engine'

    self.physics_engine = arcade.PhysicsEnginePlatformer(self.player,

    self.wall_list,

    GRAVITY)

    def on_draw(self):

    """ Render the screen. """

    # Clear the screen to the background color

    arcade.start_render()

    # Draw our sprites

    self.wall_list.draw()

    self.player_list.draw()

    # Draw our score on the screen, scrolling it with the viewport

    score_text = f"Score: {self.score}"

    arcade.draw_text(score_text, 10 + self.view_left, 10 + self.view_bottom,

    arcade.csscolor.WHITE, 18)

    def on_key_press(self, key, modifiers):

    """Called whenever a key is pressed. """

    if key == arcade.key.UP or key == arcade.key.W:

    if self.physics_engine.can_jump():

    self.player.change_y = PLAYER_JUMP_SPEED

    arcade.play_sound(self.jump_sound)

    elif key == arcade.key.LEFT or key == arcade.key.A:

    self.player.change_x = -PLAYER_MOVEMENT_SPEED

    elif key == arcade.key.RIGHT or key == arcade.key.D:

    self.player.change_x = PLAYER_MOVEMENT_SPEED

    def on_key_release(self, key, modifiers):

    """Called when the user releases a key. """

    if key == arcade.key.LEFT or key == arcade.key.A:

    self.player.change_x = 0

    elif key == arcade.key.RIGHT or key == arcade.key.D:

    self.player.change_x = 0

    def on_update(self, delta_time):

    """ Movement and game logic """

    # Move the player with the physics engine

    self.physics_engine.update()

    self.player_list.update()

    self.player_list.update_animation(delta_time)

    if self.physics_engine.can_jump():

    self.player.can_jump = False

    else:

    self.player.can_jump = True

    # --- Manage Scrolling ---

    # Track if we need to change the viewport

    changed = False

    # Scroll left

    left_boundary = self.view_left + LEFT_VIEWPORT_MARGIN

    if self.player.left < left_boundary:

    self.view_left -= left_boundary - self.player.left

    changed = True

    # Scroll right

    right_boundary = self.view_left + SCREEN_WIDTH - RIGHT_VIEWPORT_MARGIN

    if self.player.right > right_boundary:

    self.view_left += self.player.right - right_boundary

    changed = True

    # Scroll up

    top_boundary = self.view_bottom + SCREEN_HEIGHT - TOP_VIEWPORT_MARGIN

    if self.player.top > top_boundary:

    self.view_bottom += self.player.top - top_boundary

    changed = True

    # Scroll down

    bottom_boundary = self.view_bottom + BOTTOM_VIEWPORT_MARGIN

    if self.player.bottom < bottom_boundary:

    self.view_bottom -= bottom_boundary - self.player.bottom

    changed = True

    if changed:

    # Only scroll to integers. Otherwise we end up with pixels that

    # don't line up on the screen

    self.view_bottom = int(self.view_bottom)

    self.view_left = int(self.view_left)

    # Do the scrolling

    arcade.set_viewport(self.view_left,

    SCREEN_WIDTH + self.view_left,

    self.view_bottom,

    SCREEN_HEIGHT + self.view_bottom)

    def main():

    """ Main method """

    window = MyGame()

    window.setup()

    arcade.run()

    if __name__ == "__main__":

    main()

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

    What if you could learn and practice for the very job you want, from scratch?

    Posted: 20 Mar 2020 11:12 PM PDT

    I've been on this train of thought for a while. Most of what we learn in school is outdated and cannot keep up with the changes in tech, and we're still paying ridiculous amounts for that (20+ years in debt is CRAZY). What's even crazier is that 90% of us attend school because we want to get a job. And the people who are grading us have little to no job experience. College is not preparing us for employment. They're basking in the glory of their historical prominence.Not only does this affect us, but also the whole hiring process because employers have no option but to hire us with our outdated skillset. We learn outdated skills, then fill out our resumes with keywords, and then the employers need a multi-step hiring process just to verify how much of that isn't BS.And then coding challenges- the worst part of assessing developers. I just don't understand how algorithmic trivia can ever assess someone's proficiency as a developer. Those two are very, very different things.ButWhat about a platform where you could learn and practice directly for employment, from scratch, since that's our goal anyways? Not course based, but learning through actually doing- practicing on virtual real world products. Coding wisdom says you should work on projects to really learn, but what if you could work on real products in realistic environments for whatever employer you're interested in, and the employer could hire you based on that, instead of on grades? I don't mean contributing to the employer's actual products, but virtual versions hosted on a platform, that you could practice with like you practice projects on your own

    Like going all the way from 'hello world' to making APIs, practicing on, say, Gmail as the 'project' you're making to learn.

    It would also remove the need for coding challenges since what you're learning is exactly what is needed in the real world, and what the employer wants to know to feel safe.What do you guys think? Would love to get your opinions on this.

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

    c++ Very beginner question on multiple files

    Posted: 20 Mar 2020 10:55 PM PDT

    I've been watching some videos on splitting one big cpp file into a main file, a function file with the definition and a header with the function prototype, but I left out the #include "function.h" directive in the main.cpp file and it still compiled and ran anyway.

    So question - is it necessary? Is it working anyway because it's all in the same folder and the compiler goes through all the files to get it?

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

    Coding Large Sections Without Testing: Evidence of experience or Evidence of a bad habit

    Posted: 20 Mar 2020 10:44 PM PDT

    I've been programming for about 2 years now. I've noticed that when I start programming now, I write entire programs before I test any of it. Like multiple packages and classes. Is this a bad habit I'm getting into?

    When I was less experienced I would basically write short minimum compile-able sections. I felt like I needed to do this because I wasn't even sure if the code was doing what I wanted it to. With more experience now, I feel as though some of the things I'm writing are somewhat trivial, and I can trust that they're correct. I still make bugs. So I still have to walk through and debug my programs frequently. It's hard to say whether I would debug less/spend less time debugging if I wrote smaller sections. But that's kind of what I'm asking. From your experience, is coding large sections without tests irresponsible?

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

    c++ question

    Posted: 20 Mar 2020 10:39 PM PDT

    else if (letter == 8)

     { if (curr!= nullptr ) { 

    curr = curr->prev;

    delete(curr->next);

    curr->next = nullptr;

     } } 

    this line of code for some reason gets an error when im hitting backspace on the last letter left, any solutions? tryna make a notepad type app btw.

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

    [Java] How does Collections.sort() with Comparator work ?

    Posted: 20 Mar 2020 10:35 PM PDT

    I am hoping to make a flowchart or write pseudo-code for a method that involves Collection.sort with a Comparator. However, I am not quite sure how the code works internally. In my case, I am trying to sort a List of "Accounts" alphabetically by their "Website" value, which is represented by a string. I understand that the compare() method returns an integer that states if object 1's "Website" value is bigger/smaller than that of object 2, and the program uses the returned value to determine the object's location in the List. However, I don't really understand how Collections can sort using the Comparator, particularly the individual steps to create a flowchart. Does it utilize bubble/insertion/merge sort? Thanks in advance!

    Code:

    public void sortByWebsite()

    {

    // convert ArrayList into List of accounts 

    List<Account> accountsList = accounts;

    // sort with specified Comparator 

    Collections.sort(accountsList, new Comparator<Account>()

    {

    public int compare(Account o1, Account o2)

    {

    return o1.getWebsite().compareTo(o2.getWebsite());

    }

    });

    // reset ArrayList of user accounts 

    accounts = new ArrayList<Account>();

    // insert the sorted accounts in order

    for(int i =0; i < accountsList.size(); i++)

    accounts.add(accountsList.get(i));

    }

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

    CSS Grid Responsive Website

    Posted: 20 Mar 2020 04:17 PM PDT

    1. CS Grid Responsive Website
    2. I would like a photo with a opacity of .75 (see through sort of) title on top of the lower 25% of the box and font/text with an opacity of 0 (not clear)
    3. Do you have to span four rows and use the last rows for the opacity of .75 and font?
    4. How do you make the font not opaque so the contrast is sharp?
    submitted by /u/KnowNotAnything
    [link] [comments]

    [HTML/CSS] Why is my nested grid not showing on screen?

    Posted: 20 Mar 2020 09:52 PM PDT

    I'm creating a simple calculator in basic html/css and js. My goal was to separate the calculator itself into 3 divs: 1. equation display 2. digit buttons 3. function buttons

    The calculator is a grid itself and I'm trying to make the two button displays grids as well. My code for that CSS:

    .calculator { display:grid; grid-template: "a a" "b c"; grid-gap: 5px; } .numbers-container { display: grid; grid-template: "seven eight nine" "four five six" "one two three" " zer "; grid-area: b; background-color: blue; } #seven-btn { grid-area: seven; } #eight-btn { grid-area: eight; } #nine-btn { grid-area: nine; } // etc... 

    My issue is the numbers container disappears after I add display:grid to its css

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

    No comments:

    Post a Comment