Search Results

Search found 288 results on 12 pages for 'sergio tapia'.

Page 4/12 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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

  • Trouble using the ref keyword. Very newbie question!

    - by Sergio Tapia
    Here's my class: public class UserInformation { public string Username { get; set; } public string ComputerName { get; set; } public string Workgroup { get; set; } public string OperatingSystem { get; set; } public string Processor { get; set; } public string RAM { get; set; } public string IPAddress { get; set; } public UserInformation GetUserInformation() { var CompleteInformation = new UserInformation(); GetPersonalDetails(ref CompleteInformation); GetMachineDetails(ref CompleteInformation); return CompleteInformation; } private void GetPersonalDetails(ref UserInformation CompleteInformation) { } private void GetMachineDetails(ref UserInformation CompleteInformation) { } } I'm under the impression that the ref keyword tells the computer to use the same variable and not create a new one. Am I using it correctly? Do I have to use ref on both the calling code line and the actual method implementation?

    Read the article

  • How could I parse this HTML file?

    - by Sergio Tapia
    <div id="main"> <style type="text/css"> </style> <script language="JavaScript"> </script> <p style="margin: 0pt 0pt 0.5em;"><b>Media from&nbsp;<a onclick="(new Image()).src='/rg/find-media-title/media_strip/images/b.gif?link=/title/tt0087538/';" href="/title/tt0087538/">The Karate Kid</a> (1984)</b></p> <style type="text/css"> </style> <table style="border-collapse: collapse;"> </table> </div> I need to somehow extract the href value of the (new Image()). How exactly would I accomplish this with HtmlAgilityPack? I'm new to it, and so far I haven't found a useful tutorial on how to effectively use it for parsing. Thanks for the help!

    Read the article

  • Kind of stumped with some basic C# constructors.

    - by Sergio Tapia
    public class Parser { Downloader download = new Downloader(); HtmlDocument Page; public Parser(string MovieTitle) { Page = download.FindMovie(MovieTitle); } public Parser(string ActorName) { Page = download.FindActor(ActorName); } } I want to create a constructor that will allow other developers who use this library to easily create a Parser object with the relevant HtmlDocument already loaded as soon as it's done creating it. The problem lies in that a constructor cannot exist twice with the same type of parameters. Sure I can tell the logical difference between the two paramters, but the computer can't. Any suggestions on how to handle this? Thank you!

    Read the article

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