|
Anyone have a good trick to remember the standard ternary syntax?
Specifically whether the '?' or ':' comes first. I have consistently gotten this backwards over the years.
Started by mrinject on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Just use an if-statement which.
I read it as a normal English sentence:
a equals b if condition is true else c
As far as remembering to use it, especially if you are having problems remembering the syntax.
|
|
I am trying to get my app to remember the selection of an NSPopUpButton for the next time the App is launched. I tried binding the Selection Index to a NSUserDefaultsController but it has no effect, It doesn't remember the selection for the next launch...
Started by Joshua on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I would solve this by saving the -[NSPopUpButton indexOfSelectedItem] to [NSUserDefaults standardUserDefaults] at termination and restoring it at ... .
I haven't played around with bindings too much, so I can't help you figure out what's going wrong there .
|
|
Updated with clarifications
Hello,
When our users go to http://mysubdomain.server.com/login they get redirected to https://secure.server.com/login?subdomain=mysubdomain . So the actual login page is located on the secure.server.com subdomain.
The problem...
Started by Dan on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
AFAIK domain name (complete) is the current basis for remembering login.
Port combination.
|
Ask your Facebook Friends
|
Anybody have any tricks to remembering all the requirements?
Started by ASpilot2be on
, 20 posts
by 13 people.
Answer Snippets (Read the full thread at jetcareers):
Many places have figured out that pilots also have trouble remembering limitations, and have.
Safety.
|
|
In poll sites, a user (not logged in) can vote on a question only once. How does the web app 'remember' that the user has already answered a particular question?
one way is to set a cookie for every question she answers. another way to save the question...
Answer Snippets (Read the full thread at stackoverflow):
Saving the answered question IDs in the session works fine as long as the session is alive, but you lose the memory when the session ... .
The cookie solution won't work for clients who won't accept cookies .
Depends on how long you need to remember.
|
|
Most of my Lisp experience comes from Elisp. As such, I find myself writing Lisp only on occasion. By the time I come back to it, I often forget the difference between car and cdr and need to reference the docs to jog my memory.
What kinds of clever mnemonics...
Started by Ryan McGeary on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
I have no mnemonics for remembering car/cdr, though they are alphabetical ( a comes before d , thus.
|
|
I have a tool palette which shows up when an admin user is logged in to a site. The palette is draggable (via jQueryUI.draggable) and I would like it to remember the position between pages/refreshes... Is there a standard way of doing this, or a plug-...
Started by Dycey on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
My preferred method of storing this type of client-side state is to set... .
Cookies is one way of accomplishing it.
I'm not aware of plugins or standards for doing this (although it is likely they exist), but its not a terribly complicated operation anyhow .
|
|
How do I remember a url in php to serve it to a user after authentication. The idea is the user will request the url but while unauthenticated. In this case, I forward him to the login page, but what's the best practice to save that url so I can serve...
Started by drummer on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
|
|
Say, I employ merge sort to sort an array of Integers. Now I need to also remember the positions that elements had in the unsorted array, initially. What would be the best way to do this?
A very very naive and space consuming way to do would be to (in...
Started by Amit on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Clearly for an N-long array you do need to store SOMEwhere N integers -- the original position of each item, for example; any other way to encode "1 out of N!" possibilities... .
Is the struct such a bad idea? The alternative, to me, would be an array of pointers .
|
|
I have a few different things open in the terminal whenever I'm developing -- log tailing, Ruby console, plain shell in a certain directory, and so on.
How do I:
start all those things at once, hopefully in the right position on the screen? make them ...
Answer Snippets (Read the full thread at stackoverflow):
And while we're on the topic, has anyone found a working solution for getting OS X to remember window positions on an external monitor? If I unplug it and plug it back in, I have to drag everything back to the same position (although at least Mercury....
|