Search Results

Search found 284 results on 12 pages for 'sergio leunissen'.

Page 10/12 | < Previous Page | 6 7 8 9 10 11 12  | Next Page >

  • Jquery delay problem

    - by Sergio
    Why this delay of Jquery animation does not work as it should be? $(" .inner").stop().delay(1000).animate({height:'142px'},{queue:false, duration:600}); Is there any other way to delay this animation?

    Read the article

  • Problem with CSS DIV align

    - by Sergio
    If the doctype declaration is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> what is the best way for horizontal alignment of the DIV's like these: <div id="outer"><div id="inner">Some text</div></div> The CSS is: #outer{ border-top:1px dotted #999; background-color: #F4F4F4; width:100%;} #inner{ width:500px;border:1px solid #F00; margin:auto;} The thing that I want to do is the inner DIV align at center (horizontally) inside the outer DIV. This CSS working fine if the doctype declaration is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Read the article

  • Design review - do you think I'm doing this the right way? First commercial project for me!

    - by Sergio Tapia
    I'm tasked with designing an application that will allow a person to scan a legal document, save that associated with a Name and save it to a database. Now, inside of the Organization, there are many departments, and each department can have many sub departments. Problem lies in that some larger organizations will have many departments and smallers ones will only have 1 or two. I've though about creating a Department table and a Supdepartment table to create associations, etc. That way it's extensible and users can dynamically create departments to fit my program to their organizational scheme. Am I approaching this the right way? As I said, this is my first commercial application so I want to do it right and set a name for myself for delivering things on time and good code for other to expand upon.

    Read the article

  • What is the recommended way to handle different user roles in a C# application?

    - by Sergio Tapia
    I'm going to make a small application for a business that will be used locally for scanning, and storing documents in a database located on the local machine or on a machine located in the same LAN. I could create a table called Users with username and password and according to the usertype ID show a form, or another form. But I'm more interested in the recommended approach by seasoned programmers. Any advice?

    Read the article

  • Mysql two table query

    - by Sergio
    I'm using two tables. First (friendlist), which contains users who are on the list of friends and the other table (members) that contains the basic data of the users. Friendlist looks like: id | myid | date | user ----------------------------------------- 001 | 50624 | 2010-01-01 | 32009 002 | 41009 | 2010-05-05 | 50624 003 | 50624 | 2010-03-02 | 23007 The column "myid" contains members who added other users (those from column "user") to their frindlist. I want to get the list of all users that I have added to list and those who add me to their friendlist. In this example, if my id is 50624, the list would look like: | allfriends | --------------- 32009 41009 23007 Then I need to check all users from "allfriend" list with data from the table "members". I want to get only the users with status 1. The members table looks like: id | status | photo -------------------------------- 32009 | 0 | 1.jpg 41009 | 1 | 2.jpg 23007 | 1 | 3.jpg How this mysql query should look like? Thanks for any help.

    Read the article

  • How does this If conditional work in Python?

    - by Sergio Boombastic
    from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): user = users.get_current_user() if user: self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, ' + user.nickname()) else: self.redirect(users.create_login_url(self.request.uri)) application = webapp.WSGIApplication( [('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main() I don't understand how this line works: if user: self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, ' + user.nickname()) else: self.redirect(users.create_login_url(self.request.uri)) I'm guessing the users.get_current_user() return a boolean? Then, if that is the case how can it get a .nickname() method? Thanks for the guidance.

    Read the article

  • Good Git repository viewer for Mac

    - by Sergio Acosta
    Can anyone recommend a good repository viewer for Git, similar to gitk, that works on Mac OS X Leopard? (I'm not saying gitk doesn't work) Of course I would like a native Mac application, but as I haven't found any, what are the best options to gitk? I know about gitview, but I'm looking forward to evaluate as many alternatives as possible. http://sourceforge.net/projects/gitview

    Read the article

  • Invalid syntax in this simple Python application.

    - by Sergio Boombastic
    Getting an invalid syntax when creating the template_value variable: class MainPage(webapp.RequestHandler): def get(self): blogPosts_query = BlogPost.all().order('-postDate') blogPosts = blogPosts_query.fetch(10) if users.get_current_user(): url = users.create_logout_url(self.request.uri) url_linktext = 'Logout' else: url = url = users.create_login_url(self.request.uri) url_linktext = 'Login' template_value = ( 'blogPosts': blogPosts, 'url': url, 'url_linktext': url_linktext, ) path = os.path.join(os.path.dirname(__file__), 'index.html') self.response.out.write(template.render(path, template_values)) The error fires specifically on the 'blogPosts': blogPosts line. What am I doing wrong? Thanks!

    Read the article

  • How can I bind a simple Javascript array to an MVC3 controller action method?

    - by Sergio Tapia
    Here is the javascript code I use to create the array and send it on it's way: <script type="text/javascript" language="javascript"> $(document).ready(function () { $("#update-cart-btn").click(function() { var items = []; $(".item").each(function () { var productKey = $(this).find("input[name='item.ProductId']").val(); var productQuantity = $(this).find("input[type='text']").val(); items[productKey] = productQuantity; }); $.ajax({ type: "POST", url: "@Url.Action("UpdateCart", "Cart")", data: items, success: function () { alert("Successfully updated your cart!"); } }); }); }); </script> The items object is properly constructed with the values I need. What data type must my object be on the backend of my controller? I tried this but the variable remains null and is not bound. [Authorize] [HttpPost] public ActionResult UpdateCart(object[] items) // items remains null. { // Some magic here. return RedirectToAction("Index"); }

    Read the article

  • Calculating a total cost in Python

    - by Sérgio Lourenço
    I'm trying to create a trip planner in python, but after I defined all the functions I'm not able to call and calculate them in the last function tripCost(). In tripCost, I want to put the days and travel destination (city) and the program runs the functions and gives me the exact result of all the 3 functions previously defined. Code: def hotelCost(): days = raw_input ("How many nights will you stay at the hotel?") total = 140 * int(days) print "The total cost is",total,"dollars" def planeRideCost(): city = raw_input ("Wich city will you travel to\n") if city == 'Charlotte': return "The cost is 183$" elif city == 'Tampa': return "The cost is 220$" elif city == 'Pittsburgh': return "The cost is 222$" elif city == 'Los Angeles': return "The cost is 475$" else: return "That's not a valid destination" def rentalCarCost(): rental_days = raw_input ("How many days will you rent the car\n") discount_3 = 40 * int(rental_days) * 0.2 discount_7 = 40 * int(rental_days) * 0.5 total_rent3 = 40 * int(rental_days) - discount_3 total_rent7 = 40 * int(rental_days) - discount_7 cost_day = 40 * int(rental_days) if int(rental_days) >= 3: print "The total cost is", total_rent3, "dollars" elif int(rental_days) >= 7: print "The total cost is", total_rent7, "dollars" else: print "The total cost is", cost_day, "dollars" def tripCost(): travel_city = raw_input ("What's our destination\n") days_travel = raw_input ("\nHow many days will you stay\n") total_trip_cost = hotelCost(int(day_travel)) + planeRideCost (str(travel_city)) + rentalCost (int(days_travel)) return "The total cost with the trip is", total_trip_cost tripCost()

    Read the article

  • Mysql query - problem with order by

    - by Sergio
    I'm using two tables for selecting messages between users. Table "messages" for recording the messages and table "members" for checking users data (are they activ or deleted). This query working fine. What I need to do is list the received messsages order by last received. I tried to do with "ORDER BY messages.id DESC" at the end of this query but it didn't work. All messages are listed from first received. This is the mysql join table query that I'm using: sql = "select distinct messages.fromid, messages.readed, messages.fromid, messages.toid, members.id as pid From messages Inner Join members on members.id = messages.fromid Where messages.toid = ".$mid." AND members.status = 7 AND messages.kreaded !='1' AND messages.subject != 'readed' GROUP BY fromid" Is there any way to do this?

    Read the article

  • How can I merge two lists and sort them working in 'linear' time?

    - by Sergio Tapia
    I have this, and it works: # E. Given two lists sorted in increasing order, create and return a merged # list of all the elements in sorted order. You may modify the passed in lists. # Ideally, the solution should work in "linear" time, making a single # pass of both lists. def linear_merge(list1, list2): finalList = [] for item in list1: finalList.append(item) for item in list2: finalList.append(item) finalList.sort() return finalList # +++your code here+++ return But, I'd really like to learn this stuff well. :) What does 'linear' time mean?

    Read the article

  • ASP.NET MVC: Is is possible to set a global variable?

    - by Sergio
    Hello, I have a process within my MVC 2 application that takes a large amount of time and alters many rows in the database in the process. There is a chance that two or more users could attempt to perform this action at the same time, which would lead to undesirable effects. Is there a way to set a global flag somewhere within asp.net that I can check against all requests to see if the action in question is currently being executed? (a bit that I flip prior to running query, and then then flip back on completition) Or is there a better way of handling this situation? Thanks

    Read the article

  • Could someone explain hash tag usage for deeplinking ajax applications?

    - by Sergio
    Hi There, I am currently trying to full appreciate how and when to use hash tags in urls when building an ajax powered website. There seems to be a distinct lack of reading material on the web regarding this technique and as such I don't feel like I've got a good handle on it. Could someone explain in the simplest terms how the hash tag can be used in urls to enable things like loading pages via ajax. Thanks

    Read the article

  • How can I push a string from one client connected to a WCF service to another connected as well?

    - by Sergio Tapia
    Here's what I have so far: IService: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; namespace ServiceLibrary { [ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IServiceCallback))] public interface IService { [OperationContract(IsOneWay = false, IsInitiating = true, IsTerminating = false)] void Join(string userName); } interface IServiceCallback { [OperationContract(IsOneWay = true)] void UserJoined(string senderName); } } Service: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ServiceModel; namespace ServiceLibrary { [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)] public class Service:IService { IServiceCallback callback = null; public void Join(string userName) { callback = OperationContext.Current.GetCallbackChannel<IServiceCallback>(); } } } Just a simple string passed from one client to another.

    Read the article

< Previous Page | 6 7 8 9 10 11 12  | Next Page >