• Login
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.
  • F
    Francisco @PeterJones
    last edited by Jul 16, 2020, 10:18 PM

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

    1 Reply Last reply Reply Quote 0
    • M
      Makwana Prahlad Banned
      last edited by Jul 17, 2020, 5:36 AM

      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.

      F 1 Reply Last reply Jul 17, 2020, 9:36 AM Reply Quote 0
      • F
        Francisco @Alan Kilborn
        last edited by Jul 17, 2020, 9:32 AM

        @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)

        F 1 Reply Last reply Jul 17, 2020, 11:42 AM Reply Quote 0
        • F
          Francisco @Makwana Prahlad
          last edited by Jul 17, 2020, 9:36 AM

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

          1 Reply Last reply Reply Quote 0
          • F
            Francisco @Francisco
            last edited by Jul 17, 2020, 11:42 AM

            @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)

            P 1 Reply Last reply Jul 17, 2020, 12:53 PM Reply Quote 0
            • P
              PeterJones @Francisco
              last edited by PeterJones Jul 17, 2020, 12:54 PM Jul 17, 2020, 12:53 PM

              @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
              • A
                Alan Kilborn @Alan Kilborn
                last edited by Jul 17, 2020, 1:05 PM

                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
                • F
                  Francisco
                  last edited by Jul 17, 2020, 2:00 PM

                  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)

                  P 1 Reply Last reply Jul 17, 2020, 2:51 PM Reply Quote 0
                  • P
                    PeterJones @Francisco
                    last edited by Jul 17, 2020, 2:51 PM

                    @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

                    F 1 Reply Last reply Jul 18, 2020, 8:07 PM Reply Quote 2
                    • F
                      Francisco @PeterJones
                      last edited by Jul 18, 2020, 8:07 PM

                      @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
                      14 out of 14
                      • First post
                        14/14
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors