Search Results

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

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

  • I'm capturing keys on my WinForm but I'm trying to see if the pressed key is a 'String' - getting an

    - by Sergio Tapia
    Here's my code: void gkh_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == neededLetter as Keys) { if (neededLetter == "n") { neededLetter = "o"; } else if (neededLetter == "o") { neededLetter = "t"; } else if (neededLetter == "t") { neededLetter = "e"; } else if (neededLetter == "e") { this.Show(); } } else { neededLetter = "n"; } } I'm getting an error on the first If block: The as operator must be used with a reference type or nullable type

    Read the article

  • How to check if FORM Realm authentication failed?

    - by Sergio del Amo
    I use FORM Authentication. <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/loginPage.jsp</form-login-page> <form-error-page>/loginPage.jsp</form-error-page> </form-login-config> </login-config> I would like to use the same JSP for my form-login-page and form-error-page, for sake of code reuse. I use a Realm ( org.apache.catalina.realm.JDBCRealm ). In my JSP, I would like to display error messages if the authentication failed. Does Realm store anything in the request, which I could check?

    Read the article

  • Will this safely delete my record?

    - by Sergio Tapia
    I hate these three tables that. Two tables have a many to many relationship and as such it generates a third table. I'm using Linq-to-SQL and in the .dbml file I've dragged all the folder there to the graphic surface. Here is the method I'm using to delete an Area safely. Remember that documents are associated to an Area, so I can't just delete it and leave documents hanging. ScansDataContext db = new ScansDataContext(); /// <summary> /// Deletes an Area object from the database along with all associations in the database. /// </summary> /// <param name="area">Area object to save</param> public void Delete(Area area) { db.DocumentAreaRelations.DeleteAllOnSubmit(area.DocumentAreaRelations); db.Areas.DeleteOnSubmit(area); db.SubmitChanges(System.Data.Linq.ConflictMode.FailOnFirstConflict); }

    Read the article

  • xml with special character, encoding utf-8

    - by Sergio Morieca
    I have a few simple questions, because I got confused reading all difference responses. 1) If I have an xml with prolog: and I'm going to unmarshall it with Java (for example: JaXB). I suppose, that I can't put CROSS OF LORRAINE (http://www.fileformat.info/info/unicode/char/2628/index.htm) inside, but I can put "\u2628", correct? 2) I've also heard that UTF-8 doesn't contain it, but anything in Unicode can be saved with encoding UTF-8 (or UTF-16), and here is an example from this page: UTF-8 (hex) 0xE2 0x98 0xA8 (e298a8) Is my reasoning correct? Can I use this form and put it in the xml with utf-8 encoding?

    Read the article

  • Is this the 'Pythonic' way of doing things?

    - by Sergio Tapia
    This is my first effort on solving the exercise. I gotta say, I'm kind of liking Python. :D # D. verbing # Given a string, if its length is at least 3, # add 'ing' to its end. # Unless it already ends in 'ing', in which case # add 'ly' instead. # If the string length is less than 3, leave it unchanged. # Return the resulting string. def verbing(s): if len(s) >= 3: if s[-3:] == "ing": s += "ly" else: s += "ing" return s else: return s # +++your code here+++ return What do you think I could improve on here?

    Read the article

  • Pythonic way of adding "ly" to end of string if it ends in "ing"?

    - by Sergio Tapia
    This is my first effort on solving the exercise. I gotta say, I'm kind of liking Python. :D # D. verbing # Given a string, if its length is at least 3, # add 'ing' to its end. # Unless it already ends in 'ing', in which case # add 'ly' instead. # If the string length is less than 3, leave it unchanged. # Return the resulting string. def verbing(s): if len(s) >= 3: if s[-3:] == "ing": s += "ly" else: s += "ing" return s else: return s # +++your code here+++ return What do you think I could improve on here?

    Read the article

  • Can't find solution for CSS vertical align for Firefox

    - by Sergio
    I have a problem with DIV vertical align in Firefox The HTML code is: <div class="mess"><div class="rpl"><img src="img/16.png" width="16" height="16" border="0"></div><div class="pic"><img src="img/1.png" width="100" height="100" border="0"></div></div> The CSS looks like: .mess{ float:left; width:658px; border-top:1px solid #CCC;padding-top:5px; } .rpl{ position: relative;width:19px; float:left;top: 20%;display: table-cell; vertical- align: middle; padding-top:20px; } .pic{width:100px; float:left; padding-bottom:5px;margin-right:10px; } I'm trying to put "rpl" DIV at the vertical middle of the "mess" DIV. In IE it looks fine but I can't get it right in Firefox (always at the top of the "mess" div) I tried with display: inline,display: table-cell for "rpl" DIV but with no effect in FF. Is there any solution for vertical align for DIV in FF?

    Read the article

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

    - by Sergio Tapia
    How can I make a program use a MS SQL server, 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. :)

    Read the article

  • Using a Linq-To-SQL class automagically generates the connection string for me; is there a way to ma

    - by Sergio Tapia
    I'm just beginning to use Linq-to-SQL and it's just wonderful to use. The problem is, this software is going to be run on a lot of machines and each machine will have a unique connection string. Is there a way for me to manually set the connection the Linq-to-SQL (.dbml) uses? The way I'm doing things now is creating the .dbml file, and in the graphic designer I'm dragging tables from the Server Explorer to the white board of the .dbml.

    Read the article

  • Retrieve Grid Id on CellEdit JqGrid

    - by Sergio
    Hi guys, i was trying to do a Cell Editing based on this documentation http://www.trirand.com/jqgridwiki/doku.php?id=wiki:cell_editing I have two questions: How can i get the Index of my row posted to the server: The information i'm getting posted is the following: a) value of the cell b) RowId The thing is that the rowId doesn't help me. I need the actual Id of the information I'm displaying so i can do the server update with that Id. colNames: ['Id', 'Codigo', 'Nombre'], colModel: [ { name: 'Id', index: 'Id', width: 50, align: 'left', hidden: true }, { name: 'Codigo', index: 'Codigo', width: 55, align: 'left', editable: true, editrules: { number: true} }, { name: 'Nombre', index: 'Nombre', width: 200, align: 'left' }], I need the value of the column 'Id' to do my update. 2.I don't understand in the documentation how to manage an error from the server, so I can display the error message. Thank you very much! Notes: a) I've already asked in the forum of trirand, but no one reply it to me. b) If anyone has done this, it would help if help me pasting the code. c) I'm working on MVC 2 Asp.net

    Read the article

  • How to detect a click outside an element?

    - by Sergio del Amo
    I have some html menus, which i show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus area. Is something like this possible with jquery? $("#menuscontainer").clickOutsideThisElement(function() { // hide the menus });

    Read the article

  • Jquery and PHP function

    - by Sergio
    How can I this PHP function include in jquery .html? PHP function: function trim_text($string, $limit, $break="<", $pad=" ...") { $words = explode(' ', htmlentities(strip_tags($string))); $countr = count($words); if ($countr <= 8) { return $string; }else{ // return with no change if string is shorter than $limit if(strlen($string) <= $limit) return $string; $string = substr($string, 0, $limit); if(false !== ($breakpoint = strpos($string, $break, $limit))) { if($breakpoint < strlen($string) - 1) { $string = substr($string, 0, $breakpoint) . $pad; } } $last_space = strrpos(substr($string, 0, $limit), ' '); $string = substr($string, 0, $last_space); $string = strip_tags($string); return $string.$pad; } } And the Jquery part of code where I want to in ".html" part somehow call this function is: $(" .text").html('<div>'+ message +'</div>'); What I want to do is trim this "message" text using PHP function. Is it possible?

    Read the article

  • How do I respond to a specific sequence of key presses?

    - by Sergio Tapia
    The end result is very simple, I have to have something happen when a user types in the letter "n" "o" "t" "e" in that order. 'Note' is the word. I'm making a little application for a friend that will help him take notes, and I want my application to become visible when he types in "note" from anywhere on the machine. Here's what I've got so far: if (e.KeyCode == neededLetter as Keys) { neededLetter = "o"; } I initialize the neededLetter variable with "N" but I'm stuck there. Any help?

    Read the article

  • Trouble with this Python newbie exercise. Using Lists and finding if two adjacent elements are the s

    - by Sergio Tapia
    Here's what I got: # D. Given a list of numbers, return a list where # all adjacent == elements have been reduced to a single element, # so [1, 2, 2, 3] returns [1, 2, 3]. You may create a new list or # modify the passed in list. def remove_adjacent(nums): for number in nums: numberHolder = number # +++your code here+++ return I'm kind of stuck here. What can I do?

    Read the article

  • Mysql query problem

    - by Sergio
    I have a problem with (for me to complicated) MySql query. Okay, here is what I need to do: First I need to check messages that some specific user received $mid=$_SESSION['user']; $stat1=mysql_query("SELECT id, fromid, toid, subject FROM messages WHERE toid = '".$mid."' AND subject != 'not readed' GROUP BY fromid ") or die(mysql_error()); while ($h = mysql_fetch_array($stat1)) { $whosend=$h['fromid']; Second thing that I need to do is check the status of the users (deleted or not) who sent the messages ("fromid") to my specific user ("toid"). This I must do from another table: $stat2=mysql_query("SELECT id, status FROM members WHERE id='".$whosend."' AND status ='1'")or die(mysql_error()); while ($s = mysql_fetch_array($stat)) { Then my problems begin to show up. How can I get the number of the users who sent messages to my specific user with status =1? Not the number of the messages but the total number of the users who sent them. Is there any easier way to do this query? I tried with join tables like $stat=mysql_query("SELECT memebers.id, memebers.status, messages.toid, messages.fromid,messages.subject,messages.id FROM members, messages WHERE messages.toid='".$mid."' AND members.status ='7' .... But even in this query I need to have id's of the user who sent messages before this query so there will be another query before this join tables.

    Read the article

  • Controlled execution of computationally expensive tasks

    - by Sergio
    Say you have an application where a user is typing some text and as she types you'd want to perform some expensive computations in the background (related to the text that is being typed). Although you would like to do lots of things, your main priority is that the system responsiveness stay at acceptable levels so the user doesn't notice such a heavy load. Is there a way (ideally platform/language independent) to control what algorithms should be executed in the background based on the system load and responsiveness?

    Read the article

  • I can't set a border around my StackPanel. Any help?

    - by Sergio Tapia
    Here's my XAML code: <Window x:Class="CarFinder.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Search for cars in TuMomo" Height="480" Width="600"> <DockPanel Margin="8"> <Border CornerRadius="6" BorderBrush="Gray" Background="LightGray" BorderThickness="2" Padding="8"> <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="25"> <TextBlock FontSize="14" Padding="0 0 8 0"> Search: </TextBlock> <TextBox x:Name="txtSearchTerm" Width="400" /> <Image Source="/CarFinder;component/Images/Chrysanthemum.jpg" /> </StackPanel> </Border> <StackPanel Orientation="Horizontal" DockPanel.Dock="Top" Height="25"> </StackPanel> </DockPanel> </Window> The border is set around the entire window. And also, when I create another StackPanel it's added to the right of my previous StackPanel instead of being added under it. What's the reason for this?

    Read the article

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