Questions tagged [identification]

211 questions
152
votes
11 answers

How to check if a file is a valid image file?

I am currently using PIL. from PIL import Image try: im=Image.open(filename) # do stuff except IOError: # filename not an image file However, while this sufficiently covers most cases, some image files like, xcf, svg and psd are not…
Sujoy
  • 8,041
  • 3
  • 30
  • 36
112
votes
10 answers

How to check type of files without extensions?

I have a folder full of files and they don't have an extension. How can I check file types? I want to check the file type and change the filename accordingly. Let's assume a function filetype(x) returns a file type like png. I want to do this: files…
emnoor
  • 2,528
  • 2
  • 18
  • 15
109
votes
15 answers

How do I check if an object's type is a particular subclass in C++?

I was thinking along the lines of using typeid() but I don't know how to ask if that type is a subclass of another class (which, by the way, is abstract)
Chad
  • 2,335
  • 8
  • 29
  • 45
23
votes
4 answers

Trouble deciding on identifying or non-identifying relationship

I've read this question: What's the difference between identifying and non-identifying relationships? But I'm still not too sure... What I have is three tables. Users Objects Pictures A user can own many objects and can also post many pictures per…
KdgDev
  • 14,299
  • 46
  • 120
  • 156
19
votes
7 answers

Can you find out which compiler was used to compile a program?

Given an executable that is compiled from C to run on Solaris, is it possible to determine which compiler was used to compile the associated incomplete executable? I can't see anything when using either the strings or the file command, and magic…
Rob Wells
  • 36,220
  • 13
  • 81
  • 146
13
votes
8 answers

Why is just an ID in the URL path a bad idea for SEO?

Why is it a bad idea to have a ID in the URL in terms of SEO? How does this URL http://example.com/user/1234 hurt SEO? Can someone give me a practical example where search engine rankings are worse?
Tower
  • 98,741
  • 129
  • 357
  • 507
13
votes
5 answers

How do I determine the architecture of an executable binary on Windows 10

Given some Random.exe on Windows, how can I determine its CPU architecture eg Intel/ARM, and its bitness eg 32 or 64. Is there a property in File Explorer, some other tool, or programatic method I can use?
Justicle
  • 14,761
  • 17
  • 70
  • 94
11
votes
1 answer

How can I uniquely identify a machine in C?

I want to uniquely identify a machine in C. The following are sources which have serial numbers, but they aren't guaranteed to be unique, or present (like a removable HDD or network card). CPU: I'm using the cpuid instruction, however, serial…
chacham15
  • 13,719
  • 26
  • 104
  • 207
11
votes
0 answers

X-Real-IP header confusion in nginx

My nginx config is - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; set_real_ip_from 55.55.55.1; real_ip_header X-Forwarded-For; real_ip_recursive on; I would like to know…
vjjj
  • 1,019
  • 3
  • 10
  • 35
11
votes
4 answers

Finding out the licenses of JAR libraries

I use Maven to build my web app projects, when I add some dependent library to the pom file, it again adds some more dependent jars to the project recursively. Is there a way to find out or restrict that only jars having a certain type of license -…
Prabhu R
  • 13,836
  • 21
  • 78
  • 112
11
votes
6 answers

How to identify a zip file in java?

I want to identify my archive whether it is zip or rar. But the problem I get runtime error before I can validate my file. I want to create custom notification: public class ZipValidator { public void validate(Path pathToFile) throws IOException…
Jack
  • 209
  • 1
  • 3
  • 10
11
votes
4 answers

How can I know if a TIFF image is in the format CCITT T.6(Group 4)?

How can I know if a TIFF image is in the format CCITT T.6(Group 4)?
user187711
9
votes
7 answers

How to identify multiple USB-serial adapters under Ubuntu 10.1

I am reading data from multiple identical USB-serial adapters under Ubuntu 10.1. On occasion, their /dev/tty path changes (eg if other USB devices are connected on startup). I need a way of repeatedly referring to the same adapter through any such…
user589888
  • 101
  • 1
  • 1
  • 3
8
votes
3 answers

How to identify stripes of different colors

how can I identify the presence or absence of regular stripes of different colors, but ranging from very very very very light pink to black inside of a scanned image (bitmap 200x200dpi 24-bit). Carry a few examples. Example 1 Example 2 (the lines…
originof
  • 795
  • 1
  • 7
  • 24
8
votes
1 answer

How to identify user based on finger print in Android M release?

Can we use the FingerprintManager in Android M (API 22) to identify (along with authorize) the user? For example, there are two finger prints registered in the device, one for user A and one for user B. Does the API provide support to detect which…
1
2 3
13 14