|
How can I create a boost::local_time::local_date_time object from a tm time structure?
Started by Richard on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Posix_time::ptime_from_tm(*timeinfo); local_time::time_zone_ptr zone(new local_time::posix_time_zone("GMT")); local_time::local_date_time my_ldt(my_ptime, zone); std::cout << "local_date_time.
|
|
I wrote a simple script which I want to share with my colleagues.
Should it be in /usr/local/bin or /usr/local/sbin? What is the typical usage for these directories?
Started by Jérôme Kerviel on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
By default, a normal user does not have ....
/usr/local/sbin is for system administration programs (which are not part of the core OS) that a local administrator may run.
/usr/local/bin is for programs that a normal user may run.
|
|
I know it's possible to use secure file transfer protocol to transfer files from remote locations to the local box, but is it possible to use it to transfer files from some local directory to another local directory?
Started by echoblaze on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
If you execute
scp /tmp/a /tmp/b
scp does a real local copy, since both source and target are local paths to the local server and send a file over the connection without actually leaving the machine and that a given implementation....
|
Ask your Facebook Friends
|
Hi: In my Rails ApplicationController I have added the following methods (from rails guide docs) to support I8n based on http accept language header info. Is there a way to check if the requested locale is available and if not, use the 'english' default...
Started by Snej on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
See: http://guides.rubyonrails....
If you're still on 2.2 you've to implement it yourself .
In Rails 2.3 you've a available_locales method available in module I18n (calls the same method from the backend, like I18n::Backend::Simple.available_locales ).
|
|
Here's a simple (hopefully) L10N question:
Do all locales want this format:
Sunday, Nov 23, 2008
with the weekday before the date, or do some locales want it after the date like this?
Nov 23, 2008, Sunday
Started by Mike Akers on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
[EDIT] Funnily, I found an example in....
Now, I don't know your purpose, but you probably shouldn't make any guess like that anyway.. .
I can't answer for all locales, but in French, we say "dimanche 23 novembre 2008", so for us, the answer is yes.
|
|
Here's a possible scenario.
Let's say I have a website "https://www.mywebsite.com" and there is a valid SSL certificate purchased for this domain.
I want to "mimick" this website on my LOCAL machine for a testing purpose.
So let's say I set up a locally...
Started by ebae on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
You can also re-use it on your test machine if you don't mind clicking the box "accept this whacked... .
You can re-use your SSL certificate if you configure your DNS so that your test machine is the same domain name as server, which is probably a bad idea .
|
|
I have several local machines; I use a OSX 10.6 machine to do most of the serving. Annoyingly, it postfixes its network name with .local .
How would I set up a system so that I could access it by its hostname?
server: httpd apache2 default install
I am...
Started by Paul Nathan on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
How are you trying to access the Macintosh? What....
It's equivalent to having a extra cname, or host entry.. .
HostName your_new_hostname
What router / DNS server do you have running on your network?
The .local, with and without the ".local".
|
|
I need to translate a Microsoft locale ID , such as 1033 (for US English), into either an ISO 639 language code or directly into a Java Locale instance. (Edit: or even simply into the "Language - Country/Region" in Microsoft's table.)
Is this possible...
Started by Jonik on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Parameters: lcid - the Windows language ID....
The was the first hit on google for "Java LCID" is this javadoc:
gnu.java.awt.font.opentype.NameDecoder
private static java.util.Locale getWindowsLocale(int lcid)
Maps a Windows LCID into a Java Locale.
|
|
Hi,
I am working on the I18n of our java application and we have decided that we will only support data in one locale whereas the user interface may support many.
My question is this:
Should sorting and filtering of data be performed using the user's ...
Started by Ed on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
What helps the users the most ?
If you're an American working with Swedish names, and Swedish people, it'd really help you to view the data sorted using Swedish rules, since that is what most people ... .
I guess it'll have to depend on the use-cases, i.e .
|
|
Hi,
I have a local directory with executable in it (e.g. foo_dir/bin/bar). I typed "foo", but foo_dir wasn't suggested. What cames out is other program in $PATH (such as bootlogd).
How should I config my zshrc? Thanks
Started by Victor on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I found a workable solution, by "setopt autocd.
Bin directory i.e /usr/bin, /bin, /usr/local/bin.
|