• Breaking News

    Sunday, June 2, 2019

    Learn React By Creating A Fully Functional Chat Application learn programming

    Learn React By Creating A Fully Functional Chat Application learn programming


    Learn React By Creating A Fully Functional Chat Application

    Posted: 01 Jun 2019 07:39 PM PDT

    I spent the last few weeks of my life creating this tutorial series for those who are trying to learn React, but are tired of the same old tutorials.

    My goal with this series was to create something that would actually be fun and interesting for people wanting to get better at React, JavaScript, or programming in general.

    I would really love to see how people extend the functionality of this app!

    I am constantly creating new material, so subscribe to my channel if you want to keep learning! Hope to see some cool chat apps soon!

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

    Thoughts on publishing personal projects on github

    Posted: 01 Jun 2019 09:03 PM PDT

    I noticed lately that my Github is lacking in recent activity. I'd like to start making contributions to some public projects soon. However in the meantime I'd like to have an appealing github portfolio for potential future employers to see. I've been working on several personal projects where I'm either learning a new framework or solving a very specific personal problem. My personal projects are all hosted in my private gitlab, since I figured the code is not great because I'm learning a framework or it's solving such a niche problem that no one else would have. I'm wondering if it makes sense to maybe move these projects to my public github to show what I'm working on. I'm curious to hear others thoughts on publishing personal projects on github?

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

    How are user-driven sentence correction systems coded?

    Posted: 01 Jun 2019 08:15 PM PDT

    For foreign language learners, you've probably seen social apps or websites that let you native speakers correct sentences and then show the deletions and additions like here:

    https://www.fluentin3months.com/wp-content/uploads/2015/03/hello31-576x1024.png

    How are the systems coded? Is NLP used, or is it something simpler? If anyone has links to open-source Gits (especially in JS) or know the technical name for this, I'd really appreciate it.

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

    Need help with basic Javascript

    Posted: 02 Jun 2019 12:44 AM PDT

    <body> <button class="but" id="but">Press Me</button>

    <div class="test" id="test"> <p>asd</p> </div> <script> var modal = document.getElementById("test"); var btn = document.getElementById("but"); btn.onclick = function () { modal.style.display = "block"; } </script> 

    </body>

    So I have a question about the code above. If I leave it like that, the button will work, but if I switch from getElementById to getElementsByClassName, it doesn't work any more. Any idea why?

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

    Looking for a copy of VS Code

    Posted: 02 Jun 2019 12:36 AM PDT

    I have tried from multiple devices, using multiple VPNs but I cannot download it from the official website. I keep getting directed to a "not found" page. I would really grateful if anyone knew where I could find a Windows download.

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

    Best C book(s)?

    Posted: 01 Jun 2019 11:09 PM PDT

    Hello everyone. I'm looking to start programming again and decided to start with C (i have some python experience) and since Oreilly python books were in depth and informative I wanted to ask if there were any good ones for C. I would also accept any other suggestions. Thanks.

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

    GO tutorial recommendation

    Posted: 01 Jun 2019 05:06 PM PDT

    I was wondering if anyone has any recommendations for online tutorials in GO programming language. I am pretty decent in Java and Python, having worked on a few projects and internships. Now I need to learn GO for a new job I will be starting soon. Would appreciate some help getting started.

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

    Looking for Learning partner, Like minded Individual

    Posted: 01 Jun 2019 03:30 PM PDT

    Hi, just finished my freshman year of college as a computer science major, business minor and was just looking for someone who could motivate me, give me advice, and keep me consistent. My future goal is to start an AI startup, over the past year I have completely changed my life. Even though I have come a long way, I still am very far from the place I want to be. in 12 months I have read 16 amazing self-help books, ranging from many topics to help get me to this mindset. I exercise 5 days a week, try to read at least 45 minutes a day of a book I bought, spend 5-6 hours learning android development, and spend about 2 hours learning linear algebra (for machine learning), and journal. I am 20 years old, and not a single one of my friends share an inkling of wanting to get better every day. I am someone who is motivated by the people around me, and it is really frustrating having no one. Thanks for reading, hopefully, I will find someone!

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

    How to make a live-action video game (turn-based strategy)?

    Posted: 01 Jun 2019 10:44 PM PDT

    For the rest of the summer, I plan to make a video game just for fun, but I have no prior experience in coding and making video games.

    I want to make something like this -> Living Room Fight

    and I already have the resources to make the pre-recorded videos (like the actors, setting, camera, video editing software), but not the program to make the game itself.

    What game engine/program do I use and how do I make it? (without spending money)

    Pls help a newbie out :'((

    Thank you!!

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

    How to split a large website in angular?

    Posted: 01 Jun 2019 10:08 PM PDT

    I can't find any good resources showing me how to split a website by modules, components, etc...Any help would be appreciated

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

    Errors in Bash Scripting.

    Posted: 02 Jun 2019 01:48 AM PDT

    #1 #!/bin/bash

    #2

    #3 # check no arguments are given to $0:

    #4 if [ $# -ne 0 ]; then

    #5 echo "Script requires no arguments, try again"

    #6 exit 1

    #7 fi

    #8

    #9 COUNT=1

    #10 while [ $COUNT -ne 0 ]; do

    #11 echo

    #12 echo "1) Create a new virtual-environment"

    #13 echo "2) List the total virtual-environment"

    #14 echo "3) Remove a virtual-environment"

    #15 echo "4) Exit"

    #16 echo

    #17 read -p "Enter your choice: " ANS

    #18

    #19 case $ANS in

    #20

    #21 1 )

    #22 echo

    #23 read -p "Enter the name of the virtual-environment: " NAME_1

    #24 $(mkvirtualenv $NAME_1)

    #25 let COUNT=0

    #26 ;;

    #27

    #28 2 )

    #29 echo

    #30 $(lsvirtualenv -b)

    #31 echo

    #32 let COUNT=0

    #33 ;;

    #34

    #35 3 )

    #36 read -p "Enter the name of the virtual-environment: " NAME_2

    #37 $(rmvirtualenv $NAME_2)

    #38 echo "$NAME_2 environment removed successfully..."

    #39 let COUNT=0

    #40 ;;

    #41

    #42 4 )

    #43 echo "Exiting..."

    #44 echo

    #45 let COUNT=0

    #46 ;;

    #47

    #48 * )

    #49 echo

    #50 echo "Wrong input, try again"

    #51 ;;

    #52 esac

    #53 done

    I started learning BASH script recently and tried making a script for python virtual environments, but whenever I run the script I get the following errors:

    ./myenvs: line 24: mkvirtualenv: command not found

    ./myenvs: line 30: lsvirtualenv: command not found

    I tried running the commands without enclosing in $() but it still does not work.

    submitted by /u/11Night
    [link] [comments]

    CMD problem

    Posted: 02 Jun 2019 01:26 AM PDT

    So I'm currently in the middle of programming a discord bot and its running smoothly but I bought a laptop with windows 10 which my desktop runs as well and I try to use the change directory command cd desktop but it returns saying system could not find specified path and I looked everywhere for a solution but I can't find anything on it. Anybody have any clues?

    SOLVED: The desktop path was named 'OneDrive' and not 'Desktop'

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

    [django and POST] How to check if 'context' was sent to a template or not

    Posted: 01 Jun 2019 07:03 PM PDT

    I'm practicing on a simple weather app. Initially, the user goes to the website and sees this: http://agracy.herokuapp.com/weather/ which has no data being displayed.

    Obviously, the user enters their zip code and clicks the button and then the page refreshes with the relevant data.

    My question is: how can I check if my template has received a context ( dictionary of the data I want displayed ) or not?

    Here is my view (not completed, but you can see whats happening) and template.

    def weather(request): if request.method == 'POST': form = WeatherForm(request.POST) if form.is_valid(): # GET DATA FROM API AND STORE IN 'CONTEXT' context = {} return render(request, 'blog/weather.html', context) else: return render(request, 'blog/weather.html') {% extends 'blog/base.html' %} {% block content %} <h1>Weather report for {{ city }}</h1> <h3>Temperature: {{ temp }}</h3> <h3>Wind speed: {{ wind }}</h3> <h3>Description: {{ description }}</h3> <!--Form must include WHERE/HOW (URL and Method) --> <form action="{% url 'weather' %}" method="post"> {% csrf_token %} <input type="text" value="zip"> <button type="submit" value="updateWeather">Update</button> </form> {% endblock %} 
    submitted by /u/Lnnux
    [link] [comments]

    [NASMX86] Segmentation fault on Linux, but not on Windows

    Posted: 01 Jun 2019 07:00 PM PDT

    Update2 [Solved] + Question :

    Instead of using the stack (esp-4/esp-8) to allocate the variables, I created variables in .bss section, and used them. No segmentation fault anymore, but why is this? I've seen in many sites that they use the stack to allocate temp variables.

    Update1:

    In the program, I changed the standard exit call in Linux, to "ret" (which I shouldn't...), and the program works, so for some reason, the standard exit call is showing me the seg fault...

     ;mov eax, 1 ;xor ebx, ebx ;ret ret 

    Didn't get the debugger to work yet on linux..

    On windows, I'm using the standard exit call

     _ExitProcess@4 

    And I'm getting the expected output with no errors apparently


    I'm trying to generate a binary string, this macro works well on Windows, but for some reason, it's giving me segmentation fault on Linux. I've been placing "prints/prints2" around the code, which just print info. In the following, the first call to the macro prints2, actually prints the ascii string that I want to use to generate the binary string (it's a macro that uses printf and "%.8s"), the next call to prints prints a dummy message, but the next call to prints (after the mov instruction), doesn't get to print the message since a segmentation fault ends the program.

    So I believe the problem is in that mov instruction. In windows I've used it to store temporal variables, I thought through doing ebp-8 I wasn't accessing something I was supossed to, so I changed it to "ebp+8", but the problem persists.

    %1 is a string of len 8, which contains ascii characters that represent a number in the Hex base

    %2 is the destination, which must be of size len(%1)*4 (because you need 4 binary digits to represent 1 hex digit.

    %3 is the len of %1 string, which is 8.


    %macro HexToBin 3 ;src, dest, src_len mov edi,0 mov esi,0 mov bl, byte [%1+esi] ; prints2 %1, print_8 ; < Gets printed prints me_hex_cfg ; < Gets printed %%scanchar: ; hex decode mov dword [ebp-8], dword 0 ;dword [char_cnt], 0 prints me_hex_cfg ; < Doesn't get printed sub bl, 48 mov cl, bl sub cl, 7 cmp bl, 10 cmovge ebx, ecx mov cl, bl sub cl, 32 cmp bl, 16 cmovge ebx, ecx %%writeR: ; writting 0/1 on dest mov dl, bl shr dl, 3 and dl, 1 mov byte[%2+edi],0x30 cmp dl, 1 jne %%writeE mov byte[%2+edi],0x31 %%writeE: shl bl, 1 inc dword [ebp-8] inc edi ; It will increase esi each time I write 1 byte cmp dword [ebp-8], 4 jl %%writeR inc esi ; Next Char cmp esi,%3 ; were all chars iterated? je %%hextobinE mov bl, byte [mem_8+esi] jmp %%scanchar %%hextobinE: %endmacro 

    build:

    nasm -f elf32 -o gcc -m32 -o 
    submitted by /u/Grambouck
    [link] [comments]

    [Python] on my Mac, I found 5 versions of python installed. Should I delete all but the latest one?

    Posted: 02 Jun 2019 12:46 AM PDT

    I was browsing my Mac and I went into system-framework-python.framework-versions, and discovered five versions of python in there: 2.3, 2.5, 2.6, 2.7, and "current," which I'm guessing is 3.7.

    Should I go ahead and delete the older versions since I never use them? Thanks.

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

    A (probably stupid) NodeJS Security Question

    Posted: 01 Jun 2019 05:03 PM PDT

    NodeJS is built on the Chrome V8 Engine. Does this mean that Google has a backdoor into my software?

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

    C Programming: How to create a function that asks for memory for a dynamic matrix?

    Posted: 01 Jun 2019 06:05 PM PDT

    Hi,

    I want to create a function that looks like this:

    void ask_memory_float(float **matrix, int n, int m); 

    I want to give it a matrix with uninitialized memory and its dimensions (n being rows, m being columns)

    I tried this implementation but it didn't work:

    void ask_memory_float(float **matrix, int n, int m){ matrix = (float**) malloc (n * sizeof(float*)); if(matrix == NULL){ abort(); } for(int i = 0; i < n; i++){ matrix[i] = (float*) malloc (m * sizeof(float)); if(matrix[i] == NULL){ abort(); } } } 

    I am not exactly sure why it doesn't work. Any ideas?

    Maybe I should return the matrix instead of it being a void function??

    Thanks a lot in advance!

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

    Roadmap for learning Augmented Reality?

    Posted: 02 Jun 2019 12:00 AM PDT

    I'm aware of roadmap for getting into concentrations such as the different fields in webdev and software engineering. Is there a similar one for getting into Augmented Reality?

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

    Swift Series in spanish with Firestore

    Posted: 01 Jun 2019 02:09 PM PDT

    Hi everyone i made a small tutorial for Spanish speakers that would like to learn to program. More videos will come as this is the start of a small series i will be doing

    https://www.youtube.com/watch?v=fbn3FvEBeN0

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

    [Data Structures / Big O] Implement Dynamic Array (Push, Pop) using Static Array

    Posted: 01 Jun 2019 02:03 PM PDT

    I had a practice interview on interviewing.io where I had to implement a Dynamic Array with Push and Pop methods using a static array under the hood.

    I had seen this question before, the answer is to maintain a static array with capacity N, and (the trick) every time we run out of space...we copy our static array to a new static array with doubled capacity giving us amortized runtime of O(1) for our #push method, as we 'pay' for free pushes with every doubling. Something like this

    self.capacity = 4

    self.static = [5, 2, 7, 6]

    If we want to push again, at len(self.static) == self.capacity ...becomes...

    self.capacity = 8

    self.static = [5, 2, 7, 6, 9, None, None, None]

    The interviewer said that this solution was not optimal. That there is a way to acheive O(1) complexity for push without it having to be amortized. After racking my brain, scouring the internet and asking friends, I cant seem to find the solution he was talking about. Anyone know what he meant?

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

    What are the benefits of learn a graphics API like OpenGL for a programmer?

    Posted: 01 Jun 2019 04:23 PM PDT

    So, I'm grabbing programming books and my CS teacher used to keep suggesting I learn graphics programming (though I'm 99% sure he meant GUI frameworks but I've got no idea how one can confuse those two and I already know how to build GUIs). So, I've been thinking of reading an OpenGL book cause knowledge is cool. But what are some practical uses for graphics programming to the regular aspiring programmer?

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

    React flask app help

    Posted: 01 Jun 2019 10:21 PM PDT

    I have taken a bunch of online courses on flask, react, and html/css/JavaScript. I am now trying to make a full stack web application to further learn these skills. However, I am having a hard time coming up with ideas that incorporate all these technologies. I also do not know how and where to start.

    Any suggestions?

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

    No comments:

    Post a Comment