Tag: ad

  • What does Valentines Day mean to me?

    What does Valentines Day mean to me?

    Valentines Day is here, a city filled with love.

    A day in February. It is a festive day like no other, where a hint of romance fills our lungs and holds our hearts strong. You know that rush, maybe writing your first letter, standing in line trying to make sense of which flowers to get. Making it special.

    When is the next valentines day, find out here.

  • 4 Helpful WordPress Plugins: Increase Your Reach

    4 Helpful WordPress Plugins: Increase Your Reach

    4 Helpful WordPress Plugins Increase Your Reach
    4 Helpful WordPress Plugins Increase Your Reach

    A few days ago, I had looked at my WordPress follow button because I don’t like how it placed and it’s style. I needed a way to hide and show the follow my blog button. In fact, my inspiration came from the original style. So, I started googling for helpful WordPress Plugins. For example, I need a way to attach my follow button to the bottom right and fade it when the user scrolls the mouse wheel. Despite my journey with WordPress support, I managed to find a few plugins/CSS to help me with the result I needed. Here is a list of useful items that helped me:

    The 4 Plugins

    Headroom.js is a lightweight, high-performance JS widget (with no dependencies!) that allows you to react to the user’s scroll. The header on this site is a living example, it slides out of view when scrolling down and slides back in when scrolling up.

    Ad management plugin with many advanced advertising features. Supports all kinds of WordPress ads including Google AdSense, contextual Amazon Native Shopping Ads, Media.net and rotating banners.

    Helpful WordPress Plugins: Let’s Customize 🏗️

    The nice thing about this combination of plugins is that I can customize the look and feel. In other words, I popped in some JavaScript, CSS and got a few new features. For example, when the user scrolls down, the button hides or doesn’t bother you while you read my posts! Also, that alone was a trill because of how fluidly it disappears. Yet, Headroom works on your call to action and navigation headers. In other words, hide your header until you need it. Please let me know if you feel that I should add more to this list? 

    .headroom {
      will-change: transform;
      transition: transform 200ms linear;
    }
    .headroom--pinned {
      transform: translateY(0%);
    }
    .headroom--unpinned {
      transform: translateY(130%);
    }
    
    div.code-block-1:hover {
      opacity: 1.0;
      transition-timing-function: linear;transition: opacity .25s ease-in-out;
      -moz-transition: opacity .25s ease-in-out;
      -webkit-transition: opacity .25s ease-in-out;
    }
    
    div.code-block-1 {
      opacity: 0.4;
    }

    Question for you⁉️

    I added some ads in between posts. What do you think? Bad idea? distracting? How do you plan to make cash from blogging? Let me know in the comments below?

    Reading List 📚
  • ‘Tis the season! How is Christmas Eve celebrated?

    ‘Tis the season! How is Christmas Eve celebrated?

    Christmas Eve Happy holiday’s everyone!

    Christmas Eve is on its way. Also, I hope everyone is snug in their homes planning their holidays. Yet, I’m spending my holiday’s with family and I Cherish the sweet chocolate chip cookie I’m munching on!

    Christmas Comes

    Christmas comes with children singing,
    Christmas comes with sleigh bells ringing,
    Christmas comes with frosty nights,
    Christmas comes with snowball fights.

    Christmas comes with Santa Claus,
    Christmas comes with snowy floors,
    Christmas comes with robins and reindeer,
    Christmas comes with a hearty cheer.

    Christmas comes with gold, frankincense and myrrh,
    Christmas comes with Jesus’ birth,
    Christmas comes with angels from afar,
    Christmas comes with a wondrous star.

    Christmas comes now, at last,
    Christmas comes, like in the past,
    Christmas comes after such a long wait,
    Christmas comes and it will be great.

    Amy Darnbrook

    Reading List 📚

  • ‘Tis the season! How is Christmas celebrated?

    ‘Tis the season! How is Christmas celebrated?

    Christmas Eve Happy holiday’s everyone!

    Christmas Eve is on its way. I hope everyone is snug in their homes planning their holidays. I’m spending my holiday’s rebuilding something lost to me.

    Christmas Comes

     Christmas comes with children singing,
    Christmas comes with sleigh bells ringing,
    Christmas comes with frosty nights,
    Christmas comes with snowball fights.

    Christmas comes with Santa Claus,
    Christmas comes with snowy floors,
    Christmas comes with robins and reindeer,
    Christmas comes with a hearty cheer.

    Christmas comes with gold, frankincense and myrrh,
    Christmas comes with Jesus’ birth,
    Christmas comes with angels from afar,
    Christmas comes with a wondrous star.

    Christmas comes now, at last,
    Christmas comes, like in the past,
    Christmas comes after such a long wait,
    Christmas comes and it will be great.

    Amy Darnbrook

  • How can Inspirational Quotes Promote your work?

    How can Inspirational Quotes Promote your work?

    “Autumn arrives in early morning, but spring at the close of a winter day.”

    Autumn Leaf

    ~Elizabeth Bowen

    • Guide you with creating the subject being described
    • Connect you with people

    I’ve been using brainy quotes from time to time for inspiration and fun. I just like its simplicity and that I can always find a good quote to share. The quotes come along with a link back to its source, giving credit to the author. However, I try to limit my quotes to one, for SEO purposes.

    As you can tell, I was thinking about autumn and spring closing, so I shared this little piece of poetry.

    You can:

    “share collection of inspirational and famous quotes by authors you know and love. Share our Quotes of the Day on the web, Facebook, Twitter, and blogs.”

    You will find Quote of the day, inspirational, life, love and funny quotes.

    Inspirational and Famous Quotes at BrainyQuote Read more

  • How to use Visual Studio with Multithreading?

    How to use Visual Studio with Multithreading?

    Using Visual Studio with Multithreading tips, tricks, C#

    Programmers who start coding with multithreading and C#, get different first impressions.

    First, they are either afraid of new frameworks and patterns, then try their own methods. Secondly, they are brave, ready to jump on Visual Studio, C# and start learning multithreading. I had to be brave, I didn’t have the luxury to wait, so I jumped right in to face the problems and adventures head on.

    Don’t go out there learning everything about Multithreading right away, your head might hurt, start slow and as you get stuck, look things up and you’ll learn faster.  My first experience with threads came at a shock, my variables started changing on their own. I was like why is this happening!? Later I discovered that using static keyword is a good and bad thing when using threads. One, static is great if you need to share something among the threads, but just don’t forget that you’re sharing. Two, Static methods in particular aren’t thread safe. To ensure thread safety, you should consider Locking, only allow one thread at a time. Shared variables can keep you up at night because its hard to catch which thread is changing its value and can cause your application to produce the wrong result. Moreover, when writing a multithreaded application, watch out for Race Conditions, they occur when two or more threads try to change a variable, whoever gets their first will change it. Please, for your sake, just use locking, to prevent a variable from wrongly changing, until you find a clever way to prevent leaks.

    Okay, so what if a variable changes? How will it affect me? Well, I had a situation, that goes something like this: say for example, I have box A and box B, both of which need to be saved to the database, and box A will get a SSN# and box B will have a date. Now imagine I have a loop that runs for a long time and does some logic and manipulation before it gets to box A and B. box A and B are both static, we are using Multithreading technique within the TPL, we start changing A and B boxes, meanwhile other thread caught up and changed A to the new SSN#, so now we have both threads with the same SSN# being saved to the database. Now if we added a lock inside the method to wait, till both box A and B finished saving, we would have prevented the above scenario.

    Development
    Development

    Fine this is great, why hasn’t anyone figured out a better way, than using primitive locking. Well, you’re in luck, if your swing over to the MSDN System.Collections.Concurrent, they have some great data structures that take care of the locking for you and speed up development. I strongly recommend spending some time with Concurrent Queues. I started with them first.

    using System;
    using System.Collections.Concurrent;
    using System.Threading;
    using System.Threading.Tasks;
    
    class CQ_EnqueueDequeuePeek
    {
       // Demonstrates: 
       // ConcurrentQueue.Enqueue() 
       // ConcurrentQueue.TryPeek() 
       // ConcurrentQueue.TryDequeue() 
       static void Main ()
       {
          // Construct a ConcurrentQueue.
          ConcurrentQueue cq = new ConcurrentQueue();
    
          // Populate the queue. 
          for (int i = 0; i < 10000; i++) cq.Enqueue(i);
    
          // Peek at the first element. 
          int result;
          if (!cq.TryPeek(out result))
          {
             Console.WriteLine("CQ: TryPeek failed when it should have succeeded");
          }
          else if (result != 0)
          {
             Console.WriteLine("CQ: Expected TryPeek result of 0, got {0}", result);
          }
    
          int outerSum = 0;
          // An action to consume the ConcurrentQueue.
          Action action = () =>
          {                
             int localSum = 0;
             int localValue;
             while (cq.TryDequeue(out localValue)) localSum += localValue;
             Interlocked.Add(ref outerSum, localSum);
          };
    
          // Start 4 concurrent consuming actions.
          Parallel.Invoke(action, action, action, action);
    
          Console.WriteLine("outerSum = {0}, should be 49995000", outerSum);
       }
    }
  • How to use Open Broadcaster Software

    How to use Open Broadcaster Software

    Start broadcasting your games and show the public what your can do on the battlefield! I downloaded Open Broadcaster Software, its free, so it was my first choice. It was a bit of a challenge at first to get it going, but after I read a few tutorials I was up and streaming. The stream is unique to your setting of your game, so don’t go maxing out all your settings and expect to get 1080p video. According to my sources, you should keep the kbps to 80% of your total upload bandwidth. However, mind you that Twitch and YouTube cap your top at 3000-6000 kbps. One not so obvious thing to most is that each game eats up your GPU and CPU resources. Don’t expect to get a lag free stream if you plan on playing on maximum game graphic settings. I would recommend setting your resolution to at least 1080 width and what ever height. Then set all you’re in game graphics to medium or low. Just experiment and see how the stream does. OBS has a status bar on the bottom that shows you your stream frame rate and your transfer rate. Watch those and adjust your settings accordingly to get the best stream result. I started streaming with Twitch because they have a huge gaming community and decent video editing tools. Then I moved to YouTube and I was pleased to find that it had similar if not better setup. I did have a lot of trouble keeping my games from lagging or my stream from losing frames on both platforms. I’ve looked around and most of my findings were just about network problems. Moving away from network, I started to think its something on my end. I tweaked my resolution and upload speed, but I wasn’t able to get the result I wanted. I ended up reducing my in-game graphics to medium and to my surprise, I was able to maintain good FPS and continue gaming with no problem. It turns out that my graphics card was not able to stream and render my game with my high setting. If you want to maintain high quality stream, then I would recommend getting a video capture card for that. That’s pretty much it, Good luck on your adventure!

  • What is Options Trading

    What is Options Trading

    I’ve recently started getting into the stock market. It’s a huge area, especially for a  beginner, I didn’t know where to start and ask for help. I found TD Ameritrade and it wasn’t till a few months later, when I noticed that they had a section filled with webcasts. I watched a webcast from the thinkorswim community and to my surprise I found the information interesting and informative. I had the chance to learn about options trading and hedging risk. The web series was titled “Your Trade, Your Strategy: Learn to Market Strategies from the Basics to the Extreme” (Will share link as soon as author shares webcast) I went over to Investopedia and got the following definition:

    Options Trading Def:

    A financial derivative that represents a contract sold by one party (option writer) to another party (option holder). The contract offers the buyer the right, but not the obligation, to buy (call) or sell (put) a security or other financial asset at an agreed-upon price (the strike price) during a certain period of time or on a specific date (exercise date).
    Call options give the option to buy at certain price, so the buyer would want the stock to go up.
    Put options give the option to sell at a certain price, so the buyer would want the stock to go down.

    The speaker for “Your Trade, Your Strategy: Learn to Market Strategies from the Basics to the Extreme” was Don Kaufman. He told us that to be good at options trading, one should not think up outcomes, but look at the probability of outcomes. We looked at different strike amounts and tried to choose price points that had a reasonable chance of making a profit. We were shown how to hedge our options by choosing two different strike options that could either lose or gain money. Don told us not to worry about the calls and puts on either side of the strike because they are similar. One of the panelist shared an interesting quote that helped me understand and remember the difference between calls and puts. “There is a saying used with picture of a telephone receiver, “call up [phone receiver to make a phone call], then put down [to end the phone call]”. – Shared by Cindy Faber. To me, this mean that the calls are the bulls and the bears are the puts. However, mind you, that just because one side is a bull and other side is a bear, that doesn’t mean that it’s a sure way to make money. You must look at market trends and read the news. From my own experience, the market does what it wants, it will not behave the way you want it. TD Ameritrade Webcasts: Think of Swim – The Archive As always good luck on your adventure with options trading!

  • How to Reset Form Unobtrusive jQuery?

    How to Reset Form Unobtrusive jQuery?

    I was looking around for a way to reset a form that was already validated by Unobtrusive jQuery Client Validation. JQuery validate doesn’t have any way to reset the UI after errors occur. However, you can safely use:

    var validator = $( "#myform" ).validate();
    validator.resetForm();

    The best example I found online was on John Culviner blog. It wasn’t exactly what I was looking for, but it was a good start. He resets the form by using a button and attributes, I need a function that does that, so I create a plugin that clears the form on demand.

    Clear Reset Form Unobtrusive jQuery validation part 2

    usage: $(“#signupform”).clearForm()

    (function ($) {
    
        $.fn.clearForm = function (options) {
    
            // This is the easiest way to have default options.
            var settings = $.extend({
                // These are the defaults.
    
                formId: this.closest('form')
    
            }, options);
    
            var $form = $(settings.formId);
    
            //reset jQuery Validate's internals
            $form.validate().resetForm();
    
            //reset unobtrusive validation summary, if it exists
            $form.find("[data-valmsg-summary=true]")
                .removeClass("validation-summary-errors")
                .addClass("validation-summary-valid")
                .find("ul").empty();
    
            //reset unobtrusive field level, if it exists
            $form.find("[data-valmsg-replace]")
                .removeClass("field-validation-error")
                .addClass("field-validation-valid")
                .empty();
    
            return $form;
        };
    
    }(jQuery));

    Good luck on your adventure! This should help a few people using unobtrusive Validation with MVC3.

  • How to use Data Annotations?

    How to use Data Annotations?

    Interesting snippet from C#, ASP.NET and MVC, that uses the ValidationAttribute

    Ever wanted to add validation to your MVC view, well look further for more details.

    The ValidationAttribute will help you validate your model and server-side properties. As a programmer, you will need to add certain rules or attributes to the properties, such as required, string length, range and change the display property name. The example has a special attribute that limits the amount of words the user can type into a field.

    You are required to inherit from ValidationAttribute, in order to use the error message and IsValid method of the attribute. Once you have those, you can set in the constructor, the message and max value. Then override the IsValid method and check the property for the amount of words. I used split and length methods to check against the max words.

    If all is fine, return success, otherwise give the user the error message you set in the constructor.

    The programmer will need a lot of flexibility in validating their model and view, this snippet can help you avoid writing a lot of extra client side code.

    A lot of the credit goes to Scott Allen course on Building Applications with ASP.NET MVC4.

    public class MaxWordsAttribute : ValidationAttribute
        {
            public MaxWordsAttribute(int maxWords)
                : base("{0} has too many words.")
            {
                _maxWords = maxWords;
            }
    
            protected override ValidationResult IsValid(
                object value, ValidationContext validationContext)
            {
                if (value != null)
                {
                    var valueAsString = value.ToString();
                    if (valueAsString.Split(' ').Length &gt; _maxWords)
                    {
                        var errorMessage = FormatErrorMessage(validationContext.DisplayName);
                        return  new ValidationResult(errorMessage);
                    }
                }
                return ValidationResult.Success;
            }
    
            private readonly int _maxWords;
        }
    
        public class Reviews : IValidatableObject
        {
            [Range(1,10)]
            [Required]
            public int Rating { get; set; }
    
            [Required]
            [StringLength(1024)]
            public string Desc { get; set; }
    
            [Display(Name = "User Name")]
            [DisplayFormat(NullDisplayText = "anonymous")]
    
            [MaxWords(1)]
            public string UserName{ get; set; }
    
            public IEnumerable Validate(ValidationContext validationContext)
            {
                if (Rating &lt; 2 &amp;&amp; UserName.ToLower().StartsWith("cookies"))
                {
                    yield return new ValidationResult("Sorry, cookies, you can't do this");
                }
            }
        }
  • Summer Season – The season of flip-flops

    Summer Season – The season of flip-flops

    Summer Season

    “nature poems about summer”

    Summer season is starting, I found an interesting poem to start your season.

    Summer is the stuff of dreams. When adults sit at their desks, and children sit in school, they dream of summer. Summer is the time of infinite fun. The day seems to last forever, and the fun never stops. It is a time of romance, excitement and an enhanced enjoyment of life. Somehow summer never seems to last long enough. It is always over before we get a chance to fully experience its power. This is true of all things wonderful. They always seem too short.

    Read more at this Source.
    #FamilyFriendPoems

    Come over to the beach and take in a wave and enjoy the beautiful sun rays.

  • April and Spring with poetry

    April and Spring with poetry

    April welcome Spring.

    April Poetry.

    Spring is a miraculous experience. The whole world comes alive after the winter in which it seemed that everything was dead. The world comes filled with color and the scent of delicious greenery. The world that seemed so dull and cold has come alive once again. Little did we know that beneath the cold hard ground the plants and trees were preparing for rebirth. Spring gives us hope for rejuvenation in our own lives as well. Spring is a time to renew the excitement and zest for life that lives inside.

    The original poem is found at this Source.
    #FamilyFriendPoems

    This month brings flowers and bloom. Here are some holidays missing from the month of April:

    • National Humor Month
    • International Guitar Month
    • Keep America Beautiful Month
    • Lawn and Garden Month
    • National Poetry Month
    • National Pecan Month
    • National Welding Month
    • Records and Information Management Month
    • Stress Awareness Month

    You can find more holidays here.