|
The Longest Thread in the History of NG.com (maybe second longest)(keep bumping it) 50,000 or bust! @TonKSNK
Started by TonK on
, 25 posts
by 10 people.
Answer Snippets (Read the full thread at neo-geo):
|
|
Is there a command to determine length of a longest line in vim? And to append that length at the beginning of the file?
Started by joroj on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Ok, now for a pure Vim.
Length on the first line do:
:%yank :%!wc -L :put
Instead of using wc, Find length of longest line - awk bash describes how to use awk to find the length of the longest line.
|
|
I have a list of lists, and I need to find the longest one of them. If there are more than one with the same length it's the same which it returns. Thanks.
Started by misterfixit on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
N = [1] ; ?- ....
Then you can consult it:
?- longest([[1]], N).
longest([H|T], X) :- longest(T, X),!.
longest([H|T], H) :- length(H, N), longest(T, X), length(X, M), N > M,!.
longest([L], L) :- !.
Aproach.
|
Ask your Facebook Friends
|
What's the bug that you inadvertently created or encountered that remained undiscovered for the longest period of time?
Started by Hao Wooi Lim on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
How about this vulnerability that was left unpatched for 17 years: http://www.geek.com/articles/chips/17-year-old-unpatched-windows-vulnerability-discovered-20100120/
There was also the "drag-and-drop" vulnerability that allowed for remote code execution... .
|
|
What's the longest you've ever had a server running without rebooting?
Started by JoelFan on
, 20 posts
by 20 people.
Answer Snippets (Read the full thread at serverfault):
I remember back in the Novell days, we....
I've worked on old Novell 3.2 servers that were running for years .
At least I didn't need to worry about patching it.. .
Single power supply, no UPS, just luck.
I had an ultrix system with a good 5 year stretch .
|
|
I'm looking for a simple way to find the longest line in a file. Ideally, it would be a simple bash shell command instead of a script.
Started by drewster on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
Cat filename|awk '{print length, $0}'|sort -nr|head -1
For reference : Finding the longest line will show all lines having the length of the longest line found in the file, retaining the order.
|
|
Hi all,
I am using this
SELECT * FROM sys.dm_exec_query_stats s CROSS APPLY sys.dm_exec_sql_text( s.sql_handle ) t ORDER BY s.max_elapsed_time DESC
to get the longest running queries on the server level.
How do I get the longest running queries per database...
Answer Snippets (Read the full thread at stackoverflow):
Your longest running queries may not be your costliest ones, or the ones that you will benefit.
|
|
The longest city name I was able to find (that had a Zip code) was "La Canada Flintridge" which is in CA. I found that haphazardly via google. For testing our mailing addresses, I'd like to get a definite "this is the longest city name you could possibly...
Started by jcollum on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
According to Wikipedia at http://en.wikipedia.org/wiki/Longest_word_in_English#Place_names Survey’s database has these as the longest non-hyphenated community names, with the number of characters, VA (16) Eichelbergertown, PA (16)
at http....
|
|
So, I understand the problem of finding the longest simple path in a graph is NP-hard, since you could then easily solve the Hamiltonian circuit problem by setting edge weights to 1 and seeing if the length of the longest simple path equals the number...
Started by Claudiu on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The graph above is transformed to below ....
If you could solve shortest path problems with negative weights you would find a longest path is not necessarily the longest one, however, of all paths with k edges, P is the longest one.
|
|
I have a directed graph with weighted edges (weights are all positive).
Now, I'm looking for an efficient algorithm or code (specifically, C#) to find the longest path between two given vertices.
Started by Hamid on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Since you say the weights are positive, it's not possible for a longest path to exist when the graph has a cycle (reachable from the source), unless you mean....
Occur at most once, in which case Bellman-Ford will not give the longest path.
|