Questions tagged [any]

"Any" means "at least one". Use this tag for questions that deal with testing elements in a collection to see if at least one of them passes a condition.

682 questions
0
votes
1 answer

CoreData NSPredicate with two one-to-many relations

I have a CoreData model data structure like this for restricting information based on the group a user belongs to: Category <->> Information <->> Groups. I have an NSSet of UserGroups objects. I want to be able to filter categories based on the…
tslater
  • 4,362
  • 3
  • 23
  • 27
0
votes
2 answers

SQL query - If row in table1 has value, return else don't

I have a query which returns each row from a table called posts, I have now added photos to the posts so when a user uploads a new photo it will create a row in the posts which then shows the new photo uploaded. I have this all working, the issue is…
Dylan Cross
  • 5,918
  • 22
  • 77
  • 118
0
votes
1 answer

NSPredicate: More AND condition after ANY is possible?

[NSPredicate predicateWithFormat:@"ANY (spaceVariableDomains.domain.name = %@ AND spaceVariableDomains.variable.val = %@)", ...]; I want to write something like above into NSPredicate, but it is unable to parse the format string. Is it possible…
János
  • 32,867
  • 38
  • 193
  • 353
0
votes
1 answer

XML Schema: xs:any processcontent="skip" but still returns error

I wanted to embed HTML formatting and so I did
Jane Doe
  • 543
  • 5
  • 9
  • 19
0
votes
3 answers

Perl, Any match string after a pattern

I'm trying to match if any string exists after a certain pattern. The pattern is "pattern" 'anything in between' "[after]". case insensitive. e.g pattern 1 [after] ABC pattern 2 [after] 123 abc DEX pattern 3 [after] pattern 12345123…
user1539348
  • 513
  • 1
  • 7
  • 20
0
votes
1 answer

ANY in MySQL subrequest

I have a couple of tables in MySQL and I made a request to them. In this request I make a subrequest, as I have field f1 in table t1 which is sometimes NULL, sometimes NOT NULL, and in case it is NOT NULL I want to select the field f2 from table t1,…
0
votes
1 answer

Hibernate @Any could't fetch the object

I checked below article and try to implement something similar but failed. How to use Hibernate @Any-related annotations? I have 2 questions: 1- Are those Book, VHS and DVD classes are entities that map "BORROW" table. Examples codes of these…
Gokhan Oner
  • 3,237
  • 19
  • 25
0
votes
1 answer

Android game that runs on any size in an android device

I'm about to create a game in android that can run on any device (tablet, galaxy s). How can I make the game flexible? Particularly with the layouts, positions and sizes of the screen. I have no problem when it comes to images because res can handle…
John
  • 941
  • 8
  • 17
-1
votes
0 answers

Swift MultipartFormData from [String: Any] in swift using Alamofire

import Alamofire extension MultipartFormData { func importData(with parameter: Parameters, parentKey: String? = nil) { for (key, value) in parameter { let newKey = genChildKeyInArray(childKey: key, parentKey: parentKey) ??…
-1
votes
2 answers

How to count how many types in array[Any]

I am new to Swift so im just trying to solve basic problems, but can't figure out this one. I am trying to count how many times a String, Int, Double or another class appears. And output the data. Right now i am only outputting the type. This is the…
camid
  • 9
  • 1
-1
votes
3 answers

Numpy Check if an element is in array

I have an array c, another array d. how can I check if d[1]ord[3]ord[5]ord[7] is in array c? c = np.array([[ 1, 1,0], [ 1,-1,0], [-1, 1,0], [-1,-1,0]]) d = np.array([[2,2,2], [1,1,0], …
BAOLIAN
  • 55
  • 5
-1
votes
1 answer

Why does assigning a variable of type any change the type of the variable it is assigned to?

Let's look at the following example: let a: string = "hello world" let b: number = 23 let c: any = 23 console.log(typeof a) // "string" console.log(typeof b) // "number" console.log(typeof c) // "number" a = b // Fails! a = c //…
Babofett
  • 182
  • 3
  • 11
-1
votes
4 answers

Find the word from the list given and replace the words so found

My question is pretty simple, but I haven't been able to find a proper solution. Given below is my program: given_list = ["Terms","I","want","to","remove","from","input_string"] input_string = input("Enter String:") if any(x in input_string for x…
ZXCVB0T
  • 15
  • 6
-1
votes
1 answer

Python if any how to learn which element in list

mylist = ["my", "try","some","words"] message = "Do u want my chips?" if any(x in message for x in mylist): print("any of words is in the list") else: print("words not in the message") this code works fine and I use a similar code in my…
-1
votes
2 answers

Issue with the Python any() function

I am trying to convert a list of lists into a single list with '1's if any of the elements in a single list is 1 and 0 otherwise. I have the following list: result =[[-1, -1, 0], [1, 0, -1], [1, 1, 0]] and if I use any() on the first list i.e.…
Silent
  • 45
  • 5