Get Album and Image (All) from Picasa- C#-Full source

Now i want to use upload my image to picasa, i saw this example very good, i want sharing for everbody. Following full source code, you can get now.

download-source-code_btn1

 

private void BindAlbum()
    {
        AlbumQuery query = new AlbumQuery(PicasaQuery.CreatePicasaUri(txtUserName.Text));
        PicasaService service = new PicasaService("sample");
        service.setUserCredentials(txtUserName.Text, txtpwd.Text);
        Session["token"] = service.QueryClientLoginToken();
        PicasaFeed feed = service.Query(query);
        DataSet ds = new DataSet();
        DataTable dt = new DataTable();
        dt.Columns.Add(new DataColumn("Album", typeof(string)));
        dt.Columns.Add(new DataColumn("NO of photo", typeof(string)));
        dt.Columns.Add(new DataColumn("url", typeof(string)));
        dt.Columns.Add(new DataColumn("id", typeof(string)));
        foreach (PicasaEntry entry in feed.Entries)
        {
            DataRow dr1 = dt.NewRow();
            AlbumAccessor ac = new AlbumAccessor(entry);
            dr1["Album"] = entry.Title.Text;
            dr1["NO of photo"] = ac.NumPhotos;
            dr1["id"] = ac.Id;
            dr1["url"] = entry.Media.Thumbnails[0].Url;
            dt.Rows.Add(dr1);
        }
        ds.Tables.Add(dt);
        ViewState["Album"] = ds;
        GridView1.DataSource = ds;
        GridView1.DataBind();
    }
 
    /// <summary>
    /// this event used to bind the photo to gallery using the albumid
    /// </summary>
 
    protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Download")
        {
            Panel1.Visible = true;
            PhotoQuery query = new PhotoQuery(PicasaQuery.CreatePicasaUri(txtUserName.Text, e.CommandArgument.ToString()));
            PicasaService service = new PicasaService("Picasa");
            service.setUserCredentials(hfUsername.Value, hfPwd.Value);
            PicasaFeed feed = service.Query(query);
            StringBuilder html = new StringBuilder();
            string title;
            html.Append("<ul class=\"thumbs noscript\">");
            foreach (PicasaEntry entry in feed.Entries)
            {
                if (entry.Title.Text.LastIndexOf(".") > -1)
                    title = entry.Title.Text.Substring(0, entry.Title.Text.LastIndexOf("."));
                else
                    title = entry.Title.Text;
 
                html.Append(String.Format("<li><a class=\"thumb\" name={0} href=\"{1}\" title=\"{2}\"><img src=\"{3}\" alt=\"{4}\"/></a>",
                    title, entry.Media.Content.Url, title, entry.Media.Thumbnails[0].Url, title));
                html.Append(String.Format("<div class=\"caption\"><div class=\"image-title\">{0}</div><div class=\"image-desc\">{1}</div></div></li>",
                    title, entry.Summary.Text));
 
            }
            html.Append("</ul>");
            divSlider.InnerHtml = html.ToString();
        }
    }

Best gen Barcode winform and webform-Full source

Best-Code-barcode-Dotnet-Code-Full-source

I am tested for my project, and this is barcde very good

Click create barcode:

private void btnEncode_Click(object sender, EventArgs e)
        {
            int W = Convert.ToInt32(this.txtWidth.Text.Trim());
            int H = Convert.ToInt32(this.txtHeight.Text.Trim());
 
            BarcodeLib.TYPE type = BarcodeLib.TYPE.UNSPECIFIED;
            switch (cbEncodeType.SelectedItem.ToString().Trim())
            {
                case "UPC-A": type = BarcodeLib.TYPE.UPCA; break;
                case "UPC-A (Numbered)": type = BarcodeLib.TYPE.UPCA; break;
                case "UPC-E": type = BarcodeLib.TYPE.UPCE; break;
                case "UPC 2 Digit Ext.": type = BarcodeLib.TYPE.UPC_SUPPLEMENTAL_2DIGIT; break;
                case "UPC 5 Digit Ext.": type = BarcodeLib.TYPE.UPC_SUPPLEMENTAL_5DIGIT; break;
                case "EAN-13": type = BarcodeLib.TYPE.EAN13; break;
                case "JAN-13": type = BarcodeLib.TYPE.JAN13; break;
                case "EAN-8": type = BarcodeLib.TYPE.EAN8; break;
                case "ITF-14": type = BarcodeLib.TYPE.ITF14; break;
                case "Codabar": type = BarcodeLib.TYPE.Codabar; break;
                case "PostNet": type = BarcodeLib.TYPE.PostNet; break;
                case "Bookland/ISBN": type = BarcodeLib.TYPE.BOOKLAND; break;
                case "Code 11": type = BarcodeLib.TYPE.CODE11; break;
                case "Code 39": type = BarcodeLib.TYPE.CODE39; break;
                case "Code 39 Extended": type = BarcodeLib.TYPE.CODE39Extended; break;
                case "Code 93": type = BarcodeLib.TYPE.CODE93; break;
                case "LOGMARS": type = BarcodeLib.TYPE.LOGMARS; break;
                case "MSI": type = BarcodeLib.TYPE.MSI_Mod10; break;
                case "Interleaved 2 of 5": type = BarcodeLib.TYPE.Interleaved2of5; break;
                case "Standard 2 of 5": type = BarcodeLib.TYPE.Standard2of5; break;
                case "Code 128": type = BarcodeLib.TYPE.CODE128; break;
                case "Code 128-A": type = BarcodeLib.TYPE.CODE128A; break;
                case "Code 128-B": type = BarcodeLib.TYPE.CODE128B; break;
                case "Code 128-C": type = BarcodeLib.TYPE.CODE128C; break;
                default: MessageBox.Show("Please specify the encoding type."); break;
            }//switch
 
            try
            {
                if (type != BarcodeLib.TYPE.UNSPECIFIED)
                {
                    b.IncludeLabel = this.chkGenerateLabel.Checked;
 
                    //===== Encoding performed here =====
                    barcode.Image = b.Encode(type, this.txtData.Text.Trim(), this.btnForeColor.BackColor, this.btnBackColor.BackColor, W, H);
                    //===================================
 
                    //===== Static Encoding performed here =====
                    //barcode.Image = BarcodeLib.Barcode.DoEncode(type, this.txtData.Text.Trim(), this.btnForeColor.BackColor, this.btnBackColor.BackColor);
                    //==========================================
 
                    txtEncoded.Text = b.EncodedValue;
 
                    barcode.Width = barcode.Image.Width;
                    barcode.Height = barcode.Image.Height;
 
                    tsslEncodedType.Text = "Encoding Type: " + b.EncodedType.ToString();
                }//if
 
                barcode.Width = barcode.Image.Width;
                barcode.Height = barcode.Image.Height;
 
                //reposition the barcode image to the middle
                barcode.Location = new Point((this.groupBox2.Location.X + this.groupBox2.Width / 2) - barcode.Width / 2, (this.groupBox2.Location.Y + this.groupBox2.Height / 2) - barcode.Height / 2);
 
            }//try
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }//catch
        }//btnEncode_Click

Save barcode to image

private void btnSave_Click(object sender, EventArgs e)
        {
            SaveFileDialog sfd = new SaveFileDialog();
            sfd.Filter = "BMP (*.bmp)|*.bmp|GIF (*.gif)|*.gif|JPG (*.jpg)|*.jpg|PNG (*.png)|*.png|TIFF (*.tif)|*.tif";
            sfd.AddExtension = true;
            if (sfd.ShowDialog() == DialogResult.OK)
            {
                BarcodeLib.SaveTypes savetype = BarcodeLib.SaveTypes.UNSPECIFIED;
                switch (sfd.FilterIndex)
                {
                    case 1: /* BMP */  savetype = BarcodeLib.SaveTypes.BMP; break;
                    case 2: /* GIF */  savetype = BarcodeLib.SaveTypes.GIF; break;
                    case 3: /* JPG */  savetype = BarcodeLib.SaveTypes.JPG; break;
                    case 4: /* PNG */  savetype = BarcodeLib.SaveTypes.PNG; break;
                    case 5: /* TIFF */ savetype = BarcodeLib.SaveTypes.TIFF; break;
                    default: break;
                }//switch
                b.SaveImage(sfd.FileName, savetype);
            }//if
        }//btnSave_Click

download-source-code_btn1

Code Upload FTP C# – Upload file to server-Full

Just I am  completed my project winform, to working with file excel (over 30MB), i can not process at client, i must upload to server and process data.

I would like to share the following with you code upload to server

  • ftpServerIP: address to server 192.168.2.36
  • ftpUserID: Username to access server
  • ftpPassword: password ftp
  • pathFilename: path file at client (ex: E:\xxx12.xls)
private bool UploadFTP(string ftpServerIP, string ftpUserID, string ftpPassword, string pathFilename)
        {
            try
            {
                FileInfo fileInf = new FileInfo(pathFilename);
                string uri = "ftp://" + ftpServerIP + "/" + fileInf.Name;
                FtpWebRequest reqFTP;
 
                // Create FtpWebRequest object from the Uri provided
                reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + fileInf.Name));
 
                // Provide the WebPermission Credintials
                reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
 
                // By default KeepAlive is true, where the control connection is not closed
                // after a command is executed.
                reqFTP.KeepAlive = false;
 
                // Specify the command to be executed.
                reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
 
                // Specify the data transfer type.
                reqFTP.UseBinary = true;
 
                // Notify the server about the size of the uploaded file
                reqFTP.ContentLength = fileInf.Length;
 
                // The buffer size is set to 2kb
                int buffLength = 2048;
                byte[] buff = new byte[buffLength];
                int contentLen;
 
                // Opens a file stream (System.IO.FileStream) to read the file to be uploaded
                FileStream fs = fileInf.OpenRead();
 
                try
                {
                    // Stream to which the file to be upload is written
                    Stream strm = reqFTP.GetRequestStream();
 
                    // Read from the file stream 2kb at a time
                    contentLen = fs.Read(buff, 0, buffLength);
 
                    // Till Stream content ends
                    while (contentLen != 0)
                    {
                        // Write Content from the file stream to the FTP Upload Stream
                        strm.Write(buff, 0, contentLen);
                        contentLen = fs.Read(buff, 0, buffLength);
                    }
 
                    // Close the file stream and the Request Stream
                    strm.Close();
                    fs.Close();
                    return true;
                }
                catch (Exception ex)
                {
                    DevComponents.DotNetBar.MessageBoxEx.Show("Upload Error");
                }
            }
            catch (Exception)
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("Upload To Server Error");
            }
 
            return false;
        }

Easy File Transfer with Files 4 Client Pro-Demo and buy cheap

With Easy File Transfer Files 4 Client Pro:

  • Upload your files directly inside the brower and share them
  • Presents your files and folders in a well-arranged list
  • Slick design available in any color
  • Brand it for your name and logo
  • Drag and drop upload supported
  • Easy and fast in browser setup

Features Easy File Transfer

  • Powerful admin backend
  • Upload your files conveniently from inside the browser
  • Manage your files – view, rename and delete them with ease
  • Have full control over your files as they’re not hosted remotely
  • Send your recipients well-arranged and easy to use lists of files and folders
  • Let your recipients zips all files of a folder for download if requested
  • Automatically deletes old folders after a specified amount of time if wanted to save server space
  • Optional password protection for client links
  • Image thumbnails for maximum convenience
  • Unlimited use of subdirectories within your client links

easy-file-transfer-with-files-4-client-pro-demo-and-buy-cheap

  • Shows a customizable title text (e.g. company name)
  • Leaves space for your logo or other image at the site title
  • Available in any color, just use a color picker to define your base-color.
  • Easy and comfortable in-browser setup, done in a minute!
  • Minimal and elegant design that leaves room for customization
  • HTML5 / CSS3 ready
  • No database required
  • jQuery animations
  • Video Tutorials explaining installation and use in detail!
  • Supported by all major browser and IE6+!

Customer review

  • I love it, I purchase it.
  • Congratz, great great work, I really suggest you make a responsive version too. GLWS
  • Awesome and very functional script, good luck with sales !
  • Doesnt every customer see than ALL files ? Or is it possible to set for every files a password & only the one who logins with this password can see those files?
  • Thank you for your interest in my item! Only users who have the link of your file-folder can see the files. The script doesn’t allow to list all files of all subdirectories you made except for the administrator who has to login to the admin panel. If that doesn’t suffice, you can still password protect every link with individual passwords to make sure that only users with these passwords can see the link.I hope this aswered your questions sufficiently. If not just let me know

Thanks for reading.

How to Customize the Genesis Footer

remove_action('genesis_footer', 'genesis_do_footer');
add_action('genesis_footer', 'eo_custom_footer');
function eo_custom_footer()
{
 echo '<p>';
 echo 'Copyright &copy; ';
 echo '2011 - ';
 echo date('Y');
 echo ' &middot; <a href="http://journeycoder.com">Journey Coder – Sharing To Success</a> &middot; All rights reserved';
 echo '</p></div>';
}

Custom Footer of Genesis, theme geneis

Show image from byte array in .net MVC

1. Code CSharp To do not show path image, you can encryt base 64 and display 2. Code HTML: Happy coding

Continue reading...

Download: The Practice – Lawyer, Legal Offices HTML Theme

Download: The Practice - Lawyer, Legal Offices HTML Theme

1. Introduction: WordPress theme The Practice is a responsive, clean and stark looking, lawyer HTML theme specifically designed and developed to meet the needs of attorneys, legal offices, consultancy firms and many others that need a corporate website. With a responsive layout and fluid grid, The Practice handles all devices and screen resolutions with ease. […]

Continue reading...

Download: HomeQuest – Real Estate HTML Theme

Download: HomeQuest - Real Estate HTML Theme

Introduction: WordPress theme HomeQuest Built to cater to real estate agencies, brokers and directories. With a responsive layout and fluid grid, HomeQuest  handles all devices and screen resolutions with ease. HomeQuest HTML has a pixel perfect design and a bunch of features that will make clients call again and again. We have also added some handy […]

Continue reading...

Download: Unite Gallery – Multipurpose JQuery Gallery

Download: Unite Gallery - Multipurpose JQuery Gallery

The Unite Gallery is multipurpose javascript gallery based on jquery library. It’s built with a modular technique with a lot of accent of ease of use and customization. It’s very easy to customize the gallery, changing it’s skin via css, and even writing your own theme. Features Unite Gallery – Multipurpose JQuery Gallery: Responsive – […]

Continue reading...

Download: HTML5 Flow Responsive Slider

HTML5 Flow Responsive Slider

1. Intro HTML5 Flow Responsive Slider The HTML5 Flow Responsive Slider has a flexible / fluid / responsive layout, it will adapt it’s size (width and height) based on the parent container (div or some other html tag) and every piece of the gallery will align and position accordingly, this basically mean that it can […]

Continue reading...

Download: jQuery Responsive Google Charts Plugin

download-jquery-responsive-google-charts-plugin

Responsive jQuery Google Charts Plugin Its now easier than ever to use Google charts in your website. No javascript knowledge or jQuery knowledge is required. Just html/javascript. Works anywhere. You can easily set up nice, SVG, responsive charts on your websites by setting a few HTML data- properties. Here’s all the HTML you need to set […]

Continue reading...