If your browser allows, try changing the site from google.com to www.google.com. Both the google search function and the google button will still work as well.
Q:
jQuery - Local vs. External Library
I have noticed that some people are using jQuery locally in their project, and some people are adding jQuery from CDN.
What is the advantage and disadvantage to do so?
A:
The drawback of using the local version is that you need to include the file in your source code. This could mean you need to include it in a different file, or even in a separate.js file.
The benefit of using a cdn-hosted version is that you do not have to include the file in the source, and you can just add the version of jQuery you need to your project without the need to modify the source.
More information can be found here:
Q:
SQL Server: how to create a function which outputs a unique, random integer
I am using SQL Server 2008.
I need to create a function which generates a unique, random integer.
The integer must be positive and must be in the range 1-5000.
The function needs to be very fast, so an idea would be to use a lookup table.
Is this possible?
A:
If you want a single random number, you should try this code, which works for me:
CREATE FUNCTION dbo.random_value(@count int)
RETURNS int
AS
BEGIN
-- NOTE: This function returns an integer
declare @min int, @max int, @random int;
select @min = min(val), @max = max(val)
from (select top 1 val from (values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12)) v(val)) v(val);
declare @i int;
select @i = 1;
while @i ac619d1d87
Related links:
Comments