Questions tagged [symbols]

can refer to a letter or special character; a primitive data type in many programming languages; an item of the alphabet of a formal language.

Symbol can refer to:

  • A letter or special character, e.g. '@'. Questions about character processing or dealing with specific characters can be tagged with this tag.
  • A primitive data type in many programming languages (Lisp, Prolog, Ruby, Smalltalk etc.)
  • An item of the alphabet of a formal language.
3495 questions
5054
votes
25 answers

Reference Guide: What does this symbol mean in PHP? (PHP Syntax)

What is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. Why is this? It used to be hard to find questions…
Gordon
  • 312,688
  • 75
  • 539
  • 559
1378
votes
20 answers

What characters can be used for up/down triangle (arrow without stem) for display in HTML?

I'm looking for a HTML or ASCII character which is a triangle pointing up or down so that I can use it as a toggle switch. I found ↑ (↑), and ↓ (↓) - but those have a narrow stem. I'm looking just for the HTML arrow "head".
Timj
  • 13,937
  • 3
  • 18
  • 9
608
votes
11 answers

How do I list the symbols in a .so file

How do I list the symbols being exported from a .so file? If possible, I'd also like to know their source (e.g. if they are pulled in from a static library). I'm using gcc 4.0.2, if that makes a difference.
Moe
  • 28,607
  • 10
  • 51
  • 67
427
votes
8 answers

What is the motivation for bringing Symbols to ES6?

UPDATE: Recently a brilliant article from Mozilla came up. Read it if you're curious. As you may know they are planning to include new Symbol primitive type in ECMAScript 6 (not to mention some other crazy stuff). I always thought that the :symbol…
Yanis
  • 4,847
  • 2
  • 17
  • 17
390
votes
1 answer

Placing Unicode character in CSS content value

I have a problem. I have found the HTML code for the downwards arrow, ↓ (↓) Cool. Now I need to use it in CSS like so: nav a:hover {content:"&darr";} That obviously won't work since ↓ is an HTML symbol. There seems to be less info about…
davecave
  • 4,698
  • 6
  • 26
  • 32
303
votes
23 answers

How to change facet labels?

I have used the following ggplot command: ggplot(survey, aes(x = age)) + stat_bin(aes(n = nrow(h3), y = ..count.. / n), binwidth = 10) + scale_y_continuous(formatter = "percent", breaks = c(0, 0.1, 0.2)) + facet_grid(hospital ~ .) +…
wishihadabettername
  • 14,231
  • 21
  • 68
  • 85
285
votes
9 answers

What is the colon operator in Ruby?

When I say { :bla => 1, :bloop => 2 }, what exactly does the : do? I read somewhere about how it's similar to a string, but somehow a symbol. I'm not super-clear on the concept, could someone enlighten me?
LuxuryMode
  • 33,401
  • 34
  • 117
  • 188
243
votes
5 answers

In HTML I can make a checkmark with ✓ . Is there a corresponding X-mark?

Is there a corresponding X mark to ✓ (✓)? What is it?
nc.
  • 7,179
  • 5
  • 28
  • 38
223
votes
5 answers

Is there Unicode glyph Symbol to represent "Search"

Unicode has a million icon-like glyphs, but they're very hard to search. Is there a Unicode glyph that looks like a "Binocular" or "magnifying glass"? Or is there a symbol that's used to mean "Search", which is in Unicode?
Prasad Jadhav
  • 5,090
  • 16
  • 62
  • 80
211
votes
18 answers

Enums in Javascript with ES6

I'm rebuilding an old Java project in Javascript, and realized that there's no good way to do enums in JS. The best I can come up with is: const Colors = { RED: Symbol("red"), BLUE: Symbol("blue"), GREEN:…
cypherfunc
  • 2,251
  • 2
  • 12
  • 14
181
votes
2 answers

Is there a literal notation for an array of symbols?

I like this literal expression for an array of strings: %w( i can easily create arrays of words ) I am wondering if there is a literal to get an array of symbols. I know I can do %w( it is less elegant to create arrays of symbols ).map( &:to_sym…
m_x
  • 12,357
  • 7
  • 46
  • 60
174
votes
4 answers

Why use symbols as hash keys in Ruby?

A lot of times people use symbols as keys in a Ruby hash. What's the advantage over using a string? E.g.: hash[:name] vs. hash['name']
user979912
171
votes
5 answers

What is the purpose of the '@' symbol in CSS?

I just stumbled across this question and I noticed the user is using some notation I've never seen before: @font-face { /* CSS HERE */ } So is this @ symbol something new in CSS3, or something old that I've somehow overlooked? Is this something…
Hristo
  • 45,559
  • 65
  • 163
  • 230
157
votes
2 answers

What's the dSYM and how to use it? (iOS SDK)

Sometimes the compiler produces .dSYM files. I guess this is a debugging related file, but I don't know what it is, and how to use it. What is a .dSYM? How do I use it?
eonil
  • 83,476
  • 81
  • 317
  • 516
153
votes
17 answers

How to count instances of character in SQL Column

I have an sql column that is a string of 100 'Y' or 'N' characters. For example: YYNYNYYNNNYYNY... What is the easiest way to get the count of all 'Y' symbols in each row.
cindi
  • 4,571
  • 8
  • 31
  • 38
1
2 3
99 100