Pages

how to save blogger page with pdf



1.First Sign up with Web2PDF.
2.Now Configure your "Save Page as PDF" button and click "Generate the JavaScript" button.
3.Then a Javascript code will be generated. Copy This code.
Now follow these simple steps :
(a)Log in to your dashboard--> layout- -> Edit HTML
(b)Click on "Expand Widget Templates"
(c)Scroll down to where you see this:
<data:post.body/>
(d)Immediately after above line, paste the code which you have generated at the Web2Pdf Online website. It's look like below code:
<!-- START: PDF Online Script --><script type="text/javascript">var authorId = "XXXXXXXX-XXXX-XXXX-XXX-XXXXXXX";var pageOrientation = "0";var topMargin = "0.5";var bottomMargin = "0.5";var leftMargin = "0.5";var rightMargin = "0.5";</script><script type="text/javascript" src="http://web2.pdfonline.com/pdfonline/pdfonline.js"></script><!-- END: PDF Online Script -->
(e)Click on "Save Templates" and Refresh your site.

j s : finder fox



                           you can add this wedget to your site and blogger
Simply insert the above code before the </body> tag of your page.


<script type="text/javascript">
var finderfoxConfig = {
    version: "1.0.0",
    key: "5eaa44a909a0b4070000012f5dee8ef1"
};
document.write(unescape('%3Cscript type="text/javascript" src="'+
('https:'==document.location.protocol?'https://ssl.':'http://')+
'finderfox.smarterfox.com/finderfox.js"%3E%3C/script%3E'));
</script>

c sharp : DATA STRUCTURES


DATA STRUCTURES

There are various ways of grouping sets of data together in C#.
Enumerations
An enumeration is a data type that enumerates a set of items by assigning to each of them an identifier (a name), while exposing an underlying base type for ordering the elements of the enumeration. The underlying type is int by default, but can be any one of the integral types except for char.
Enumerations are declared as follows:
enum Weekday { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday };
The elements in the above enumeration are then available as constants:
Weekday day = Weekday.Monday;
if (day == Weekday.Tuesday)
{
Console.WriteLine("Time sure flies by when you program in C#!");
}
If no explicit values are assigned to the enumerated items as the example above, the first element has the value 0, and the successive values are assigned to each subsequent element. However, specific values from the underlying integral type can be assigned to any of the enumerated elements:
enum Age { Infant = 0, Teenager = 13, Adult = 18 };
Age age = Age.Teenager;
Console.WriteLine("You become a teenager at an age of {0}.", (int)age);
The underlying values of enumerated elements may go unused when the purpose of an enumeration is simply to group a set of items together, e.g., to represent a nation, state, or geographical territory in a more meaningful way than an integer could. Rather than define a group of logically related constants, it is often more readable to use an enumeration.
It may be desirable to create an enumeration with a base type other than int. To do so, specify any integral type besides char as with base class extension syntax after the name of the enumeration, as follows:
enum CardSuit : byte { Hearts, Diamonds, Spades, Clubs };
Structs
Structures (keyword struct) are light-weight objects. They are mostly used when only a data container is required for a collection of value type variables.
24 | C# Programming Data Structures
Structs are similar to classes in that they can have constructors, methods, and even implement interfaces, but there are important differences. Structs are value types while classes are reference types, which means they behave differently when passed into methods as parameters. Another very important difference is that structs cannot support inheritance. While structs may appear to be limited with their use, they require less memory and can be less expensive if used in the proper way.
A struct can, for example, be declared like this:
struct Person
{
public string name;
public System.DateTime birthDate;
public int heightInCm;
public int weightInKg;
}
The Person struct can then be used like this:
Person dana = new Person();
dana.name = "Dana Developer";
dana.birthDate = new DateTime(1974, 7, 18);
dana.heightInCm = 178;
dana.weightInKg = 50;
if (dana.birthDate < DateTime.Now)
{
Console.WriteLine("Thank goodness! Dana Developer isn't from the future!");
}
It is also possible to provide constructors to structs to make it easier to initialize them:
using System;
struct Person
{
string name;
DateTime birthDate;
int heightInCm;
int weightInKg;
public Person(string name, DateTime birthDate, int heightInCm, int weightInKg)
{
this.name = name;
this.birthDate = birthDate;
this.heightInCm = heightInCm;
this.weightInKg = weightInKg;
}
}
public class StructWikiBookSample
{
public static void Main()
{
Person dana = new Person("Dana Developer", new DateTime(1974, 7, 18), 178, 50);
}
}

c# Sharp How can I disable the ALT+F4 method of closing the application

frist way

private void Form1_FormClosing(object sender, FormClosingEventArgs e) 
{ 
    e.
Cancel = true; 
} 

second way
You can handle "Alt+F4" KeyDown to disable it.

1. set "KeyPreview" of your form to "true"

2. add "KeyDown" handler for your form (or override "OnKeyDown" method)

private void Form1_KeyDown(object sender
, System.Windows.Forms.KeyEventArgs e) {
if( e.Alt && e.KeyCode==Keys.F4 ) {
e.Handled=true;
}
}

java script: install floating digg share


Login to your Blogger account.
Go to Design > Page Elements.
Click Add A Gadget.
In Add A Gadget window, select HTML/Javascript .
Copy the code below and paste it inside the content box.

<!-- floating page sharer Start code2all.blogspot.com-->
<style>
#pageshare {position:fixed; bottom:15%; margin-left:-71px; float:left; border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:#fff;padding:0 0 2px 0;z-index:10;}
#pageshare .sbutton {float:left;clear:both;margin:5px 5px 0 5px;}
.fb_share_count_top {width:48px !important;}
.fb_share_count_top, .fb_share_count_inner {-moz-border-radius:3px;-webkit-border-radius:3px;}
.FBConnectButton_Small, .FBConnectButton_RTL_Small {width:49px !important; -moz-border-radius:3px;-webkit-border-radius:3px;}
.FBConnectButton_Small .FBConnectButton_Text {padding:2px 2px 3px !important;-moz-border-radius:3px;-webkit-border-radius:3px;font-size:8px;}
</style>
<div id='pageshare'>
<div class='sbutton' id='fb'>
<a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
</div>
<div class='sbutton' id='rt'>
<script src="http://tweetmeme.com/i/scripts/button.js" type='text/javascript'></script>
</div>
<div class='sbutton' id='su'>
<script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script>
</div>
<div class='sbutton' id='digg'>
<script src='http://widgets.digg.com/buttons.js' type='text/javascript'></script>
<a class="DiggThisButton DiggMedium"></a>
</div>
<div class='sbutton' id='gb'>
<a class='google-buzz-button' data-button-style='normal-count' href='http://www.google.com/buzz/post' title='post on google buzz'>
<script src='http://www.google.com/buzz/api/button.js' type='text/javascript'></script>
</a></div>
<div style="clear: both;font-size: 9px;text-align:center;"><a href="http://www.bloggersentral.com/2010/07/install-floating-social-media-buttons.html">Get this</a></div>
</div>
<!-- floating page sharer End -->

 

java script : bookmark this page


<a style="font-family:Arial;font-size:14px;color:#000000;font-weight:bold;font-style:normal;text-decoration:none" href="javascript:addToFavorites('code2all', 'http://www.code2all.blogspot.com')">Bookmark this page!</a>


with my best mohamed basha

c # : Number OnlyTextbox


First
      - add two textbox ( txtType1, txtType2 )
      - add three label ( label1, label2, label3 )
Second
      - Right click on textType1 and choose properties
      - move to Events and double click on  KeyPress
Third
      - add this code

//Using 2.0 Framework function TryParse


int isNumber = 0;
int.TryParse(e.KeyChar.ToString(), out isNumber);
if (isNumber == 0)
e.Handled = true;


Second
      - Right click on textType2 and choose properties

      - move to Events and double click on KeyPress
Third
      - add this code

//Using Regular Expressions
if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(), "\\d+"))
e.Handled = true;




C# Numbers Only in Textbox

I created a text box event handler to only allow my textbox to accept Numbers only. The Event handler works great and does not allow anything but numbers except when the form first loads and the character entered is non-numeric it then allows the first charcter to be entered can be non-numberic. If I enter a number then erase it it will not allow a non-numeric character.

I saw one example of this but the texbox had a underline in it but it did not have any code in it.
Here is my event handler right now
 
first way
C# Syntax
 
private void text1_TextChanged(object sender, EventArgs e)
{
      text1.KeyPress += new KeyPressEventHandler(rtbQuantity_KeyPress);
}
private void text1_KeyPress(object sender, KeyPressEventArgs e)
{
if ((e.KeyChar < '0')  || (e.KeyChar > '9')) e.Handled = true;
}
 
 
sec way
 
private void txtType1_KeyPress(object sender, KeyPressEventArgs e)

{

int isNumber = 0; e.Handled = !int.TryParse(e.KeyChar.ToString(), out isNumber);

}
 
 
3rt way
 
private void txtType1_KeyPress(object sender, KeyPressEventArgs e)


{

int isNumber = 0; e.Handled = !int.TryParse(e.KeyChar.ToString(), out isNumber);

}

c#: Play wav files



// Play wav files

 System.Media.SoundPlayer player = new SoundPlayer();
 player.SoundLocation = "c:\\test.wav";
 player.LoadAsync();
 player.PlayLooping();   //asynchronous (loop)playing in new thread
 Thread.Sleep(5000);
 player.Stop();




java script Email

IsEmail: Returns a Boolean if the specified Expression is a
          valid e-mail address. If Expression is null, false
          is returned.

 Parameters:
      Expression = e-mail to validate.



function IsEmail(Expression)
{
        if (Expression == null)
                return (false);

        var supported = 0;
        if (window.RegExp)
        {
                var tempStr = "a";
                var tempReg = new RegExp(tempStr);
                if (tempReg.test(tempStr)) supported = 1;
        }
        if (!supported)
                return (Expression.indexOf(".") > 2) && (Expression.indexOf("@") > 0);
        var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
        var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
        return (!r1.test(Expression) && r2.test(Expression));
}

 

c sharp Set image opacity

here you can set and change image opacity and more

public static Image SetOpacity(Image original, float opacity)
{
Bitmap temp = new Bitmap(original.Width, original.Height);
Graphics g = Graphics.FromImage(temp);
ColorMatrix cm = new ColorMatrix();
cm.Matrix33 = opacity;
ImageAttributes ia = new ImageAttributes();
ia.SetColorMatrix(cm, ColorMatrixFlag.Default, ColorAdjustType.Bitmap);
g.DrawImage(original, new Rectangle(0, 0, temp.Width, temp.Height), 0, 0, original.Width, original.Height, GraphicsUnit.Pixel, ia);
g.Dispose();
return temp;
}

with my best----> mohamed basha
c sharp Set image opacity, c #, code 2 all, java script, c sharp

How to call other applications using the

Windows Forms Controls: How to call other applications using the
Process control
this video description How to call other applications using the Process control

Named and Optional Parameters in C# 4.0

microsoft video
learning c charp
this video to description Named and Optional Parameters in C# 4.0
you can download this video click here

Link With in

Related Posts Plugin for WordPress, Blogger...