i'm using spring+tapestry for authenticate webuser. I wonder is there any technique i can force all users that currently login in to logout let say i'm on scenario where the site is 'under maintenance mode'
Let's say I have a variable t that's set to this:
datetime.datetime(2009, 7, 10, 18, 44, 59, 193982, tzinfo=<UTC>)
If I say str(t), i get:
'2009-07-10 18:44:59.193982+00:00'
How can I get a similar string, except printed in the local timezone rather than UTC?
Coming from an iPhone world...
In Android, I am looking for an iPhone UIWebView-like control which can display HTML and let me catch clicks on links and stop the navigation. My apps display text with commands as href's in the HTML.
Is there a way to find out the final location of my animated "object" after the animation? Let's say I am animating an ImageView with location in parent as (0,0 - 20,20) using TranslateAnimation and ScaleAnimation over 1 second with setFillAfter(true).
How to I find the final location of this "object" (since the View location itself does not move)? I need to continue the animation from this point based on an user input.
So let's say I have a view that access a date:
<%= Html.TextBoxFor(model => Model.Birthday) %>
How do I have my view dictate how that date is formatted? I'd like to use common formatting options, and it's important that this is 2-way (both for display and data-entry).
What are some best practices to keep in mind when developing a script program that could be integrated with a GUI, probably by somebody else, in the future?
Possible scenario:
i develop a fancy python CLI program that scrapes every unicorn images from the web
i decide to publish it on github
a unicorn fan programmer decides to take the sources and build a GUI on them.
he\she gives up because my code is not reusable
How do i avoid step four and let unicorn fan programmer build his\her GUI without hassle?
In what other software-related technologies is the term clientlet used, besides the Lobo browser project? Google search yielded nothing of use, it returns client let as part of non-related phrases, not as an unitary term.
Hye Guys,
I'm busy working on a time series and am trying to find the commands that allow me to insert a quarter count variable. To keep things simple, the third quarter of 1995 (date my observations start) should be quarter -2, the fourth quarter of 1995 should be -1 etc etc uptill 2006 (should be somewhere around 45 by then). My dates are in date9 format, such as 20JUN04 etc..
Anyone who can help me with the commands I need t o let this work in SAS?
Thanks
If you had the opportunity to take one computer science course now, and as a result significantly increase your knowledge in a subject area, what would it be? Undergraduate or graduate level.
Compilers? Distributed algorithms? Concurrency theory? Advanced operating systems?
Let me know why.
(Note that I appreciate this isn't a far fetched scenario - but time and inertia might be preventing people from taking the course or reading the book or whatever)
This subject is pretty often asked here and the Sun tutorial is too concise about the subject. So I thought, let's post a CW question and answer about this so that it can if necessary be referenced in other topics.
Others are of course free to add more hints and best practices here.
We are working on exception handling with ASP.NET web applications (with C# language). Would you please let me know the best practices of Exception handling?
I have been writing specs for controllers and models, but I have never written a helper spec. I have no idea where I start.
I have the following snippet in application_helper.rb
def title(page_title)
content_for(:title) { page_title }
end
How should I write a helper spec on the code?
Also if there's any open-source Rails app to show good helper testing/specing, do let me know.
So I have a query, can someone let me know if it looks ok content wise?
"INSERT INTO ".TBL_MESSAGES." (NULL, 'Your ranking points have changed',
'Due to your recent activity, your ranking points have increased by $r', '2', '$u',
'0', '0', '0', '0', NULL, NULL, NULL, NULL, now())";
I can add further information if the query doesnt appear to have a problem?
Thanks
How do I process a signal of in a subclass? Let's say my subclass is derived from QTextEdit and is interested in the signal textChanged. It seems silly to connect an object to itself, I should be able to simply override the textChange method -- but it isn't virtual.
What is the accepted way to do this?
I encountered really strange behaviour when constructing a Calendar object and then formating it in a particular style.
Let the code do the talking:
public class Test
{
public static void main(String[] args)
{
SimpleDateFormat frmt = new SimpleDateFormat();
frmt.applyPattern("yyyy-MM-dd");
GregorianCalendar date = new GregorianCalendar(2012,1,1);
System.out.println(frmt.format(date.getTime()));
}
}
The output is:
2012-02-01
The expected output is of course:
2012-01-01
What am I doing wrong?
I doubt if this is encryption but I can't find a better phrase. I need to pass a long query string like this:
http://test.com/test.php?key=[some_very_loooooooooooooooooooooooong_query_string]
The query string contains NO sensitive information so I'm not really concerned about security in this case. It's just...well, too long and ugly. Is there a library function that can let me encode/encrypt/compress the query string into something similar to the result of a md5() (similar as in, always a 32 character string), but decode/decrypt/decompress-able?
I am currently html encoding all user entered text before inserting/updating a db table record. The problem is that on any subsequent updates, the previously encoded string is reencoded. This endless loop is starting to eat up alot of column space in my tables. I am using parameterized queries for all sql statements but am wondering would it be safe to just let the .NET Framework handle this part without the HTML Encoding?
After literally days of tweaking, I think I got vim's autocomplete (omnicomplete + Acp plugin) to work acceptably. But the annoying thing is that it is still enabled for plain text files so I would have to type :DisableAcp for README or plain text files. How do I add logic to my vimrc so that if it detects an empty filetype it disables the Acp on startup?
here is what I wrote:
if &filetype == ""
let g:acp_enableStartup = 0
endif
but this disables Acp on start up for all files.
Hello every one,i would like to know if we have any class in qt which can zip a folder or file.i used qprocess to compress,it got compressed but i am unable to uncompress it using normal zip tool.can anyone let me know how can we compress a folder/file using qt api classes
Let's say I had a query like this:
SELECT * FROM (
SELECT 'a' AS a, '1' AS b
UNION
SELECT 'a' AS a, '2' AS b
UNION
SELECT 'b' AS a, '1' AS b) AS a
GROUP BY a.a
In this case "a".b is an aggregate of 1,2 while "b".b is only an aggregate of 1.
How can I select only "a"?
I have a 5 bit integer that I'm working with. Is there a native function in Objective-C that will let me know which bit is the leftmost?
i.e. I have 01001, it would return 8 or the position.
Thanks
Hello,
I am learning Computer Graphics at the university and I'm trying to figure out the use of it ... and I fail.
Only games and movies stick in to my mind, I'm sure there are other uses for, let's say, graphic algorithms, openGL, 2D and 3D, 3ds Max ...
Is it useful later on ? Where do I need it ?
Thank you
How to filter nested/child collections of entities when including them in EF?
Example:
Let's have standard Customer-Orders association. How to load all customers and include only their last three orders in their Orders collection?
Is there something like AssociateWith function from L2S for EF?
Users drag rows up and down in my DataGridView. I have the dragging logic down-pat, but I'd like there to be a dark marker indicating where the row will be placed after I let go of the mouse.
(I've seen this in 1000 places before, but can't seem to find an example right now)
Does anyone know how I'd go about doing this? Is this built-in, or would I have to draw my own marker (if so, how do I do that)?
Thanks!
I have put together a 5 star rating system using PHP and Ajax which will write the rating into a database. (See link below)
http://andrewmccrum.com/maps/rate/5star.php
I want this rating system to work within a Google Maps InfoWindow but at the minute I can only get the InfoWindow to read and display the rating. It will not let the user vote like the top link. And I have no idea why
www.andrewmccrum.com/maps/database/index.php