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.
3215 questions
4722
votes
20 answers

Reference — What does this symbol mean in PHP?

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
  • 296,205
  • 68
  • 508
  • 534
1298
votes
19 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,137
  • 3
  • 16
  • 9
522
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
  • 24,940
  • 7
  • 50
  • 66
382
votes
7 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,367
  • 2
  • 15
  • 15
357
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,314
  • 5
  • 23
  • 32
251
votes
20 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
  • 12,253
  • 20
  • 58
  • 83
249
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
  • 31,806
  • 34
  • 112
  • 184
233
votes
4 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.
  • 6,709
  • 5
  • 25
  • 36
204
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
  • 4,786
  • 16
  • 57
  • 79
177
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
  • 11,705
  • 6
  • 43
  • 57
164
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
161
votes
16 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:…
Eric the Red
  • 1,746
  • 2
  • 10
  • 14
157
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
  • 42,002
  • 60
  • 155
  • 224
124
votes
16 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,181
  • 8
  • 28
  • 35
119
votes
5 answers

How to get an outline view in sublime texteditor?

How do I get an outline view in sublime text editor for Windows? The minimap is helpful but I miss a traditional outline (a klickable list of all the functions in my code in the order they appear for quick navigation and orientation) Maybe there is…
user89021
  • 13,714
  • 14
  • 51
  • 65
1
2 3
99 100