This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create FUNCTION [dbo].[DistanceBetween] (@Lat1 as real, | |
@Long1 as real, @Lat2 as real, @Long2 as real) | |
RETURNS Decimal | |
AS | |
BEGIN | |
DECLARE @dLat1InRad as float(53); | |
SET @dLat1InRad = @Lat1 * (PI()/180.0); | |
DECLARE @dLong1InRad as float(53); | |
SET @dLong1InRad = @Long1 * (PI()/180.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System | |
{ | |
public static class DateTimeExtensions | |
{ | |
/// <summary> | |
/// Returns the Week Number of the supplied date object | |
/// </summary> | |
/// <param name="value"></param> | |
/// <returns>int</returns> | |
public static int WeekNumber(this System.DateTime value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace System.Web.Mvc | |
{ | |
public static class HelperExtensions | |
{ | |
public static MvcHtmlString If(this MvcHtmlString value, bool evaluation) | |
{ | |
return evaluation ? value : MvcHtmlString.Empty; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Formats Phone Numbers to standard formats for display | |
/// </summary> | |
/// <param name="pn">Phone Number to format</param> | |
/// <returns></returns> | |
public static string FormatPhoneNumber(string pn) | |
{ | |
if (String.IsNullOrEmpty(pn)) | |
return pn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function action_register() | |
{ | |
#If user already signed-in | |
if(Auth::instance()->logged_in()!= 0){ | |
#redirect to the user account | |
Request::instance()->redirect('account/profile'); | |
} | |
#Load the view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class UsersRolesConstraints extends Doctrine_Migration_Base | |
{ | |
public function up() | |
{ | |
// Types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
class TicketsCommentsStatusesLabels extends Doctrine_Migration_Base | |
{ | |
public function up() | |
{ | |
$this->createTable('tickets', array( | |
'id' => array( | |
'type' => 'integer', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
CREATE TABLE tickets ( | |
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
user_id INT NUT NULL, | |
project_id INT NOT NULL, | |
status_id INT NOT NULL, | |
created INT NOT NULL, | |
last_update INT NOT NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#issues{overflow:hidden;} | |
#issues .menu{float:left;width:10em;} | |
#issues .menu .create{margin-bottom:15px;} | |
#issues .menu .create a{display:block;} | |
#issues .menu .create img{width:8.921em;height:2.099em;} | |
#issues .menu ul{list-style-type:none;} | |
#issues .menu ul li{display:block;border:1px solid #e0e0e0;border-right:0;margin-top:-0.1em;} | |
#issues .menu ul li a{display:block;padding:.25em .5em;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<title>jQuery UI Example Page</title> | |
<link type="text/css" href="css/jquery-ui-1.8rc3.custom.css" rel="stylesheet" /> | |
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> | |
<script type="text/javascript" src="js/jquery-ui-1.8.custom.js"></script> | |
<script type="text/javascript"> |
NewerOlder