Questions tagged [reverse-lookup]

Many programming languages feature data structures where unique indexes are associated with a value. Reverse lookup is retrieving the index with which a given value is accessed.

47 questions
0
votes
1 answer

Django filter field with foreign key

Update Thank you Root for your below answer (which I upvoted). Based on your suggestions, I was able to solve my problem. I am now using this - try: queryset2 = RoomBookings.objects.filter(HotelName__HotelName__icontains=hotel.HotelName) …
Ross Symonds
  • 690
  • 1
  • 8
  • 29
0
votes
1 answer

ZSH reverse loookup in the current command

Using Ctrl+R reverse lookup, I have found a long command that I need: scp .oh-my-zsh/custom/themes/robbyrussell_modifiedprompt.zsh-theme pi@192.168.43.220:.oh-my-zsh/custom/themes/robbyrussell_modifiedprompt.zsh-theme but I need to change the ip…
Koikos
  • 162
  • 9
0
votes
1 answer

Django query for a related object

I have two models Post and UserBookmarks. models.py of Project/App1 from App2 import UserBookmarks class Post(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) author =…
user11684966
0
votes
1 answer

How batch reverse lat/long on OSM

I have a list of lat/long coordinates and need to obtain the state for each. That can be done with the code: df = pd.read_csv('SOL_A.dsv', delimiter = '|', low_memory=False) for index, row in df.iterrows(): lat = row['LAT'] lon =…
filippo
  • 5,583
  • 13
  • 50
  • 72
0
votes
1 answer

R: Cross-referencing columns/reverse lookup

I've found a solution for this but suspect there must be a more natural or idiomatic way. Given a dataset of many observations over several years at a lot of stations, get a listing by station of the years in which each was active -- should be…
uhClem
  • 95
  • 10
0
votes
1 answer

django reverse lookup query within three tables

I have three tables User, Users_clients, and Credits. I want to list tables of current user's clients with their details and credit. If any client is listed in credit table then credit should return 0 where else it should return the credit value. my…
0
votes
1 answer

Django: one-to-many relationship and reverse lookup

i have a Problem which i am unsure what the most django/pythonic way to solve it would be. I have the following models: class Order(models.Model): ord_someinformation = models.CharField(max_length=10) class Articles(models.Model): myFK =…
Burnie800
  • 77
  • 1
  • 9
0
votes
1 answer

Where do reverse lookups get the value of the nameserver which holds the PTR records

When I do a reverse lookup on my IP, it correctly finds one of our BIND nameservers and does a reverse lookup. How does it find our nameserver, where are the nameserver details stored? With RIPE/ARIN or on our Router (we have a class B block that…
ZZ9
  • 2,177
  • 2
  • 27
  • 38
0
votes
1 answer

Vary DNS resolution according to requesting IP

I'm looking for a way of getting our DNS server to do a reverse look-up in order to resolve placeholder values differently according to the requesting machine's IP address. Variables A placeholder value called SYSWEB to be resolved by DNS Websites:…
ShaneC
  • 2,237
  • 2
  • 32
  • 53
0
votes
0 answers

php + shell: how to look up an IP's parent domain ("superdomain")

Given an arbitrary IP address (registrar not known at this point), what's the easiest or most efficient way to look up the end-user CIDR to which it "belongs", and basic information about that IP block (such as registered name of owner). I'm…
Stilez
  • 558
  • 5
  • 14
0
votes
2 answers

Django: How to reverse lookup with filter and count

In my template, I want to get a count of all answers for a question where the Answer.Value = "YES" I have two models: class Question(models.Model): question = models.CharField(max_length=100) class Answer(models.Model): question =…
thedeepfield
  • 6,138
  • 25
  • 72
  • 107
0
votes
0 answers

Neo4j reverse lookup - get index from node via cypher query

We can search a node by index via cypher query: START n=node:index('property:val') RETURN n; Is there a possible reverse query which we can get the index from a node id? So if a node is retrieved via node id, how can we retrieve all indices of the…
dcd0181
  • 1,493
  • 4
  • 29
  • 52
0
votes
2 answers

Django reverse lookup specific example

I have two model classes, Person and Relationship as follows with fields omitted for brevity: class Person(models.Model): first_name = models.CharField(max_length=32, null=True) . . . relationship =…
Furbeenator
  • 8,106
  • 4
  • 46
  • 54
-2
votes
1 answer

Reverse Lookup 2D array in VBA to get Column name from list of data

I am new to VBA programming and struggling to get my head around this issue I am having. I need help using Excel VBA for large volume 2D matrix data, how to get the Column name from the data table based on a specific set of lookup values from…
-2
votes
3 answers

How to get a key from a list of dictionaries by its value

I have a list of dictionaries and I am trying to get the dictionary key by its value: list1 = [{'a':1,'b':2,'c':3}, {'d':4,'e':5,'f':6}, {'g':7,'h':8,'i':9}] Here I am trying to get the dictionary key if the value 5 exists in the…
Surya G
  • 25
  • 7