These are chat archives for FreeCodeCamp/Help

8th
Oct 2018
Bjorn van de Peut
@bjorno43
Oct 08 2018 01:03
Sometimes I believe I missed my calling..
afbeelding.png
afbeelding.png
Been on that for about 4 days now :P
Claudio Restifo
@Marmiz
Oct 08 2018 05:05
At first I thought it was Blender @bjorno43 :)
Bjorn van de Peut
@bjorno43
Oct 08 2018 05:09
Whaha nah, just messing around with Minecraft a bit :P
Kranti Nebhwani
@darkphotonKN
Oct 08 2018 05:59

anyone have any tips or ideas on how to make drop down menu options be dynamic in that say the first dropdown determines the contents of the second drop down that determines the third. So e.g.:
Dropdown1:

space
earth

-- selected space -->
Dropdown2:

planets

moons  

stars

-- selected moon -->
Dropdown3:

Titan

Ganymede

Luna

...

I was planning to have all 3 drop downs visibile from the start though, but unsure if that's a good idea. And then choosing the category from the first one limits the options in the second etc. After choosing all 3 the content for that "section" is generated

Kranti Nebhwani
@darkphotonKN
Oct 08 2018 06:08
@bjorno43 lol did you make that entire mansion wowwww
BuntyBru
@BuntyBru
Oct 08 2018 06:27
Has anyone managed two github accounts through the same machine?
i mean we have to put separate sshKeys
but is that all it?
Bjorn van de Peut
@bjorno43
Oct 08 2018 06:30

@darkphotonKN Assuming your HTML would look something like this:

<select id="start">
    <option value="earth">Earth</option>
    <option value="space">Space</option>
</select>

<select id="second">
</select>

Your JS should look something like this (haven't tested it, but should work fine):

function createOption(value, innerTxt, ele){
    /* Create elements */
    let optionEle = document.createElement('option');
    let innerTxtEle = document.createTextNode(innerTxt);

    /* Set value */
    optionEle.value = value;

    /* Append both to select */
    optionEle.appendChild(innerTxtEle);
    ele.appendChild(optionEle);
}

document.getElementById('start').addEventListener('change', function(e) {
    /* Get first select */
    const startSelect = document.getElementById('start');

    /* Earth selected */
    if(ele.options[ele.selectedIndex].value === 'earth'){

        const secondSelect = document.getElementById('second');
        createOption('countries','Countries',secondSelect);
        createOption('cities','Cities',secondSelect);

    /* Space selected */
    } else if(ele.options[ele.selectedIndex].value === 'space'){

        const secondSelect = document.getElementById('second');
        createOption('moons','Moons',secondSelect);
        createOption('stars','Stars',secondSelect);
    }
}, false);
Obviously you still have to add the removing parts etc, but given this example you should be able to do that yourself
Kranti Nebhwani
@darkphotonKN
Oct 08 2018 06:41
@bjorno43 thank you man i shall study that hard :D
Bjorn van de Peut
@bjorno43
Oct 08 2018 06:43
@darkphotonKN You're welcome. It's really not that hard to understand. You monitor for a change in the first select. Then you check which value is selected, and based on that, you append new options to the second select :)
Kranti Nebhwani
@darkphotonKN
Oct 08 2018 06:46
@bjorno43 yep i got it now :) im just not used to certain things in frameworkless javascript, which im trying to get better at now ill get back to you if i have further questions with this as im still thinking of some whacky things I could do following this
Bjorn van de Peut
@bjorno43
Oct 08 2018 06:50
I always say: If you can't do it in native JS, you have to get back to the basics. Frameworks are amazing and definitely make your life a lot better. But there's a difference between relying on them and being dependent on them. You never know what the future of a certain framework will be and should always be able to do without should it ever come to that. Just my opinion though
Karma Drukpa
@coderkarma
Oct 08 2018 06:50
true
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>My Photo Gallary</title>
    <link rel="stylesheet" href="style.css">
</head>

<body>
    <h1>A Collection of Stunning Photos.</h1>
    <div id="flex-container">
        <div><img  src="images/img1.jpg" alt="photo1"></div>
        <div><img src="images/img2.jpg" alt="photo2"></div>
        <div><img src="images/img3.jpeg" alt="photo3"></div>
        <div><img src="images/img4.jpeg" alt="photo4"></div>
        <div><img src="images/img5.jpeg" alt="photo5"></div>
        <div><img src="images/img6.jpeg" alt="photo6"></div>
        <div><img src="images/img7.jpeg" alt="photo7"></div>
        <div><img src="images/img8.jpeg" alt="photo8"></div>
        <div><img src="images/img9.jpg" alt="photo9"></div>
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="scripts.js"></script>

</body>

</html>
@bjorno43 here's my little problem, if you could help me out
when i click on image, I want to make image larger with smooth animation. but the thing is I am not able to do it.
Bjorn van de Peut
@bjorno43
Oct 08 2018 06:54
@coderkarma Give me a couple of mins. I remember seeing a tutorial about what you want somewhere. Lemme see if I can find it
Karma Drukpa
@coderkarma
Oct 08 2018 06:55
let divs = document.querySelectorAll('#flex-container > div');


divs.forEach((e) => {
  e.addEventListener('click', (el) => {
   let image = el.currentTarget.firstChild;
   image.classList.toggle('bigger');
  })
});
I tried doing this. but when it only makes images big, their position were not center even when center them.
thanks, let me check that out.
Kranti Nebhwani
@darkphotonKN
Oct 08 2018 06:56
@bjorno43 yep defeinitely agree with you, hence why im trying to go back and learn now haha
Karma Drukpa
@coderkarma
Oct 08 2018 06:58
@bjorno43 thanks, that link explains everything lol
Bjorn van de Peut
@bjorno43
Oct 08 2018 06:58
@coderkarma You're welcome :)
Karma Drukpa
@coderkarma
Oct 08 2018 07:00
when it comes to descendent, child, sibling etc in html, it confuses especially while targeting them.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:01
Just view your code like a family tree. That's why code indentation is also very important. It makes it easy for you to see what the parents and childs are
Karma Drukpa
@coderkarma
Oct 08 2018 07:02
true.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:02

Hard to see:

<html> <!-- parent -->
<body> <!-- child of html -->
<div> <!-- child of body -->

Easy to see:

<html> <!-- parent -->
        <body> <!-- child of html -->
                <div> <!-- child of body -->
Karma Drukpa
@coderkarma
Oct 08 2018 07:03
hahah that's right.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:08
@coderkarma This is the kind of code I'm working on :laughing:
class Chat {

    constructor() {
        /* Settings */
        this.serverHost = window.location.host;
        this.serverPort = 9300;
        this.userCount = 0;
        this.socket = false;
        this.connected = false;
        this.connecting = false;
    }

    /* New connection */
    connect(){
        /* Connection pending */
        if (this.connecting) {
            return;
        }

        /* User already connected. Disconnect */
        if (this.connected) {
            this.disconnect();
            return;
        }

        /* Create websocket instance. Bind events */
        const Socket = new WebSocket('wss://'+this.serverHost+'/myws/');
        this.setSocketEvents(Socket);
        this.socket = Socket;
    }

    /* Socket events */
    setSocketEvents(Socket){
        this.connecting = true;
        /* Processed on connection */
        Socket.onopen = () => {
            this.connected = true;
            this.connecting = false;

            /* Makes sure the username is set by the server
               Server refuses connection if user messes around with this */
            const token = document.getElementById('token').value;

            this.socket.send('JOIN '+token);

            const ele = document.getElementById('modal');
            const instance = M.Modal.getInstance(ele);
Ene Catalin
@EneCatalin
Oct 08 2018 07:09
is that node ?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:09
Nope. That's normal JS
lol
I mean client side, lol
Ene Catalin
@EneCatalin
Oct 08 2018 07:09
you can make a chat with plain js ?
nvm, client side
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:09
Well if you have a websocket server running somewhere, sure
Ene Catalin
@EneCatalin
Oct 08 2018 07:09
wait
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:09
But you dont need Node for that :P
Ene Catalin
@EneCatalin
Oct 08 2018 07:10
really ?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:10
Ye that's what I'm working on
Ene Catalin
@EneCatalin
Oct 08 2018 07:10
I don't know what a websocket server is
how does that spare you the need of making a server side for the app ?
Karma Drukpa
@coderkarma
Oct 08 2018 07:10
@bjorno43 I don't know any thing about websocket to
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:10
Erm. On the most basic level: It's an ip address and a port. Nothing else
Ene Catalin
@EneCatalin
Oct 08 2018 07:11
oh so user one sends the text message to said api
with a signature of sorts
and the api sends data to user 2
and so on
is that it ?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:11
Yes, now you're getting it. On the server there's program listening on that port. It waits for packets and forwards them to all clients connected
Ene Catalin
@EneCatalin
Oct 08 2018 07:12
problem is this is a classic server ?
Karma Drukpa
@coderkarma
Oct 08 2018 07:12
@bjorno43 well commented and well indented, very easy to read and understand.
Ene Catalin
@EneCatalin
Oct 08 2018 07:12
like, sounds like pre written server you just don't write
feel like I am missing something
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:12
For me it's a simple server running on Ubuntu. I've programmed the websocket in PHP. You can do that with Node as well though. Just what you prefer
Karma Drukpa
@coderkarma
Oct 08 2018 07:12
@EneCatalin is that your real profile picture?
Ene Catalin
@EneCatalin
Oct 08 2018 07:13
right, so it's a normal server
@coderkarma yes
ostriches are people too
Nicolas Ramirez
@kamatheuska
Oct 08 2018 07:13
@bjorno43 I am implementing my first class syntax. It looks just awesome
Karma Drukpa
@coderkarma
Oct 08 2018 07:13
wow!! I almost passed out.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:13
Ye of course. I mean, technically you could use WebRTC for a direct browser to browser connection. But I haven't checked that out yet
Ene Catalin
@EneCatalin
Oct 08 2018 07:14
going by the name it sounds hellish to try
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:14
That would eliminate the need for a server though, haha
Ene Catalin
@EneCatalin
Oct 08 2018 07:14
nvm it's cool
read up on it
curious how they do it
and how secure it is
but not curious enough to actually research it
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:15
I guess it's a bit like a P2P connection
Karma Drukpa
@coderkarma
Oct 08 2018 07:15
how important is AJAX to learn ?
Ene Catalin
@EneCatalin
Oct 08 2018 07:15
well, don't bother
if you run into it do it
you'll run into it lol
like, fast
Karma Drukpa
@coderkarma
Oct 08 2018 07:16
I am doing AJAX tutorial at TreeHouse.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:16
Ajax honestly sounds a lot more complicated than it really is. But you only need it when you need to transfer data without refreshing your website
Ene Catalin
@EneCatalin
Oct 08 2018 07:16
just do a small project
like, write a webpage about why ostriches are the best birds
and emus suck
ajax was hell at first
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:17
Very, very true
Ene Catalin
@EneCatalin
Oct 08 2018 07:17
it's easy once you get used to it
but I wanted to rip my hair off at the start lol
out*
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:17
You're not alone, lol
Men.. the "good" old days..
Ene Catalin
@EneCatalin
Oct 08 2018 07:17
most programming is like that
Karma Drukpa
@coderkarma
Oct 08 2018 07:18
@bjorno43 Honestly, I don't know anything about AJAX but I am following some tutorial, that is included in front-end course, therefore I have to learn and understand it better.
Ene Catalin
@EneCatalin
Oct 08 2018 07:18
takes you a week to implement a basic feature
2nd time around it takes you 10 mins
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:18
@kamatheuska It gets closer to Object Orientated programming. I concept I like quite a lot :)
Ene Catalin
@EneCatalin
Oct 08 2018 07:18
OOP is the best shit
that and strongly typed languages :P
Nicolas Ramirez
@kamatheuska
Oct 08 2018 07:19
@bjorno43 Still, I would like to remain more functional
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:19
@coderkarma Untill you're doing server side programming, you probably hardly ever run into a situation where you'll need Ajax
Nicolas Ramirez
@kamatheuska
Oct 08 2018 07:19
I am building the biggest frankeinstein yet
so a lot of inheritance would be really difficult to process for my neurons
Karma Drukpa
@coderkarma
Oct 08 2018 07:20
@bjorno43 Oh Okay.
good to know.
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:20
Hmm. Some prefer functional programming, others like OOP. Luckily functional isn't nessesarily better than OOP
Ene Catalin
@EneCatalin
Oct 08 2018 07:23
I haven't tried functional
there's a javaRX thingy for that but i've never touched it
alpox
@alpox
Oct 08 2018 07:23

Luckily functional isn't nessesarily better than OOP

But nicer ^_^

Bjorn van de Peut
@bjorno43
Oct 08 2018 07:23
@EneCatalin You're right about that. The implicit conversion in JS made me pull a few hair strings as well, ghehe
Ene Catalin
@EneCatalin
Oct 08 2018 07:24
@bjorno43 yes, it's made to spare you a headache
I mean sure, it adds clutter, and you do need to make a few conversions the hard way
but holy f does it spare you some panic and makes stuff easy to debug
Karma Drukpa
@coderkarma
Oct 08 2018 07:24
alright guys, I am signing off now. goodnight here
Ene Catalin
@EneCatalin
Oct 08 2018 07:24
nite
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:24
Gn8 @coderkarma
Btw, I actually downloaded a project that enables audio and videochat through WebRTC. Cool stuff :P
Pretty much a very simplified Skype through the web
Ene Catalin
@EneCatalin
Oct 08 2018 07:29
that sounds cool
tech is evolving a lot lately
RIP newbies
hell, RIP ostrich lol
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:31
Ghehe. Well I'm just happy we've got websockets these days
Ene Catalin
@EneCatalin
Oct 08 2018 07:31
i need to look into them
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:31
I remember when I started on my first chatsystem. I had to do with short polling.. /cry
Ene Catalin
@EneCatalin
Oct 08 2018 07:31
you said they're pretty much servers ?
never done a chat, probs should try one myself some day
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:32
No they're a protocol I guess. The websocket is just the connection itself. You still have to write software behind it in order to do something with it
Ene Catalin
@EneCatalin
Oct 08 2018 07:33
so you have to write how to interpret the data
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:33
Yes
Ene Catalin
@EneCatalin
Oct 08 2018 07:34
anyway, not doing anything related to that yet
I just need to do a short expense consumer app or some crap like that to practice a bit
expense tracker*
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:35
A chatsystem is something of a different nature I guess. It's very easy to setup, extremely complicated to make it fully featured. Very interesting to work on though
Ene Catalin
@EneCatalin
Oct 08 2018 07:35
there's a chance ima try it
if I don't find anything java related
I love java but in need I will switch to web :|
speaking of, a chat in java with spring seems like a special kind of hell
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:37
Java isn't really my thing. The bigger the app, the slower it becomes cuz of the JITTER
Ene Catalin
@EneCatalin
Oct 08 2018 07:37
behold, gods mistake
tried spring as a newbie a year ago, soul crushing
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:38
The hell is wrong with that website? I can't even set the cookie settings to minimal without it loading on 93% forever..
Ene Catalin
@EneCatalin
Oct 08 2018 07:39
it's spring
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:39
Ah finally.. it finished
Ene Catalin
@EneCatalin
Oct 08 2018 07:39
this is the "web" part of java
android is a fucking joke to program by comparison
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:40
Ye no.. that's like me writing web apps with C#.. sure it's possible. Doesn't mean I should..
BuntyBru
@BuntyBru
Oct 08 2018 07:41

i am kind of confused so i am asking this

when a repository at Github has several branches and i just want to clone a specific branch
I do this
right

git clone -b myBranch https://github.com.....nfdfhfh.git

right?
Ene Catalin
@EneCatalin
Oct 08 2018 07:41
isn't c# for web apps ?
the hell is it for then ?
BuntyBru
@BuntyBru
Oct 08 2018 07:41
or will i have to do something else too after cloning
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:41
Whahaha
Ene Catalin
@EneCatalin
Oct 08 2018 07:41
i've been told to make a simple web page in C# once
HATED it
the fucking errors trying to set it up
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:42
:laughing:
Ene Catalin
@EneCatalin
Oct 08 2018 07:42
"it's like java" yeah right
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:42
Ok whoever said that, is an idiot.. C# !== Java!
Ene Catalin
@EneCatalin
Oct 08 2018 07:42
lots of people say that
I love java
can't stand C# for some reason
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:43
Ye.. Usually it's people that understand the concept of OOP and therefor compare the two..
Ene Catalin
@EneCatalin
Oct 08 2018 07:44
anyway, what's it for if not web pages ?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:44
@BuntyBru It should be something like: git clone --single-branch -b branch host:/dir.git
Ene Catalin
@EneCatalin
Oct 08 2018 07:44
had to make a simple rest thingy with it
Nicolas Ramirez
@kamatheuska
Oct 08 2018 07:44
@BuntyBru why do you want to clone only a branch? is it a too big of a repo?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:45
C# is for .NET development. Mostly Windows programs
Ene Catalin
@EneCatalin
Oct 08 2018 07:49
that sounds limiting af
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:50
Yup. I mean, C# can be used for cross os development. But you either need to exclude .NET or have the non-windows os install a .NET package
Ene Catalin
@EneCatalin
Oct 08 2018 07:52
so dependency hell
sounds fun
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:52
Yup
That's what makes Java better some ways cross os. Cuz it's compiled on the client by the JVM
Downside of that is that it's slower than pre-compiled software
Ene Catalin
@EneCatalin
Oct 08 2018 07:54
true, takes a while to run a java program
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:54
Upside is that's it's nearly impossible to write game trainers for games written in Java :laughing:
Ene Catalin
@EneCatalin
Oct 08 2018 07:54
cause of he JVM ?
how is that an upside ?
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:54
Yup. It's practicly impossible to find any pointers cuz the game is re-compiled everytime
Cuz it makes it pretty much impossible for ppl to cheat
Ene Catalin
@EneCatalin
Oct 08 2018 07:55
just realized that lol
pre-compiled software pointers are the same
cause they have to be
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:55
Exactly
Ene Catalin
@EneCatalin
Oct 08 2018 07:56
cause it's already compiled
never thought about that
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:57
But then again, as it's not compiled to begin with, anyone with a bit of knowledge could just alter the game source, ghehe
Ene Catalin
@EneCatalin
Oct 08 2018 07:57
paradox interactive made games moddable like that more or less
that's very much a feature
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:57
Still that would only allow them to cheat on single player cuz any MD5 checksum would inmediately fail if you did that
Ene Catalin
@EneCatalin
Oct 08 2018 07:58
games that moddable are great
modders have often remade them much better
Bjorn van de Peut
@bjorno43
Oct 08 2018 07:58
True
Ene Catalin
@EneCatalin
Oct 08 2018 07:59
this should legit be a feature in gaming in general
you have the game, may as well have the tools to modify what you don't like
anyway, don't think I will ever write games
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:00
Well it's a bit problematic to do that
If you sell a game and release the source with it for modding, your game will be pirated within a day
Ene Catalin
@EneCatalin
Oct 08 2018 08:00
the game will be pirated anyway ?
legit don't think piracy cuts that much on sales
Claudio Restifo
@Marmiz
Oct 08 2018 08:01
lootbox the mod keys == profit
...actually... :thought_balloon:
Ene Catalin
@EneCatalin
Oct 08 2018 08:01
(as a pirate, soon as I got some cash I started buying what I played)
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:01
Not anymore. There are securities these days that have proven to be uncrackable for at least 1 month and most likely longer. More than enough for your game to sell
Ene Catalin
@EneCatalin
Oct 08 2018 08:01
lootboxes are cancer
that seems fair
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:03
And actually, it was proven that it does cut a LOT on sales. Some indy company released their own game both for sale and a "pirated" version some days later. They started monitoring and in the end 95% of users was playing the pirated version and only 5% bought it
Ene Catalin
@EneCatalin
Oct 08 2018 08:04
that's brutal
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:06
Yup. I mean, I get it. Games are way too expensive. You're not gonna buy every game that piekes your interest only to find out you don't like it 5 days later. But personally, I really do buy games that I still enjoy after a few weeks. Simply because I know very well how much time and work goes into its development
Like cyberpunk 2077. You can bet your ass that I'll be buying that one legit :P
Same goes for Skyrim 2 when it gets released of course, ghehe
Ene Catalin
@EneCatalin
Oct 08 2018 08:10
I am legit broke
but yeah, when I have cash I buy
i will definitely buy the witcher at some point
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:10
Well both wont be released untill somewhere in 2019.. so plenty of time to save up for it
Ene Catalin
@EneCatalin
Oct 08 2018 08:10
need a new pc before that lol but yeah
or a console
consoles are cheaper
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:11
PC masterrace!
I only have 1 console here at my home
Ene Catalin
@EneCatalin
Oct 08 2018 08:11
I have none and live in a student dorm
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:12
The original Nintendo. And it still works! On my 45" plasma TV! :laughing:
Ene Catalin
@EneCatalin
Oct 08 2018 08:12
so yeah :P
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:12
Even though I know that thing is worth quite a bit of money these days, I will not be selling it! :P
Ene Catalin
@EneCatalin
Oct 08 2018 08:12
it costs more ?
wtf
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:14
I remember seeing the original one for a couple of thousend bucks online. Not talking about the NES, but really the first Nintendo
Hmm never mind. Can't find anything about it anymore. Had something to do with a different design if I remember correctly
Shivam-walia
@Shivam-walia
Oct 08 2018 08:20
How we can perform Image stitching using open CV in Python
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:21
@Shivam-walia Our Python help channel
BuntyBru
@BuntyBru
Oct 08 2018 08:22

@kamatheuska
no repo is not that big
But several people are contributing at the same time

BTW doesn't cloning a branch gives us the whole repo
I mean that is what branches are for

whole repo + additional features

right?
Shivam-walia
@Shivam-walia
Oct 08 2018 08:22
@bjorno43 Thanks
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:23
@Shivam-walia :thumbsup:
BuntyBru
@BuntyBru
Oct 08 2018 08:24
@bjorno43
what does this do then
git clone -b branch host:/dir.git
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:24
@Shivam-walia Be patient though. Many of our Campers are from the US and it's currently in the middle of the night there. Most are probably asleep
Shivam-walia
@Shivam-walia
Oct 08 2018 08:25
Oka I understand
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:25
@BuntyBru That clones all branches. You can read more about it here: https://stackoverflow.com/questions/1911109/how-to-clone-a-specific-git-branch
BuntyBru
@BuntyBru
Oct 08 2018 08:28
@bjorno43 yup i saw it
See a single branch = whole repository code + extra features
extra features are the reason for which you created the branch right?
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:29

@BuntyBru Good. Then you should've seen:

"With Git 1.7.10 and later, add --single-branch to prevent fetching of all branches."

BuntyBru
@BuntyBru
Oct 08 2018 08:29

@bjorno43

single branch = whole repository code + extra features
extra features are the reason for which you created the branch right?

Bjorn van de Peut
@bjorno43
Oct 08 2018 08:30
Honestly, I'm the wrong person to ask about that. I'm just very good and fast with Google when you asked your question, lol
BuntyBru
@BuntyBru
Oct 08 2018 08:30
i mean if i clone into a single branch
I would be able to run the whole stuff
right?
whole stuff + additional features which i am making
@bjorno43
okay let me try it
lets see what happens
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:32
@BuntyBru Trial and error is usually the way to go. Or come back in about 10 / 12 hours. Other regulars of this channel will be online by then who have more exp with Git
BuntyBru
@BuntyBru
Oct 08 2018 08:32
cool
when i am mostly available in here
Claudio Restifo
@Marmiz
Oct 08 2018 08:33
@BuntyBru the branch you want is on the remote repo?
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:33
Talk about the devil.. :innocent:
Claudio Restifo
@Marmiz
Oct 08 2018 08:33
let's say there's
master
newFeature
you can clone the repo.
git branch -r // list all remote repo
git checkout -b newFeature // will recognize that you want a local branch that tracks remote newFeature

from newFeature you can create a new local branch that you work on locally.

(from newFeature)
git checkout -b myLocalB // set a new local B

When you are done with your local you can then merge into newFeature so all your remote friends will benefit from you awesome work :sparkles:

then git blame @bjorno43 and is all set
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:39
I had that coming didn't I..?
Claudio Restifo
@Marmiz
Oct 08 2018 08:40
kinda... :laughing:
Bjorn van de Peut
@bjorno43
Oct 08 2018 08:40
Hahaha
Claudio Restifo
@Marmiz
Oct 08 2018 08:44

for instance he stated this:

i mean if i clone into a single branch 
I would be able to run the whole stuff
right?
whole stuff + additional features which i am making

That depends a lot of which branch he's cloning and how diff from others.

May Kittens Devour Your Soul
@diomed
Oct 08 2018 09:03

Talk about the devil.. :innocent:

who mentioned me?

Bjorn van de Peut
@bjorno43
Oct 08 2018 09:13
@diomed :wave: Sorry for waking you up, lol
BuntyBru
@BuntyBru
Oct 08 2018 09:31

@Marmiz
git checkout -b newFeature

i will do this when i have cloned the full repo

right?

master
prod
stage

I have to clone prod and stage

and then make my changes to stage and then merge it to prod

Claudio Restifo
@Marmiz
Oct 08 2018 09:34
@BuntyBru pro-tip:
type git help checkout in your terminal and read about what the -b flag does :)
@BuntyBru and maybe git help clone :)
so you'll see that when you actually git clone whateverTheRepoUrl you'll have the remote tracking for each branch in the cloned repo.
so you don't "have to clone prod and stage"
they are already there
BuntyBru
@BuntyBru
Oct 08 2018 09:47
@Marmiz
so you mean to say i should download the full repo
and then work through checkout
git clone somestuufffff.git
git checkout branch
git checkout -b branch-name
Claudio Restifo
@Marmiz
Oct 08 2018 09:50

when you clone, the default is that you clone the whole repo, with all its git history, branches, blame rebase and so on...
the whole story.

But that's the whole point of git. So that no matter at which point you jump in, you'll always be on track

BuntyBru
@BuntyBru
Oct 08 2018 09:50
yep that was what i was confused about
If i clone a branch, a specific branch, that means i get the full code + features for that branch
and when i clone the full repo
I get all branches
Claudio Restifo
@Marmiz
Oct 08 2018 09:51
I have yet to see the benefit of cloning a single branch tbh
BuntyBru
@BuntyBru
Oct 08 2018 09:52
What i want to know now is if i clone in the full repo
and then use checkout
that is the proper way
?

I have yet to see the benefit of cloning a single branch tbh

working with a team now, So need to know about this stuff

There saying is I should clone the branch1 and branch2
and then work with branch2 and then merge it with branch1
so that testing could be done
Claudio Restifo
@Marmiz
Oct 08 2018 09:57
git clone remoteRepo
git branch // probably just master
git branch -r // all the remote repo imagine in this case master prod stage
git checkout -b prod 
// creates a local prod branch that tracks remote/prod. I'm too lazy to type remote/prod all the time. Essentially is almost the same
git checkout -b stage // see above - and we move to stage
git pull origin stage // so you are up to date (just in case)
git checkout -b myFix // create a LOCAL branch, your friends won't see this at home unless you create a remote branch as well

< work on your stuff, once you are happy >

git checkout stage // back to stage
git pull origin stage // update
git merge myFix // add myFix changes to stage
git push origin stage // now my friend see the changes I made
DISCLAIMER: ask your team :)
any more question is better onto your team @BuntyBru , each project I've been on has been different. Some with CI, some with automated testing... and so on...
there's no "unique" way to do this
BuntyBru
@BuntyBru
Oct 08 2018 10:05
@Marmiz okay
I am going to ask my team now
about the above process
if they do not agree i would look into it again
Claudio Restifo
@Marmiz
Oct 08 2018 10:06
imho better safe than sorry @BuntyBru :+1:
BuntyBru
@BuntyBru
Oct 08 2018 10:08
one ques
difference between
git checkout -b prod and git checkout -b myFix
// create a LOCAL branch, your friends won't see this at home unless you create a remote branch as well
Claudio Restifo
@Marmiz
Oct 08 2018 10:11

they both create a LOCAL branch for you to work on. The difference is that in first case git will understeand that you want to track remote/prod and will set it up for you already.
(so that each pull - push ... is done to remote/prod)

In the second case there's no remote tracking :)

@BuntyBru
BuntyBru
@BuntyBru
Oct 08 2018 10:22
@Marmiz
so myFix will start showing on Github as sooon as i push the code
?
Claudio Restifo
@Marmiz
Oct 08 2018 10:23
@BuntyBru only if you set the upstream when pushing :)
Bjorn van de Peut
@bjorno43
Oct 08 2018 10:24
@BuntyBru Sorry m8, but do you realise that he's been helping you with that issue for almost 2 hours now? You can't expect someone to keep going forever m8. Try doing your own research as well, or ask the people from your team :)
Claudio Restifo
@Marmiz
Oct 08 2018 10:24
git push -u origin my_local_branch
will also add a traking record remotely for my_local_branch
it's k @bjorno43 , but you know he's right @BuntyBru
Bjorn van de Peut
@bjorno43
Oct 08 2018 10:31
@Marmiz I know. Just making him realise how much of your time he's consuming. Nothing wrong with asking for help and we're all willing to go the extra mile for a person in need. But 2 hours on basicly the same thing is more than a mile :P
Even I learned more about Git than I ever planned to :laughing:
BuntyBru
@BuntyBru
Oct 08 2018 10:42
@Marmiz
agreed
@bjorno43
Dayna wiggins
@dwiggins4121
Oct 08 2018 12:10
lool
Xarri Jorge
@xarrijorge
Oct 08 2018 12:11
:wave:
psyperl
@psyperl
Oct 08 2018 13:50
:wave:
Kyle Holm
@thekholm80
Oct 08 2018 14:18
:wave:
May Kittens Devour Your Soul
@diomed
Oct 08 2018 14:43
what's the difference between putting website on netlify and putting website on github pages?
Aditya
@ezioda004
Oct 08 2018 14:47
Custom domain name with netlify (if the name is available)
May Kittens Devour Your Soul
@diomed
Oct 08 2018 14:52
I think pages support that as well
Eric Weiss
@eweiss17
Oct 08 2018 14:56
I think you may have to pay a fee or something to change your github pages domain
I remember wanting to change it, but didn't because of something like that
May Kittens Devour Your Soul
@diomed
Oct 08 2018 14:56
fee.....
spooky
Aditya
@ezioda004
Oct 08 2018 15:00
Yeah you have to pay in github, its free in netlify and heroku
Jim7894
@Jim7894
Oct 08 2018 15:36

Unity here:

private BoxCollider2D rb2d;

if (Input.GetMouseButton(0) ) {Vector3 pos = Camera.main.ScreenToWorldPoint (Input.mousePosition);

Need help to get to pos

psyperl @psyperl waits for someone with assembly question
May Kittens Devour Your Soul
@diomed
Oct 08 2018 17:43
when is recursion even handy?
Christopher McCormack
@cmccormack
Oct 08 2018 17:43
@diomed when traversing trees
May Kittens Devour Your Soul
@diomed
Oct 08 2018 17:45
ok, wind
psyperl
@psyperl
Oct 08 2018 17:55
like when you got lost in the forest the other day
May Kittens Devour Your Soul
@diomed
Oct 08 2018 18:05
I try to forget that ever happened
Ariel
@ArielLeslie
Oct 08 2018 18:22
@diomed Sometimes it's also just the cleanest and clearest way to solve the problem
@eweiss17 GitHub doesn't charge you to use your own domain, but you have to own the domain. Otherwise it's just based on your repo name.
Aita Kane
@aita-kane
Oct 08 2018 19:17
@JohnnyBizzel okay thank you for all
Johnny
@JohnnyBizzel
Oct 08 2018 23:30
@aita-kane :+1: