The Art of Programming

Insert HTML at Cursor/Caret within a Content Editable Div

27. July 2014 03:29 by Scott in javascript, jquery, C#, Development  //  Tags:   //   Comments (0)

First we need to capture the cursor position within the Div it self.

$scope.editorSelection;

    $scope.SetupEditor = function () {
        var editable = document.getElementById('editor'),
selection, range;
        var captureSelection = function (e) {
            // Don't capture selection outside editable region
            var isOrContainsAnchor = false,
                isOrContainsFocus = false,
                sel = window.getSelection(),
                parentAnchor = sel.anchorNode,
                parentFocus = sel.focusNode;

            while (parentAnchor && parentAnchor != document.documentElement) {
                if (parentAnchor == editable) {
                    isOrContainsAnchor = true;
                }
                parentAnchor = parentAnchor.parentNode;
            }

            while (parentFocus && parentFocus != document.documentElement) {
                if (parentFocus == editable) {
                    isOrContainsFocus = true;
                }
                parentFocus = parentFocus.parentNode;
            }

            if (!isOrContainsAnchor || !isOrContainsFocus) {
                return;
            }
            selection = window.getSelection();

            // Get range (standards)
            if (selection.getRangeAt !== undefined) {
                range = selection.getRangeAt(0);

                // Get range (Safari 2)
            } else if (
                document.createRange &&
                selection.anchorNode &&
                selection.anchorOffset &&
                selection.focusNode &&
                selection.focusOffset
            ) {
                range = document.createRange();
                range.setStart(selection.anchorNode, selection.anchorOffset);
                range.setEnd(selection.focusNode, selection.focusOffset);
            } else {
                // Failure here, not handled by the rest of the script.
                // Probably IE or some older browser
            }
            $scope.editorSelection = range;
        };
        editable.onkeyup = captureSelection;
    }

 

From here, we need to be able to insert HTML at the selection when we choose to.

    function insertHtmlAfterSelection(html) {
        var range, expandedSelRange, node;
        if ($scope.editorSelection) {
            range = $scope.editorSelection;
            expandedSelRange = range.cloneRange();
            range.collapse(false);
            var el = document.createElement("div");
            el.innerHTML = html;
            var frag = document.createDocumentFragment(), node, lastNode;
            while ((node = el.firstChild)) {
                lastNode = frag.appendChild(node);
            }
            range.insertNode(frag);
        }
    }

 

That will be it.

High Precision Stop Watch Class For C#

9. March 2014 14:27 by Scott in C#, Stopwatch  //  Tags:   //   Comments (0)

Requirements were to make a very high precision stop watch class for one of our projects.  This is what we came up with.  This class is used in one application by many sports teams around the world.

public class StopwatchWrapper : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        Timer timer;

        private bool _isPaused;
        /// <summary>
        /// is the clock currently counting down.
        /// </summary>
        public bool IsPaused
        {
            get { return _isPaused; }
            set
            {
                _isPaused = value;
                OnPropertyChanged("IsPaused");
            }
        }
        /// <summary>
        /// we need to track how many milliseconds occured since the last elapsed timer interval.
        /// </summary>
        private long _millisecondsSinceLastInterval = 0;

        private bool _isRunning;
        /// <summary>
        /// is the clock currently counting down.
        /// </summary>
        public bool IsRunning
        {
            get { return _isRunning; }
            set
            {
                _isRunning = value;
                OnPropertyChanged("IsRunning");
            }
        }
        private long _timerLength;
        public long TimerLength
        {
            get { return _timerLength; }
            set
            {
                _timerLength = value;
                OnPropertyChanged("TimerLength");
            }
        }
        private DateTime _startTime;
        public DateTime StartTime
        {
            get { return _startTime; }
            set
            {
                _startTime = value;
                OnPropertyChanged("StartTime");
            }
        }

        private long _timeElapsed;
        public long TimeElapsed
        {
            get { return _timeElapsed; }
            set
            {
                _timeElapsed = value;
                OnPropertyChanged("TimeElapsed");
            }
        }

        private bool _isClockAtZero;
        public bool IsClockAtZero
        {
            get { return _isClockAtZero; }
            set
            {
                _isClockAtZero = value;
                OnPropertyChanged("IsClockAtZero");
            }
        }

        private long _timeRemaining;
        /// <summary>
        /// time remaing in milliseconds from the timer Length
        /// </summary>
        public long TimeRemaining
        {
            get { return _timeRemaining; }
            set
            {
                _timeRemaining = value;
                OnPropertyChanged("TimeRemaining");
            }
        }

        public StopwatchWrapper(long timeForClockInMilliseconds)
        {
            timer = new Timer(500);
            timer.Elapsed += new ElapsedEventHandler(timer_Elapsed);
            TimerLength = timeForClockInMilliseconds;
            TimeRemaining = timeForClockInMilliseconds;
            TimeElapsed = 0;
        }
        /// <summary>
        /// dummy constructor for the xport of xml games
        /// </summary>
        public StopwatchWrapper()
        {
        }

        void timer_Elapsed(object sender, ElapsedEventArgs e)
        {
            TimeSpan ts = DateTime.UtcNow - StartTime;
            _millisecondsSinceLastInterval = (long)ts.TotalMilliseconds - _millisecondsSinceLastInterval;

            TimeElapsed += _millisecondsSinceLastInterval;
            TimeRemaining = _timerLength - TimeElapsed;

            _millisecondsSinceLastInterval = (long)ts.TotalMilliseconds;



            Console.WriteLine(TimeElapsed);
            Console.WriteLine(_timerLength);
            Console.WriteLine(TimeRemaining);
            Console.WriteLine(StartTime);
            IsRunning = true;
            if (TimeRemaining <= 0)
                IsClockAtZero = true;
        }

        public void Stop()
        {
            if (timer != null)
                timer.Stop();
            IsRunning = false;
        }
        public void Pause()
        {
            if (timer != null && IsRunning)
            {
                timer.Stop();
                IsPaused = true;
            }
        }
        public void Start()
        {
            StartTime = DateTime.UtcNow;
            timer.Start();
            IsRunning = true;
            IsClockAtZero = false;
            _millisecondsSinceLastInterval = 0;
        }
        /// <summary>
        /// resumes the clock.
        /// </summary>
        public void Resume()
        {
            if (IsPaused)
            {
                StartTime = DateTime.UtcNow;
                timer.Start();
                IsRunning = true;
                IsPaused = false;
                _millisecondsSinceLastInterval = 0;
                Console.WriteLine(TimeElapsed);
                Console.WriteLine(_timerLength);
                Console.WriteLine(TimeRemaining);
                Console.WriteLine(StartTime);
            }
        }
        /// <summary>
        /// adds seconds to the clock.
        /// </summary>
        /// <param name="seconds">seconds to be added.  Can be negative or positive.</param>
        public void AddSecondsToClock(int seconds)
        {
            if (StartTime == new DateTime())
            {
                StartTime = DateTime.UtcNow;
                TimeRemaining = _timerLength;
            }
            StartTime = StartTime.AddSeconds(seconds);
            TimeRemaining += seconds * 1000;
            TimerLength += seconds * 1000;
            //Console.WriteLine("change");
            //Console.WriteLine("change"+TimeRemaining);
            //Console.WriteLine("change"+TimerLength);
        }
        /// <summary>
        /// changes the amount of seconds of a clock
        /// </summary>
        /// <param name="seconds"></param>
        public void changeSecondsOfClock(int seconds)
        {
            TimeElapsed = 0;
            TimeRemaining = seconds * 1000;
            TimerLength = seconds * 1000;
            //Console.WriteLine("change");
            //Console.WriteLine("change" + seconds);
            //Console.WriteLine("change" + TimeRemaining);
            //Console.WriteLine("change" + TimerLength);
        }

        public void Reset()
        {
            IsRunning = false;
            StartTime = DateTime.UtcNow;
        }


        protected void OnPropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(name));
            }
        }

    }

Don’t Give Up

8. February 2014 17:36 by Scott in Inspiration, Startups  //  Tags:   //   Comments (0)

I'd like to share a story of a sushi restaurant owner that I know. I was a bartender there, many, many years ago.

This restaurant owner came from Japan with his wife when they were in their twenties. They both spoke limited English and settled down in a part of New York that is predominantly Caucasian. For many years, he worked as a dishwasher while saving up diligently.

When he saved up enough money, he entered into a partnership with 2 others to open up a restaurant. One of the partners screwed the other two and he had to declare bankruptcy.

He went back to being a dishwasher, then later a cook, as he saved up money again. Finally, he had a chance to purchase a hole-in-the-wall restaurant that he thought he could improve. Unfortunately, that one also failed. And he declared bankruptcy for a second time.

That still didn't deter him. He worked again, saved up again, and opened up his third restaurant, a sushi restaurant. And for him, the third time was the charm.

This one became a success. It grew to 3 locations total. Every morning, he drove for hours to the fish market at 4am to select the best fish, then transported it to his restaurants in the back of his truck. He still has that truck. We all called it his "fishmobile" because it stunk of fish like you wouldn't believe.

He didn't reach this success until his 50s. Through it all, his wife was amazingly supportive. She worked alongside him in these restaurants too. They are retired now. He shared his story with me when I told him I was starting a business of my own.

I can't imagine having to lose so much, but in his perspective, he started out with nothing, so it wasn't that painful to return to nothing. I'm not saying I would want to do this with my wife and daughter, but hearing his story definitely gave me perspective.

Do You Care About the NSA Spying On You?

30. December 2013 21:22 by Scott in   //  Tags:   //   Comments (0)

The protection from snooping government for law abiders isn't for humdrum people like you. It's for people working to make the world better who come under fire through no illegal activity of their own.

Did you know the FBI put MLK under surveillance at the orders of Bobby Kennedy (then-Attorney General)? They didn't find evidence of crimes, so they threatened to publicize his extramarital affair if he didn't give up his civil rights work.

It's about preventing unchecked government power over those who aren't criminals who are working against the status quo.

OF COURSE you don't care if the NSA reads your email. You don't change anything, and subsequently don't matter.

We as a society care if the NSA reads the private emails of the next important up-and-coming political party leader who will break us out of the corporate-owned two-party system. THAT'S the person we're trying to protect, not boring uninspired people who "have nothing to hide".

TinyMCE writer Image Upload for C# MVC

23. November 2013 21:12 by Scott in C#, javascript, tinymce, jquery  //  Tags:   //   Comments (0)

Just a quick code sample on how to plug an Image Upload into C# and MVC.  Since I searched all around the internet with no real easy example.

Put this somewhere on the page. This will be where the person adds the image.  As you can see, we will be posting the image to the “data-action” attribute.

  @Html.TextArea("Message", string.Empty, new
                           {
                               id = "wmd-input"
                           })
                            <div id="insertImageDialog" title="Insert Image">
                                <input type="file" name="file" id="file" data-action="/forum/postimageupload" />
                            </div>

Here is the Javascript. 

  1. Below, you can see in the first block, I create another button for TinyMCE panel.  I call it the imageUpload.
  2. I then add it to the Plugin Manager.
  3. I then enable it in the plugins: options called imageUpload.
  4. I create a Modal Dialog as I am using Jquery and the Jquery.UI library within my project.
  5. Below that is the hook up for the Image Upload Modal.  As you can see I use the AjaxFileUpload by jquery.
$(function () {
        tinymce.create('tinymce.plugins.imageUpload', {
            createControl: function (n, cm) {
                switch (n) {
                    case 'imageupload':
                        var c = cm.createButton('mysplitbutton', {
                            title: 'Upload Image',
                            image: '@Url.Content("~/content/images/icons/imageUpload.png")',
                            onclick: function () {
                                $dialog.dialog('open');
                            }
                        });
                        return c;
                }
                return null;
            }
        });
        tinymce.PluginManager.add('imageIupload', tinymce.plugins.imageUpload);
        tinymce.init({
            mode: "textareas",
            elements: "elm2",
            theme: "advanced",
            skin: "o2k7",
            skin_variant: "silver",
            plugins: "imageIupload,safari,style,layer,table,advhr,advimage,advlink,inlinepopups,preview,media,contextmenu,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

            theme_advanced_buttons1: "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,formatselect,fontsizeselect",
            theme_advanced_buttons2: "link,unlink,anchor,image,imageupload,cleanup,code,|,preview,|,forecolor,backcolor,|tablecontrols,|,hr,removeformat,visualaid,|,iespell,media,|,ltr,rtl",
            theme_advanced_buttons3: "",
            theme_advanced_buttons4: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            theme_advanced_resizing: true,
            language: "en",
            relative_urls: false
        });
        var $dialog = $('#insertImageDialog').dialog({
            autoOpen: true,
            closeOnEscape: false,
            modal: false,
            open: function (event, ui) {
                $(this).parent().css('position', 'fixed');
                $(".ui-dialog-titlebar-close").hide();
            }
        });
        var $loader = $('span.loading-small', $dialog);
        var $url = $('input[type=text]', $dialog);
        var $file = $('input[type=file]', $dialog);
        var dialogInsertClick = function () {
            dialogClose();
        };
        var dialogCancelClick = function () {
            dialogClose();
        };
        var dialogClose = function () {
            $url.val('');
            $file.val('');
            $dialog.dialog('close');
        };
        $dialog.dialog('option', 'buttons', {
            'Insert': dialogInsertClick,
            'Cancel': dialogCancelClick
        });
        var uploadStart = function () {
            $loader.show();
        };
        var uploadComplete = function (response) {
            $loader.hide();
            if (response.success) {
                tinyMCE.execCommand("mceInsertContent", false, "<img src='" + response.imagePath + "'/>");
                dialogClose();
            } else {
                alert(response.message);
                $file.val('');
            }
        };
        $file.unbind('change').ajaxfileupload({
            action: $file.attr('data-action'),
            onStart: uploadStart,
            onComplete: uploadComplete,
            'params': {
                'Id': '@Model.Id',
                'TopicId': '@Model.Id'
            },
        });
        $dialog.dialog('close');
    });
 


Here is the MVC Model Method.

As you can see from above, within the AjaxFileUpload, I am posting a C# Model.  Its called NewPost.  Below is the Model I am passing in.

    [HttpPost]
        public ActionResult PostImageUpload(NewPost model)
        {
            string result;
            var serializer = new JavaScriptSerializer();
            try
            {
                // upload the file
                if (model.File != null && model.File.ContentLength > 0)
                {
                   
                }
            }
            catch (Exception exception)
            {
                ErrorDatabaseManager.AddException(exception, exception.GetType());
            }
            result = serializer.Serialize(
                        new { success = false, message = "Invalid image file" });
            return Content(result);
        }

Last but not least, I am posting a file within the Model.  Rather than it be apart of the request object, its within the model.

public HttpPostedFileBase File { get; set; }

 

Hope this little write up helps someone.

List of SMS Gateways

4. November 2013 15:52 by Scott in wikipedia deletion  //  Tags:   //   Comments (0)

Wikipedia just recently deleted the list of SMS Gateways page that I used on a regular basis.  So I felt, its time to copy and paste since I still use it.

This is a list of carriers providing Short Message Service (SMS) transit via SMS gateways.

This list explains which email address to use if one wants to send an email and have it arrive as a text message on someone's phone. The number must contain no punctuation. For instance, to send to a number typically expressed in the United States as 987-555-0100, one would email 9875550100@SMS-gateway.

Some carriers have multiple gateways. The SMS gateway refers to Short Message Services which are capable of transmitting plain text messages only. MMS refers to "Multimedia Messaging Services" which are generally capable of carrying messages which include text, pictures and audio.

Carrier Region Mail-to-SMS gateway Web-to-SMS gateway SMS-to-mail gateway
Gateway number Message format
All Carrier International number@email.experttexting.com Free Registration Required - www.ExpertTexting.com   N/A
Aircel India number@aircel.co.in Not working for some reason    
Airtel India number@airtelap.com Not working for some reason    
Airtel Karnataka, India number@airtelkk.com Not working for some reason    
Ahra Samaneh Iranian Co. ( اهرا سامانه ایرانیان ) Iran (missing?) [1]    
AirFire Mobile United States number@sms.airfiremobile.com [2]    
Aio Wireless United States number@mms.aiowireless.net [3]    
Alaska Communications United States number@msg.acsalaska.com [4]    
Aliant Canada number@sms.wirefree.informe.ca      
Alltel (Allied Wireless) United States number@sms.alltelwireless.com (SMS)

number@mms.alltelwireless.com (MMS)

     
Verizon Wireless (merger with Alltel was completed in November 2009)[1] United States number@message.Alltel.com[2] (SMS & MMS)

number@text.wireless.alltel.com (SMS) number@mms.alltel.net (MMS) number@vtext.com (SMS)

[5]    
Altiria Spain info@altiria.com[3] SMS masivo    
Ameritech United States number@paging.acswireless.com [6]    
Amitas Digital Australia   Requires Login [7]    
Anchor Mobile United States   [8]    
Andhra Pradesh AirTel India 91number@airtelap.com [9]    
Andhra Pradesh Idea Cellular India number@ideacellular.net [10]    
Api4SMS Austria number@members.api4sms.net Requires Login SMS Gateway    
aql United Kingdom number@text.aql.com[4] [11] 44 7766 40 41 42 address text
SourceSMS United Kingdom   [12] address text  
Assurance Wireless United States number@vmobl.com      
AT&T Mobility United States domestic-number@txt.att.net (SMS),

domestic-number@mms.att.net (MMS) (Note: This gateway fails to handle complete phone numbers; the country code must be omitted, leaving only the ten-digit NANP number.)[5]

Requires login[6] 121 111[7] address text

address (subject) text

AT&T grandfathered customers (originally AT&T, then Cingular, now AT&T Mobility). Officially offline since June 10, 2010, under AT&T ticket CM20100610_10186966. United States number@mmode.com   121 address text
AT&T Mobility (formerly Cingular) United States number@mms.att.net

number@txt.att.net
number@cingularme.com
number@mobile.mycingular.com

     
AT&T Enterprise Paging United States number@page.att.net      
AT&T Global Smart Messaging Suite - Powered By Soprano United States number@sms.smartmessagingsuite.com [8]    
B2Bsms B2B SMS India info@b2bsms.co.in or

info@b2bsms.co.in

[13]    
Beeline (Russia) Russia number@sms.beemail.ru      
Bell Mobility & Solo Mobile Canada number@txt.bell.ca or

number@txt.bellmobility.ca or

10digitnumber@txt.northerntelmobility.com

[14]    
BellSouth United States number@bellsouth.cl [15]    
blablaSMS International   [16]    
Bluegrass Cellular United States number@sms.bluecell.com (SMS)

number@mms.myblueworks.com (MMS)

[17]    
Bluesky Communications American Samoa, United States number@psms.bluesky.as      
Boost Mobile United States number@sms.myboostmobile.com (SMS)

number@myboostmobile.com (MMS)[9]

   
Strata United States number@rinasms.com (SMS)    
Bouygues Telecom (company) France number@mms.bouyguestelecom.fr      
Box Internet Services SMS Gateway Switzerland number@sms.boxis.net (SMS)

number@mms.boxis.net (MMS)

SMS Gateway

+ SMS API [10]

   
SFR France number@sfr.fr      
BudgetSMS.net International   Requires Login SMS Gateway    
BulkSMS.com International number@bulksms.net Requires Login SMS Gateway API    
Bulletin.net International InternationalFormattednumber@bulletinmessenger.net Requires Login [18]    
C Beyond (All Page Wireless)   number@cbeyond.sprintpcs.com      
Cellcom United States number@cellcom.quiktxt.com      
Cellular South United States number@csouth1.com      
Centennial Wireless United States, Puerto Rico, and the U.S. Virgin Islands (merging with AT&T Mobility) number@cwemail.com [19]      
Cequens Middle East And Africa www.cequens.com Requires signup at http://www.cequens.com      
Chariton Valley Wireless United States number@sms.cvalley.net      
Chat Mobility United States number@mail.msgsender.com      
Chennai Skycell / Airtel India 919840number@airtelchennai.com [20]    
Chennai RPG Cellular India 9841number@rpgmail.net [21]    
China Mobile China number@139.com      
Cincinnati Bell Cincinnati, Ohio, United States number@gocbw.com (SMS)

number@mms.gocbw.com (MMS)

     
Cingular (Postpaid) United States number@cingular.com

number@mobile.mycingular.com

[22] (must be logged in prior to visiting this link)    
Claro Brazil number@clarotorpedo.com.br [23] (registration not required)    
Claro Nicaragua number@ideasclaro-ca.com [24]    
Claro Peru   [25]    
Claro Puerto Rico number@vtexto.com [26]    
Cleartalk United States number@sms.cleartalk.us [27]    
Claro Colombia number@iclaro.com.co [28]    
Connection Software (CSoft) United Kingdom number@itsarrived.net [29]  
Consumer Cellular United States number@cingularme.com [30]   Subject and Body are concatenated into the text message
Cricket United States number@mms.mycricket.com (SMS and MMS) [31]   (note: Cricket does not allow SMS messages to be sent to phone. All messages are MMS)
C Spire Wireless United States number@cspire1.com [32]    
Accessyou Hong Kong number@messaging.accessyou.com (MMS) [33]    
CSL Hong Kong number@mgw.mmsc1.hkcsl.com (MMS) [34]    
CTI Móvil (Now Claro) Argentina number@sms.ctimovil.com.ar [35]    
CTI Móvil (Now Claro) Paraguay   [36]    
CTI Móvil (Now Claro) Uruguay   [37]    
Delhi Airtel India 919810number@airtelmail.com [38]    
Digicel (Dominica) Dominica (no-area-code)number@digitextdm.com [39]    
DTC United States number@sms.advantagecell.net      
E-Plus Germany 0number@smsmail.eplus.de [40]    
Edge Wireless United States number@sms.edgewireless.com [41]    
Element Mobile United States number@SMS.elementmobile.net      
Emtel Mauritius number@emtelworld.net [42]    
Esendex United Kingdom number@echoemail.net [43]    
Esendex Australia number@echoemail.net [44]    
Esendex United States number@echoemail.net [45]    
Esendex Spain number@esendex.net [46]    
Eventis Moldova   [47]    
FreeSMSGateway.com United States   [48]    
Fido Canada number@sms.fido.ca (as of June 2012) [49] ( Rogers' Web server is faster )    
Firmensms Austria 0043number@subdomain.firmensms.at Requires Login SMS Gateway    
Freebie SMS Europe number@smssturen.com [50] ( Message in subject line )    
General Communications Inc. Alaska, United States number@mobile.gci.net [51]    
Globalstar (satellite) International number@msg.globalstarusa.com or number@g2smsc.globalstar.com [52][53]    
Globul Bulgaria 35989number@sms.globul.bg [54]    
Goa Airtel India 919890number@airtelmail.com [55]    
Goa Idea Cellular India number@ideacellular.net [56]    
Golden State Cellular California, United States number@gscsms.com [57]    
Greatcall California, United States number@vtxt.com [58]    
Gujarat Idea Cellular India number@ideacellular.net [59]    
Gujarat Airtel India 919898number@airtelmail.com [60]    
Gujarat Celforce / Fascel India 9825number@celforce.com [61]    
Guyana Telephone & Telegraph Guyana number@sms.cellinkgy.com [62]    
Haryana Airtel India 919896number@airtelmail.com [63]    
Haryana Escotel India 9812number@escotelmobile.com [64]    
Hawaiian Telcom Wireless Hawaii, United States number@hawaii.sprintpcs.com      
HSL Mobile United Kingdom number@sms.haysystems.com[11] [65]    
Helio South Korea and United States number@myhelio.com      
Himachai Pradesh Airtel India 919816number@airtelmail.com      
ICE Costa Rica number@sms.ice.cr   1001 address : (subject) text
Illinois Valley Cellular United States number@ivctext.com (SMS)

number@ivcdata.com (MMS)

[66]
Iridium (satellite) International number@msg.iridium.com[12] [67]    
i wireless (T-Mobile) Midwest, United States number.iws@iwspcs.net [68]    
i-wireless (Sprint PCS) United States number@iwirelesshometext.com [69]    
Kajeet United States number@mobile.kajeet.net      
Karnataka Airtel India 919845number@airtelkk.com [70]    
Kerala Airtel India 919895number@airtelkerala.com [71]    
Kerala Escotel India 9847number@escotelmobile.com [72]    
Kolkata Airtel India 919831number@airtelkol.com [73]    
Koodo Mobile Canada number@msg.telus.com [74]    
LongLines United States number@text.longlines.com [75]    
Lynx Mobility Canada number@sms.lynxmobility.com [76]    
M1 Singapore number@m1.com.sg [77]    
Madhya Pradesh Airtel India 919893number@airtelmail.com [78]    
Maharashtra Airtel India 919890number@airtelmail.com [79]    
Maharashtra Idea Cellular India number@ideacellular.net [80]    
Más Móvil Panama number@cwmovil.com [81]    
Mediaburst United Kingdom number@sms.mediaburst.co.uk [82]    
Ncell(Previously Mero Mobile)[13] Nepal 977number@sms.ncell.com.np (Requires registration) [83]    
Meteor Ireland number@sms.mymeteor.ie (SMS) (Not currently valid)

number@mms.mymeteor.ie (MMS) (No longer working : (Sender not allowed error)

[84]    
MetroPCS United States number@mymetropcs.com      
Moldcell Moldova   [85]    
Mobiltel Bulgaria 35988number@sms.mtel.net [86]    
Mobitel Sri Lanka number@sms.mobitel.lk [87] Mobitel no longer offers email2sms.    
textit.biz Sri Lanka http://textit.biz/sendmsg/?ph=xxxx&tx=xxxxx [88]    
Movistar Argentina number@sms.movistar.net.ar [89]    
Movistar Colombia number@movistar.com.co [90]    
Movistar Spain 0number@movistar.net [91]    
Movistar Spain and Latin America number@movimensaje.com.ar      
Movistar Uruguay 95number@sms.movistar.com.uy      
MTN South Africa number@sms.co.za [92]    
MTS Mobility Canada number@text.mtsmobility.com [93]    
Mumbai Airtel India 919892number@airtelmail.com [94]    
mVaayoo.com India http://www.mvaayoo.com/SMSGateway.html Requires Registration[14]    
My-Cool-SMS United Kingdom number@my-cool-sms.com [95]    
Nepal Telecom Nepal   [96]    
Nextech United States number@sms.ntwls.net [97]    
Nextel Mexico number@msgnextel.com.mx [98]    
Nextel Argentina TwoWay.11number@nextel.net.ar [99]    
O2 Germany 0number@o2online.de [100]    
OgVodafone Iceland number@sms.is [101]    
Orange Moldova Moldova   [102]    
Orange Netherlands 0number@sms.orange.nl no dns for sms.orange.nl [103]    
Orange Switzerland   [104]    
Orange United Kingdom number@orange.net [105]    
Oxygen8 United Kingdom http://www.oxygen8.com Requires Login SMS Gateway    
Page Plus Cellular (Verizon MVNO) United States number@vtext.com (SMS)

number@vzwpix.com (MMS)
number@mypixmessages.com (MMS)

[106]

[107]

   
Panacea Mobile Worldwide number@api.panaceamobile.com (SMS) [108] (requires login)   subject: username password

body: the message

Pioneer Cellular United States nine-digit-number@zsend.com      
Personal Argentina number@alertas.personal.com.ar (call for activation) [109][15]    
Plus Poland +number@text.plusgsm.pl (+48domestic-number@text.plusgsm.pl) [110]    
Pocket Wireless Texas, United States number@sms.pocket.com      
PC Telecom Canada number@mobiletxt.ca      
Punjab Airtel India 919815number@airtelmail.com [111]    
Qwest Wireless United States number@qwestmp.com [112]    
Red Pocket Mobile (AT&T MVNO) United States number@txt.att.net (SMS)

number@mms.att.net (MMS)

     
Rogers Wireless Canada and United Stateslog number@sms.rogers.com or 1number@mms.rogers.com Requires Login[16]   Name (subject) text (Note: Subject must be in plain text, not Q-encoded as described in RFC 2047.)
RoutoMessaging Worldwide number@email2sms.routomessaging.com [113]   Subject: Sender ID (Originating Address who is sending the message) Body: the message (Note: plain text emails supported)
SaskTel Canada number@sms.sasktel.com

number@pcs.sasktelmobility.com

[114]    
Sendega Norway number@sendega.com (registration required) [115]   Content support: subject, body or subject + body. Settings available from website (login required)
Setar Mobile email (Aruba) Aruba number@mas.aw (297domestic-number@mas.aw) [116]    
Síminn Iceland number@box.is [117]    
Simple Mobile United States number@smtext.com [118]    
SMS Broadcast Australia number@send.smsbroadcast.com.au Requires Login [119]    
SMS Global Australia number@email.smsglobal.com Requires Login [120]    
SMS Central Australia number@sms.smscentral.com.au Requires Login [121]    
SMS4Free United States   [122]    
SMSPUP Australia domestic-number@smspup.com Requires Login [123]    
Starhub Enterprise Messaging Solution (powered by Soprano) Singapore number@starhub-enterprisemessaging.com(sms@starhub-enterprisemessaging.com ) [124]    
Southernlinc United States number@page.southernlinc.com (SMS)      
South Central Communications United States number@rinasms.com (SMS) [125]    
Spikko Israel number@SpikkoSMS.com [126]    
Sprint United States number@messaging.sprintpcs.com (SMS)

number@pm.sprint.com (MMS) --> No Longer valid as Sprint no longer supports MMS via email to phone.

[127] requires login 6245 address message
Straight Talk United States number@vtext.com (SMS)

number@txt.att.net (SMS if using the AT&T SIM) number@tmomail.net (MMS or SMS when using the T-Mobile SIM, begin 'number' with 1 then phone number) number@mypixmessages.com (MMS) number@mms.att.net (MMS & SMS) number@mmst5.tracfone.com (T-Mobile SIM MMS & SMS) number@messaging.sprintpcs.com (SMS) number@tracfone.plspictures.com (MMS)

     
Solavei United States XXXYYYZZZZ@tmomail.net (MMS or SMS) --Uses T-mobile's gateway -- number is the 10 cell number or can include 1 at the beginning. [128] 500[17] address text

address/subject/text

address#subject#text

Sunrise Communications Switzerland number@gsm.sunrise.ch [129] (registration required)    
Swisscom Switzerland   [130]

[131] [132]

   
Syringa Wireless United States number@rinasms.com      
TeletopiaSMS Norway number@sms.teletopiasms.no (registration required) [133]   Content settings available from website
T-Mobile United States number@tmomail.net (MMS or SMS) --number can and by default properly begins with "1" (the US country code) [134] 500[17] address text

address/subject/text

address#subject#text

T-Mobile (Optus Zoo) Australia 0number@optusmobile.com.au Requires Login[18]    
T-Mobile Austria number@sms.t-mobile.at (43676domestic-number@sms.t-mobile.at) [135]    
T-Mobile Croatia number@sms.t-mobile.hr (385domestic-number@sms.t-mobile.hr) [136] 100 address##subject#text
T-Mobile Germany number@t-mobile-sms.de [137]    
T-Mobile Netherlands 31number@gin.nl [138]    
Tamil Nadu Airtel India 919894number@airtelmobile.com [139]    
Tamil Nadu Aircel India 9842number@airsms.com [140]    
Tele2 Sweden 0number@sms.tele2.se [141]    
Telecom New Zealand New Zealand number@etxt.co.nz [142]    
Teleflip United States number@teleflip.com [143]    
Telekom Srbija Serbia   [144]    
Telstra Integrated Messaging (powered by Soprano) Australia sms@tim.telstra.com(mobile@sms.tim.telstra.com) Requires Login[19]    
All Australian Mobile Networks Australia number@sms.itcompany.com.au Requires Login[20]    
Telus Mobility Canada and United States number@msg.telus.com (SMS)

number@mms.telusmobility.com (MMS)

[145]    
TellusTalk Europe number@esms.nu [146]    
TextOver United Kingdom Log into TextOver for details [147]    
TextAnywhere United Kingdom   [148]    
Thuraya (satellite) International   [149]    
Tigo (Formerly Ola) Colombia number@sms.tigo.com.co [150]    
TIM Italy 0number@timnet.com [151]    
Ting United States number@message.ting.com (SMS)

No MMS Gateway

     
TracFone (prepaid) United States, Puerto Rico, and the U.S. Virgin Islands direct: number@mmst5.tracfone.com

indirect: number@txt.att.net
number@tmomail.net
number@vtext.com
number@email.uscc.net
number@message.alltel.com

     
Txtlocal United Kingdom number@txtlocal.co.uk [152]    
Telcel Mexico number@itelcel.com [153]    
UkraineCalling International   [154]    
Unicel United States number@utext.com [155]    
UniMóvil Corporation United Kingdom number@viawebsms.com [156]  
Union Wireless United States number@union-tel.com [157]
Unité Moldova   [158]    
US Cellular United States number@email.uscc.net (SMS)

number@mms.uscc.net (MMS)

[159]    
USA Mobility United States number@usamobility.net (SMS) [160]    
UTBox Australia number@sms.utbox.net Requires Login[21]    
Uttar Pradesh West Escotel India 9837number@escotelmobile.com [161]    
Verizon Wireless United States number@vtext.com (SMS)

number@vzwpix.com (MMS)

[162] 6245 address (subject) text
Viaero United States number@viaerosms.com (SMS)

number@mmsviaero.com (MMS)

[163]    
Vivo Brazil number@torpedoemail.com.br [164] (registration required)    
Virgin Mobile Canada number@vmobile.ca   6245 address message
Virgin Mobile United States number@vmobl.com (SMS)[22]

number@vmpix.com (MMS)[23]

  6245 address message
Virgin Mobile United Kingdom number@vxtras.com Does not appear to work[18]    
Vodacom South Africa number@voda.co.za [165] (registration required)    
Vodafone Czech Republic alias@vodafonemail.cz (registration required in Samoobsluhy)      
Vodafone Germany 0number@vodafone-sms.de [166]    
Vodafone Italy 3**number@sms.vodafone.it      
Vodafone Portugal   [167] (registration required)    
Vodafone Spain 0number@vodafone.es [168]    
Vodafone New Zealand number@mtxt.co.nz [169]    
Voyager Mobile United States number@text.voyagermobile.com      
West Central Wireless United States number@sms.wcc.net [170]    
Wind Mobile Canada number@txt.windmobile.ca   4000[24] address text
www.srisms.in INDIA PC / Online Based Text Messaging BULK SMS GATEWAY AND API FOR DEVELOPER N/A PC / Online Based Text Messaging / Android App
24x.com UK Easy web screen, Email to sms or API's for programmers - This is a business only charged for service www.24x.com Business SMS only, use screens, email or API's [171] Easy Programmer's Manual with example code for cutting and pasting into your applications.
SendSMS.pk Pakistan Complete Developer API SendSMS.pk Just reply to the number from which you receive the SMS web based sms, 2 ways sms, and api
SMSPinoy.com Philippines Complete Developer API SMSPinoy.com Just reply to the number from which you receive the SMS web based sms, 2 ways sms, and api
smsthing.com United Kingdom Free Gateway, Replyable smsthing.com Reply to received messages Send from web, email, receive free with api
BIPKampany.hu Hungary Web-to-SMS, email-to-sms or API's for programmers sms.bipkampany.hu SMS gateway/API for two way messaging, email-to-SMS SMS gateway/API manual for software integration, PHP examples
Eurobate.no Norway, Denmark, Sweden   List all services Customized Full standalone, and integrated solutions.
Msg2Send Singapore Web Based Msg2Send N/A  
streetunity.org/sms United Kingdom Free from web only streetunity.org/sms N/A Reply to SMS received to email the sender
CoolSMS SMS Gateway Denmark sms<number>@coolsmsc.dk[25] www.coolsms.com Short code or MSISDN Received SMS are sent to the user via smtp, smpp or HTTP
Kapow SMS Gateway United Kingdom <number>@kapow.co.uk[25] www.kapow.co.uk Short code or MSISDN Received SMS are sent to the user via email or HTTP
www.fastsms.co.uk United Kingdom PC / Online Based Text Messaging www.fastsms.co.uk N/A PC / Online Based Text Messaging
XIT Communications Texas, United States number@sms.xit.net [172]    
Polkomtel Poland +48number@text.plusgsm.pl [173]    
Papersky United Kingdom PC / Online Based Text Messaging www.papersky.com N/A PC / Online Based Text Messaging

A few software libraries and resources have cropped up that utilize the gateways in the list for application software development purposes.

Company/Author Name Language License
Brendan Lim SMS Fu Ruby Open Source (MIT)
CubicleSoft E-mail to SMS/MMS Gateways in JSON format JSON Open Source (MIT/LGPL)
CubicleSoft E-mail to SMS/MMS Gateways in JSON format JSON Open Source (MIT/LGPL)

References[edit]

  1. Jump up ^ Alltel.com "Verizon Wireless Integration FAQs"[dead link]
  2. Jump up ^ message.alltel.com: "Reply to Address" section
  3. Jump up ^ Contact[dead link]
  4. Jump up ^ ""Email to SMS"". Aql.com. Retrieved 2013-07-11. 
  5. Jump up ^ "AT&T Answer Center "What is the E-mail Address for Text Messaging (SMS), Multimedia Messaging (MMS), RIM BlackBerry and MEdia Net?"". Wireless.att.com. Retrieved 2013-07-11. 
  6. Jump up ^ "AT&T Answer Center "How can I send a text message from the AT&T website?"". Wireless.att.com. Retrieved 2013-07-11. 
  7. Jump up ^ http://kb.palmone.com/SRVS/Data/Palm/KnowledgeBases/PalmSupportKB/document/htmlimport/6487.html
  8. Jump up ^ "AT&T Global Smart Messaging Suite - Powered By Soprano". Att.com. Retrieved 2013-07-11. 
  9. Jump up ^ "Support/Frequently Asked Questions". Retrieved 2013-02-08. 
  10. Jump up ^ Box Internet Services - SMS Gateway + SMS API
  11. Jump up ^ "HSL SMTP Interface for Sending SMS" (PDF). Retrieved 2013-07-11. 
  12. Jump up ^ "Email and Iridium SMS". Humanedgetech.com. Retrieved 2013-07-11. 
  13. Jump up ^ Subigya Nepal (2012-09-12). "Ncell.com.np "Email to SMS service"". Thelacunablog.com. Retrieved 2013-07-11. 
  14. Jump up ^ "Bulk Text Messaging". 
  15. Jump up ^ "Personal". Personal. 2013-06-27. Retrieved 2013-07-11. 
  16. Jump up ^ "Rogers.com - Welcome". Websms.rogers.page.ca. 1997-02-26. Retrieved 2013-07-11. 
  17. ^ Jump up to: a b "Text messaging FAQs | T-Mobile Support". Support.t-mobile.com. Retrieved 2013-07-11. 
  18. ^ Jump up to: a b Fitzpatrick, Martin (2012-03-16). "Email to SMS gateways for notifications | Martin Fitzpatrick". Martinfitzpatrick.name. Retrieved 2013-07-11. 
  19. Jump up ^ "Telstra Business - Mobile Phone Messaging Applications". Telstraenterprise.com. Retrieved 2013-07-11. 
  20. Jump up ^ "Email to SMS". IT Company. Retrieved 2013-07-11. 
  21. Jump up ^ "SMS from PC with Emails. Send SMS Messages From Email". UTBox. Retrieved 2013-07-11. 
  22. Jump up ^ "Virgin Mobile Help". Retrieved 2012-09-29. 
  23. Jump up ^ "Virgin Mobile Help". Retrieved 2010-10-25. 
  24. Jump up ^ "Wind Mobile Help". Retrieved 2012-05-24. 
  25. ^ Jump up to: a b "CoolSMS API". CoolSMS SMS Gateway. Retrieved 08 September 2013. 

External links[edit]

Xamarin iOS Problem and Fix with Visual Studio

28. October 2013 14:05 by Scott in vs2012, xamarin  //  Tags:   //   Comments (0)

I kept running into two error messages.  My iOS Hello world app wasn’t starting up.  Just a simple app after the host machine was synced and built. So kept looking for solutions until I found one here: http://forums.xamarin.com/discussion/5217/communication-issues-from-windows-8-to-mac-mini

Here are the two messages I was running into:

  1. There was an error launching the application: iOS Simulator failed to install the application.
  2. has exited with code 0 or has exited with code –1

The solution was of two parts.  I had to reset the iPhone Simulator and add the identifier information in.  Once done, it seemed to work the proper way.

On iOS

Click iPhone Simulator a the top title bar, then Reset Content and Settings.

Hope that helps for someone.

What Scares Me about the Tech Behind Healthcare.gov

23. October 2013 09:13 by Scott in Opinion  //  Tags:   //   Comments (0)

We are all aware of the problems with the new roll out of the healthcare.gov website.  The large amount of JS files being sent back and forth, the slow down and the inability to sign up at most hours of the day.  But thats not what worries me.

What worries me is if this thing was so POORLY designed on the UI side, what do you think it look like on the back end side?  Do you actually think they offer encryption, data protection and have taken the time to implement industry standards to protect our most important information?

Seeing that the front end is soo poorly designed, I don't really have any faith in the back end.  This is what the news should be wondering, questioning and even guessing. 

What say you?  Do you believe they did good on the back end?

Please don't bring Politics into this.  Its a purely technical talk.

Get Parameter From Url with Javascript

23. October 2013 08:11 by Scott in javascript  //  Tags:   //   Comments (0)
function getParameterByName(name){
var match = (RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}

TimeZone Import List for MSSql

4. October 2013 17:52 by Scott in MSSql, TSql  //  Tags:   //   Comments (0)

Placed here for reference.

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TimeZone](
    [ZoneId] [int] IDENTITY(1,1) NOT NULL,
    [Location] [nvarchar](max) NULL,
    [GMT] [nvarchar](max) NULL,
    [GMTOffset] [int] NOT NULL,
    [Created] [datetime] NOT NULL,
    [LastModified] [datetime] NULL,
 CONSTRAINT [PK_TimeZone] PRIMARY KEY CLUSTERED 
(
    [ZoneId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

 

INSERT INTO TimeZone VALUES 
( 'International Date Line West', '(GMT-12:00)', -12,'10-4-2013', '10-4-2013'),
( 'Midway Island', '(GMT-11:00)', -11,'10-4-2013', '10-4-2013'),
( 'Samoa', '(GMT-11:00)', -11,'10-4-2013', '10-4-2013'),
( 'Hawaii', '(GMT-10:00)', -10,'10-4-2013', '10-4-2013'),
( 'Alaska', '(GMT-09:00)', -9,'10-4-2013', '10-4-2013'),
( 'Pacific Time (US & Canada)', '(GMT-08:00)', -8,'10-4-2013', '10-4-2013'),
( 'Tijuana', '(GMT-08:00)', -8,'10-4-2013', '10-4-2013'),
( 'Arizona', '(GMT-07:00)', -7,'10-4-2013', '10-4-2013'),
( 'Mountain Time (US & Canada)', '(GMT-07:00)', -7,'10-4-2013', '10-4-2013'),
( 'Chihuahua', '(GMT-07:00)', -7,'10-4-2013', '10-4-2013'),
( 'La Paz', '(GMT-07:00)', -7,'10-4-2013', '10-4-2013'),
( 'Mazatlan', '(GMT-07:00)', -7,'10-4-2013', '10-4-2013'),
( 'Central Time (US & Canada)', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Central America', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Guadalajara', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Mexico City', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Monterrey', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Saskatchewan', '(GMT-06:00)', -6,'10-4-2013', '10-4-2013'),
( 'Eastern Time (US & Canada)', '(GMT-05:00)', -5,'10-4-2013', '10-4-2013'),
( 'Indiana (East)', '(GMT-05:00)', -5,'10-4-2013', '10-4-2013'),
( 'Bogota', '(GMT-05:00)', -5,'10-4-2013', '10-4-2013'),
( 'Lima', '(GMT-05:00)', -5,'10-4-2013', '10-4-2013'),
( 'Quito', '(GMT-05:00)', -5,'10-4-2013', '10-4-2013'),
( 'Atlantic Time (Canada)', '(GMT-04:00)', -4,'10-4-2013', '10-4-2013'),
( 'Caracas', '(GMT-04:00)', -4,'10-4-2013', '10-4-2013'),
( 'La Paz', '(GMT-04:00)', -4,'10-4-2013', '10-4-2013'),
( 'Santiago', '(GMT-04:00)', -4,'10-4-2013', '10-4-2013'),
( 'Newfoundland', '(GMT-03:30)', -3,'10-4-2013', '10-4-2013'),
( 'Brasilia', '(GMT-03:00)', -3,'10-4-2013', '10-4-2013'),
( 'Buenos Aires', '(GMT-03:00)', -3,'10-4-2013', '10-4-2013'),
( 'Georgetown', '(GMT-03:00)', -3,'10-4-2013', '10-4-2013'),
( 'Greenland', '(GMT-03:00)', -3,'10-4-2013', '10-4-2013'),
( 'Mid-Atlantic', '(GMT-02:00)', -2,'10-4-2013', '10-4-2013'),
( 'Azores', '(GMT-01:00)', -1,'10-4-2013', '10-4-2013'),
( 'Cape Verde Is.', '(GMT-01:00)', -1,'10-4-2013', '10-4-2013'),
( 'Casablanca', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'Dublin', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'Edinburgh', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'Lisbon', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'London', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'Monrovia', '(GMT)', 0,'10-4-2013', '10-4-2013'),
( 'Amsterdam', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Belgrade', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Berlin', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Bern', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Bratislava', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Brussels', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Budapest', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Copenhagen', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Ljubljana', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Madrid', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Paris', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Prague', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Rome', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Sarajevo', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Skopje', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Stockholm', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Vienna', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Warsaw', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'West Central Africa', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Zagreb', '(GMT+01:00)', 1,'10-4-2013', '10-4-2013'),
( 'Athens', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Bucharest', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Cairo', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Harare', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Helsinki', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Istanbul', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Jerusalem', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Kyev', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Minsk', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Pretoria', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Riga', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Sofia', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Tallinn', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Vilnius', '(GMT+02:00)', 2,'10-4-2013', '10-4-2013'),
( 'Baghdad', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Kuwait', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Moscow', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Nairobi', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Riyadh', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'St. Petersburg', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Volgograd', '(GMT+03:00)', 3,'10-4-2013', '10-4-2013'),
( 'Tehran', '(GMT+03:30)', 3,'10-4-2013', '10-4-2013'),
( 'Abu Dhabi', '(GMT+04:00)', 4,'10-4-2013', '10-4-2013'),
( 'Baku', '(GMT+04:00)', 4,'10-4-2013', '10-4-2013'),
( 'Muscat', '(GMT+04:00)', 4,'10-4-2013', '10-4-2013'),
( 'Tbilisi', '(GMT+04:00)', 4,'10-4-2013', '10-4-2013'),
( 'Yerevan', '(GMT+04:00)', 4,'10-4-2013', '10-4-2013'),
( 'Kabul', '(GMT+04:30)', 4,'10-4-2013', '10-4-2013'),
( 'Ekaterinburg', '(GMT+05:00)', 5,'10-4-2013', '10-4-2013'),
( 'Islamabad', '(GMT+05:00)', 5,'10-4-2013', '10-4-2013'),
( 'Karachi', '(GMT+05:00)', 5,'10-4-2013', '10-4-2013'),
( 'Tashkent', '(GMT+05:00)', 5,'10-4-2013', '10-4-2013'),
( 'Chennai', '(GMT+05:30)', 5,'10-4-2013', '10-4-2013'),
( 'Kolkata', '(GMT+05:30)', 5,'10-4-2013', '10-4-2013'),
( 'Mumbai', '(GMT+05:30)', 5,'10-4-2013', '10-4-2013'),
( 'New Delhi', '(GMT+05:30)', 5,'10-4-2013', '10-4-2013'),
( 'Kathmandu', '(GMT+05:45)', 5,'10-4-2013', '10-4-2013'),
( 'Almaty', '(GMT+06:00)', 6,'10-4-2013', '10-4-2013'),
( 'Astana', '(GMT+06:00)', 6,'10-4-2013', '10-4-2013'),
( 'Dhaka', '(GMT+06:00)', 6,'10-4-2013', '10-4-2013'),
( 'Novosibirsk', '(GMT+06:00)', 6,'10-4-2013', '10-4-2013'),
( 'Sri Jayawardenepura', '(GMT+06:00)', 6,'10-4-2013', '10-4-2013'),
( 'Rangoon', '(GMT+06:30)', 6,'10-4-2013', '10-4-2013'),
( 'Bangkok', '(GMT+07:00)', 7,'10-4-2013', '10-4-2013'),
( 'Hanoi', '(GMT+07:00)', 7,'10-4-2013', '10-4-2013'),
( 'Jakarta', '(GMT+07:00)', 7,'10-4-2013', '10-4-2013'),
( 'Krasnoyarsk', '(GMT+07:00)', 7,'10-4-2013', '10-4-2013'),
( 'Beijing', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Chongqing', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Hong Kong', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Irkutsk', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Kuala Lumpur', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Perth', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Singapore', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Taipei', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Ulaan Bataar', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Urumqi', '(GMT+08:00)', 8,'10-4-2013', '10-4-2013'),
( 'Osaka', '(GMT+09:00)', 9,'10-4-2013', '10-4-2013'),
( 'Sapporo', '(GMT+09:00)', 9,'10-4-2013', '10-4-2013'),
( 'Seoul', '(GMT+09:00)', 9,'10-4-2013', '10-4-2013'),
( 'Tokyo', '(GMT+09:00)', 9,'10-4-2013', '10-4-2013'),
( 'Yakutsk', '(GMT+09:00)', 9,'10-4-2013', '10-4-2013'),
( 'Adelaide', '(GMT+09:30)', 9,'10-4-2013', '10-4-2013'),
( 'Darwin', '(GMT+09:30)', 9,'10-4-2013', '10-4-2013'),
( 'Brisbane', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Canberra', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Guam', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Hobart', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Melbourne', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Port Moresby', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Sydney', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Vladivostok', '(GMT+10:00)', 10,'10-4-2013', '10-4-2013'),
( 'Magadan', '(GMT+11:00)', 11,'10-4-2013', '10-4-2013'),
( 'New Caledonia', '(GMT+11:00)', 11,'10-4-2013', '10-4-2013'),
( 'Solomon Is.', '(GMT+11:00)', 11,'10-4-2013', '10-4-2013'),
( 'Auckland', '(GMT+12:00)', 12,'10-4-2013', '10-4-2013'),
( 'Fiji', '(GMT+12:00)', 12,'10-4-2013', '10-4-2013'),
( 'Kamchatka', '(GMT+12:00)', 12,'10-4-2013', '10-4-2013'),
( 'Marshall Is.', '(GMT+12:00)', 12,'10-4-2013', '10-4-2013'),
( 'Wellington', '(GMT+12:00)', 12,'10-4-2013', '10-4-2013'),
( 'Nuku''alofa', '(GMT+13:00)', 13,'10-4-2013', '10-4-2013');