Programming

[HELP] Find a balance between Study and Practice

Learn Programming - Thu, 09/20/2018 - 11:48

Hello everyone.

I thing that is a common question for beginners. So, I would like to know how I could achieve some sort of balance between taking a course/reading a book and make personal projects with that knowledge.

Right now i'm thinking about learning Node and React. But I want to learn Electron, React native and other stuff. If i just do courses and do not put in practice will be worthless (I know that because i already took a Node course and I do not remember almost anything because I do not practice).

Hope someone can help me. Because I want to be a better programmer!

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

Idle Until Urgent

Programming - Thu, 09/20/2018 - 11:38
Categories: Programming

Postgres 11 - A First Look

Programming - Thu, 09/20/2018 - 11:14
Categories: Programming

is Searching online ok

Learn Programming - Thu, 09/20/2018 - 10:38

still learning python and having a hard time at it guys is it ok to look for help on youtube when you are looking for functions and help ???

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

Would Javascript or PHP be better for my problem?

Learn Programming - Thu, 09/20/2018 - 10:22

I'm working on a webcomic website and I wanted to make a navigation bar for the the comic with a previous, next, and maybe random comic button. I'm new to both JavaScript and PHP, but have previous programming experience. What I was thinking of doing was using some code to redirect the user by taking the id of the url(I think that's what I want) and then adding 1 or substracting 1 and using the new link with the new id as the redirect link. Example: if the id in the link was 6 and I clicked next it would take 6 add 1 and use the new link with 7. I'm not sure if that is how it's done because I am just starting(started about 1 day ago). Which would be better for my problem, or would a combination of both be better? I was planning on just learning JavaScript, but while looking into it, I saw some people using PHP for the navigation bar.

Also I know I can use Comicpress or similar programs to make this simpler, but I wanted to do this without that. Any help is appreciated

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

Drupal Dev Thursdays: Post here with development questions or discussion

Drupal - Open Source Content Platform - Thu, 09/20/2018 - 10:08

This is the weekly thread for development questions or chit-chat that doesn't belong in the Monday Beginner Questions thread. All questions/comments/ranting about Drupal dev is fair game.

(Check out the weekly post schedule in the sidebar)

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

[C Programming] Undefined reference to pow and sqrt

Learn Programming - Thu, 09/20/2018 - 09:59

I'm trying to do my homework which is to make a program that calculates a hypotenuse, given two cathetus entered by the user. This is the code:

#include <stdio.h> #include <math.h> #include <locale.h> int main(void) { float primeiroCateto; float segundoCateto; float hipotenusa; setlocale(LC_ALL, "Portuguese"); printf("Digite o valor do primeiro cateto:\n"); scanf("%f", &primeiroCateto); printf("Digite o valor do segundo cateto:\n"); scanf("%f", &segundoCateto); hipotenusa = sqrt(pow(primeiroCateto, 2) + pow(segundoCateto, 2)); printf("A hipotenusa é igual a:\n%.2f", hipotenusa); return 0; }

The problem is that when i try to copile the code using:

gcc -Wall -Wextra -o Atividade2_exercício5 Atividade2_exercício5.c

This error shows up:

/tmp/ccFsAgvS.o: In function `main': Atividade2_exercício5.c:(.text+0x82): undefined reference to `pow' Atividade2_exercício5.c:(.text+0x9d): undefined reference to `pow' Atividade2_exercício5.c:(.text+0xa7): undefined reference to `sqrt' collect2: error: ld returned 1 exit status

So what to do now? (i'm using vccode by the way)

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

Issue with loop Question in Python

Learn Programming - Thu, 09/20/2018 - 09:42

Question

Create the str_analysis() function that takes 1 string argument and returns a string message. The message will be an analysis of a test string that is passed as an argument to str_analysis(). The function should respond with messages such as:

  • "big number"
  • "small number"
  • "all alphabetic"
  • "multiple character types"

The program will call str_analysis() with a string argument from input collected within a while loop. The while loop will test if input is empty (an empty string "") and continue to loop and gather input until the user submits at least 1 character (input cannot be empty).

The program then calls the str_analysis() function and prints the return message.

My code

def nonesense(var):

wus = ""

while wus.isdigit() != True:

wus = input("alphas or digits only please: ")

if wus.isalpha() == True:

print("yep thats some letter string")

elif wus.isdigit() == True:

if wus.isdigit() <= 99:

print("Yep thats a small number")

elif wus.isdigit() >= 99:

print("Yep thats a large number")

else:

Print("Yep, Thats not what I asked for.")

nonesense()

Error

TypeError

Traceback (most recent call last) <ipython-input-36-902ef75d336e> in <module>() 12 else: 13 Print("Yep, Thats not what I asked for.") ---> 14 nonesense() TypeError: nonesense() missing 1 required positional argument: 'var'

working answer

user_input = input("enter word or integer: ")

while user_input == "":

user_input = input("enter word or integer: ")

def str_analysis():

if user_input.isdigit() == True:

if int(user_input) > 99:

print(user_input, "is a pretty big number")

else:

print(user_input, "is a smaller number than expected")

elif user_input.isalpha() == True:

print (user_input, "is all alphabetical characters!")

str_analysis()

Help

Sorry about the wall but I want to understand why mine didn't work, was it just the order of def and while, is it possible to answer the question the way I started and I just executed it poorly after?

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

Can I use C# on Linux?

Learn Programming - Thu, 09/20/2018 - 09:40

Will I run into unexpected problems and stuff or would it go rather smoothly?

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

Practical Scripting resources - where to learn [ruby background]

Learn Programming - Thu, 09/20/2018 - 09:40

I’ve been fortunate to build code and done courses so far, but anyone have any recommended resources for some practical scripting learning/resources that are real-world?

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

Pages