Questions tagged [labels]

6 questions
10
votes
1 answer

Options vs Preferences vs Settings? What do they mean, and for what should I use them?

Across the various different programs, you will most often have a menu item called: Preferences Firefox Chrome Gedit Synaptic (Under a Settings menu column) Hexchat (Under a Settings menu column) Gnome-Terminal Thunderbird Rhythmbox Less…
Anon
  • 3,565
  • 3
  • 27
  • 45
3
votes
1 answer

Is it an anti-pattern for Swift functions that take in a sender to have a label for that parameter?

This is something I see all over Cocoa: func someAction(_ sender: Any) which is called like: someAction(someObject) This can be very confusing to me. The infamous example is in NSView subclasses: print("Hello, World!") Despite this being standard…
Ky -
  • 525
  • 5
  • 17
3
votes
1 answer

How to solve binary labeling with graph cut?

Many literature references suggest that the binary labeling problem can be converted into a graph cut problem and solved with the max flow/min cut algorithm. I'm trying to understand the formulation given in Xiaowei Zhou's presentation of the…
3
votes
4 answers

Indenting labels in C

I noticed that in the Vim automatically indents labels in a rather unintuitive way (IMHO). int main(void) { goto end; end: return 0 } Are there any style guidelines for labels? For the faint-hearted, the goto's I am using are for error…
tskuzzy
  • 732
  • 1
  • 7
  • 12
2
votes
3 answers

Can you pass a label as an argument, and have the function return to it?

So I would like to be able to call a function like this: void func(1, 2, 3, (void*)label) // can return normal or to the labels //some code label: //different code Is it possible, and is it bad practice?
JavaProphet
  • 185
  • 1
  • 5
1
vote
0 answers

distribute rectangles in order to do not overlap

I've a series of labels and icons inside the screen. A label is on the right of corresponding icon. I must perform a sort of declutter: when two or more labels overlap each other (or a label with an icon), the label must be moved in free space. This…
Jepessen
  • 123
  • 6