Search Results

Search found 18 results on 1 pages for 'contactmatt'.

Page 1/1 | 1 

  • Computer Science Fundamentals - Recommended books

    - by contactmatt
    Hey, I'm looking to see if anyone can recommend any books in fundamentals of computer science. I obtained my associates degree as a programmer/analyst a couple years ago and I know a good amount about programming on the .NET framework. I'm even certified on the .NET 4 framework as a web application developer. However, since I was only able to obtain my associates degree, I was deprived at my college on the low-level basics and operations of computers and basic computer science information. I'm really interesting in learning about the low-level operations of a computer and in programming (bytes, bits, memory management, etc.) Can anyone recommend any good computer science books for someone who is decently experienced in programming? Thank You

    Read the article

  • .NET C# : Image Conversion from Bitmap to Icon doesn't seem to work

    - by contactmatt
    I have a simple function that takes a bitmap, and converts the bitmap to an ICON format. Below is the function. (I placed literal values in place of the variables) Bitmap tempBmp = new Bitmap(@"C:\temp\mypicture.jpeg"); Bitmap bmp = new Bitmap(tempBmp, 16, 16); bmp.Save("@C:\temp\mypicture2.ico", ImageFormat.Icon) It doesn't seem to be converting correctly...or so I think. After the image is converted, some browsers do not reconigze the image as a true "ICON" , and even Visual Studio 2008 doesn't reconigze the image as an icon after its converted to an Icon format. For example, I was going to set the Icon property for my Win32 form app with the Icon i just converted. I open the dialouge box and select the icon I just converted and get the following error. -- "Argument 'picture' must be a picture that can be used as a Icon." I've browsed the web and come across complicated code where people take the time to manually convert the bitmap to different formats, but I would think the above code should work, and that the .NET framework would take care of this conversion.

    Read the article

  • Collection was modified; enumeration operation may not execute - why?

    - by contactmatt
    I'm enumerating over a collection that implements IList, and during the enumeration I am modifying the collection. I get the error, "Collection was modified; enumeration operation may not execute." I want to know why this error occurs when modifying a item in the collection during iteration. I've already converted my foreach loop to a for loop, but I want to know the 'details' on why this error occurs.

    Read the article

  • Image Conversion from Bitmap to Icon doesn't seem to work

    - by contactmatt
    I have a simple function that takes a bitmap, and converts the bitmap to an ICON format. Below is the function. (I placed literal values in place of the variables) Bitmap tempBmp = new Bitmap(@"C:\temp\mypicture.jpeg"); Bitmap bmp = new Bitmap(tempBmp, 16, 16); bmp.Save("@C:\temp\mypicture2.ico", ImageFormat.Icon) It doesn't seem to be converting correctly...or so I think. After the image is converted, some browsers do not reconigze the image as a true "ICON" , and even Visual Studio 2008 doesn't reconigze the image as an icon after its converted to an Icon format. For example, I was going to set the Icon property for my Win32 form app with the Icon i just converted. I open the dialouge box and select the icon I just converted and get the following error. -- "Argument 'picture' must be a picture that can be used as a Icon." I've browsed the web and come across complicated code where people take the time to manually convert the bitmap to different formats, but I would think the above code should work, and that the .NET framework would take care of this conversion.

    Read the article

  • Is using the .NET Image Conversion enough?

    - by contactmatt
    I've seen a lot of people try to code their own image conversion techniques. It often seems to be very complicated, and ends up using GDI+ function calls, and manipulating bits of the image. This has got me wondering if I am missing something in the simplicity of .NET's image conversion call when saving an image. Here's the code I have: Bitmap tempBmp = new Bitmap("c:\temp\img.jpg"); Bitmap bmp = new Bitmap(tempBmp, 800, 600); bmp.Save(c:\temp\img.bmp, //extension depends on format ImageFormat.Bmp) //These are all the ImageFormats I allow conversion to within the program. Ignore the syntax for a second ;) ImageFormat.Gif) //or ImageFormat.Jpeg) //or ImageFormat.Png) //or ImageFormat.Tiff) //or ImageFormat.Wmf) //or ImageFormat.Bmp)//or ); This is all I'm doing in my image conversion. Just setting the location of where the image should be saved, and passing it an ImageFormat type. I've tested it the best I can, but I'm wondering if I am missing anything in this simple format conversion, or if this is sufficient?

    Read the article

  • Asp.net Login Status Question: It Aint Working

    - by contactmatt
    I'm starting to use Role Management in my website, and I'm current following along on the tutorial from http://www.asp.net/Learn/Security/tutorial-02-vb.aspx . I'm having a problem with the asp:LoginStatus control. It is not telling me that I am currently logged in after a successful login. This can't be true because after successfully logging in, my LoggedInTemplate is shown. The username and passwords are simply stored in a array. Heres the Login.aspx page code. Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) _ Handles btnLogin.Click ' Three valid username/password pairs: Scott/password, Jisun/password, and Sam/password. Dim users() As String = {"Scott", "Jisun", "Sam"} Dim passwords() As String = {"password", "password", "password"} For i As Integer = 0 To users.Length - 1 Dim validUsername As Boolean = (String.Compare(txtUserName.Text, users(i), True) = 0) Dim validPassword As Boolean = (String.Compare(txtPassword.Text, passwords(i), False) = 0) If validUsername AndAlso validPassword Then FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, chkRemember.Checked) End If Next ' If we reach here, the user's credentials were invalid lblInvalid.Visible = True End Sub Here is the content place holder on the master page specifically designed to hold Login Information. On successfull login, the page is redirected to '/Default.aspx', and the LoggedIn Template below is shown...but the status says Log In. <asp:ContentPlaceHolder Id="LoginContent" runat="server"> <asp:LoginView ID="LoginView1" runat="server"> <LoggedInTemplate> Welcome back, <asp:LoginName ID="LoginName1" runat="server" />. </LoggedInTemplate> <AnonymousTemplate> Hello, stranger. </AnonymousTemplate> </asp:LoginView> <br /> <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Logout.aspx" /> </asp:ContentPlaceHolder> Forms authentication is enabled. I'm not sure what to do about this :o.

    Read the article

  • C# Calendar Object on top

    - by contactmatt
    Hi programming some C# in a form with a bunch of group boxes. I have a two Calendar controls that when called upon, are partially invisible due to surrounding group boxes. this.grp_TransactionDetails.Controls.Add(this.cal_Ctrl); this.grp_TransactionDetails.Controls.Add(this.cal_Batch); Any ideas? (I wish there was a z-index property)

    Read the article

  • .NET : Targeting the runtime

    - by contactmatt
    I'm starting to read in-depth on the .NET framework, and its Common Language Runtime. I'm reading a .NET overview by Microsoft and I'm not sure what is meant by this statement. Code that targets the runtime is known as managed code, while code that does not target the runtime is known as unmanaged code. How do you target the Common Language Runtime? I know its defaulted when developing in Visual Studio, but how would you specifically target the CLR? What code when developing a .NET application wouldn't target the CLR, and thereby be called unmanaged code?

    Read the article

  • Log4net Logging Problem : Very simple file appender logging not working

    - by contactmatt
    Here's my web.config information <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/> </configSections> <log4net> <root> <level value="ALL" /> </root> <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="c:\temp\log-file.txt" /> <appendToFile value="true" /> <rollingStyle value="Size" /> <maxSizeRollBackups value="10" /> <maximumFileSize value="1MB" /> <staticLogFileName value="true" /> <layout type="log4net.Layout.SimpleLayout" /> </appender> </log4net> ... Here's the code that initalizes the logger protected void SendMessage() { log4net.Config.XmlConfigurator.Configure(); ILog log = LogManager.GetLogger(typeof(Contact)); ... log.Info("here we go!"); log.Debug("debug afasf"); ... } it doesn't work, no matter what I seem to do. I am referencing the 'log4net.dll' correctly, and by debugging the application i can see that the log object is getting initiated properly. This is a asp.net 3.5 framework web project. Any ideas/suggestions? I thought originally this error may be due to a file write permission constraint, but that doesn't seem to be the case (or so I think).

    Read the article

  • .NET WPF Application : Loading a resourced .XPS document

    - by contactmatt
    I'm trying to load a .xps document into a DocumentViewer object in my WPF application. Everything works fine, except when I try loading a resourced .xps document. I am able to load the .xps document fine when using an absolute path, but when I try loading a resourced document it throws a "DirectoryNotFoundException" Here's an example of my code that loads the document. using System.Windows.Xps.Packaging; private void Window_Loaded(object sender, RoutedEventArgs e) { //Absolute Path works (below) //var xpsDocument = new XpsDocument(@"C:\Users\..\Visual Studio 2008\Projects\MyProject\MyProject\Docs\MyDocument.xps", FileAccess.Read); //Resource Path doesn't work (below) var xpsDocument = new XpsDocument(@"\MyProject;component/Docs/Mydocument.xps", FileAccess.Read); DocumentViewer.Document = xpsDocument.GetFixedDocumentSequence(); } When the DirectoryNotFoundException is thrown, it says "Could not find a part of the path : 'C:\MyProject;component\Docs\MyDocument.xps' It appears that it is trying to grab the .xps document from that path, as if it were an actual path on the computer, and not trying to grab from the .xps that is stored as a resource within the application.

    Read the article

  • C# .NET : Is using the .NET Image Conversion enough?

    - by contactmatt
    I've seen a lot of people try to code their own image conversion techniques. It often seems to be very complicated, and ends up using GDI+ funciton calls, and manipulating bits of the image. This has got me wondering if I am missing something in the simplicity of .NET's image conversion call when saving an image. Here's the code I have Bitmap tempBmp = new Bitmap("c:\temp\img.jpg"); Bitmap bmp = new Bitmap(tempBmp, 800, 600); bmp.Save(c:\temp\img.bmp, //extension depends on format ImageFormat.Bmp) //These are all the ImageFormats I allow conversion to within the program. Ignore the syntax for a second ;) ImageFormat.Gif) //or ImageFormat.Jpeg) //or ImageFormat.Png) //or ImageFormat.Tiff) //or ImageFormat.Wmf) //or ImageFormat.Bmp)//or ); This is all I'm doing in my image conversion. Just setting the location of where the image should be saved, and passing it an ImageFormat type. I've tested it the best I can, but I'm wondering if I am missing anything in this simple format conversion, or if this is suffice?

    Read the article

  • C#; storing a short date in a DateTime object

    - by contactmatt
    I'm trying to store a shortened date (mm/dd/yyyy) into a DateTime object. The following code below is what I am currently trying to do; this includes the time (12:00:00 AM) which I do not want :( DateTime goodDateHolder = Convert.ToDateTime(DateTime.Now.ToShortDateString()); Result will be 10/19/2009 12:00:00 AM

    Read the article

  • SQL Query Syntax : Using table alias in a count is invalid? Why?

    - by contactmatt
    Could someone please explain to me why the following query is invalid? I'm running this query against an Oracle 10g database. select count(test.*) from my_table test; I get the following error: ORA-01747: invalid user.table.column, table.column, or column specification however, the following two queries are valid. select count(test.column) from my_table test; select test.* from my_table test;

    Read the article

  • Design Patterns: What is a type

    - by contactmatt
    A very basic question, but after reading the "Design Patterns: Elements of reusable OO Software" book, I'm a little confused. The book states, "An object's type only refers to its interface-the set of request to which it can respond. An object can have many types, and objects of different classes can have the same type." Could someone please better explain what a Type is? I also don't understand how one object can have multiple types...unless the book is speaking of polymorphism....

    Read the article

  • Programming Definitions: What exactly is 'Building'.

    - by contactmatt
    What does it mean to BUILD a solution/project/program? I want to make sure I have my definitions correct (so I don't sound like a idiot when conversing). In IDE's, you can (correct me if I'm wrong) compile source-code/programming-code into computer-readable machine code. You can debug a program, which is basically stepping through the program and looking for errors. But what exactly doe's building a program do? In VS im aware that when you build a program it produces a executable file in a debug folder. Any hard-core tech definitions of what it means to BUILD a program?

    Read the article

  • ASP.NET Application Level vs. Session Level and Global.asax...confused

    - by contactmatt
    The following text is from the book I'm reading, 'MCTS Self-Paced Training Kit (Exam 70-515) Web Applications Development with ASP.NET 4". It gives the rundown of the Application Life Cycle. A user first makes a request for a page in your site. The request is routed to the processing pipeline, which forwards it to the ASP.NET runtime. The ASP.NET runtime creates an instance of the ApplicationManager class; this class instance represents the .NET framework domain that will be used to execute requests for your application. An application domain isolates global variables from other applications and allows each application to load and unload separately, as required. After the application domain has been created, an instance of the HostingEnvironment class is created. This class provides access to items inside the hosting environment, such as directory folders. ASP.NET creates instances of the core objects that will be used to process the request. This includes HttpContext, HttpRequest, and HttpResponse objects. ASP.NET creates an instance of the HttpApplication class (or an instance is reused). This class is also the base class for a site’s Global.asax file. You can use this class to trap events that happen when your application starts or stops. When ASP.NET creates an instance of HttpApplication, it also creates the modules configured for the application, such as the SessionStateModule. Finally, ASP.NET processes request through the HttpApplication pipleline. This pipeline also includes a set of events for validating requests, mapping URLs, accessing the cache, and more. The book then demonstrated an example of using the Global.asax file: <script runat="server"> void Application_Start(object sender, EventArgs e) { Application["UsersOnline"] = 0; } void Session_Start(object sender, EventArgs e) { Application.Lock(); Application["UsersOnline"] = (int)Application["UsersOnline"] + 1; Application.UnLock(); } void Session_End(object sender, EventArgs e) { Application.Lock(); Application["UsersOnline"] = (int)Application["UsersOnline"] - 1; Application.UnLock(); } </script> When does an application start? Whats the difference between session and application level? I'm rather confused on how this is managed. I thought that Application level classes "sat on top of" an AppDomain object, and the AppDomain contained information specific to that Session for that user. Could someone please explain how IIS manages Applicaiton level classes, and how an HttpApplication class sits under an AppDomain? Anything is appreciated.

    Read the article

  • Design Patterns : Question about "Types"

    - by contactmatt
    Would someone please explain to me what the below paragraph means? This is a snippet from "Design Patterns: Elements of Reusable OO software" Part of an object's interface may be characterized by one type, and other parts by other types. Two objects of the same type need only share parts of their interfaces. Interfaces can contain other interfaces as subsets. - Design Patterns - Elements of Reusable OO software, pg 13

    Read the article

  • Entity Framework - Store parent reference on child relationship (one -> many)

    - by contactmatt
    I have a setup like this: [Table("tablename...")] public class Branch { public Branch() { Users = new List<User>(); } [Key] public int Id { get; set; } public string Name { get; set; } public List<User> Users { get; set; } } [Table("tablename...")] public class User { [Key] public int Id {get; set; } public string Username { get; set; } public string Password { get; set; } [ForeignKey("ParentBranch")] public int? ParentBranchId { get; set; } // Is this possible? public Branch ParentBranch { get; set; } // ??? } Is it possible for the User to know what parent branch it belongs to? The code above is not working. Entity Framework version 5.0 .NET 4.0 c#

    Read the article

1