Skip to content

More searching and selecting

This part will cover

  • Searching and selecting in higher dimensional matrices

You notice that the user 'YouKnowWho' had taken over several posts and replaced the author with themselves. You've exported an array of posts to look for any suspicious activity that might hint at how the forum was compromised.

Creating the array of posts

      POSTS  ('30-08-2024' '') ('Why does DVB-C use QAM instead of OFDM?' 'frequencySniffer') ('DAC in QPSK modulation' 'radioComputer') ('29-08-2024' '') ('Nordtel OC3 Express' 'corporateRaider') ('Record for longest television broadcast' 'YouKnowWho') ('Book on Digital Signal Processing' 'vacuumTubed') ('Trying to obtain a clear QAM signal from cable' 'hadamardMardy') ('28-08-2024' '') ('Early color TV in Finland' 'YouKnowWho') ('Soviet Tube Substitute for 6TGSN7'  'YouKnowWho') ('OFDM, carriers and useful data symbol rate' 'YouKnowWho') ('27-08-2024' '') ('How good was broadcast NTSC/PAL in practice?' 'dataMoshpit') ('Looking for flyback' 'YouKnowWho')
      POSTS
┌─────────────┬──────────────────────────────────────────────────────────┬──────────────────────────────────────┬─────────────┬─────────────────────────────────────┬────────────────────────────────────────────────────┬───────────────────────────────────────────────┬──────────────────────────────────────────────────────────────┬─────────────┬──────────────────────────────────────┬──────────────────────────────────────────────┬───────────────────────────────────────────────────────┬─────────────┬──────────────────────────────────────────────────────────┬────────────────────────────────┐
│┌──────────┬┐│┌───────────────────────────────────────┬────────────────┐│┌──────────────────────┬─────────────┐│┌──────────┬┐│┌───────────────────┬───────────────┐│┌───────────────────────────────────────┬──────────┐│┌─────────────────────────────────┬───────────┐│┌──────────────────────────────────────────────┬─────────────┐│┌──────────┬┐│┌─────────────────────────┬──────────┐│┌─────────────────────────────────┬──────────┐│┌──────────────────────────────────────────┬──────────┐│┌──────────┬┐│┌────────────────────────────────────────────┬───────────┐│┌───────────────────┬──────────┐│
││30-08-2024││││Why does DVB-C use QAM instead of OFDM?frequencySniffer│││DAC in QPSK modulationradioComputer│││29-08-2024││││Nordtel OC3 ExpresscorporateRaider│││Record for longest television broadcastYouKnowWho│││Book on Digital Signal ProcessingvacuumTubed│││Trying to obtain a clear QAM signal from cablehadamardMardy│││28-08-2024││││Early color TV in FinlandYouKnowWho│││Soviet Tube Substitute for 6TGSN7YouKnowWho│││OFDM, carriers and useful data symbol rateYouKnowWho│││27-08-2024││││How good was broadcast NTSC/PAL in practice?dataMoshpit│││Looking for flybackYouKnowWho││
│└──────────┴┘│└───────────────────────────────────────┴────────────────┘│└──────────────────────┴─────────────┘│└──────────┴┘│└───────────────────┴───────────────┘│└───────────────────────────────────────┴──────────┘│└─────────────────────────────────┴───────────┘│└──────────────────────────────────────────────┴─────────────┘│└──────────┴┘│└─────────────────────────┴──────────┘│└─────────────────────────────────┴──────────┘│└──────────────────────────────────────────┴──────────┘│└──────────┴┘│└────────────────────────────────────────────┴───────────┘│└───────────────────┴──────────┘│
└─────────────┴──────────────────────────────────────────────────────────┴──────────────────────────────────────┴─────────────┴─────────────────────────────────────┴────────────────────────────────────────────────────┴───────────────────────────────────────────────┴──────────────────────────────────────────────────────────────┴─────────────┴──────────────────────────────────────┴──────────────────────────────────────────────┴───────────────────────────────────────────────────────┴─────────────┴──────────────────────────────────────────────────────────┴────────────────────────────────┘

      POSTS
┌──────────────────────────────────────────────┬────────────────┐
30-08-2024                                                    
├──────────────────────────────────────────────┼────────────────┤
Why does DVB-C use QAM instead of OFDM?       frequencySniffer
├──────────────────────────────────────────────┼────────────────┤
DAC in QPSK modulation                        radioComputer   
├──────────────────────────────────────────────┼────────────────┤
29-08-2024                                                    
├──────────────────────────────────────────────┼────────────────┤
Nordtel OC3 Express                           corporateRaider 
├──────────────────────────────────────────────┼────────────────┤
Record for longest television broadcast       YouKnowWho      
├──────────────────────────────────────────────┼────────────────┤
Book on Digital Signal Processing             vacuumTubed     
├──────────────────────────────────────────────┼────────────────┤
Trying to obtain a clear QAM signal from cablehadamardMardy   
├──────────────────────────────────────────────┼────────────────┤
28-08-2024                                                    
├──────────────────────────────────────────────┼────────────────┤
Early color TV in Finland                     YouKnowWho      
├──────────────────────────────────────────────┼────────────────┤
Soviet Tube Substitute for 6TGSN7             YouKnowWho      
├──────────────────────────────────────────────┼────────────────┤
OFDM, carriers and useful data symbol rate    YouKnowWho      
├──────────────────────────────────────────────┼────────────────┤
27-08-2024                                                    
├──────────────────────────────────────────────┼────────────────┤
How good was broadcast NTSC/PAL in practice?  dataMoshpit     
├──────────────────────────────────────────────┼────────────────┤
Looking for flyback                           YouKnowWho      
└──────────────────────────────────────────────┴────────────────┘

In order to split the above array apart into a new dimension, where each layer is a different day of posts, we can use the partition enclose function. The left argument to this function is the number of splits to put at each position in the array

      'otherworldlier'
otherworldlier

      1=5|⍳15
1 0 0 0 0 1 0 0 0 0 1 0 0 0 0

      (1=5|⍳15)  'otherworldlier'
┌─────┬─────┬────┐
otherworldlier
└─────┴─────┴────┘

      (1=5|⍳15)  'stockbrokerages'
┌─────┬─────┬─────┐
stockbrokerages
└─────┴─────┴─────┘

      (1=5|⍳15)  'supersonically'
┌─────┬─────┬────┐
supersonically
└─────┴─────┴────┘

      (1=4|⍳12)  'showmanships'
┌────┬────┬────┐
showmanships
└────┴────┴────┘

      (1=4|⍳10)  'workfellow'
┌────┬────┬──┐
workfellow
└────┴────┴──┘

      1 1 1 1  'bars'
┌─┬─┬─┬─┐
bars
└─┴─┴─┴─┘

      (1=5|⍳15)  'otherworldlier'
other
world
lier


      1 0 0 1 0 0 0 0 1 0 0 0 1[1]POSTS
┌──────────────────────────────────────────────────────────┬────────────────────────────────────────────────────────────────┬───────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────┐
│┌───────────────────────────────────────┬────────────────┐│┌──────────────────────────────────────────────┬───────────────┐│┌──────────────────────────────────────────┬──────────┐│┌────────────────────────────────────────────┬───────────┐│
││30-08-2024                                             │││29-08-2024                                                   │││28-08-2024                                          │││27-08-2024                                             ││
│├───────────────────────────────────────┼────────────────┤│├──────────────────────────────────────────────┼───────────────┤│├──────────────────────────────────────────┼──────────┤│├────────────────────────────────────────────┼───────────┤│
││Why does DVB-C use QAM instead of OFDM?frequencySniffer│││Nordtel OC3 Express                           corporateRaider│││Early color TV in Finland                 YouKnowWho│││How good was broadcast NTSC/PAL in practice?dataMoshpit││
│├───────────────────────────────────────┼────────────────┤│├──────────────────────────────────────────────┼───────────────┤│├──────────────────────────────────────────┼──────────┤│├────────────────────────────────────────────┼───────────┤│
││DAC in QPSK modulation                 radioComputer   │││Record for longest television broadcast       YouKnowWho     │││Soviet Tube Substitute for 6TGSN7         YouKnowWho│││Looking for flyback                         YouKnowWho ││
│└───────────────────────────────────────┴────────────────┘│├──────────────────────────────────────────────┼───────────────┤│├──────────────────────────────────────────┼──────────┤│└────────────────────────────────────────────┴───────────┘│
                                                          ││Book on Digital Signal Processing             vacuumTubed    │││OFDM, carriers and useful data symbol rateYouKnowWho││                                                          
                                                          │├──────────────────────────────────────────────┼───────────────┤│└──────────────────────────────────────────┴──────────┘│                                                          
                                                          ││Trying to obtain a clear QAM signal from cablehadamardMardy  ││                                                                                                                 
                                                          │└──────────────────────────────────────────────┴───────────────┘│                                                                                                                 
└──────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────────────┴───────────────────────────────────────────────────────┴──────────────────────────────────────────────────────────┘

      1 0 0 1 0 0 0 0 1 0 0 0 1[1]POSTS
┌──────────────────────────────────────────────┬───────────────────┐
30-08-2024                                                       
├──────────────────────────────────────────────┼───────────────────┤
Why does DVB-C use QAM instead of OFDM?       frequencySniffer   
├──────────────────────────────────────────────┼───────────────────┤
DAC in QPSK modulation                        radioComputer      
├──────────────────────────────────────────────┼───────────────────┤
                                                                 
├──────────────────────────────────────────────┼───────────────────┤
                                              |                   
└──────────────────────────────────────────────┴───────────────────┘
┌──────────────────────────────────────────────┬───────────────────┐
29-08-2024                                                       
├──────────────────────────────────────────────┼───────────────────┤
Nordtel OC3 Express                           corporateRaider    
├──────────────────────────────────────────────┼───────────────────┤
Record for longest television broadcast       YouKnowWho         
├──────────────────────────────────────────────┼───────────────────┤
Book on Digital Signal Processing             vacuumTubed        
├──────────────────────────────────────────────┼───────────────────┤
Trying to obtain a clear QAM signal from cablehadamardMardy      
└──────────────────────────────────────────────┴───────────────────┘
┌──────────────────────────────────────────────┬───────────────────┐
28-08-2024                                                       
├──────────────────────────────────────────────┼───────────────────┤
Early color TV in Finland                     YouKnowWho         
├──────────────────────────────────────────────┼───────────────────┤
Soviet Tube Substitute for 6TGSN7             YouKnowWho         
├──────────────────────────────────────────────┼───────────────────┤
OFDM, carriers and useful data symbol rate    YouKnowWho         
├──────────────────────────────────────────────┼───────────────────┤
Varicap-tuned filters                         thomasedison96     
└──────────────────────────────────────────────┴───────────────────┘
┌──────────────────────────────────────────────┬───────────────────┐
27-08-2024                                                       
├──────────────────────────────────────────────┼───────────────────┤
How good was broadcast NTSC/PAL in practice?  dataMoshpit        
├──────────────────────────────────────────────┼───────────────────┤
Looking for flyback                           YouKnowWho         
├──────────────────────────────────────────────┼───────────────────┤
CTCSS in NBFM                                 Radiovangelist     
├──────────────────────────────────────────────┼───────────────────┤
455 kHz and 10.7 MHz as intermediate freqs    |Decibels_per_Kg    
└──────────────────────────────────────────────┴───────────────────┘

A similar function is the partition function, which acts a little differently based on its left argument array than the partitioned enclose function. Zeroes indicate dropped elements, and partitions begin when the elements increase in value.

      0 0 0 1 1 0 0 0 1 2 0 0'flamethrower'
┌──┬─┬─┐
meow
└──┴─┴─┘

The array of posts is three dimensional, where the last axis consists of the post title and username as can be seen above.

Obtaining the indices of 'YouKnowWho' using where on the username subarray

      POSTS[;;2]
┌┬────────────────┬─────────────┬───────────┬─────────────┐
││frequencySnifferradioComputer                        
├┼────────────────┼─────────────┼───────────┼─────────────┤
││corporateRaider YouKnowWho   vacuumTubedhadamardMardy
├┼────────────────┼─────────────┼───────────┼─────────────┤
││YouKnowWho      YouKnowWho   YouKnowWho              
├┼────────────────┼─────────────┼───────────┼─────────────┤
││dataMoshpit     YouKnowWho                           
└┴────────────────┴─────────────┴───────────┴─────────────┘
      'YouKnowWho'  POSTS[;;2]
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0
0 0 0 0 0

we run into a problem! The where ⍷ function returns all zeroes! The reason for this is that 'YouKnowWho' really isn't in the array, only the scalar that contains 'YouKnowWho'

      POSTS[;;2][2;3]
┌──────────┐
YouKnowWho
└──────────┘

Then, replacing 'YouKnowWho' with ⊂'YouKnowWho',

      ('YouKnowWho')  POSTS[;;2]
0 0 0 0 0
0 0 1 0 0
0 1 1 1 0
0 0 1 0 0
      ('YouKnowWho')  POSTS[;;2]
┌───┬───┬───┬───┬───┐
2 33 23 33 44 3
└───┴───┴───┴───┴───┘
      POSTS[;;1][('YouKnowWho')  POSTS[;;2]]
┌───────────────────────────────────────┬─────────────────────────┬─────────────────────────────────┬─────────────────────
Record for longest television broadcastEarly color TV in FinlandSoviet Tube Substitute for 6TGSN7OFDM, carriers and us
└───────────────────────────────────────┴─────────────────────────┴─────────────────────────────────┴─────────────────────
      ─────────────────────┬───────────────────┐
      eful data symbol rateLooking for flyback
      ─────────────────────┴───────────────────┘

Nothing yet, maybe if you take the first letter of each title?

      POSTS[;;1][('YouKnowWho')  POSTS[;;2]]
Record for longest television broadcast   
Early color TV in Finland                 
Soviet Tube Substitute for 6TGSN7         
OFDM, carriers and useful data symbol rate
Looking for flyback    

      (POSTS[;;1][('YouKnowWho')  POSTS[;;2]])[;1]
RESOL

      (POSTS[;;1][('YouKnowWho')  POSTS[;;2]])[;1]
LOSER

That's not very nice!