Community
    • Login

    Distance between grids

    Scheduled Pinned Locked Moved General Discussion
    14 Posts 4 Posters 1.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • FranciscoF
      Francisco @PeterJones
      last edited by

      @PeterJones Thanks Peter, I used Alan information, take care of yourself

      1 Reply Last reply Reply Quote 0
      • Makwana PrahladM
        Makwana Prahlad Banned
        last edited by

        Hello,@Francisco
        Please try this code,To distance between grids

        Html code:

        <div class="wrapper aligned">
            <div class="box item1">One</div>
            <div class="box item2">Two</div>
            <div class="box item3">Three</div>
            <div class="box item4">Four</div>
            <div class="box item5">Five</div>
        </div>
        

        Css code :

        html {
          box-sizing: border-box;
        }
        *, *:before, *:after {
          box-sizing: inherit;
        }
        
        body {
          margin: 40px;
        }
        
        .wrapper {
          margin: 0 0 20px 0;
          width: 500px;
          height: 400px;
          border: 2px solid #CCC;
          display: grid;
          grid-gap: 10px;
          grid-template-columns: repeat(4, 80px);
          grid-template-rows: repeat(3,100px);
          align-content: space-around;
          justify-content: space-between;
        }
        
        
        
        .box {
          background-color: #444;
          color: #fff;
          border-radius: 5px;
          padding: 20px;
          font-size: 150%;
        }
        
        .item1 {
          grid-column: 1 / 5;
        }
        
        .item2 {
          grid-column: 1 / 3;
          grid-row: 2 / 4;
        }
        
        .item3 {
          grid-column: 3 / 5;
        }
        

        I hope this code will be useful.
        Thank you.

        FranciscoF 1 Reply Last reply Reply Quote 0
        • FranciscoF
          Francisco @Alan Kilborn
          last edited by

          @Alan-Kilborn Allan, GM, some lines have a small difference, the number 1, between the number “2” and the character “~” so these lines were selected … how to correct?
          QSO 11: 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~ 724km Mult. ‘GG43’ band 144MHz (mult +1)

          FranciscoF 1 Reply Last reply Reply Quote 0
          • FranciscoF
            Francisco @Makwana Prahlad
            last edited by

            @Makwana-Prahlad GM, thanks, sorry, its not how to use this scheme.

            1 Reply Last reply Reply Quote 0
            • FranciscoF
              Francisco @Francisco
              last edited by

              @Alan-Kilborn sorry, it also has a comma after km
              QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1)

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @Francisco
                last edited by PeterJones

                @Francisco said in Distance between grids:

                sorry, it also has a comma after km

                QSO  11 : 144	PH	2020-06-14	1311	PT9VR	59	GG29QN	PY5EK	59	GG43AM	2	1	~724km, Mult. ‘GG43’ band 144MHz (mult +1)
                

                It also appears you no longer have the space between the ~ and the number of km. It’s hard to hit a moving target.

                Also, it would be really nice if you followed my original advice and used the forum’s toolbar or manual Markdown code to format your example text as text, so we could be sure that we were seeing what you were originally typing (the forum considers many characters and character-combos as special, and will make changes. For example, I am betting that you typed 'GG43' with normal ASCII single quotes, but the forum sees quotes as something it can modify, so it presented it with so-called smart-quotes / curly-quotes, as ‘GG43’. If the quoting had ended up being important to your question (which it didn’t, in this instance), it could have sent us down the wrong path.

                It also makes the data stand out as data; see my modified-quote of your text.

                I would change @Alan-Kilborn’s search regex to (?-is)^.+~\h*(?=\d+km) . Using the \h* instead of a single space in the regex will allow there to be zero or more spaces between the tilde and the number. Using \d+ instead of \d{3} means one or more digits (instead of his original exactly-three digits), which will allow ~ 1km or ~ 1100km to match, too (all your examples have been three digits so far… but given the moving goalposts you are setting, it wouldn’t surprise me if those changed). And removing the $ at the end of the lookahead means that km doesn’t have to be the last token on the line, so things can come after the km.

                1 Reply Last reply Reply Quote 1
                • Alan KilbornA
                  Alan Kilborn @Alan Kilborn
                  last edited by

                  To quote myself:

                  @Alan-Kilborn said in Distance between grids:

                  …perhaps because something critical may have been left out of the problem statement.

                  :-)

                  Really my goal was just to lay the groundwork of an approach that could be used, on a problem that sounded like something a one-shot search operation can’t really accomplish.

                  Of course, as the “goalposts” move (LOL) maybe a simple-search would have been good enough? Really, though, still hard to tell.

                  I think we have a new idiom to join “baking cookies” and perhaps some others… : “moving goalposts”. BTW, it seems an oxymoron to “set” the “moving goalposts”. :-)

                  1 Reply Last reply Reply Quote 0
                  • FranciscoF
                    Francisco
                    last edited by

                    Sorry for the confusion, i don’t speak english, i’m using the google translator. The forum has already helped me a lot, with my difficulties, despite my 67 years, even on other occasions … I thank you for your patience. take careIt two lines, i send a copy and paste:

                    QSO 10 : 144 PH 2020-06-14 1219 PT9VR 59 GG29QN PT9AL 59 GG27OS 2 - ~200km
                    QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1)

                    PeterJonesP 1 Reply Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @Francisco
                      last edited by

                      @Francisco said in Distance between grids:

                      i send a copy and paste:
                      QSO 10 : 144 PH 2020-06-14 1219 PT9VR 59 GG29QN PT9AL 59 GG27OS 2 - ~200km
                      QSO 11 : 144 PH 2020-06-14 1311 PT9VR 59 GG29QN PY5EK 59 GG43AM 2 1 ~724km, Mult. ‘GG43’ band 144MHz (mult +1)

                      Please use the toolbar button </> to format your text:
                      39e26833-18d2-4feb-95ce-142d029d1a58-image.png

                      The regex I supplied above,

                      • FIND = (?-is)^.+~\h*(?=\d+km)

                      will find the distances in the following text:

                      QSO  10 : 144	PH	2020-06-14	1219	PT9VR	59	GG29QN	PT9AL	59	GG27OS	2	-	~200km
                      QSO  11 : 144	PH	2020-06-14	1311	PT9VR	59	GG29QN	PY5EK	59	GG43AM	2	1	~724km, Mult. 'GG43' band 144MHz (mult +1)
                      

                      However, if you want to leave only the distances, as @Alan-Kilborn’s original regex was meant to do, edit it slightly:

                      • FIND = (?-is)^.+~\h*(\d+km).*$
                      • REPLACE = $1
                      • MODE = regular expression

                      Good luck

                      FranciscoF 1 Reply Last reply Reply Quote 2
                      • FranciscoF
                        Francisco @PeterJones
                        last edited by

                        @PeterJones FIND = (?-is)^.+~\h*(?=\d+km) I hope I got it right in the reply, Peter just this command resolves to, thank you very much. GL

                        1 Reply Last reply Reply Quote 1
                        • First post
                          Last post
                        The Community of users of the Notepad++ text editor.
                        Powered by NodeBB | Contributors