Search Results

Search found 229 results on 10 pages for 'anne gentle'.

Page 4/10 | < Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Table sorting & pagination with jQuery and Razor in ASP.NET MVC

    - by hajan
    Introduction jQuery enjoys living inside pages which are built on top of ASP.NET MVC Framework. The ASP.NET MVC is a place where things are organized very well and it is quite hard to make them dirty, especially because the pattern enforces you on purity (you can still make it dirty if you want so ;) ). We all know how easy is to build a HTML table with a header row, footer row and table rows showing some data. With ASP.NET MVC we can do this pretty easy, but, the result will be pure HTML table which only shows data, but does not includes sorting, pagination or some other advanced features that we were used to have in the ASP.NET WebForms GridView. Ok, there is the WebGrid MVC Helper, but what if we want to make something from pure table in our own clean style? In one of my recent projects, I’ve been using the jQuery tablesorter and tablesorter.pager plugins that go along. You don’t need to know jQuery to make this work… You need to know little CSS to create nice design for your table, but of course you can use mine from the demo… So, what you will see in this blog is how to attach this plugin to your pure html table and a div for pagination and make your table with advanced sorting and pagination features.   Demo Project Resources The resources I’m using for this demo project are shown in the following solution explorer window print screen: Content/images – folder that contains all the up/down arrow images, pagination buttons etc. You can freely replace them with your own, but keep the names the same if you don’t want to change anything in the CSS we will built later. Content/Site.css – The main css theme, where we will add the theme for our table too Controllers/HomeController.cs – The controller I’m using for this project Models/Person.cs – For this demo, I’m using Person.cs class Scripts – jquery-1.4.4.min.js, jquery.tablesorter.js, jquery.tablesorter.pager.js – required script to make the magic happens Views/Home/Index.cshtml – Index view (razor view engine) the other items are not important for the demo. ASP.NET MVC 1. Model In this demo I use only one Person class which defines Person entity with several properties. You can use your own model, maybe one which will access data from database or any other resource. Person.cs public class Person {     public string Name { get; set; }     public string Surname { get; set; }     public string Email { get; set; }     public int? Phone { get; set; }     public DateTime? DateAdded { get; set; }     public int? Age { get; set; }     public Person(string name, string surname, string email,         int? phone, DateTime? dateadded, int? age)     {         Name = name;         Surname = surname;         Email = email;         Phone = phone;         DateAdded = dateadded;         Age = age;     } } 2. View In our example, we have only one Index.chtml page where Razor View engine is used. Razor view engine is my favorite for ASP.NET MVC because it’s very intuitive, fluid and keeps your code clean. 3. Controller Since this is simple example with one page, we use one HomeController.cs where we have two methods, one of ActionResult type (Index) and another GetPeople() used to create and return list of people. HomeController.cs public class HomeController : Controller {     //     // GET: /Home/     public ActionResult Index()     {         ViewBag.People = GetPeople();         return View();     }     public List<Person> GetPeople()     {         List<Person> listPeople = new List<Person>();                  listPeople.Add(new Person("Hajan", "Selmani", "[email protected]", 070070070,DateTime.Now, 25));                     listPeople.Add(new Person("Straight", "Dean", "[email protected]", 123456789, DateTime.Now.AddDays(-5), 35));         listPeople.Add(new Person("Karsen", "Livia", "[email protected]", 46874651, DateTime.Now.AddDays(-2), 31));         listPeople.Add(new Person("Ringer", "Anne", "[email protected]", null, DateTime.Now, null));         listPeople.Add(new Person("O'Leary", "Michael", "[email protected]", 32424344, DateTime.Now, 44));         listPeople.Add(new Person("Gringlesby", "Anne", "[email protected]", null, DateTime.Now.AddDays(-9), 18));         listPeople.Add(new Person("Locksley", "Stearns", "[email protected]", 2135345, DateTime.Now, null));         listPeople.Add(new Person("DeFrance", "Michel", "[email protected]", 235325352, DateTime.Now.AddDays(-18), null));         listPeople.Add(new Person("White", "Johnson", null, null, DateTime.Now.AddDays(-22), 55));         listPeople.Add(new Person("Panteley", "Sylvia", null, 23233223, DateTime.Now.AddDays(-1), 32));         listPeople.Add(new Person("Blotchet-Halls", "Reginald", null, 323243423, DateTime.Now, 26));         listPeople.Add(new Person("Merr", "South", "[email protected]", 3232442, DateTime.Now.AddDays(-5), 85));         listPeople.Add(new Person("MacFeather", "Stearns", "[email protected]", null, DateTime.Now, null));         return listPeople;     } }   TABLE CSS/HTML DESIGN Now, lets start with the implementation. First of all, lets create the table structure and the main CSS. 1. HTML Structure @{     Layout = null;     } <!DOCTYPE html> <html> <head>     <title>ASP.NET & jQuery</title>     <!-- referencing styles, scripts and writing custom js scripts will go here --> </head> <body>     <div>         <table class="tablesorter">             <thead>                 <tr>                     <th> value </th>                 </tr>             </thead>             <tbody>                 <tr>                     <td>value</td>                 </tr>             </tbody>             <tfoot>                 <tr>                     <th> value </th>                 </tr>             </tfoot>         </table>         <div id="pager">                      </div>     </div> </body> </html> So, this is the main structure you need to create for each of your tables where you want to apply the functionality we will create. Of course the scripts are referenced once ;). As you see, our table has class tablesorter and also we have a div with id pager. In the next steps we will use both these to create the needed functionalities. The complete Index.cshtml coded to get the data from controller and display in the page is: <body>     <div>         <table class="tablesorter">             <thead>                 <tr>                     <th>Name</th>                     <th>Surname</th>                     <th>Email</th>                     <th>Phone</th>                     <th>Date Added</th>                 </tr>             </thead>             <tbody>                 @{                     foreach (var p in ViewBag.People)                     {                                 <tr>                         <td>@p.Name</td>                         <td>@p.Surname</td>                         <td>@p.Email</td>                         <td>@p.Phone</td>                         <td>@p.DateAdded</td>                     </tr>                     }                 }             </tbody>             <tfoot>                 <tr>                     <th>Name</th>                     <th>Surname</th>                     <th>Email</th>                     <th>Phone</th>                     <th>Date Added</th>                 </tr>             </tfoot>         </table>         <div id="pager" style="position: none;">             <form>             <img src="@Url.Content("~/Content/images/first.png")" class="first" />             <img src="@Url.Content("~/Content/images/prev.png")" class="prev" />             <input type="text" class="pagedisplay" />             <img src="@Url.Content("~/Content/images/next.png")" class="next" />             <img src="@Url.Content("~/Content/images/last.png")" class="last" />             <select class="pagesize">                 <option selected="selected" value="5">5</option>                 <option value="10">10</option>                 <option value="20">20</option>                 <option value="30">30</option>                 <option value="40">40</option>             </select>             </form>         </div>     </div> </body> So, mainly the structure is the same. I have added @Razor code to create table with data retrieved from the ViewBag.People which has been filled with data in the home controller. 2. CSS Design The CSS code I’ve created is: /* DEMO TABLE */ body {     font-size: 75%;     font-family: Verdana, Tahoma, Arial, "Helvetica Neue", Helvetica, Sans-Serif;     color: #232323;     background-color: #fff; } table { border-spacing:0; border:1px solid gray;} table.tablesorter thead tr .header {     background-image: url(images/bg.png);     background-repeat: no-repeat;     background-position: center right;     cursor: pointer; } table.tablesorter tbody td {     color: #3D3D3D;     padding: 4px;     background-color: #FFF;     vertical-align: top; } table.tablesorter tbody tr.odd td {     background-color:#F0F0F6; } table.tablesorter thead tr .headerSortUp {     background-image: url(images/asc.png); } table.tablesorter thead tr .headerSortDown {     background-image: url(images/desc.png); } table th { width:150px;            border:1px outset gray;            background-color:#3C78B5;            color:White;            cursor:pointer; } table thead th:hover { background-color:Yellow; color:Black;} table td { width:150px; border:1px solid gray;} PAGINATION AND SORTING Now, when everything is ready and we have the data, lets make pagination and sorting functionalities 1. jQuery Scripts referencing <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.tablesorter.pager.js")" type="text/javascript"></script> 2. jQuery Sorting and Pagination script   <script type="text/javascript">     $(function () {         $("table.tablesorter").tablesorter({ widthFixed: true, sortList: [[0, 0]] })         .tablesorterPager({ container: $("#pager"), size: $(".pagesize option:selected").val() });     }); </script> So, with only two lines of code, I’m using both tablesorter and tablesorterPager plugins, giving some options to both these. Options added: tablesorter - widthFixed: true – gives fixed width of the columns tablesorter - sortList[[0,0]] – An array of instructions for per-column sorting and direction in the format: [[columnIndex, sortDirection], ... ] where columnIndex is a zero-based index for your columns left-to-right and sortDirection is 0 for Ascending and 1 for Descending. A valid argument that sorts ascending first by column 1 and then column 2 looks like: [[0,0],[1,0]] (source: http://tablesorter.com/docs/) tablesorterPager – container: $(“#pager”) – tells the pager container, the div with id pager in our case. tablesorterPager – size: the default size of each page, where I get the default value selected, so if you put selected to any other of the options in your select list, you will have this number of rows as default per page for the table too. END RESULTS 1. Table once the page is loaded (default results per page is 5 and is automatically sorted by 1st column as sortList is specified) 2. Sorted by Phone Descending 3. Changed pagination to 10 items per page 4. Sorted by Phone and Name (use SHIFT to sort on multiple columns) 5. Sorted by Date Added 6. Page 3, 5 items per page   ADDITIONAL ENHANCEMENTS We can do additional enhancements to the table. We can make search for each column. I will cover this in one of my next blogs. Stay tuned. DEMO PROJECT You can download demo project source code from HERE.CONCLUSION Once you finish with the demo, run your page and open the source code. You will be amazed of the purity of your code.Working with pagination in client side can be very useful. One of the benefits is performance, but if you have thousands of rows in your tables, you will get opposite result when talking about performance. Hence, sometimes it is nice idea to make pagination on back-end. So, the compromise between both approaches would be best to combine both of them. I use at most up to 500 rows on client-side and once the user reach the last page, we can trigger ajax postback which can get the next 500 rows using server-side pagination of the same data. I would like to recommend the following blog post http://weblogs.asp.net/gunnarpeipman/archive/2010/09/14/returning-paged-results-from-repositories-using-pagedresult-lt-t-gt.aspx, which will help you understand how to return page results from repository. I hope this was helpful post for you. Wait for my next posts ;). Please do let me know your feedback. Best Regards, Hajan

    Read the article

  • How to Use an Xbox 360 Controller On Your Windows PC

    - by Jason Fitzpatrick
    The keyboard and mouse might be a good fit for many native computer games, but it feels downright weird to play emulated games that way. Whether you want to play Super Mario with a proper gamepad or try out a new PC title like Diablo III in comfort, we’ve got you covered. Today we’re taking a look at how you can take a Microsoft Xbox 360 controller and configure it to work with everything from your favorite emulators to old and new PC games. Whether you want the authentic feel of a controller in your hand when you play old school games or you’re looking for a gentle-on-the-wrists way to play modern games, it’s easy to set up. How to Use an Xbox 360 Controller On Your Windows PC Download the Official How-To Geek Trivia App for Windows 8 How to Banish Duplicate Photos with VisiPic

    Read the article

  • How can I enable Unity 3d after installing Bumblebee? GLX Problems

    - by ashley
    I'm new to Ubuntu, I'm running 12.04 64 Bit on a Dell XPS L207x with a Nvidia GT555M card. From what I could understand online I needed to install Bumblebee to get the most out of the Optimus system and better battery life. I can test the Bumblebee is working by running optirun glxgears for example. If I run just glxgears then I get the following error Error: couldn't get an RGB, Double-buffered visual. I'm also unable to run Unity 3d, which I would very much like. I'd greatly appreciate any and all help, please be gentle.

    Read the article

  • Visual Studio 2010 Parody

    Last week my acting career got off the ground (and likely burned and crashed just as quickly). You can check out my Visual Studio meets The Pink Panther-like a totally tongue in cheek video right here. be gentle :-) Tim Heuer even has some behind the scenes photos he may share. ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Literature in programming and computer science

    - by Peter Turner
    I hope, gentle programmers, that you'll forgive me for not asking a "Soft Question" on theoreticalCS.SE and asking this here. It has recently come to my attention that bigendian came from Jonathan Swift's Gulliver's Travels. I was pretty surprised when listening to the book on my commute to hear something I'd only heard before in Comp Sci / Engineering classes. I thought it was some sort of nouveau-politically incorrect piece of holdover jargon like Master and Slave drives or Polish Notation. Are there any other incidents, not of politically incorrect jargon, but of literature influencing aspects of computers, programming or software development?

    Read the article

  • PS3 controller on Sixad disbales Broadcom Bluetooth

    - by Craggles
    The recipe for breaking blue tooth is so far: Fresh install - blue tooth is happy install broadcom drivers for wifi Update to latest ubu install sixad run it once through and check ps3 controller is working. reboot Bluetooth is dead or if I disable blue-tooth before reboot it won't come back either. Latest stable Ubuntu - inbuilt bluetooth module. Hp Probook 6470b. UPDATE Running sixad via: sudo apt-add-repository ppa:falk-t-j/qtsixa sudo apt-get update sudo apt-get install sixad Then: sudo sixpair sixad --start And turning off bluetooth to disconnect the PS3 controller and ctrl c the terminal means bluetooth can't be reactivated. Even after a reboot. Help is appreciated! I'm very new to Ubuntu so be gentle. UPDATE 2 Reinstalling bluez, fixes it...

    Read the article

  • Unable to login following permission changes in device manager (11.10 + Gnome)

    - by Symanuk
    (Running Gnome 3 on Ubuntu 11.10) Everything working well (at least a couple of months), until recently when I changed the permissions through the device manager on the sda1 /2/ 3 drives, thinking it would save all the switching I seem to have to do between users in order to see / use files I previously copied across from an external drive. Now when I boot up the Ubuntu splash screen loads indefinitely, and if I go in through the GRUB / recover option, i'm getting a load of negative permission messages back (regardless of using the fsck or remount options) Either way = unusable machine (Laptop Dell Inspiron n5050), and no way through to login. I'm looking for: (1) a way back in so any help greatfully received (answers need to be pretty basic as i'm a novice), and (2) if i'm to learn anything, a decent thread on setting permissions within Ubuntu / Gnome 3. I'm new to both Ubuntu & Linux, so please be gentle!! Cheers

    Read the article

  • SQLBits will be full shortly

    - by simonsabin
    This really is a note to give people a gentle nudge. If you are thinking about coming to SQLBits then you need to register soon. We’ve never had to close registrations this early but it looks like we will be full my mid March. Some of the training days will be full before then. With the early bird rate ending at the end of February we could see SQLBits filling up even sooner. So if you want to come to SQLBits in Brighton in April. Make sure you register soon....(read more)

    Read the article

  • is requiring a video player download acceptable

    - by wantTheBest
    Our site currently is going to require our users to download a player to view videos they will want to view on our site. The videos get uploaded by users from various sources (smartphones in 3gp format for example). However most people have Flash on their machines. I am trying to 'make a gentle stand' and tell the team that requiring a download of a video player is not acceptable. My thinking is this: instead of allowing people to upload 3gp and other formats then re-serving the exact format on REQUESTs from our site's users we will instead use a video converter such as FFMpeg to convert every uploaded video to FLV for viewing on flash. so when a user requests to view one of the videos on our site -- boom they probably already have Flash installed so we just play the video in their Flash player. I feel serving up FLV flash video is best. Does it ring true that requiring, say, a 3gp player download just to view a video is the wrong approach?

    Read the article

  • Cant find one particular wireless network. Worked before, but sudenly stopt working.

    - by Haakon
    My first question here. My problem is: I cant find my wireless network at home. Situation: It worked fine 7 days ago. It works with a cable(wierd). I find the network on my ipad/phone. I can connect to wireless hotspot network form my phone and wireless at my university, and it works fine. I can connect to the network in windows What I have tried: Tried this Strange network issue; works on windows, but not on ubuntu, works on campus wireless, but not at home (removing resolve.conf). Hardware and software: I have a Broadcom card Use dual boot ubuntu 12.04 - windows 7 Things I did to make wireless work: blacklist brcmsmac blacklist bcma blacklist b43 blacklist ssb Can anyone help me? I'm about to kill myself(not literary)!! I'm not that good in linux so go gentle on me:)

    Read the article

  • Understanding and Using Parallelism in SQL Server

    SQL Server is able to make implicit use of parallelism to speed SQL queries. Quite how it does it, and how you can be sure that it is doing so, isn't entirely obvious to most of us. Paul White begins a series that makes it all seem simple, starting at the gentle level of counting Jelly Beans. Free trial of SQL Backup™“SQL Backup was able to cut down my backup time significantly AND achieved a 90% compression at the same time!” Joe Cheng. Download a free trial now.

    Read the article

  • is requiring a video player download acceptable

    - by wantTheBest
    Our site currently is going to require our users to download a player to view videos they will want to view on our site. The videos get uploaded by users from various sources (smartphones in 3gp format for example). However most people have Flash on their machines. I am trying to 'make a gentle stand' and tell the team that requiring a download of a video player is not acceptable. My thinking is this: instead of allowing people to upload 3gp and other formats then re-serving the exact format on REQUESTs from our site's users we will instead use a video converter such as FFMpeg to convert every uploaded video to FLV for viewing on flash. so when a user requests to view one of the videos on our site -- boom they probably already have Flash installed so we just play the video in their Flash player. I feel serving up FLV flash video is best. Does it ring true that requiring, say, a 3gp player download just to view a video is the wrong approach?

    Read the article

  • On Building a Data-Driven E-Commerce Site

    The following is a preprint of an article for the NDC Magazine to be published in Apri.   It had been a long, hard week at work. I had my feet up and was calling my long-distance girlfriend when she popped the question: “Do you know how to build web sites?”   That was about a month ago and, after swearing to her that I spent my days helping other people build their web sites, so I should oughta know a thing or two about how to build one for her. After some very gentle requirements...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • How to create Recent Documents History in C# in WPF Application

    - by Gagan
    I am making a WPF Application in C# where I need to show the recent documents history (just like it happens in word, excel and even visual studio), showing the list the last 5 or 10 documents opened. I have absolutely no idea as to how I should go about it. Please help. And please be kind and gentle...I am an amatuer coder, and it is tough to digest high-tech talks as of now! :)

    Read the article

  • Seeking a simultaneous fade and blur effect using JQuery or Javascript

    - by Heath Waller
    Can anyone think of a way to simulate the fade/blur flash effect used in the following website: http://www.frenchlaundry.com/ (image fades and blurs on hover, while text fades in simultaneously) using JQuery? I am looking to have this whole chain of effects happen on load or when the DOM is ready (instead of on hover). And by blur, I mean a gaussian-type of blur - possibly using Pixastic (?) I am really new at this, so please be gentle :) Thank you.

    Read the article

  • GQL how to select by UserProperty

    - by fmsf
    Hey I have this code but it doesn't work because it is expecting a string. How can I make it work? class Atable(BaseModel): owner = db.UserProperty() (...) --------- // -------------- query = "SELECT * FROM Atable WHERE owner=", users.get_current_user() results = db.GqlQuery(query) How can I fix that search? Thanks :) I've started with the appengine database yesterday so be gentle :)

    Read the article

  • GQL select by UserProperty

    - by fmsf
    Hey I have this code but it doesn't work because it is expecting a string. How can I make it work? class Atable(BaseModel): owner = db.UserProperty() (...) --------- // -------------- query = "SELECT * FROM Atable WHERE owner=", users.get_current_user() results = db.GqlQuery(query) How can I fix that search? Thanks :) I've started with the appengine database yesterday so be gentle :)

    Read the article

  • Regex, replace path to resource, modify resource name

    - by jerome
    Hi all, I'd like to use a JS regex to take a string such as the following: 'http://www.somedomain.com/some_directory/some_other_directory/some_image.jpg' And turn it into this: 'http://www.some_other_domain.com/another_directory/yet_another_directory/size1_some_image.jpg' Any hints? Additionally, any pointers for books or other resources that give a gentle introduction to mastering regexes in JS and other languages?

    Read the article

  • Programming introduction book

    - by Avi
    Hello there, I've offered an out-of-job girl to help her study programming (with an MCSD as the ultimate goal) - and she has no progrmming knowledge. The idea is that she'll study from books and I"ll help. Help- I need a gentle introduction to programming book, very easy, very practical, very hands-on and up to date. Optimally would be for the .Net 4.0 MS enviornment (C#,Visual Basic) but other alternaitves (Jave, Python etc.) are OK.

    Read the article

  • how to run g95 executable files in OS X terminal

    - by lollygagger
    I am completely new to this game, so please be gentle ;-) I made an example program in Fortran 90, lets call it 'program.f90'. I compile it: g95 program.f90 It creates an executable called a.out How do I run this? It is supposed to print something to the screen, and get input from me, but I cannot figure out how to!

    Read the article

  • Podcast Show Notes: Toronto Architect Day Panel Discussion

    - by Bob Rhubart
    The latest Oracle Technology Network ArchBeat Podcast features a four-part series recorded live during the panel discussion at OTN Architect Day in Tornonto, April 21, 2011. More than 100 people attended the event, and the audience tossed a lot of great questions at a terrific panel. Listen for yourself... Listen to Part 1 Panel introduction and a discussion of the typical characteristics of Cloud early-adopters. Listen to Part 2 (June 22) The panelists respond to an audience question about what happens when data in the Cloud crosses international borders. Listen to Part 3 (June 29) The panel discusses public versus private cloud as the best strategy for small or start-up businesses. Listen to Part 4 (July 6) The panel responds to an audience question about how cloud computing changes performance testing paradigms. The Architect Day panel includes (listed alphabetically): Dr. James Baty: Vice President, Oracle Global Enterprise Architecture Program [LinkedIn] Dave Chappelle: Enterprise Architect, Oracle Global Enterprise Architecture Program [LinkedIn] Timothy Davis: Director, Enterprise Architecture, Oracle Enterprise Solutions Group [LinkedIn] Michael Glas: Director, Enterprise Architecture, Oracle [LinkedIn] Bob Hensle: Director, Oracle [LinkedIn] Floyd Marinescu: Co-founder & Chief Editor of InfoQ.com and the QCon conferences [LinkedIn | Twitter | Homepage] Cary Millsap: Oracle ACE Director; Founder, President, and CEO at Method R Corporation [LinkedIn | Blog | Twitter] Coming Soon IASA CEO Paul Preiss talks about architecture as a profession. Thomas Erl and Anne Thomas Manes discuss their new book SOA Governance: Governing Shared Services On-Premise & in the Cloud A discussion of women in architecture Stay tuned: RSS

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10  | Next Page >