Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

Albu Marius

@Albu Marius
About
Posts
51
Topics
11
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multiple log4net files.
    A Albu Marius

    Solved.

    BasicConfigurator.Configure(generalLogAppender);

    had to be called after the appender was attached to the logger.

    I am fighting against the Universe... Reference-Rick Cook

    C# help learning

  • Multiple log4net files.
    A Albu Marius

    I have a problem regarding multiple log files. In my project i have a GeneralLog (singleton instance) that is configured from the app.config of the application.

    		the file where to write the events<-->
    		
    		the lowest level a message must reach in order to get written in the log file<-->
    		
    		a value indicating that every message is appended to the log file<-->
    		
    		
    		
    		the message layout<-->
    

    This works. During the execution I create alot more (dynamically) log files from appenders defined like this:

            FileAppender generalLogAppender = new FileAppender();
            //Initialize the properties of the appender
            generalLogAppender.Name = generalLogFileName;
            generalLogAppender.File = "Log+"+ fileName + ".dat";
            generalLogAppender.AppendToFile = true;
            generalLogAppender.Threshold = Level.Warn;
            PatternLayout layout2 = new PatternLayout();
            layout2.ConversionPattern = "\[%d\] - %m%n";
            layout2.ActivateOptions();
            generalLogAppender.ActivateOptions();
            BasicConfigurator.Configure(generalLogAppender);
    

    The files are created, but nothing is written in them, only in the GeneralLog. I am really confused by this. I checked the net and of course CodeProject and found only static examples of logs, never a mixed case.

    I am fighting against the Universe... Reference-Rick Cook

    C# help learning

  • conferencing
    A Albu Marius

    If you look for audio conferencing use Ventrilo or Teamspeak (usually MMO gamer tools, but very good).

    I am fighting against the Universe... Reference-Rick Cook

    The Lounge question

  • Good pissed off music...
    A Albu Marius

    Yep...Really nice for a darn 'good' day like this. Just wasted 3-4 hours of configuring a database when an idiot restored a backup over it... without making a backup of the original. O...happy times.

    I am fighting against the Universe... Reference-Rick Cook

    The Lounge com question

  • Good pissed off music...
    A Albu Marius

    Try Deicide - Stench of Redemption :P or anything from Dying Fetus. Really cheers me up :)

    I am fighting against the Universe... Reference-Rick Cook

    The Lounge com question

  • File & FileInfo
    A Albu Marius

    Try this : http://www.codeproject.com/cs/files/detailedfileinfo.asp

    I am fighting against the Universe... Reference-Rick Cook

    C# question

  • Visual Studio 2005 Standard Edition
    A Albu Marius

    The Express Edition is not a trial edition. Its free .(and = 0).

    I am fighting against the Universe... Reference-Rick Cook

    C# csharp visual-studio algorithms question announcement

  • how can i send emails automatically in asp.net using C# code
    A Albu Marius

    I have used this approach in a project of mine . I created a windows service and by default this will give you 2 event handlers : OnStart & OnStop. In the OnStart you could do something like this :

        protected override void OnStart(string\[\] args)
        {
            //a handle for the Elapsed event 
            Alarm.Elapsed += new ElapsedEventHandler(OnElapsedTime);
            //set the interval between 2 consecutive Elapsed events
            Alarm.Interval = SETINTERVAL; // a constant equal to 60000 ms
            //enabling the timer
            Alarm.Enabled = true;
        }
    

    The "alarm" object is an instance of System.Timers.Timer class. In the OnElapsedTime event you can check to see if the time has come to send the mails and call the appropiate method. As for the MailMessage class and how to use it I suggest using Google for the answer.

    I am fighting against the Universe... Reference-Rick Cook

    C# csharp asp-net help question

  • how can i send emails automatically in asp.net using C# code
    A Albu Marius

    Use a service (windows or web) with a timer. When the timer reaches the particular time needed send the emails by using the System.Net.Mail.MailMessage class.

    I am fighting against the Universe... Reference-Rick Cook

    C# csharp asp-net help question

  • Memory pairing
    A Albu Marius

    The motherboards slots are colored in 2 colors (blue-blue-black-black), so probably the example that you suggested (1GB-1GB-512MB-512MB) is the correct one.

    I am fighting against the Universe... Reference-Rick Cook

    Hardware & Devices performance question

  • Memory pairing
    A Albu Marius

    I have 4 slots and the 4 sticks of memory are paired (TWIN...)Is this a correct placement: 1GB-512MB-1GB-512MB? I have read on another forum that I should make some changes in BIOS for the best performance. Is this true?

    I am fighting against the Universe... Reference-Rick Cook

    Hardware & Devices performance question

  • Memory pairing
    A Albu Marius

    I have 2x512 MB of memory at a latency of 5-5-5-12. The question is can I add 2x1024 of the same latency and speed (800 MHZ) without damaging the system?

    I am fighting against the Universe... Reference-Rick Cook

    Hardware & Devices performance question

  • Windows Explorer and Folders containing video
    A Albu Marius

    Problem solved : I have installed the latest codec pack (KLite) and it works, although I don't see the connection, probably a backround worker made the explorer crash.

    I am fighting against the Universe... Reference-Rick Cook

    System Admin question

  • Windows Explorer and Folders containing video
    A Albu Marius

    This happens for all folders containing any kind of video.

    I am fighting against the Universe... Reference-Rick Cook

    System Admin question

  • Windows Explorer and Folders containing video
    A Albu Marius

    It doesn't matter which type of view I use and the videos don't seem to be corrupt.

    I am fighting against the Universe... Reference-Rick Cook

    System Admin question

  • Windows Explorer and Folders containing video
    A Albu Marius

    Does anybody have an idea why the explorer crashes every single time I enter a folder containing videos (any format *.avi, *.mpeg , etc)? It's pretty annoying and makes simple tasks very hard to do.

    I am fighting against the Universe... Reference-Rick Cook

    System Admin question

  • Performance issue
    A Albu Marius

    Thank you for your advice. Your explanations cleared this issue for me.

    I am fighting against the Universe... Reference-Rick Cook

    Database performance database question help

  • Performance issue
    A Albu Marius

    I'm sorry, I should have been more specific in my post. The situation : 2 selects (not very large)each returning about 3000 records . One select is saved in a temporary table (#tmpSomething) and the other one is joined with the first and the result is outputed (duration - few miliseconds). I was advised to never use temporary tables because of the performance issues. I know this is the case of @ tables which store all the data in memory and for a large number of records (tens of thousands) the SQL Server hangs for a time before returning the result. But my problem is why can 't I use # table (which are stored on disk)? Is the impact to performance so big due to the I/O operations? As I said I was advised to always use a select contained in the bigger select instead of temporary tables. This seems to me as a bad practice because this way the SQL code if pretty hard to understand and I'm not sure this resolves the performance issues. If someone can shed some light on this dilema of mine , please do.

    I am fighting against the Universe... Reference-Rick Cook

    Database performance database question help

  • Performance issue
    A Albu Marius

    What is the best way to write an SQL stored procedure: by using temporary tables (e.g #tmpSomething or @tmpSomething) or by using multiple selects? How is this affecting the speed of execution and the memory usage? Thank you in advance.

    I am fighting against the Universe... Reference-Rick Cook

    Database performance database question help

  • Can we seperate the functions in different files?
    A Albu Marius

    As a best practice it is advised to refractor functions that do similar things in different classes. That way you avoid having problem with too much code in the same .cs file. In my case I choose to have at most 400 lines of code in a class.

    I am fighting against the Universe... Reference-Rick Cook

    C# question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups