Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jun 19 2020 20:05
    @krisb1220 banned @Gastony
  • May 14 2020 22:38
    @bjorno43 banned @minitechtips_twitter
  • May 14 2020 22:37
    @bjorno43 banned @real-action
  • Mar 05 2020 07:17
    @krisb1220 banned @stevemeds12_gitlab
  • Feb 01 2020 00:26
    @bjorno43 banned @Ndoua
  • Jan 07 2020 03:08
    @bjorno43 banned @doctor-sam
  • Jun 20 2019 21:19
    @bjorno43 banned @shenerd140
  • Apr 27 2019 19:47
    @mstellaluna banned @zhonghuacx
  • Apr 25 2019 17:12
    @mstellaluna banned @cmal
  • Jan 08 2019 21:57
    @mstellaluna banned @dertiuss323
  • Dec 15 2018 23:39
    @mstellaluna banned @Julianna7x_gitlab
  • Nov 07 2018 04:43
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:26
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:15
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:13
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
Matthew
@ChaplainsBud
Hi, does anyone know a good resource for implementing a linked list in JavaScript?
Matthew
@ChaplainsBud
I'm still trying to figure out linked lists
Matthew
@ChaplainsBud
hi
Is it possible to see 'this' as a member of an object?
Gopherine
@gopherine
hi has anyone used react-spring for animation ?
if yes can you please look at this https://github.com/pmndrs/react-spring/discussions/1265 and tell me what am i doing wrong here

Is it possible to see 'this' as a member of an object?

what do you mean by this as member of object this can be called inside a class when called it returns constructor value

Anant Garg
@anantgargcq
Hi, does anyone know how can I test react code snippets in-browser? just like FreeCodeCamp does in their react curriculum.
Kevin
@mcfarke311
@anantgargcq There is a react browser extension that will help debug/validate react on pages that you visit. You can find it on their website. Otherwise, according to React documentation, they utilize Jest to test React and so you would be able to write your own tests. I'm not sure if you are looking to write your own tests or just validate React JSX that you have written.
Corey Lewis
@cursiv3
@anantgargcq codesandbox.io is an amazing place for that in a bunch of frameworks as well as react
Kaisa-034
@Kaisa-034
Hello, my name is Fabiola. Im new in the world of code. It would be good to have a study partner in Discord for speak, help each other and share our progress.
Kevin
@mcfarke311
@Kaisa-034 Welcome Fabiola!
@Kaisa-034 It might help if you specify where you are in the curriculum or what your interests are to find someone to work with
@Kaisa-034 also, check out the FreeCodeCamp/LetsPair channel for finding a partner as well!
Hussam Al-Tayeb
@ht990332
hello.
Is a program such as FreeCodeCamp helpful for someone 40 year old? I'm currently employed at a construction company and its future is very dim. Or is this something that fits younger people better?
Hussam Al-Tayeb
@ht990332
In terms of knowledge, I am not starting from scratch. I have extensive knowledge of Linux and plenty of C knowledge. I also know moderate java and C#
Nicholas Carrigan (he/him)
@nhcarrigan

https://www.freecodecamp.org/news/introducing-freecodecamp-chat/

Read about freeCodeCamp's new chat server. And we mention Gitter and Discord in there as well. In short, these will continue to exist as unofficial chat rooms, and you all can move over to chat.freecodecamp.org whenever you feel ready.

Juljan Kandari
@JKDeveloper1

function addTogether() {
let firstArg = arguments[0];
let secondArg = arguments[1];

if (arguments.length > 1)
{

return firstArg + secondArg;}

if (
cfirstArg == 'number'&&
secondArg ){
return firstArg + secondArg;

}

else if(arguments.length === 1){
if (convert(firstArg) === undefined){
return undefined;
}

}
function convert(argument){
if (argument === "number"){
return argument ;
}else{
return undefined;
}

}
}
addTogether(2),(3);

help please
why can not get this? addTogether(5)(7) should return 12
joaquin fox
@joaquinfox

Julian, a few syntax changes and a little refactoring will get you there. Look at this refactor.

function addTogether(arr){
return arr[0] + arr[1];
}
addTogether([5,7])
// returns 12

But we can do better still. Your function addTogether() only works for an array of length === 2. This isn't very useful. It would be better if we could add the values in an array of any length. There are several ways to do this:

function addAnyArray(arr){
let sum = 0;
for(let i =0; i ++; i < arr.length){
sum += i;
}
return sum;
}

addAnyArray([1,2,3,4]);
// This will return 10

Using ES6, we can get a bit fancier, and terser (but these methods are a little harder to read). Here is an example:

[1,2,3,4].reduce((finalSum, interimValues)=> finalSum + interimValues);


// This will return 10

Hope this helps!

Juljan Kandari
@JKDeveloper1
Thank you
Hussam Al-Tayeb
@ht990332
hi
can someone help me figure out why https://hussam.eu.org/demo/grid.html looks ok on android and desktop but not on iphones? I do not have an iphone and two people said the captions overlap the bouncing images.
Vanessa Correia
@wordlesspirate
Have you tried using the "inspect" tools on your browser, @ht990332? Probably not the same as using an actual phone, but you do have the option to see how your code would look like on Android/iPhone devices, with the "Toggle device toolbar" options.
image.png
Hussam Al-Tayeb
@ht990332
@wordlesspirate hi. I did try inspect. it looks good there and on my android but not on people's iphones...
Hussam Al-Tayeb
@ht990332
@wordlesspirate I 'semi' forced the problem to show on regular browsers. would you mind taking a look. I think the next step is to figure out why they aren't stacking over each other. parent div is relative to body. children are absolute.
Hussam Al-Tayeb
@ht990332
anyone here has an iphone?
Hussam Al-Tayeb
@ht990332
ok, i fixed it.
Ferenc Fabian
@PumpkinSeed_dev_twitter
Hi, https://github.com/PumpkinSeed/sqlfuzz got v0.4.0 with postgres support. Would be awesome if you can try it out and throw me issues if you find something. Many thanks if you do that.
Riadh
@KWFE
Hi guys
António Oliveira
@apspoliveira
hello
b1ffliu
@b1ffliu
I AM BACK NOW!!!!
Momozor
@momozor
hi
bgdeveloper15
@bgdeveloper15
Hello
John Melody Me
@johnmelodyme

[ELIXIR QUESTION]

Hey Guys I Need Some Help. I wrote a Script for WebScrap

The source :

defmodule Shopee do
  @behaviour Crawly.Spider

  @doc """
  Execute by
  Crawly.Engine.start_spider({defmodule_name})
  """

  @impl Crawly.Spider
  def base_url() do
    "https://shopee.com.my"
  end

  @impl Crawly.Spider
  def init() do
    [start_urls: ["https://shopee.com.my/search?keyword=computer"]]
  end

  @impl Crawly.Spider
  def parse_item(response) do
    urls =
      response.body
      |> Floki.find(".a._35LNwy")
      |> Floki.attribute("href")

    requests =
      Enum.map(urls, fn url ->
        url
        |> build_absolute_url(response.request_url)
        |> Crawly.Utils.request_from_url()
      end)

    name =
      response.body
      |> Floki.find("._1POlWt")
      |> Floki.text()

    price =
      response.body
      |> Floki.find("._5W0f35")
      |> Floki.text(deep: false, sep: "")

    %Crawly.ParsedItem {
      :requests => requests,
      :items => [
        %{name: name, price: price}
      ]
    }

  end

  def build_absolute_url(url, request_url) do
    URI.merge(request_url, url) |> to_string()
  end

  def show() do
    case HTTPoison.get("https://shopee.com.my/search?keyword=computer") do
      {:ok, %HTTPoison.Response{status_code: 200, body: body}} ->
        urls =
          body
          |> Floki.find(".a._35LNwy")
          |> Floki.attribute("href")

          IO.puts urls |> to_string()

          {:ok, urls}

    end
  end
end

The Error I got :

iex(1)> Crawly.Engine.start_spider(Shopee) 

01:32:49.699 [error] GenServer #PID<0.408.0> terminating
** (UndefinedFunctionError) function Shopee.init/1 is undefined or private
    (shopee 0.1.0) Shopee.init([crawl_id: "8ed539e0-bf11-11eb-86f5-3085a98593d6"])
    (crawly 0.13.0) lib/crawly/manager.ex:126: Crawly.Manager.handle_continue/2
    (stdlib 3.8) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib 3.8) gen_server.erl:388: :gen_server.loop/7
........
John Melody Me
@johnmelodyme

[ELIXIR QUESTION]

Hey Guys I Need Some Help. I wrote a Script for WebScrap

The source :

defmodule Shopee do
  @behaviour Crawly.Spider

  @doc """
  Execute by
  Crawly.Engine.start_spider({defmodule_name})
  """

  @impl Crawly.Spider
  def base_url() do
    "https://shopee.com.my"
  end

  @impl Crawly.Spider
  def init() do
    [start_urls: ["https://shopee.com.my/search?keyword=computer"]]
  end

  @impl Crawly.Spider
  def parse_item(response) do
    urls =
      response.body
      |> Floki.find(".a._35LNwy")
      |> Floki.attribute("href")

    requests =
      Enum.map(urls, fn url ->
        url
        |> build_absolute_url(response.request_url)
        |> Crawly.Utils.request_from_url()
      end)

    name =
      response.body
      |> Floki.find("._1POlWt")
      |> Floki.text()

    price =
      response.body
      |> Floki.find("._5W0f35")
      |> Floki.text(deep: false, sep: "")

    %Crawly.ParsedItem {
      :requests => requests,
      :items => [
        %{name: name, price: price}
      ]
    }

  end

  def build_absolute_url(url, request_url) do
    URI.merge(request_url, url) |> to_string()
  end

  def show() do
    case HTTPoison.get("https://shopee.com.my/search?keyword=computer") do
      {:ok, %HTTPoison.Response{status_code: 200, body: body}} ->
        urls =
          body
          |> Floki.find(".a._35LNwy")
          |> Floki.attribute("href")

          IO.puts urls |> to_string()

          {:ok, urls}

    end
  end
end

The Error I got :

iex(1)> Crawly.Engine.start_spider(Shopee) 

01:32:49.699 [error] GenServer #PID<0.408.0> terminating
** (UndefinedFunctionError) function Shopee.init/1 is undefined or private
    (shopee 0.1.0) Shopee.init([crawl_id: "8ed539e0-bf11-11eb-86f5-3085a98593d6"])
    (crawly 0.13.0) lib/crawly/manager.ex:126: Crawly.Manager.handle_continue/2
    (stdlib 3.8) gen_server.erl:637: :gen_server.try_dispatch/4
    (stdlib 3.8) gen_server.erl:388: :gen_server.loop/7
........

IT 's OK , I fixed it.

instead of @behaviour I declared it use and

I init the function with an ignore expression in the parametre. So is

 @impl Crawly.Spider
  def init(_) do
    [start_urls: ["https://shopee.com.my/search?keyword=computer"]]
  end

instead of

 @impl Crawly.Spider
  def init() do
    [start_urls: ["https://shopee.com.my/search?keyword=computer"]]
  end
Morchid Chellali
@Morched23MJ

Having trouble using GSAP + Locomotive Scroll + Angular. I did a heavy search for any useful guides (ones that provide a good service arch to manage gsap+scroll) to no avail.

Do anyone have a link, or a github repo (e.g. Porfolios) implementing this? (in Angular ofc)

GetFlutter
@getflutterdev_twitter
Hey we changed from getflutter to getwidget please do check our docs: https://docs.getwidget.dev/
mariano909010
@mariano909010
hola
que es esto
joaquin fox
@joaquinfox
Hi everyone. I am not looking to pair but I am looking for some accountability partners who would like to meet virtually and regularly, and maybe team up on projects. What I am envisioning is a small team of about 4 who meet bi-monthly or weekly and use a structured, agile method of standups with a rotating scrum master. The idea is that we would meet, talk about what we accomplished since our last meeting, what blocks we've come across, what mileposts are we aiming for, and that kind of thing. I want this team to be focused on JS and all things JS. If any of this sounds cool, let me know. (edited)
Carlos Nah
@RA9
@joaquinfox I am interested
joaquin fox
@joaquinfox
This message was deleted
1 reply
What days of the week could you meet? Im usually good to meet Monday or Tuesday
joaquin fox
@joaquinfox
@RA9 Hi Carlos, that's awesome. What days of the week are good for you? I can meet Mondays and Tuesdays usually :) I work long days on weekends.