Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 08:18
    FieryCod commented #1379
  • Jan 30 10:01
    atif089 commented #1379
  • Jan 30 10:01
    atif089 commented #1379
  • Jan 30 10:01
    atif089 commented #1379
  • Jan 30 04:11
    tclindner opened #1998
  • Jan 28 05:21

    ljharb on master

    [eslint config] [base] [patch] … [eslint config] [patch] extend … Merge pull request #1996 from r… (compare)

  • Jan 28 05:21
    ljharb closed #1996
  • Jan 28 04:50
    ljharb synchronize #1996
  • Jan 27 21:45
    ljharb closed #1997
  • Jan 27 21:45

    ljharb on master

    [editorial] [react] fix typo [eslint config] [*] [deps] upda… (compare)

  • Jan 27 21:39
    ljharb synchronize #1997
  • Jan 27 21:39
    ljharb labeled #1997
  • Jan 27 21:39
    ljharb labeled #1997
  • Jan 26 18:14
    ljharb labeled #1996
  • Jan 26 18:14
    ljharb labeled #1996
  • Jan 26 18:13
    ljharb synchronize #1996
  • Jan 26 18:05
    ljharb commented #1996
  • Jan 26 08:55
    telmen opened #1997
  • Jan 24 19:37
    peteclark3 commented #1689
  • Jan 24 17:25
    ljharb commented #747
Muhammad
@MuhammadJamaluddin
Thanks, Jordan ❤️
I really appreciate your help...
Muhammad
@MuhammadJamaluddin
Oh, just solved it :D
Jordan Harband
@ljharb
what was it?
I did exactly what he said & it worked
Jordan Harband
@ljharb
that's a hack tho
eslint can certainly parse it
it's just that the wrong parser version is being used
Muhammad
@MuhammadJamaluddin
I see, will go with that in the meantime... is that something that could be resolved from your side?
Jordan Harband
@ljharb
no
Igor Gassmann
@IGassmann
Hey y'all! How do you guys handle the class-methods-use-this error when implementing methods of an inherited class? The method can't be transformed as a static one.
Jordan Harband
@ljharb
you’d use an override comment.
Igor Gassmann
@IGassmann
Would that break any of the guide rules? I wasn't able to find the relative guide rule in http://airbnb.io/javascript/
Jordan Harband
@ljharb
no, it’s fine
Igor Gassmann
@IGassmann
ajay yadav
@ajay7868
anyone help how to get a folder path when i browse any folder
Shak Daniel
@shakdaniel
Anyone knows how to test a ternary operator using Jest? Ex…
return ( 
  <div>
    <div onClick={toggleCtrl.setOpen}>Toggle</div>
    { !isOpen ? <h1>Hide</h1> : <h1>Show</h1> }
  </div>
);
Jordan Harband
@ljharb
@shakdaniel has nothing to do with jest. have one test with isOpen truthy, and another with it falsy.
Dominika Kulakowska
@dominikabieder

CALLING ALL JUNIOR and SENIOR DEVS

Hi 👋 I’m researching the topic of
JUNIOR DEVS: challenges when working on a new project,
SENIOR DEVS: challenges when working with code written by someone else

and your feedback/rant would help a lot!

You can share your thoughts with me via survey:

JUNIORS: https://www.surveymonkey.de/r/contribution-new-project-2
SENIORS: https://www.surveymonkey.de/r/code-challenges-3

Big thanks,
Dominika

Mr. Tomtastic Hoffmann
@Bot-Mr-Tomtastic
hello everyone
what's new?
sweetodev
@sweetodev
Screen Shot 2019-11-05 at 6.26.16 PM.png
Hi, I’m new here, exploring gitter.
I also have a question, please see attached and advise.
Mile Mijatović
@mijatovicmile
Hello
Can you help me with converting Array to Array of Objects
I got this
credit: ["62515f2a-b538-45fd-a99b-dd2b0da585c7", "885113f8-5c93-4590-ac9a-99a9c8d35b8c",…]
0: "62515f2a-b538-45fd-a99b-dd2b0da585c7"
1: "885113f8-5c93-4590-ac9a-99a9c8d35b8c"
2: "c594a9d9-aab7-49ce-9a3f-49779cdbd283"
I need to convert this array to [ { id: 62515f2a-b538-45fd-a99b-dd2b0da585c7 } , { id: 1 } , { id: 2 } ]
how to do that ?
Pratyush
@pratyushcrd
idsArray.map(id => ({ id })) @mijatovicmile
Mile Mijatović
@mijatovicmile
Thank you
mridul037
@mridul037
whats this error
Altaf Hussain
@altafhussain786
hello
meladon1337
@meladon1337

HEy guys i have a problem with IE 11

delay: function (fn, ms) {
            let timer = 0;
            return function (...args) {
                clearTimeout(timer);
                timer = setTimeout(fn.bind(this, ...args), ms || 0)
            }
        }`

Doesnt work, can someone help?
error @ return function (...args)

Louis Law
@louiscklaw
2019-11-22_13-20.png
ishtjot
@ishtjot

I get NaN rather then 0.00 when i add tax and fee what can be the issue?

Its in my retail app

fee={this.props.cart.fee === undefined ? '0.00' : this.props.cart.fee}
can it something related to this statement?
Jordan Harband
@ljharb
i see a string and presumably a number
set it to 0, not ‘0.00’
Lujain36
@Lujain36
Hi
I’m struggling with edit-card function, and I hope you can help. If I pressed edit icon for any card, it shows the info of the last card added in firebase not the info of the selected card.
$(document).on("click", ".edit", function(){
          var value = $("#project44").val();
          var valuename = $(this).parents("div").parents("div").parents("div").find("#nameofkey").html();
          var valuedes = $(this).parents("div").parents("div").parents("div").find("#desofkey").html();
           var valuelest = $(this).parents("div").parents("div").parents("div").find("#desofkey").html();
          $("#nametoEdit22").val(valuename)
          $("#destoEdit22").val(valuedes)
          $("#urltoEdit").val(valueurl)
          $("#idtoEdit").val(value)



        });
^ this javascript code should show the card info in a pop-up window

{% for list in keywordList %}

                      <div class="col-sm-6 col-md-4 col-lg-3 mt-4"  >
                        <div  class="card card-inverse card-info" style="background-color:  #fcfeff;" >

                            <h5 v-model="card.value" @change="input(card.value, card.id)" class="card-title" id="nameofkey" style="margin-top: 30px;">{{keywordList[list].namear}}</h5>
                            <small id="desofkey" style="color: black; margin-bottom: 30px;  ">{{keywordList[list].des}}</small>
                           <!-- <img class="card-img-top" style="margin-left: 100px; margin-top: 15px; margin-bottom: 15px;" width="1" src="{{ url_for('static', filename='images/list.png') }}">-->
                            <div class="card-block"  >
                                <div class="card-text" style="text-align: center;" >
                                    {% set cpc = [0] %}
                                    {% set volume = [0] %}
                                    {% for single_item in keywordList[list].keywords  %}
                                    {% if 'cpc' in keywordList[list].keywords[single_item] %}
                                    {% if volume.append(volume.pop() + keywordList[list].keywords[single_item].volume) %}{% endif %}
                                    {% if cpc.append(cpc.pop() + keywordList[list].keywords[single_item].cpc) %}{% endif %}
                                    {% endif %}
                                    {% endfor %}
                                    <div style="text-align: right; ">
                                    <small>$ {{  cpc[0] }} : التكلفه الكليه  </small>

                                    {% if keywordList[list].keywords|length!=0 %}
                                    {% set avecpc = cpc[0]/keywordList[list].keywords|length %}
                                    {% set avevolume = volume[0]/keywordList[list].keywords|length %}

                                    <small> <br>   متوسط التكلفة: {{avecpc}} $ / كلمة  </small>
                                    <small> <br>   متوسط عمليات البحث: {{avevolume}} / كلمة  </small>
                                  {% else  %}
                                    <small> <br>   متوسط التكلفة: 0 $ / كلمة  </small>
                                    <small> <br>   متوسط عمليات البحث: 0 / كلمة  </small>
                                    {% endif %}
                                    <small> <br>  {{keywordList[list].keywords|length}} : عدد الكلمات </small>
                                  </div>
                                </div>
                            </div>
                            <div class="card-footer">

                              <small> {{keywordList[list].date}} : اخر تعديل </small>

<form method="POST" action="/keywordslistkeyword" >
<input id="listkeywords" name="listkeywords" value="{{list}}" style="display: none;"></input>
<input id="project44" name="project44" value="{{projectID}}" style="display: none;" ></input>
{% if keywordList[list].keywords|length!=0 %}
<button id="newpage2" style=" background-color: #49a09d; color: white; margin-left: 20px;"class="btn btn-info float-right btn-sm"> عرض القائمة </button>
{% endif %}
</form>
<div style="text-align: left;">
<a class="edit" title="تعديل" href="#myModal2" style="color: gray;" data-toggle="modal" title="تعديل"><i class="material-icons">&#xE254;</i></a>
<a class="delete" title="حذف" ><i class="material-icons">&#xE872;</i></a>
</div>
</div>
</div>
</div>
{% endfor %}

^ this code creates the cards
ishtjot
@ishtjot
@ljharb it was something related to parse float . i got it fix using oroperator with parse float , thanks though