Search Results

Search found 303 results on 13 pages for 'sergio romero'.

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

  • How to select the first element of a set with JSTL?

    - by Sergio del Amo
    I managed to do it with the next code but there must be an easier way. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <c:if test="${fn:length(attachments) > 0}"> <c:forEach var="attachment" items="${attachments}" varStatus="loopCount"> <c:if test="${loopCount.count eq 1}"> attachment.id </c:if> </c:forEach> </c:if>

    Read the article

  • Access denied when trying to access my database.

    - by Sergio Tapia
    Here's my code: <html> <head> </head> <body> <?php $user = mysql_real_escape_string($_GET["u"]); $pass = mysql_real_escape_string($_GET["p"]); $query = "SELECT * FROM usario WHERE username = '$user' AND password = '$pass'"; mysql_connect(localhost, "root", ""); @mysql_select_db("multas") or die( "Unable to select database"); $result=mysql_query($query); if(mysql_numrows($result) > 0){ echo 'si'; } ?> </body> </html> And here's the error I get when I try to run it Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\useraccess.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\xampp\htdocs\useraccess.php on line 7 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\xampp\htdocs\useraccess.php on line 8 Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in C:\xampp\htdocs\useraccess.php on line 8 Warning: mysql_numrows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\useraccess.php on line 16

    Read the article

  • Jquery and PHP rating function problem

    - by Sergio
    I know that I was already posted similar question but I just can't find the answer and figure it out how to solve this problem. I'm trying to customize Jquery Star Rating plugin (link text) but I do not know what to do to show the message based on response of PHP script. Jquery script successfully send rating data to PHP scripts that query the database and based on that echo message of proper or improper rating. What should I add to an existing JS code so I can get echo from PHP and base on that write a message on some DIV beside rating star? Jquery: $('#gal').rating('gl.php?gal_no=<?=$gal_no;?>&id=<?=$id;?>', {maxvalue:10,increment:.5, curvalue: <?=$cur;?>}); Simplified PHP code: $br=mysql_query("SELECT count(gal) as total FROM ...") if ... { echo '0'; } else echo '1'; } Jquery code successfully transmitted data to PHP script and when the PHP done with checking data echo the result ('1' or '0'). How can I get this PHP result back to Jquery and based on them write a message? Something like: if(data=="1") { $("#error").show("fast").html('not correct').css({'background-color':'#F5F5F5','border-color' : '#F69'}); }else{ $("#error").show("fast").html('correct').css({'background-color' : '#FFF','border-color' : '#3b5998'}); } If someone has an idea...I would appreciate it.

    Read the article

  • What is the best way to handle my softwares licenses?

    - by Sergio Tapia
    By best I mean more time tested, easier to implement and easier for the users to work with. I do not want my licensing crap to interfere with their work. I was thinking of launching a WCF service that check with my license DB if it's a valid license and if it is, send a True. If the returned response is False, then shut down the program after telling them to fix their license. Do you think this is a good way to handle it?

    Read the article

  • Remove trailing slash from comment form

    - by Sergio Vargott
    and i really need a code to remove the ending slash when a user put their link. for example i need them to put their url to grab their avatar, but in some cases they put their url ending with a slash (.com/) how can i remove that slash automatically? because when they put their url like that the avatar doesn't show i need them to end like this (.com) in order to show their avatar. I was looking for a remove trailing slash php code, but any solution will be appreciated. i tried to use this code but didn't work $string = rtrim($string, '/');

    Read the article

  • How can I use multiple Datatables on my CrystalReport?

    - by Sergio Tapia
    I have a dataset that connects with three databases. How can I attach my Crystalreport viewer so all three are included? protected void Page_Load(object sender, EventArgs e) { ReportDocument X = new ReportDocument(); DataTable DTable = new DataTable(); DataSet1TableAdapters.TableAdapterManager ????? = new WebApplication1.DataSet1TableAdapters.TableAdapterManager(); DTable = ???????? string ubicacion = Server.MapPath("crystalReport1.rpt"); X.Load(ubicacion); X.SetDataSource(DTable); CrystalReportViewer1.ReportSource = X; }

    Read the article

  • Why is this variables 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

  • I'm trying to grasp the concept of creating a program that uses a SQL Server database, but I'm used

    - by Sergio Tapia
    How can I make a program use a SQL Server database, and have that program work on whatever computer it's installed on. If you've been following my string of questions today, you'd know that I'm making an open source and free Help Desk suite for small and medium businesses. The client application. The client application is a Windows Forms app. On installation and first launch on every client machine, it'll ask for the address of the main Help Desk server. The server. Here I plan to handle all incoming help requests, show them to the IT guys, and provide WCF services for the Client application to consume. My dilemma lies in that, I know how to make the program run on my local machine; but I'm really stumped on how to make this work for everyone who wants to download and install the server bit on their Windows Server. Would I have to make an SQL Script and have it run on the MS SQL server when a user wants to install the 'server' application? Many thanks to all for your valuable time and effort to teach me. It's really really appreciated. :) Edit: To clarify, each business will have their server completely separate from me. I will have no access whatsoever to them nor will they be in any way connected to me. (I don't know why I should clarify this :P ) So, assuming the have ABSOLUTELY NO DATABASE SERVER installed; what can I do?

    Read the article

  • SQL join to grab data from same table via intermediate table

    - by Sergio
    Hi Could someone help me with building the following query. I have a table called Sites, and one called Site_H. The two are joined by a foreign key relationship on page_id. So the Sites table contains pages, and the Site_H table shows which pages any given page is a child of by having another foreign key relation back to the site table with a column called ParentOf. So, a page can be have another page as a parent. Other data is stored in the Site_H table such as position etc, hence why it is separated out. I would like a query that returns the details of a page along with the details of its parent page. I just cant quite think about how to structure the SQL. Thanks

    Read the article

  • Getting a cryptic error on my simple Java program, comparing char[i] to a string.

    - by Sergio Tapia
    public static void ejemplosString(String palabra){ char[] letras = palabra.toCharArray(); int contadorVocales = 0; for (int i = 0; i < letras.length; i++) { if (char[i] == 'a') { contadorVocales++; } if (char[i] == "e") { contadorVocales++; } if (char[i] == "i") { contadorVocales++; } if (char[i] == "o") { contadorVocales++; } if (char[i] == "u") { contadorVocales++; } } } Getting the error on every If statement. Any guidance?

    Read the article

  • Java Script in Rails 3.1 works only in certain parts. Any idea why?

    - by Sergio Nekora
    This might seem a bit weird, but since I am new in RoR and cannot find any similar questions I thought you might know. The situation is that JavaScript does not work throughout my whole site. For instance. For the sake of checking, I place a link with an alert function in the footer. It did not work at the beginning, it felt like the JS was disabled(but it wasn't). But eventually it worked. Now it works in most the pages but it does not work in one that there is also an 'autocomplete' field. Of course, this autocomplete field does not work either. That could lead you to think that there is something wrong with the autocomplete code. However this same code is working in the sidebar. Any ideas why? Could it have anything to do with the fact that one day my assets folder appeared empty? After installing the gmaps4rails gem I realized that all my Js and CSS files were gone from my assests folder. Ok, it might have happened long before and I just realized at that point. I don't really know. Here in the root you can see that the 'Hola sip' click at the button works. here it works However, here same link does not trigger the alert function. here it doesn't

    Read the article

  • Jquery load DIV inside another DIV at same page

    - by Sergio
    HTML: <div class="someclass" rel="first">text 1</div> <div class="someclass" rel="second">text 2</div></div></div> <div class="info_ly">here is some text</div> <div class="first" > the first DIV </div> <div class="second" > the second DIV </div> CSS: .first{ display:none} .second{ display:none} Jquery: $(".someclass").click(function() { $(".info_ly").html($(this).attr('rel')); }); I want to call and load the "rel" DIV inside "info_ly" DIV. With this Jquery code I get only text "first" or "second" inside "info_ly" DIV. How can I load the DIV with the class "first" or DIV with the class "second" inside "info_ly" DIV?

    Read the article

  • What is the best type to use for returning an image in my C# library project?

    - by Sergio Tapia
    I'm making a project that will scrap information about a movie and return all sorts of goodies. This will be a .dll that other developers will use in their projects. For example, if they want to set a pictureBox image to the movies poster, what would be the best way to handle my library returning the image? //Set the image to The Matrix poster. pictureBox1.Image = MyLibrary.GetPoster("The Matrix"); Should I return an Image? A Byte[] array?

    Read the article

  • Need some suggestions on my softwares architecture. [Code review]

    - by Sergio Tapia
    I'm making an open source C# library for other developers to use. My key concern is ease of use. This means using intuitive names, intuitive method usage and such. This is the first time I've done something with other people in mind, so I'm really concerned about the quality of the architecture. Plus, I wouldn't mind learning a thing or two. :) I have three classes: Downloader, Parser and Movie I was thinking that it would be best to only expose the Movie class of my library and have Downloader and Parser remain hidden from invocation. Ultimately, I see my library being used like this. using FreeIMDB; public void Test() { var MyMovie = Movie.FindMovie("The Matrix"); //Now MyMovie would have all it's fields set and ready for the big show. } Can you review how I'm planning this, and point out any wrong judgement calls I've made and where I could improve. Remember, my main concern is ease of use. Movie.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Drawing; namespace FreeIMDB { public class Movie { public Image Poster { get; set; } public string Title { get; set; } public DateTime ReleaseDate { get; set; } public string Rating { get; set; } public string Director { get; set; } public List<string> Writers { get; set; } public List<string> Genres { get; set; } public string Tagline { get; set; } public string Plot { get; set; } public List<string> Cast { get; set; } public string Runtime { get; set; } public string Country { get; set; } public string Language { get; set; } public Movie FindMovie(string Title) { Movie film = new Movie(); Parser parser = Parser.FromMovieTitle(Title); film.Poster = parser.Poster(); film.Title = parser.Title(); film.ReleaseDate = parser.ReleaseDate(); //And so an so forth. } public Movie FindKnownMovie(string ID) { Movie film = new Movie(); Parser parser = Parser.FromMovieID(ID); film.Poster = parser.Poster(); film.Title = parser.Title(); film.ReleaseDate = parser.ReleaseDate(); //And so an so forth. } } } Parser.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using HtmlAgilityPack; namespace FreeIMDB { /// <summary> /// Provides a simple, and intuitive way for searching for movies and actors on IMDB. /// </summary> class Parser { private Downloader downloader = new Downloader(); private HtmlDocument Page; #region "Page Loader Events" private Parser() { } public static Parser FromMovieTitle(string MovieTitle) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindMovie(MovieTitle); return newParser; } public static Parser FromActorName(string ActorName) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindActor(ActorName); return newParser; } public static Parser FromMovieID(string MovieID) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindKnownMovie(MovieID); return newParser; } public static Parser FromActorID(string ActorID) { var newParser = new Parser(); newParser.Page = newParser.downloader.FindKnownActor(ActorID); return newParser; } #endregion #region "Page Parsing Methods" public string Poster() { //Logic to scrape the Poster URL from the Page element of this. return null; } public string Title() { return null; } public DateTime ReleaseDate() { return null; } #endregion } } ----------------------------------------------- Do you guys think I'm heading towards a good path, or am I setting myself up for a world of hurt later on? My original thought was to separate the downloading, the parsing and the actual populating to easily have an extensible library. Imagine if one day the website changed its HTML, I would then only have to modifiy the parsing class without touching the Downloader.cs or Movie.cs class. Thanks for reading and for helping!

    Read the article

  • Nested joins hide table names

    - by Sergio
    Hi: I have three tables: Suppliers, Parts and Types. I need to join all of them while discriminating columns with the same name (say, "id") in the three tables. I would like to successfully run this query: CREATE VIEW Everything AS SELECT Suppliers.name as supplier, Parts.id, Parts.description, Types.typedesc as type FROM Suppliers JOIN (Parts JOIN Types ON Parts.type_id = Types.id) ON Suppliers.id = Parts.supplier_id; My DBMS (sqlite) complains that "there is not such a column (Parts.id)". I guess it forgets table names once the JOIN is done but then how can I refer to the column id that belongs to the table Parts?

    Read the article

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