How To Get or Store File/Folder Path in app.config File and Read It | C#

get+folder+path+from+app.config+file


We got a folder named ‘SheToldMeImages’ in D Drive with some files in it and now we want to access it from app.config file.


SheToldMeFolder


Lets see how we can do that


Go to app.config file and paste the below code in configuration tag


<configuration>
<appSettings>    
<add key="SheToldMeImagesPath" value="D:\SheToldMeImages\" />
</appSettings>
</configuration>

Now we have give the path and assigned a key with name as ‘SheToldMeImagespath’.


Now, lets access this key by follwoing the below code


string Path = 
System.Configuration.ConfigurationManager.AppSettings["SheToldMeImagesPath"].ToString();

Hope im pretty clear with this simple task.

Download Torrent Files Directly Without Any Torrent Software | ZBigz

ZBigz

This post is for those who want to download torrent files but without using any applications like uTorrent or any other as they feel unsafe,or don’t want to be traced or may be any other restrictions.

To be quick ZBigz is the solution for that.

How to use ZBigz :

1. Visit ZBigz

2. Grab any torrent link url and paste it in the textbox and hit the Go button

ZBigz+Torrent+URL

Else you can upload the torrent file by downloading it also

ZBigz+Torrent+File

3. In the next popup select Free option and your file will be downloaded to the server.

ZBigz+Free+User+Limitations

Mostly your file will be downloaded to the server within minutes and will be available for you to download.Now download your file and enjoy.

Note :

Please note that the maximum size of the file should not be more than 1 GB.I would recommend you to register so that your file will be available in your account for 7days and only 2 files can be stored as Free user.

If you want to remove these limitations you can become their premium user.

I have also a made a small video also for more brief. Please watch and share your thoughts.



Display Numbers In Label With Sleep/Delay Using 'For Loop' In Windows Application

Sand+Glass


Here i will be showing how to display numbers in sequence using For Loop In Windows Application.


Display+Numbers

we can do this in two different methods.

Lets move ahead and do this.

First create a windows application with a button and a label in it.

Now on button click we will display numbers one by one with small delay.


Method 1 : Sleep Method

private void buttonStart_Click(object sender, EventArgs e)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i <= 15; i++)
{
sb.Append(i);
sb.Append(Environment.NewLine);
label1.Text = sb.ToString();
Application.DoEvents();
Thread.Sleep(2000);
}
}

Method 2 : ASync Method

private void buttonStart_Click(object sender, EventArgs e)
{
DisplayNumbers();            
}

async void DisplayNumbers()
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i <= 15; i++)
{
sb.Append(i);
sb.Append(Environment.NewLine);
label1.Text = sb.ToString();
await Task.Delay(2000);
}
}

Run the application to check output by using any of the method above


Please note that Async method will only work in 4.5 Framework.


Have a great day :-)

Get Cursor Focus On Load For WPF Textbox

Cursor+Focus+On+Load+For+WPF+Textbox


Its a very simple task to get the textbox focus on Load event.


Lets take a textbox in Xaml and raise an loaded event as shown below.

<TextBox Loaded="TextBoxLoaded"/>

Now go to code behind and write the below code to get focus.


private void TextBoxLoaded(object sender, RoutedEventArgs e)
{
var textbox = sender as TextBox;
if (textbox == null) return;            
textbox.Focusable = true;
textbox.Focus();
}

Have a nice day :-).

Show Or Hide >> Play / Enqueue In Winamp For Folder Context Menus

Winamp+Logo

Image Credits : Winamp


In this simple tutorial, I will explain you about how to Show or Hide Play in Winamp option for folder context menus.


If you look at the below screenshot you can see that all the below folders are music files only but when you right click on them it is not showing Play in winamp or Enqueue in winamp option. Now, lets head and fix that.

Winamp+Without +Play+Context+Menu


Play /Enqueue In Winamp For Folder Context Menu :


Open Winamp click on Options and select Preferences.Winamp+Options


Select File types and on right side you will find an option ‘Show Winamp actions in the folder context menu’. Just tick mark that option.Winamp+Preferences

Winamp+With +Play+Context+Menu


If you want to hide the context menu options then just uncheck the option.


Share your thoughts if you this simple tutorial helped you.

Best And Easy Way To Get Back Links To Your Posts From Content Thieves | Tynt

Tynt_Logo

Back links play a important role for your blog as it not only generates traffic but also increases your Page Rank. Writing a Powerful Content and Getting Back links will definitely make a successful blog. But what can you do if someone copies your content and use that in their blog without linking back or giving any credit to your hard work. We can resolve this by simply adding Tynt script to our blog.


What is Tynt ?
Tynt is a powerful tool which will keep track of all the contents copied from a site and automatically links back to the original article. Whenever someone copy content from your site and pastes it into an email, blog post, face book or anywhere else then a Read more link along with creative commons attribution license, Facebook and Twitter profile links are automatically added at the bottom of the text which is copied from your blog. With this tool your traffic increases and SEO also improves.

Copied Content :

Tynt Copied Content

Suppose someone copied the above content and pasted anywhere, then it will paste as below content.

Pasted Content :

To turn it off go to your Google+ account, then go to your account settings, then got to Google+ Settings page and scroll down for Auto Enhance and set it to Off.

Read more: http://she-toldme.blogspot.com/2013/11/white-photos-uploading-to-blogger-and.html#ixzz2pi5xgIwB
Follow us: @SheeToldMe on Twitter | SheeToldMe on Facebook


How To Get Tynt ?

Visit Tynt and click on Get The Code

Tynt+Get+The+Code

Fill up the form and submit to get registered with Tynt.

Tynt+Sign+Up+Form

After you hit on submit you will be redirected to a page where a Tynt script is given as shown below.Copy the script and go to Blogger now.

Tynt+Script+Install


Adding Tynt To Blogger :


◾ Login to your Blogger  >> Dashboard


◾ Select Template and Click On Edit HTML

Blogger+Template


◾ Search for </head> tag and paste the Tynt script just above it which we got earlier.

Blogger+Tynt+Script


◾ Save the template and again go back to the Tynt site.


◾ Scroll down to find Test the script button and Hit it after you fill in your site url.

Tynt+Test+Script


◾ You will get a success msg as shown below.

Tynt+Test+Script+Success


Final Words:
Do remember that minimum 8 number of words are required to be copied, to have an attribution link added. Visit your publisher dashboard to customize your attribution link according to your needs. You can even add Twitter and Facebook names also. Hope I'm clear enough with this tutorial. Do subscribe for latest updates.

Share your thoughts on this post.

Facebook Symbols Collection | Just Copy And Paste To Use

Official Facebook Symbols

Apple symbol: Ѽ

Butterflies: Ƹ̴Ӂ̴Ʒ εїз

Comet: ☄

Cloud and umbrella  ☁ ☂ 

Check symbol:✓

Chess Pieces:
♚ ♛ ♜ ♝ ♞ ♟

Clocks-⌛ ⌚

Crosses-
☩ ☨ ☦ ✙ ✚ ✛ ✜ ✝ ✞ ✠

Flowers
❀ ✿ ❁ ✾ ✽ ❃ ❋

✿◕‿◕✿  ❀◕‿◕❀    ❁◕‿◕❁    ✾◕‿◕✾

Hands:
☚ ☛ ☜ ☝ ☞ ☟

Letters-
ⒶⒷⒸⒹⒺⒻ ⒼⒽⒾⒿⓀⓁ ⓂⓃⓄⓅⓆⓇ ⓈⓉⓊⓋⓌⓍ ⓎⓏ
ⓐⓑⓒⓓⓔⓕ ⓖⓗⓘⓙⓚⓛ ⓜⓝⓞⓟⓠⓡ ⓢⓣⓤⓥⓦⓧⓨⓩ

Love Eyes:  ♥‿♥ 

Moon symbols  ☾ ☽

Misc ✈,♨,☠,๑ ۩ ۞

Music
♪ ♫ ♩ ♬ ♭ ♮ ♯

Numeric Face book Symbols-
①②③④⑤⑥⑦⑧⑨⑩ ⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳

Peace Symbols
✌☮

Poker/Card Symbols
Black: ♥ ♦ ♣ ♠
White: ♡ ♢ ♤ ♧

Risk radioactive and biological: ☢ ☣

Religion\Belief Symbols.
☯ ✡☨ ✞ ✝☥ ☦ ☧ ☩ ☪ ☫ ☬ ☭

Sun symbols: ☼ ☀

Snowman: ☃

Stars
★ ✩ ✮ ✯ ✰ ☆ ⋆ ╰☆╮✡ ۞

Stationary- ✉ ✍ ✎ ✏ ✐✑✒ ⌨ ,✂ ✄ ,☎ ☏ ✆

Snow Flakes
❇ ❈ ❅ ❄ ❆

Zodiac Symbols:
♈ – Aries (The Ram)
♉ – Taurus (The bull)
♊ – Gemini (The Twins)
♋ – Cancer (The Crab)
♌ – Leo (The Lion)
♍ – Virgo (The Virgin)
♎ – Libra (The Scales)
♏ – Scorpio (The Scorpion)
♐ – Sagittarius (Centaur The Archer)
♑ – Capricorn (Goat-horned, The sea goat)
♒ – Aquarius (The water bearer)
♓ – Pisces (The fish)

Funny Faces-
Face 1:ಠ_ಠ

Face 2: ಥ_ಥ

Face 3: ¯\(°_o)/¯

Face 4: ب_ب

Face 5: ◕ ‿ ◕

Face 6: m(&gt;&lt;)m

Face 7: o(╥﹏╥)o

Face 8: //(ㄒoㄒ)//

Face 9: {{{(&gt;_&lt;)}}}

Face 10:   ☼_☼  

Face 10:   ( ( (d[-.-]b) ) )   

Princess Leia Star Wars: @-_-@ .. @-.-@ .. @&gt;.&lt;@

╔═══╗ ♪
║███║ ♫
║ (●) ♫
╚═══╝♪♪   iPod.

Lucky strike cigarette: (̅_̅_̅(̲̲̲̲̲̅̅̅̅̅̅(̅_̅_̲̲̲̅̅̅l̲̅u̲̅c̲̅k̲̅y̲̲̅̅̅_̅_ ̅_̅() ڪے

Marlboro cigarette: (̅_̅_̅(̲̲̲̲̲̅̅̅̅̅̅(̅_̅_̲̅м̲̅a̲̅я̲̅l̲̅b̲̅o̲̅r̲̅o̲̅̅ _̅_̅_̅()

$̲̅(̲̅2οο̲̅)̲̅$̲̅]

[̲̅$̲̅(̲̅ιοο̲̅)̲̅$̲̅]

[̲̅$̲̅(̲̅5̲̅)̲̅$̲̅]

[̲̅$̲̅(̲̅1̲̅)̲̅$̲̅]

╔♫╗────────╔═╦╗─♫╗╔╗─╔╗─♥── ║╩╠═╦═╦═╦╦╗║╚╠╬╦╣╚╣╚╦╝╠═╦╦╗ ║╦║╬║╬║╬║║║║╔║║╔╣╔╣║║╬║╬║║║ ╚╩╩╩╣╔╣╔╬╗║♫═╩╩╝╚═╩╩╩═╩╩╬╗║ ────♫╝╚╝╚═╝─────────────╚═♥
ஜ۩۞۩ஜ (INSERT NAME HERE)ஜ۩۞۩ஜ

Comment below if you got any more Symbols

Auto Increase Text Area On Typing | As Seen In Facebook

Auto+Increase+TextArea+Sample+Code+By+SheToldMe

If you ever used Facebook then you might have noticed that, when you are typing a comment in a text box then the text box will automatically increases. In the same way lets create that type of text box today in a very simple and easy method.


Downloading & Adding Script Files :

We need to download jquery-1.3.2.min.js and jquery.textarea-expander.js files to proceed further. If you already have these two files then you can skip to further.

Copy these two files to your scripts folder. If you don't know how to create this then follow below 2 simple steps.
1. Right Click on your project and click on 'New Folder', Rename it to 'Scripts'.
2. Again Right Click On 'Scripts' Folder and click on Add Existing Item and select the 2 files which you downloaded and Add them.


Code To Auto Increase Text Area :

We can do this in two methods, i will explain you both methods

Method : 1

Copy the below two script lines of code and paste them in aspx head part.

<script src="Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="Scripts/jquery.textarea-expander.js" type="text/javascript"></script>


Now its time to create a text box, we can either we use a html text area or aspx text box, we should assign its class as 'expand'.


'expand' is the function which is already kept in the above script files, so you no need to do anything more.


In the below examples I'm giving you both text area and text box, use any one of them ,Run It And Test It


<textarea class="expand" cols="44" name="textarea2" rows="3"></textarea>

else


<asp:textbox class="expand" id="txtFacebook" rows="1" runat="server" style="overflow: hidden;" 
textmode="MultiLine" width="350"></asp:textbox>


Method : 2


Copy the below script code and paste them in aspx head part.


<script src="Scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
function FitToContent(id, maxHeight) {
var text = id && id.style ? id : document.getElementById(id);
if (!text)
return;
var adjustedHeight = text.clientHeight;
if (!maxHeight || maxHeight > adjustedHeight) {
adjustedHeight = Math.max(text.scrollHeight, adjustedHeight);
if (maxHeight)
adjustedHeight = Math.min(maxHeight, adjustedHeight);
if (adjustedHeight > text.clientHeight)
text.style.height = adjustedHeight + "px";
}
}
</script>

Take a text area from html and call the above FitToContent function on key up

<textarea name="comment" onkeyup="FitToContent(this, document.documentElement.clientHeight)" 
style="overflow: hidden; width: 350px;"></textarea>


Run the application to test.Hope it worked fine and I'm clear.

If you face any issues, feel free to ask.

Adding Watermark To Text Box Using Ajax Control

Water+Mark+For+TextBox


In our previous post we learned creating date picker with Ajax control. In the same way we can add watermark to the textbox by using control called 'Text Box Watermark Extender'.


Lets head to the code and create it in simple steps

Step 1 : Add Ajax Tool kit To Web Form if it is not added else skip to next step

Step 2 : Create a text box

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

Step 3 : Add Script Manager to the page

<asp:ScriptManager id="ScriptManager1" runat="server">
</asp:ScriptManager>

Step 4 : For showing watermark we need to add a control called 'Text Box Watermark Extender' where its Target Control ID would be our ID of text box which we created in step 2.


Also there is a property called watermarkcssclass where we need to give it as watermarked.


And last and important thing is to give some text to the watermarktext property which we will show to the user ex: enter your name or password...etc... like i gave in the below code


<ajax:TextBoxWatermarkExtender runat="server" TargetControlID="TextBox1" 
WatermarkCssClass="watermarked" WatermarkText="Enter Name"/>

Run the application to check and results.


Hope i explained it to you in a simple and easy way.


Here is the Complete formatted code.


<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<ajax:TextBoxWatermarkExtender runat="server" TargetControlID="TextBox1" 
WatermarkCssClass="watermarked" WatermarkText="Enter Name" />

<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<ajax:TextBoxWatermarkExtender runat="server" TargetControlID="TextBox2"
WatermarkCssClass="watermarked" WatermarkText="Enter Pass" />
</div>
</form>
</body>