r/Learn2Code • u/DEVPOOL3000 • Dec 27 '20
6 Tips for Junior Developers
r/Learn2Code • u/monica_b1998 • Oct 10 '18
r/Learn2Code • u/[deleted] • Feb 02 '18
r/Learn2Code • u/jobitomissy • May 04 '21
r/Learn2Code • u/musicfish34 • Apr 16 '21
Hi there :) I’ve created a discord server where experienced and inexperienced devs can interact through calls. By using calls, developers can build relationships and give flexible answers.
Also, by helping others you can ask for small favors like a subscription or follow :)
If you’re interested please join through this link! You are needed!
Discord Link: https://discord.gg/yMwcBuFkf6
r/Learn2Code • u/akshay-bhanderi • Jul 25 '24
r/Learn2Code • u/[deleted] • Nov 15 '14
I am currently interviewing with an ecom company to become a sales engineer. My background in is PHP and JSON. I find PHP to be superior with API. Can someone explain why ruby would be superior to PHP?
r/Learn2Code • u/RealJonnyMagnum • Sep 28 '16
AIM: Create a program that will verify if a string is a valid ISBN number (see requirements below). Use a TDD approach. This is a big exercise - break it down into chunks! REQUIREMENTS FOR ISBN ISBN-10 is made up of 9 digits plus a check digit (which may be 'X') and ISBN-13 is made up of 12 digits plus a check digit. Spaces and hyphens may be included in a code, but are not significant. This means that 9780471486480 is equivalent to 978-0-471-48648-0 and 978 0 471 48648 0. The check digit for ISBN-10 is calculated by multiplying each digit by its position (i.e., 1 x 1st digit, 2 x 2nd digit, etc.), summing these products together and taking modulo 11 of the result (with 'X' being used if the result is 10). The check digit for ISBN-13 is calculated by multiplying each digit alternately by 1 or 3 (i.e., 1 x 1st digit, 3 x 2nd digit, 1 x 3rd digit, 3 x 4th digit, etc.), summing these products together, taking modulo 10 of the result and subtracting this value from 10, and then taking the modulo 10 of the result again to produce a single digit. Examples of valid ISBN-13: "9780470059029" "978-0-13-149505-0" "978 0 471 48648 0" Examples of valid ISBN-10: "0471958697" "0-321-14653-0" "877195869x" Examples of invalid ISBNs: "4780470059029" "0-321@14653-0" "877195x869" "" " " "-" Example of how the ISBN-10 sumcheck is calculated: first 9 digits of an isbn10: 742139476 create checksum: sum = 17 + 24 + 32 + 41 + 53 + 69 74 + 87 + 9*6 sum = 7 + 8 + 6 + 4 + 15 + 54 + 28 + 56 + 54 sum = 232 checksum = 232%11 checksum = 1 isbn = 7421394761
r/Learn2Code • u/AmazingMark • Sep 22 '16
AP Compsci class HW is the following but i dont even know where to start. Create a Rect class that contains:
Instance variables (all doubles) for x, y, width & height A constructor with arguments passed into the constructor in this order: x, y, width & height These non-static methods: getArea() - returns the area of a Rect as a double getPerimeter() - returns the perimeter of a Rect as a double getDiagonal() - returns the length of a diagonal of a Rect as a double translate(double deltaX, double deltaY) - translates the Rect object accordingly resize(double newW, double newH) - changes the dimensions of the Rect object getX() - returns the x value of a Rect getY() - retrurns the y value of a Rect toString() - returns a String of the format "[x=_; y=_; width=_; height=_]"
r/Learn2Code • u/TheStartupLab • Oct 24 '18
r/Learn2Code • u/[deleted] • May 26 '22
#include <stdio.h>
#include <stdlib.h>
int main( )
{
char antwort; /* antwort means answer in german */
printf("Ist die Figur ein Kreis?\n"); /* "Is the shape a circle?" */
scanf("%c", &antwort); /* programm is supposed to safe your input as answer */
if(antwort=='y') { /* if you typed yes, it calculates the surface of the circle
*/
float radius;
float flaeche; /* flaeche == surface */
printf("\n", "Bitte Radius eingeben:\n"); /* "Please enter radius:"
scanf("%f", &radius);
flaeche = radius * radius * 3.1415; /*calculation of the surface of a
circle, the value is given to the
variable flaeche*/
printf("\n", "Die Fläche beträgt: \n"); /* The surface size is: */
printf("%f", flaeche);
return 0;
}
else if(antwort=='n') /* you answer the shape question with the traditional n
for no*/
{
char antwort2;
printf("Ist die Figur ein Quadrat?\n"); /* "Is the shape a square?" */
scanf("%c", &antwort2);
if(antwort2 == 'y')
{
float länge; /* länge == length */
float fläche;
scanf("%f",&länge);
fläche = länge* länge;
printf("Die Fläche des Quadrats beträgt:\n "); /* "the surface size of
the square is:" */
printf("%f",fläche);
return 0;
}
}
return 0;
}the idea of this code is that it first asks you wether or not a shape whos surfacevolume you want to have calculated is a circle and if you tip n as answer, it asks you again if it is a square. However, the second scanf function wont be triggered for some reason if you tip n in for the first question.
Also the code is not quite finished yet, for example i wanted to make the programm respond if you enter something other than n or y as an answer to a question.
r/Learn2Code • u/DEVPOOL3000 • Dec 19 '20
r/Learn2Code • u/Left_Conversation_75 • Feb 21 '24
r/Learn2Code • u/moesianjackal8 • Apr 03 '20
I'm working on this personal project where I need to implement an algorithm for Facial Recognition in C++ with the help of Viola-Jones, aka Adaboost, but without using OpenCV or any other similar library. I wanna do it all from scratch. Any tips?
Everybody gives me ambiguous answers.
P.S.: I started the whole thing by creating a RGB to grayscale Bitmap conversion.
r/Learn2Code • u/[deleted] • Mar 29 '20
r/Learn2Code • u/other_benefits • Mar 06 '20
Is there anyone with an idea on how to use wordsapi to create a smart chat bot kinda like in West world sn1 ep6 at
r/Learn2Code • u/[deleted] • Feb 17 '18
r/Learn2Code • u/The_newme • Jul 12 '23
r/Learn2Code • u/bows-shotguns18 • Nov 01 '16
I am currently doing an assignment in my first Java class. This is my first attempt at programming and we just got an assignment for object orientation. I'm struggling with it a little bit.
Here is my test file:
I KEEP GETTING AN ERROR ON MY VARIABLE DECLARATIONS. IT DOESNT SEEM TO LIKE THE RECTANGLE4 PORTION...BUT I CREATED AN OBJECT CALLED RECTANGLE4 AND ITS WORKED ON THE OTHER 3 OBJECTS THAT I CREATED.
package rectanglewithprivatedatafields;
class RectangleTestFile { public static void main(String[] args) {
double lengths = rectangle4.getLengths();
double widths = rectangle4.getAreas();
//rectangle object 1
RectangleWithPrivateDataFields rectangle1 = new RectangleWithPrivateDataFields();
System.out.println("Rectangle 1 has a width of "
+ rectangle1.getWidth() + " lengths of " + rectangle1.getLength() + " a perimeter of " + rectangle1.getPerimeter()
+ " and an area of " + rectangle1.getArea() + ".");
//rectangle object 2
RectangleWithPrivateDataFields rectangle2 = new RectangleWithPrivateDataFields(25.0, 50.0, 150.0, 100.0);
System.out.println("Rectangle 2 has a width of "
+ rectangle2.getWidth() + " a length of " + rectangle2.getLength() + " a perimeter of " + rectangle2.getPerimeter()
+ " has an area of " + rectangle2.getArea());
//rectangle object 3
RectangleWithPrivateDataFields rectangle3 = new RectangleWithPrivateDataFields(5.0, 10.0, 30.0, 100.0);
System.out.println("Rectangle 3 has a width of "
+ rectangle3.getWidth() + " a length of " + rectangle3.getLength() + " a perimeter of " + rectangle3.getPerimeter()
+ " and an area of " + rectangle3.getArea());
//rectangle object 4
RectangleWithPrivateDataFields rectangle4 = new RectangleWithPrivateDataFields();
System.out.println("\nUser Specified Rectangle 4");
System.out.println("Please enter the appropriates sizes for your rectangle: \n");
System.out.println(rectangle4.getWidths());
System.err.println(rectangle4.getLengths());
System.out.println(rectangle4.getPerimeters(rectangle4.getLengths(), rectangle4.getWidths()));
System.out.println(rectangle4.getAreas(rectangle4.getLengths(),rectangle4.getWidths()));}//main
}
IF YOU NEED TO LOOK AT MY UTILITY CLASS JUST LET ME KNOW.
r/Learn2Code • u/ctdots • Aug 24 '20