archive-ro.com » RO » A » ALEXPETA.RO

Total: 36

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Create a Selfexpanding Textarea using Javascript
    sizes in Firefox vs IE As the textarea element doesnt self expand the question I ve asked myself was what html tag element is self exapading vertically when filled with text Why not have the text fill a div element and transfer its size to the textarea So lets get started with the code first we have the some CSS big wrap background color EDEFF4 border bottom 1px solid E5EAF1 margin top 2px padding 5px 5px 4px fontStyle direction ltr font family lucida grande tahoma verdana arial sans serif font size 11px text align left Test left 9999px position absolute height auto width auto font family lucida grande tahoma verdana arial sans serif font size 11px comm width 340px border 1px solid BDC7D8 height 13px padding 3px overflow hidden resize none word wrap break word white space pre wrap z index 2 btn background color 5B74A8 border 0 none color White cursor pointer display block font weight bold padding 3px 8px highlighter width 340px white space pre wrap word wrap break word position absolute color trasparent z index 1 border 1px solid 003 visibility hidden padding 3px margin 1px Here we have defied some styles to resemble the facebook interface Next is the HTML table cellpadding 0 cellspacing 0 align center tbody tr td div style class fontStyle id highlighter name highlighter div div class big wrap div class wrap textarea id comm class fontStyle onkeypress enlarge this event onkeyup enlarge this event onkeydown enlarge this event onblur enlarge this event onfocus enlarge this event textarea input class mentionsHidden type hidden autocomplete off name add comment text value div div td tr tr td style height 20px padding top 2px align right input type submit class btn id btnAddComm value Add Comment name btnAddComm td tr tr td style height

    Original URL path: http://www.alexpeta.ro/blog/post/create-a-selfexpanding-textarea-using-javascript (2016-05-01)
    Open archived version from archive


  • Adding Gravatar To An ASP MVC Project
    this without having to save images for every user I wanted this feature on this blog and i had to write today this in my ASP MVC project so lets get coding public static class Gravatar public enum GRProtocol Normal http www gravatar com avatar Secure https www gravatar com avatar public enum GRSize xs20 s 20 s40 s 40 m80 s 80 l160 s 160 xl200 s 200 public enum GRDefault MysteryMan d mm IdentIcon d identicon MonsterId d monsterid WaveAtar d wavatar Retro d retro public static string GetGravatarLink string email GRProtocol protocol GRSize size GRDefault defaultAvatar string theEmail email Trim ToLower MD5 md5Hasher MD5 Create byte data md5Hasher ComputeHash Encoding Default GetBytes theEmail StringBuilder sBuilder new StringBuilder add the procol switch protocol case GRProtocol Normal sBuilder Append http www gravatar com avatar break case GRProtocol Secure sBuilder Append https www gravatar com avatar break Loop through each byte of the hashed data and format each one as a hexadecimal string for int i 0 i data Length i sBuilder Append data i ToString x2 sBuilder Append add the size switch size case GRSize xs20 sBuilder Append s 20 break case GRSize s40 sBuilder Append s 40 break case GRSize m80 sBuilder Append s 80 break case GRSize l160 sBuilder Append s 160 break case GRSize xl200 sBuilder Append s 200 break add the default gravatar when email is not on gravatar switch defaultAvatar case GRDefault MysteryMan sBuilder Append d mm break case GRDefault IdentIcon sBuilder Append d identicon break case GRDefault MonsterId sBuilder Append d monsterid break case GRDefault WaveAtar sBuilder Append d wavatar break case GRDefault Retro sBuilder Append d retro break Return the gravatar link return sBuilder ToString As you can see the end result represents a Gravatar url that will be specified in and

    Original URL path: http://www.alexpeta.ro/blog/post/adding-gravatar-to--an-asp-mvc-project (2016-05-01)
    Open archived version from archive

  • The Blog Is Live
    doing so is coding my own small scale blog CMS As you can probably tell im kind of a designely challenged person if i can say so and because i can t afford buying a good blog design right now i ve googled some free templates filtered them out and chose this black greenish one I ve left the credits and the footer intact and i dont claim this as

    Original URL path: http://www.alexpeta.ro/blog/post/the-blog-is-live (2016-05-01)
    Open archived version from archive

  • My First Article
    2011 Copyright from Bing images Prairie smoke blossoms  Jim Brandenburg Minden Pictures Its good to be on the blogosphere I ve been waiting for this moment for quite some time over two years now and its finally good to be virtually present I ve allways wanted to be apart of the online family although im sure that one day the excitement will fade away So enough for the first

    Original URL path: http://www.alexpeta.ro/blog/post/my-first-article (2016-05-01)
    Open archived version from archive



  •