Search Results

Search found 446 results on 18 pages for 'sergio oliveira jr'.

Page 14/18 | < Previous Page | 10 11 12 13 14 15 16 17 18  | Next Page >

  • Where can an absolute beginner of Kohana PHP go to learn how to use it from the ground up?

    - by Sergio Tapia
    Hi guys! I have a month of free time and I've decided to launch my own website. It's going to be big and have dymanic content where different users with different roles can perform modifications to the site. Place comments, rate stores, list items, etc. This sound like a perfect opportunity for me to expand my horizons and learn a PHP Framework. I've used PHP bare bones before but nothing too complex. As of now, do you think Kohana is a mature framework to use? I've used Zend in the past for a course in Uni but it sucked horribly, I was new to the MVC model, but Zend had pretty much zero workable tutorials and guides for newbies. That's why I hated it. Where can I go to learn how to use Kohana from a retarded starting point? Thank you very much for your time.

    Read the article

  • How to apply images conditionally using entries and categories?

    - by Sergio Acosta
    Using version 2.5.3 of ExpressionEngine, I have a list of products displayed by category, but I need the premium products among this list being featured with a small star image. How do you call conditionally this little stars besides the {title}? At the moment this code shows stars for all products and that is not ideal. <ol class="voices-list"> {exp:channel:entries channel="product" orderby="title" sort="asc" category="2&6" dynamic="no"} <li><a href="{page_url}">{title}<img class="feature_icon medium" src="{root_url}img/audio/smallstar.png" alt="star"></a></li> {/exp:channel:entries} </ol> I need your help, please.

    Read the article

  • How can I check if a user has written his username and password correctly?

    - by Sergio Tapia
    I'm using a Linq-to-SQL class called Scans.dbml. In that class I've dragged a table called Users (username, password, role) onto the graphic area and now I can access User object via a UserRepository class: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Scanner.Classes { public class UserRepository { private ScansDataContext db = new ScansDataContext(); public User getUser(string username) { return db.Users.SingleOrDefault(x => x.username == username); } public bool exists(string username) { } } } Now in my Login form, I want to use this Linq-to-SQL goodness to do all the data related activities. UserRepository users = new UserRepository(); private void btnLogin_Click(object sender, EventArgs e) { loginToSystem(); } private void loginToSystem() { if (users.getUser(txtUsername.Text)) { } //If txtUsername exists && User.password == Salt(txtPassword) //then Show.MainForm() with User.accountType in constructor to set permissions. } I need help with verifying that a user exists && that that users.password is equal to SALT(txtpassword.text). Any guidance please?

    Read the article

  • 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

  • Why is this variable declared as private and also readonly?

    - by Sergio Tapia
    In the following code: public class MovieRepository : IMovieRepository { private readonly IHtmlDownloader _downloader; public MovieRepository(IHtmlDownloader downloader) { _downloader = downloader; } public Movie FindMovieById(string id) { var idUri = ...build URI...; var html = _downloader.DownloadHtml(idUri); return ...parse ID HTML...; } public Movie FindMovieByTitle(string title) { var titleUri = ...build URI...; var html = _downloader.DownloadHtml(titleUri); return ...parse title HTML...; } } I asked for something to review my code, and someone suggested this approach. My question is why is the IHtmlDownloader variable readonly?

    Read the article

  • How can I create a small relational database in MySQL?

    - by Sergio Tapia
    I need to make a small database in MySQL that has two tables. Clothes and ClotheType Clothes has: ID, Name, Color, Brand, Price, ClotheTypeID ClotheType has: ID, Description In Microsoft SQL it would be: create table Clothes( id int, primary key(id), name varchar(200), color varchar(200), brand varchar(200), price varchar(200), clothetypeid int, foreign key clothetypeid references ClotheType(id) ) I need this in MySQL.

    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

  • 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

  • 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

  • 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

< Previous Page | 10 11 12 13 14 15 16 17 18  | Next Page >