Questions tagged [detect]

"Detect" is overbroad and should not be used. Tag with the specific sort of detection you mean: collision-detection, face-detection, feature-detection, browser-detection, etc, etc.

This tag has an active burnination request. It should be removed from questions, not added.

Detection activity exist in many ways.

For example:

  • Detecting active bluetooth devices;
  • Detecting Internet Connection;
  • Detecting available ports;
  • Detecting incoming voice;
  • Detecting color scheme;
  • Detecting features.
1045 questions
12
votes
4 answers

I need a new way to detect if there has been a change to an elements HTML

Right now im trying to find a way to detect when an elements HTML has changed. I'm currently trying: var a, b; setInterval(function() { a = $('#chat').text(); }, 150); setInterval(function() { b = $('#chat').text(); if (a !== b) { …
Shawn31313
  • 5,978
  • 4
  • 38
  • 80
11
votes
5 answers

How do I automatically find a user's location?

I am currently working on a show listing website. I am going to display show information by location for the user sorted in a variety of different ways. I know I could ask the user where they are located when they first sign into the site, but…
CodingWithoutComments
  • 35,598
  • 21
  • 73
  • 86
11
votes
4 answers

tap detection on a gameobject in unity

i'm currently making a soccer game. In this mini-game, when the player touch the ball, it adds force, and the goal is to make the higher score. So i wrote: void Update() { if(Input.touchCount == 1 && Input.GetTouch(0).phase== TouchPhase.Began) …
Ophélia
  • 241
  • 2
  • 6
  • 16
11
votes
3 answers

How to detect if request came from mobile device

On server side is there any way to detect that particular request to API came from mobile device (from mobile app)? I know about user agent sniffing but I dont like this aproach from few enough reasons not to implement it. I also know I could add…
azrahel
  • 1,143
  • 2
  • 13
  • 31
11
votes
5 answers

Why does Enumerable#detect need a Proc/lambda?

Enumerable#detect returns the first value of an array where the block evaluates to true. It has an optional argument that needs to respond to call and is invoked in this case, returning its value. So, (1..10).detect(lambda{ "none" }){|i| i == 11}…
Maxim Schmidt
  • 147
  • 12
11
votes
6 answers

How to detect mobile browser for screen size?

I'm working on a site that needs to work on desktop and mobile. Right now I have a main content div that is set to 70% of the screen width. However, I feel that this is to small for mobile devices (like phones, not so much tablets) and want to up it…
Esaevian
  • 1,707
  • 5
  • 18
  • 30
11
votes
5 answers

iphone SDK detect Wifi and Carrier network

my app accesses the internet and i just want to detect whether there is a connection either via wifi or via carrier data network or not apple has made an example for that…
Mina Mikhael
  • 2,825
  • 6
  • 27
  • 31
10
votes
3 answers

On Android, how to detect a system dialog is displayed (power options, recent apps, low battery...)?

I'd like to catch anything that causes the display of my Activity to get even partially hidden, e.g. power options, recent apps tray, low battery notification, etc... and I'm having a hard time to detect these system events. I was pretty sure…
Wouzz
  • 1,200
  • 1
  • 10
  • 12
10
votes
8 answers

can php detect client browser monitor size/resolution?

Php can detect IP, hostname, client agent etc. Can php detect client browser monitor size/resolution?
show_lol
10
votes
3 answers

Detect headset button click on iPhone SDK

Is there a way to detect the headset's play/pause button click? I managed to detect the volume buttons clicks using: AudioSessionAddPropertyListener( kAudioSessionProperty_CurrentHardwareOutputVolume , audioVolumeChangeListenerCallback, self ); But…
MCO
  • 153
  • 1
  • 2
  • 12
10
votes
2 answers

How to detect that a control is being moved?

Suppose I have a window with a custom UserControl, and the UserControl has a textbox inside. When I drag the window around, how can the TextBox detect that it is being moved ? I tried to search around its RenderTransform property, there is that…
Mohamed
  • 121
  • 1
  • 7
10
votes
3 answers

How to set local environment in Laravel 4

I just want to set the local environment into Laravel 4. In bootstrap/start.php I have: $env = $app->detectEnvironment(array( 'local' => ['laravel.dev', ''], )); I tried change local to development index in array, but nothing works. I tried…
Godô
  • 113
  • 1
  • 1
  • 7
9
votes
4 answers

How to load an arbitrary image from a BLOB stream into a TImage?

If I understand it correctly, TImage.LoadFromFile determines the type of picture from the file extension. Is there any way to detect the image type automatically from a TBlobStream with a raw image in it? My current code: procedure…
Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113
9
votes
3 answers

How to determine if jQuery is running on a page (even if jQuery is /after/ the detection script)

I'm working on a do-dad that can be embedded in a page like a youtube video. The particular effect I want needs jQuery to work. I want to load jQuery on the condition that something on the page hasn't already added jQuery. I though of testing if…
Trass Vasston
  • 679
  • 2
  • 6
  • 19
9
votes
1 answer

How to detect whether screen is touched in a background service in Android Studio?

I am working on a project on android studio. I need to detect whether the screen is touched or not in a background service (and pop up a message for that). But, I have problem detecting whether the screen is touched or not in a background service…
Henry
  • 157
  • 1
  • 3
  • 12