This is strange:
DateList@AbsoluteTime[596523]
returns
{2078, 7, 2, 2, 42, 9.7849}
But
DateList@AbsoluteTime[596524]
returns
{1942, 5, 26, 20, 28, 39.5596}
The question: What's going on?
Note that AbsoluteTime with an integer argument is undocumented.
(I think I now know what it's doing but figured this is useful to have as a StackOverflow question for future reference; and I'm curious if there's some reason for that magic 596523 number.)
I have a url /embed?t=X and I want to redirect it to /page/embed/X where X is any number of alpha numeric characters.
I know must redirect rules go the other way but for the purpose of the applciation I need to reverse it.
Any ideas?
I have tried things like:
RedirectRule ^embed\?t\=([a-zA-Z0-9]+)$ /page/embed/$1
but with no luck.
Hi! all,
I am writing an application for video streaming.In the application server is required to know the distance of the client from it self in terms of hop number.My question is,is there any tool/method other than traceroute available in unix environment to find it?
I also need to find out the geographical location of the client.So is their any tool/method for this as well?
Any help in this regard will be highly appreciated.
Thanks in advance.
Mawia
Hi,
I've got table Articles
ID identity autoincement, IDArticle: nvarchar(100) ,IDCar nvarchar(100), createddate
How to convert this:
SELECT IDCar , MAX(createddate)
FROM Articles
GROUP BY IDCar
to get IDArticle
eg:
1 art1 BWM 5-21-2010
2 art2 BMW 5-24-2010
3 art3 BMW 5-31-2010
4 art4 Porshe 5-31-2010
5 art5 Porshe 6-1-2010
Expecting result is:
art3
art5
It's not duplicated with:
http://stackoverflow.com/questions/2736769/sql-query-number-of-occurance/2736809#2736809
I'm developing a touchscreen application that, aside from everything else, records the amount of times the screen is used so that the user can be reminded to clean the screen after a predefined number of clicks.
I've got the click functions written nicely, all I need now is make sure the function is called on a click.
I imagine $('*').click(function() { //do something }); would accomplish my goal, but is that the best way? Also, would that overwrite other click functions assigned to the elements?
<?php
function register_template(){
print_r(func_get_args());
# the result was an array ( [0] => my template [1] => screenshot.png [2] => nice template .. )
}
register_template( # unkown number of arguments
$name = "my template",
$screenshot = "screenshot.png",
$description = "nice template .. "
)
?>
BUT , I want the result array as $key = $value form , $key represents the parameter name.
I had never really thought about whether a symbol could be a number in Lisp, so I played around with it today:
> '1
1
> (+ '1 '1)
2
> (+ '1 1)
2
> (define a '1)
> (+ a 1)
2
The above code is scheme, but it seems to be roughly the same in Common Lisp and Clojure as well. Is there any difference between 1 and quoted 1?
I have written this function in Scala to calculate the fibonacci number given a particular index n:
def fibonacci(n: Long): Long = {
if(n <= 1) n
else
fibonacci(n - 1) + fibonacci(n - 2)
}
However it is not efficient when calculating with large indexes. Therefore I need to implement a function using a tuple and this function should return two consecutive values as the result.
Can somebody give me any hints about this? I have never used Scala before. Thanks!
somehow couldn't find this with a google search, but I feel like it has to be simple...I need to convert a string to a fixed-length byte array, e.g. write "asdf" to a byte[20] array. the data is being sent over the network to a c++ app that expects a fixed-length field, and it works fine if I use a BinaryWriter and write the characters one by one, and pad it by writing '\0' an appropriate number of times.
is there a more appropriate way to do this?
hi,
i am using autocomplete with oracle Db,how to create unique keyword for the table.
KEYWORD VARCHAR2(100)
COUNT NUMBER(18)
how can i make as unique
can plz tell the query
I need your help to solve this program ...
Implement a separate chaining hash table that stores strings. You’ll need a hash function that converts string into an index number. Assume the strings will be lowercase words, so 26 characters will suffice.
i have an html page where i have a table of items (one item per row) where each item is a html link that says "Add" and there is a textbox next to each link with a number in it.
the text link and the textbox are in the same td inside the row of the table.
how do i, using jquery, capture the value from the textbox that is to the right of the link i click on.
Is there a formula someplace which can be used to determine the minimum number of segments / bytes which need to be transfered across a TCP connection to determine it's bandwidth and which takes into account Slow Start and Congestion Avoidance?
Hi,
I have set the correct CVS Root, within this root I have a repository which
contains a number of files. In particular, I am interested in the revisions of
one of the files, lets call it test.tex. Now I would like to get ALL different versions
of this file, from the repository. Is there somehow a command that I could use to do that?
Or do I need to extract them one after the other?
Many thanks!
Windows XP, IE 7
If the data in one of the column in table is more than say 800 bytes, it seems to print partial pages. Previews also appears same (span into multiple partial pages).
What is the best way so that large number of rows with wide coulumns (fixed width) are printed properly without giving blank or partial page.
Used table with thead and colgroup with width in 14%.
I want to run my ruby script x times a day (the number might change) on my linux box. What would be the best way to do so if I do not what it happen at the same time? I want the time (hour and minute) to be random
I have a page that I'm converting to PDF. This page contains a number of paragraphs and they don't all fit onto a single page. If I could reduce the spacing between the <p> tags, this would help fit more. Is this possible? Thanks.
I am working on a webapplication
How can i create SQL for the following
Database Information
User information
Username - String
Password - String
Admin or Client - boolean
Last login – Date/Time
LogItem
typeLogItem – String (Page name?)
hitCount – int
View
PageURL
UserID
Transaction
User – String
DateTimeStamp
SKU – int
Purchase-boolean
TransactionID-int
Inventory information
Sku number - int
Item description - String
Price to customer - double
Count - in
I Need a regular expression which accepts all types of characters (alphabets, numbers and all special characters), and miniumum number of characters should be 15 and no limit for maximum characters.
Hey,
I'm doing a statistical research application. I need to store words according to 2 initial letters which is 676 combinations and each word has its number of occurrences (minimal, maximal, average) in text. I'm not sure how the model/schema should look like. There will be a lot of checking whether the keyword was already persisted. I appreciate your suggestions.
Edit: I'll be using either mysql or postgresql + spring templates
I want to develop a game in flex to build a building. In canvas i want to spirit into number of squares and place a different type of building in that square(Using click and drag). If small building means its take two square and big building means its take four squares. Please anybody help me
i have table country and having country name and country code,
i have customer table having countomer mobile number like customer_mobile field values like 0044-123456798 ,
0024-582654753 , 012-52686145 ,
i want to populate my country oce into combo,
that country name should in customer table which country code count is high that country name should come in the
dropdown list top ,
How to write the join query...
Thanks
I was looking at the metadata for System.Web.Configuration.CompilationSection, and noticed the following attribute on the TimeSpan BatchTimeout property:
[TimeSpanValidator(MinValueString = "00:00:00",
MaxValueString = "10675199.02:48:05.4775807")]
Could someone explain why this is the allowed max value? TimeSpan itself has an upper limit, so why would there be another value validation, and why this number?