Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts

Friday, December 19, 2014

PROGRAMMING: C# CODE TO GENERATE RANDOM PASSWORDS DEVELOPER TUTORIAL

C# CODE TO GENERATE RANDOM PASSWORDS - DEVELOPED BY JAY STILLA + CO. MISTERBOTS



Here is a very useful C# code snippet for generating random strong passwords. The password is generated using upper case and lower case alphabets, numerals and special characters.


//create constant strings for each type of characters
static string alphaCaps = "QWERTYUIOPASDFGHJKLZXCVBNM";
static string alphaLow = "qwertyuiopasdfghjklzxcvbnm";
static string numerics = "1234567890";
static string special = "@#$";
//create another string which is a concatenation of all above
string allChars = alphaCaps + alphaLow + numerics + special;
Random r = new Random();
public string GenerateStrongPassword(int length)
{
    String generatedPassword = "";
    if (length < 4)
        throw new Exception("Number of characters should be greater than 4.");
    // Generate four repeating random numbers are postions of
    // lower, upper, numeric and special characters
    // By filling these positions with corresponding characters,
    // we can ensure the password has atleast one
    // character of those types
    int pLower, pUpper, pNumber, pSpecial;
    string posArray = "0123456789";
    if (length < posArray.Length)
        posArray = posArray.Substring(0, length);
    pLower = getRandomPosition(ref posArray);
    pUpper = getRandomPosition(ref posArray);
    pNumber = getRandomPosition(ref posArray);
    pSpecial = getRandomPosition(ref posArray);
    for (int i = 0; i < length; i++)
    {
        if (i == pLower)
            generatedPassword += getRandomChar(alphaCaps);
        else if (i == pUpper)
            generatedPassword += getRandomChar(alphaLow);
        else if (i == pNumber)
            generatedPassword += getRandomChar(numerics);
        else if (i == pSpecial)
            generatedPassword += getRandomChar(special);
        else
            generatedPassword += getRandomChar(allChars);
    }
    return generatedPassword;
}
private string getRandomChar(string fullString)
{
    return fullString.ToCharArray()[(int)Math.Floor(r.NextDouble() * fullString.Length)].ToString();
}
private int getRandomPosition(ref string posArray)
{
    int pos;
    string randomChar = posArray.ToCharArray()[(int)Math.Floor(r.NextDouble()
                                   * posArray.Length)].ToString();
    pos = int.Parse(randomChar);
    posArray = posArray.Replace(randomChar, "");
    return pos;
}

WPF - Redrawing the whole control on resize - Coded in C# [C-Sharp]VB, C++ (Open Source)


Can't Afford A Bot? Buy SEO & Social Media Metrics For Cheap Starting at $1 Dollar



Redrawing The Whole Control On Resize[C#]

CODE WRITTEN BY: JASON "JAY STILLA" LEE

Written By Jason Jay Stilla Lee - Programmer / Musician 
Enjoy The Music While You Study This Code or Copy and Paste into .CS
Coded: C#  Text Editor: Visual Studios 2013  Project: Windows Forms - WPF Application
Tutorial # 6 How To Redraw The Whole Control on Resize.
Music By Yours Truly Jay Stilla: Album Jason Society
Press Play on a Song, Crack Your Fingers And Lets Get To Coding


When custom controls or Windows Forms controls like Panel are resized, only their newly exposed portions are redrawn. However, this behaviour sometimes does not provide the desired results (see fig. 1 below).
This example shows how to ensure redrawing of the whole control after resizing by setting the control's ResizeRedraw property.

Fig. 1. A partially redrawn control after resizing.

Redrawing the whole control on resize

The ResizeRedraw protected property defined in the Control class indicates, whether the control redraws itself when resized. To ensure redrawing of the whole control on resize set this property to true. This will usually be done in the constructor of a derived class.
[C#]
public MyControl()
{
InitializeComponent();
ResizeRedraw = true;
}
Alternatively, if you can not or don't want to create a derived class, set the property using reflection or simply call the Invalidate or Refresh method in the control's Resize event handler.
[C#]
using System.Reflection;

public static void SetResizeRedraw(Control control)
{
typeof(Control).InvokeMember("ResizeRedraw",
BindingFlags.SetProperty | BindingFlags.Instance | BindingFlags.NonPublic,
null, control, new object[] { true });
}
[C#]
myControl.Resize += new EventHandler(myControl_Resize);

private void myControl_Resize(object sender, EventArgs e)
{
((Control)sender).Invalidate();
}

A sample control

The following is a code of a user control displaying an ellipse that stretches and shrinks when the control's size changes:
[C#]
public partial class MyControl : UserControl
{
public MyControl()
{
InitializeComponent();
ResizeRedraw = true;
}

protected override void OnPaintBackground(PaintEventArgs e)
{
base.OnPaintBackground(e);
// draw a blue ellipse into the control area
e.Graphics.FillEllipse(new SolidBrush(Color.Blue), 2, 2,
ClientRectangle.Width - 4, ClientRectangle.Height - 4);
}
}
Whithout the ResizeRedraw statement, the control is redrawn only partially and the result looks like in figure 1 above. When the ResizeRedraw = true statement is included, the control is redrawn properly as shown in the following figure 2.

Fig. 2. A properly redrawn control after resizing.


Google Blogs. TopBots.BlogSpot.Com [Created By iMyriad CEO J Jay Stilla Lee" it is a Informative Social Media Marketing Bots News Blog & That List Free Downloads of Automated Bot Software Apps for Facebook, Twitter, Youtube, Google, Instagram & Social Media Websites Written By Jason "Jay Stilla" Lee Online. His Alias Mister Bots Is Software Creation Specialist whom Develops Marketing Bots and Software Scripts that are Given away at no cost weekly. He Also teaches SEO Secrets and Tools For Advertising" Blogger.Com -TopBots Website Blog Https://TopBots.BlogSpot.Com < Informative Software and internet Technology News Blog.. Web blogging on new 2015 Bots and 2014's Best Software Bots Automated and Scripted Combined.

Jay-Stilla Productions LLC - Limited Liability Corporation LLC

Thursday, December 18, 2014

C# CODE TO EXTRACT EMAIL FROM WEB TUTORIAL BUILD A POWERFUL BOT

C# CODE TO EXTRACT EMAIL FROM WEB PAGES FULL TUTORIAL [BUILD A BOT] SALE FOR MONEY

TopBots.BlogSpot.Com
C# More: Features Build A Bot Blogs
Code to Extract Email Addresses

TopBots.BlogSpot.Com

This Info Was Quoted From Jay Stilla and Mister Bots Blooger By Google Blogs. TopBots.BlogSpot.Com [Created By iMyriad CEO Jason Jay Stilla Lee" it is a Informative Social Media Marketing Bots News Blog & That List Free Downloads of Automated Bot Software Apps for Facebook, Twitter, Youtube, Google, Instagram & Social Media Websites Written By Jason "Jay Stilla" Lee Online. His Alias Mister Bots Is Software Creation Specialist whom Develops Marketing Bots and Software Scripts that are Given away at no cost weekly. He Also teaches SEO Secrets and Tools For Advertising" Blogger.Com -TopBots Website Blog https://TopBots.Com < Informative Software and internet Technology News Blog.. Web blogging on new 2015 Bots and 2014's Best Software Bots Automated and Scripted Combined. iMyriads.BigCartel.Com < is a Website Created by Jay Stilla

Code to Extract Email Addresses


The Following is a sample code to Extract Email addresses from a given string and store them into an array.I will give the code as Method, so that you can easily import it into your application.This code can be easily used to extract Email Id’s from a web page, just pass the HTML of the web page as the Text2Scrape.
https://TopBots.Com 

Script:
This Class uses String arrays to store results
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

  1. namespace JayStilla.Mrbots
  2. {
  3. public class ExtractEmails
  4. {
  5. private string s;
  6. public ExtractEmails(string Text2Scrape)
  7. {
  8. this.s = Text2Scrape;
  9. }
  10. public string[] Extract_Emails()
  11. {
  12. string[] Email_List = new string[0];
  13. Regex r = new Regex(@"[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}", RegexOptions.IgnoreCase);
  14. Match m;
  15. //Searching for the text that matches the above regular expression(which only matches email addresses)
  16. for (m = r.Match(s); m.Success; m = m.NextMatch())
  17. {
  18. //This section here demonstartes Dynamic arrays
  19. if (m.Value.Length > 0)
  20. {
  21. //Resize the array Email_List by incrementing it by 1, to save the next result
  22. Array.Resize(ref Email_List, Email_List.Length + 1);
  23. Email_List[Email_List.Length - 1] = m.Value;
  24. }
  25. }
  26. return Email_List;
  27. }
  28. }
  29. }

https://TopBots.Com 

Free EPK from TopBots.Blogspot.com
The following code snippet is the same as the above one, the only difference is that this method saves the Extracted Email Id’s to a string list instead of an array, I think the following code is more effective and easy to code
This class uses List to store results, and these list are converted into arrays just before they are returned as arrays

using System;

using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System. Media;
using System.Threading

  1. namespace TopBots.Media
  2. {
  3. public class ExtractEmailLists
  4. {
  5. private string s;
  6. public ExtractEmailLists(string Text2Scrape)
  7. {
  8. this.s = Text2Scrape;
  9. }
  10. public string[] Extract_Emails()
  11. {
  12. Regex r = new Regex(@"[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}", RegexOptions.IgnoreCase);
  13. Match m;
  14. List results = new List();
  15. for (m = r.Match(s); m.Success; m = m.NextMatch())
  16. {
  17. if (!(results.Contains(m.Value)))
  18. results.Add(m.Value);
  19. }
  20. return results.ToArray();
  21. }
  22. }
  23. }

https://TopBots.Com 
UBot Studio 


Announcing UBot Studio – The First And Best Simple-To-Use, No-Programming-Necessary Bot Maker!


UBot is the internet marketer’s Swiss army knife. While other software attacks SEO, keyword research, and indexing with a chainsaw, UBot grows your business your way using marketing automation that YOU control. With an intuitive drag-and-drop interface and intelligent commands, it simplifies complicated and time-consuming tasks like account creation, article spinning, posting and messaging, on any websites you choose. Just watch a few of the tutorials and you can see how simple it is to stand out from the crowd with your own customized bots.

Other Non Bot Options:https://TopBots.Com

Saturday, November 29, 2014

The Secret World of Social Marketing- Top 10 Bots



Top 10 Social Media Marketing Bots: 

FREE SOCIAL MEDIA BOTS, SCRIPTS, APPS & TOOLS BELOW: SUBSCRIBE TO DOWNLOAD ALL 10 POWERFUL FREE AUTOMATED BOTS DESIGNS. PC WINDOWS COMPATIBLE 3-10MB FILES + LIC.

The Secret World of Social Marketing:  Increasing Social Media Metrics  

 So you signed up for an Account with a social media network with hopes of utilizing its traffic to promote, advertise, and sell a product. You've done your best to create a buzz in the public but can't seem to get the attention of  the millions that Sign in to social media sites everyday. You've Always wonder how people get thousands on top of thousands of social metrics. Whether its likes, follows, views, plays, favorites, repost or any other measurement of social status without a large team or great PR Agent you may not ever get the audience you've slaved for day by day manually adding, following and inviting consumers/fans to show you some social love. 

"Ever Wonder The Secret To Getting Thousands of Likes, Followers, Views, Plays?" 
 The problem is You've been attempting to direct millions of people all alone which is very hard to do without just getting lucky with a viral video of a cute kitten playing chopsticks with chopsticks. I am happy to say today is the last day you will ever have to be alone in your efforts to market your product. After subscribing & reading my blogs this knowledge that has been kept a big secret from everyone will be in the palm of your hand to utilize and create the social signals you've worked so hard to attain and deserve.

In This Article I will list the Top 10 Social Media Marketing Tools that are used by Professional Marketing Teams Across the globe. These methods & tools can be used to promote anything your heart desire and the great thing about them is they are accessible to any and everyone with the knowledge of their existence.

FREE SOCIAL MEDIA MARKETING & SEO AUTOMATED BOTS:FREE-*DOWNLOADS* 
  1. Register now and get instant access to my free members only Windows PC software
  2. Run Bots on as many computers as you'd like!
  3. You'll find the download links to get my free marketing bots on this page!
  4. You can use to automate your marketing!

FREE EMAIL ACCOUNT CREATOR BOT.exe : Download email-account-createor-bot.exe from SendSpacecreated by TopBots.BlogSpot.Com (c)2014 "Mister Bots"
FREE PC WINDOWS SOFTWARE:
I Will Be Giving Out Free Social Media Bots, Scripts & Tools Made By Myself "Mister Bots" Throughout This Entire Blog. Subscribe, To Ensure You Don't Miss Out On The Powerful Free Automated Social Media Bots, Software, E-Books & Tools Posted Directly To TopBots.BlogSpot.Com  And Check In Daily For Updates & More Free Social Media Bots. I Will Also Show You The Applications I Used To Personally Build These Bots For Marketing on Facebook Followers, Shares, Fan Page Likes, & Post Like - Twitter Followers, Tweets, & Repost - Youtube Subscribers, Likes & Plays- Instagram Likes & Followers,  
The First Gift For My Readers, Google Plus Followers & Extra Gifts For Subscribers to this Blog is This Powerful Automated Bot, That Will Create You Email Accounts. 
CLICK HERE TO DOWNLOAD 

#1.Ubot Studio:



UBot is the internet marketer’s Swiss army knife. While other software attacks SEO, keyword research, and indexing with a chainsaw, UBot grows your business your way using marketing automation that YOU control. With an intuitive drag-and-drop interface and intelligent commands, it simplifies complicated and time-consuming tasks like account creation, article spinning, posting and messaging, on any websites you choose. Just watch a few of the tutorials and you can see how simple it is to stand out from the crowd with your own customized bots.

We wanted Ubot 4 to be a breakthrough in automatic marketing technology. With our Image Recognition, this generation of marketers will be the first to control Flash games and applications inside their bots. Let me say that again. You can now make a bot for Farmville. And the new Artificial Intelligence feature and ultra-fast multi-threaded browsing will let you create accounts on almost any site at the touch of a button, and interact with web elements at lightning speeds. After you use the simple drag-and-drop interface to build scripts, you can switch to the new code view to copy, paste, and manipulate whole sets of commands as quickly as you would rewrite a sentence. Then, you can use the compile feature to turn these ideas into your own full-featured, stand-alone bots. You can sell them, give them away, or run them on as many different machines as you want.




Rebuilt from the ground up, the latest version of the most popular marketing automation software on the planet is
Devour Your Competition With The Only 100% Marketing Automation Program – UBot Studio

  • - Easier to use, with intelligent element selection that lets you build bots faster
  • - More powerful, with multithreading that gives you the power to unleash armies of bots at once (Pro) 
  • - State-of-the-art, with Advanced Image Recognition that lets users control Flash and more (Pro)
  • - Programmer-friendly, just switch to code view for instant scripting (Pro) 
  • – Intelligent, with Artificial Intelligence lets you make accounts universally on most websites
  • - User-friendly, with a drag and drop interface for easy command creation
  • - Profitable for customers, who can compile any script into a stand-alone .exe’s
  • - Stealthy, combining inbuilt support for Proxy Flipping, Captcha Solving, and Windows Shell Commands, as well as User Agents (Pro)
  • - Smart, featuring conditionals, variables, and scraping commands hand you the power to automate everything

The best marketing automation software on the planet is easier to use and more incredible than ever.


Other Non Bot Options: