Questions tagged [fallback]

A fallback is a design pattern useful in situations, when certain advanced functionality may be used only if certain conditions are met. If the conditions cannot be fulfilled, algorithm reverts to the so-called fallback function, which achieves the goal using less sophisticated methods.

508 questions
14
votes
2 answers

Fallback image with CSS

I have an that shows a remote image. I want it to fallback to another local image, in the case where the remote one is not reachable.
Kamafeather
  • 8,663
  • 14
  • 69
  • 99
14
votes
6 answers

TouchID forward to system passcode authentication

I want to use TouchID authenticate my own app. 1.I want user can click 'Enter passcode' to invoke system build-in passcode screen to authenticate,if success then enter my own app. But I don't how know to make it forward to passcode authenticate…
eric
  • 261
  • 1
  • 4
  • 11
14
votes
6 answers

Fallback (default) image using Angular JS ng-src

I'm trying to set an image source using data returned from a modal. This is inside an ng-repeat loop:
nikjohn
  • 20,026
  • 14
  • 50
  • 86
13
votes
8 answers

HTML5 Type Detection and Plugin Initialization

PART A: I know there are a lot of things out there that tell you if a browser supports a certain HTML5 attribute, for example http://diveintohtml5.info/detect.html, but they don't tell you how to acquire the type from individual elements and use…
13
votes
2 answers

How to detect if Moment js is loaded from CDN

I want to create a fallback if moment js is not loaded from CDN. I couldn't find any helpful resource online, neither on momentjs.com to detect if Moment js is present. Here's my code :
Garric
  • 552
  • 3
  • 13
  • 29
13
votes
1 answer

How does fallback work with socket.io?

I'd like to use WebSocket with Java. Problem is, my server is separated from the client by a proxy that cannot be configured. I've been searching for implementations of WebSocket with fallbacks such as long-polling. I've found socket.io but don't…
Grégoire Borel
  • 1,880
  • 3
  • 33
  • 55
13
votes
3 answers

Java fallback pattern

I'm trying to find a nice way of implementing a service which relies on a third-party library class. I also have a 'default' implementation to use as fallback in case the library is unavailable or can not provide an answer. public interface Service…
12
votes
1 answer

Retrieving i18n data with fallback language

I have to grab i18n text from a database. The default language is English, it has text for everything. But the non-English languages doesn't necessarily have all the desired translations. If a non-English translation for a certain entity/key isn't…
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
12
votes
2 answers

How do web browsers implement font fallback?

I'm interested in knowing where font fallback fits in the font shaping/rendering stack. In other words, at what point are missing glyphs detected and how are they substituted? I see in this document that the FontConfig tool does font fallback "based…
bright
  • 4,700
  • 1
  • 34
  • 59
12
votes
1 answer

Is there a such a thing like "user-defined encoding fallback"

When using ASCII encoding and encoding strings to bytes, characters like ö will result to ?. Encoding encoding = Encoding.GetEncoding("us-ascii"); // or Encoding encoding = Encoding.ASCI; data = encoding.GetBytes(s); I'm searching for a way…
joe
  • 8,344
  • 9
  • 54
  • 80
12
votes
3 answers

fallback for an nginx upstream proxy

I have an nginx instance in front of a cluster of image servers: upstream img-farm-1 { server 10.0.1.1; server 10.0.1.2; server 10.0.1.3; server 10.0.1.4; # etc } location ~ ^/static: { rewrite /static:(.*) /$1…
dland
  • 4,319
  • 6
  • 36
  • 60
11
votes
2 answers

color IE fallback for rgba() does not work

Why the following fallback for IE color: red; does not work ? In IE7, the color is black rather than red. Live demo here HTML:
Hello
CSS: div { width: 200px; height: 100px; background-color: blue; …
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
10
votes
2 answers

MySQL replication for fallback scenario

When I have two mysql servers that have different jobs (holding different databases) but want to be able to use one of them to slip in when the other one fails, what would you suggest how I keep the data on both of them equal "close to realtime"?…
BlaM
  • 28,465
  • 32
  • 91
  • 105
10
votes
2 answers

What is a fallback?

I'm not native English speaker and I want to be sure I know what "fallback" means. I've checked that it can refer to a "Plan 'B'". More specifically, I've read this sentence from a file "For using REM and a fallback". // Mixin: Font Size // // For…
Cremix_hellven
  • 895
  • 2
  • 7
  • 13
10
votes
2 answers

How is the skipping implemented in Spring Batch?

I was wondering how I could determine in my ItemWriter, whether Spring Batch was currently in chunk-processing-mode or in the fallback single-item-processing-mode. In the first place I didn't find the information how this fallback mechanism is…
Peter Wippermann
  • 4,125
  • 5
  • 35
  • 48
1
2
3
33 34