Search Results

Search found 246 results on 10 pages for 'gabriel diaconescu'.

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

  • Tips on a tool to measure code quality?

    - by Cristi Diaconescu
    I'm looking for a tool that can provide code quality metrics. For instance it could report very long functions (spaghetti code) very complex classes (which could contain do-it-all code) ... While we're on the (subjective:-) subject of code quality, what other code metrics would you suggest? I'm targetting C#/.NET code, but I'm sure this could extend to most programming languages.

    Read the article

  • C# FileStream position is off after calling ReadLine()

    - by Cristi Diaconescu
    I'm trying to read a (small-ish) file in chunks of a few lines at a time, and I need to return to the beginning of particular chunks. The problem is, after the very first call to streamReader.ReadLine(); the streamReader.BaseStream.Position property is set to the end of the file! Now I assume some caching is done in the backstage, but I was expecting this property to reflect the number of bytes that I used from that file. For instance, calling ReadLine() again will (naturally) return the next line in the file, which does not start at the position previously reported by streamReader.BaseStream.Position. My question is, how can I find the actual position where the 1st line ends, so I can return there later? I can only think of manually doing the bookkeeping, by adding the lengths of the strings returned by ReadLine(), but even here there are a couple of caveats: ReadLine() strips the new-line character(s) which may have a variable length (is is '\n' ? is it "\r\n" ? etc) I'm not sure if this would work ok with variable-length characters ...so right now it seems like my only option is to rethink how I parse the file, so I don't have to rewind. If it helps, I open my file like this: using (var reader = new StreamReader( new FileStream(m_path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))) {...} Any suggestions?

    Read the article

  • Can't set breakpoints on an auto-property setter ? Why?

    - by Cristi Diaconescu
    Apparently VS 2008 does not allow setting a breakpoint just on the setter of an auto-property. I.e. if I define an auto-property like this: public int CurrentFramesize { get; protected set; } and then try to set a breakpoint on the setter line, the whole auto-property turns breakpoint-red. This works just fine for normal properties, so any idea why auto-properties get this special (restrictive) treatment? Are they more than just syntactic sugar to normal properties with a hidden backing field?

    Read the article

  • .NET C# Explicit implementation of grandparent's interface method in the parent interface

    - by Cristi Diaconescu
    That title's a mouthful, isn't it?... Here's what I'm trying to do: public interface IBar { void Bar(); } public interface IFoo: IBar { void Foo(); } public class FooImpl: IFoo { void IFoo.Foo() { /*works as expected*/ } //void IFoo.Bar() { /*i'd like to do this, but it doesn't compile*/ } void IBar.Bar() { /*works as expected*/ } } So... Is there a way to declare IFoo.Bar(){...} in my class, other than basically merging the two interfaces into one? And, if not, why?

    Read the article

  • C# Compiler should give warning but doesn't?

    - by Cristi Diaconescu
    Someone on my team tried fixing a 'variable not used' warning in an empty catch clause. try { ... } catch (Exception ex) { } - gives a warning about ex not being used. So far, so good. The fix was something like this: try { ... } catch (Exception ex) { string s = ex.Message; } Seeing this, I thought "Just great, so now the compiler will complain about s not being used." But it doesn't! There are no warnings on that piece of code and I can't figure out why. Any ideas? PS. I know catch-all clauses that mute exceptions are a bad thing, but that's a different topic. I also know the initial warning is better removed by doing something like this, that's not the point either. try { ... } catch (Exception) { } or try { ... } catch { }

    Read the article

  • UNIX find for finding file names NOT ending in specific extensions?

    - by Cristi Diaconescu
    Is there a simple way to recursively find all files in a directory hierarchy, that do not end in a list of extensions? E.g. all files that are not *.dll or *.exe UNIX/GNU find, powerful as it is, doesn't seem to have an exclude mode (or I'm missing it), and I've always found it hard to use regular expressions to find things that don't match a particular expression. I'm in a Windows environment (using the GnuWin32 port of most GNU tools), so I'm equally open for Windows-only solutions.

    Read the article

  • Resharper 5 - enable/disable on the fly

    - by Cristi Diaconescu
    I want to disable ReSharper 5 when debugging - it slows things down more than I'm willing to take. Is there an automatic way to do this? The next best thing would be a toolbar button to manually enable/disable it. On the Tools - Options - ReSharper page there's a comment that the VS command Resharper_ToggleSuspended would do just this. The problem is, I can't find the command when I right-click a toolbar - Customize... - 'Commands' tab - Choose 'Resharper' category. Am I missing something?

    Read the article

  • C# Virtual method call in constructor - how to refactor?

    - by Cristi Diaconescu
    I have an abstract class for database-agnostic cursor actions. Derived from that, there are classes that implement the abstract methods for handling database-specific stuff. The problem is, the base class ctor needs to call an abstract method - when the ctor is called, it needs to initialize the database-specific cursor. I know why this shouldn't be done, I don't need that explanation! This is my first implementation, that obviously doesn't work - it's the textbook "wrong way" of doing it. The overridden method accesses a field from the derived class, which is not yet instantiated: public abstract class CursorReader { private readonly int m_rowCount; protected CursorReader() { m_rowCount = CreateCursor(sqlCmd); //virtual call ! } protected abstract int CreateCursor(string sqlCmd); } public class SqlCursorReader : CursorReader { private SqlConnection m_sqlConnection; public SqlCursorReader(string sqlCmd, SqlConnection sqlConnection) { m_sqlConnection = sqlConnection; //field initialized here } protected override int CreateCursor(string sqlCmd) { //uses not-yet-initialized member *m_sqlConnection* //so this throws a NullReferenceException var cursor = new CustomCursor(sqlCmd, m_sqlConnection); return cursor.Count(); } } I will follow up with an answer on my attempts to fix this...

    Read the article

  • Making the iPhone work with stripped down Windows XP

    - by Gabriel
    Hi, this is my first time posting here and I have a really specific question. I have an ASUS eee 901 running Windows XP Home. I had everything working well, but then I decided to improve performance by moving Windows to the smaller but faster internal SSD. I used Nlite to strip down Windows, following the instructions here: http://wiki.eeeuser.com/howto:nlitexp I now have a very lightweight installation of XP home with SP3 and all the current updates. Almost everything is working really well. I have installed iTunes and I CAN sync with no problems. However, each time I plug in my iPhone 3GS (latest firmware), Windows tries and fails to install drivers. The Found New Hardware Wizard launches, but nothing I do will make it complete successfully, with the result that the iphone does not show up in Windows as removable storage, or as a camera. When I launch the Camera and Scanner Wizard, it shows only my webcam, not the iphone. I have verified that I have the following files in place: Windows\System32\ptpusb.dll (regsvr32 successful) Windows\System32\ptpusd.dll (entry point not found, can not be registered) Windows\System32\usbaaplrc.dll (entry point not found, can not be registered) Windows\System32\drivers\usbaapl.sys Windows\System32\drivers\usbscan.sys Windows\System32\drivers\usbstor.sys Does anyone know if some other file is required or if there's some other element preventing this from working? Edit (From posted answer) I did select Cameras & Camcorders, and my webcam is working fine for video & still capture.

    Read the article

  • Make sent items appear in Outlook 2010 conversation without exchange

    - by Gabriel Guimarães
    Hi I just installed outlook 2010, and saw this conversation feature. However my sent mails does not appear in the conversation. How do I make it appear there? PS: I'm not using exchange. Is there a way to do this without exchange? EDIT: There's something Weird happening. I'm testing this and it appears to work only sometimes. And When I Try this at the other company's computer that uses Exchange, but don't have exchange Cached mode enabled this doesn't work. And the option Show messages from other folders is not even there.

    Read the article

  • Migrated SCOM 2007 R2 Reporting Services but reports are gone

    - by Gabriel Guimarães
    I've migrated Reporting Services on a SCOM 2007 R2 install, and noticed that the reports have not being copied. I can create a new report, but the ones I've had because of the management packs are gone. I've tried re-applying the Management Packs however it doesn't re-deploy them and when I try to access for example: Monitoring - Microsoft Windows Print Server - Microsoft Windows Server 2000 and 2003 Print Services - State View - select any item and click Alerts on the right menu. I get the following error: Date: 12/24/2010 12:40:35 PM Application: System Center Operations Manager 2007 R2 Application Version: 6.1.7221.0 Severity: Error Message: Cannot initialize report. Microsoft.Reporting.WinForms.ReportServerException: The item '/Microsoft.SystemCenter.DataWarehouse.Report.Library/Microsoft.SystemCenter.DataWarehouse.Report.Alert' cannot be found. (rsItemNotFound) at Microsoft.Reporting.WinForms.ServerReport.GetExecutionInfo() at Microsoft.Reporting.WinForms.ServerReport.GetParameters() at Microsoft.EnterpriseManagement.Mom.Internal.UI.Reporting.Parameters.ReportParameterBlock.Initialize(ServerReport serverReport) at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ReportForm.SetReportJob(Object sender, ConsoleJobEventArgs args) The report doesn't exist on the reporting services side. how do I re-deploy this reports? Any help is appreciated. Thanks in advance.

    Read the article

  • Re-deploy Reports from SCOM 2007 R2 Management Packs

    - by Gabriel Guimarães
    I've migrated Reporting Services on a SCOM 2007 R2 install, and noticed that the reports have not being copied. I can create a new report, but the ones I've had because of the management packs are gone. I've tried re-applying the Management Packs however it doesn't re-deploy them and when I try to access for example: Monitoring - Microsoft Windows Print Server - Microsoft Windows Server 2000 and 2003 Print Services - State View - select any item and click Alerts on the right menu. I get the following error: Date: 12/24/2010 12:40:35 PM Application: System Center Operations Manager 2007 R2 Application Version: 6.1.7221.0 Severity: Error Message: Cannot initialize report. Microsoft.Reporting.WinForms.ReportServerException: The item '/Microsoft.SystemCenter.DataWarehouse.Report.Library/Microsoft.SystemCenter.DataWarehouse.Report.Alert' cannot be found. (rsItemNotFound) at Microsoft.Reporting.WinForms.ServerReport.GetExecutionInfo() at Microsoft.Reporting.WinForms.ServerReport.GetParameters() at Microsoft.EnterpriseManagement.Mom.Internal.UI.Reporting.Parameters.ReportParameterBlock.Initialize(ServerReport serverReport) at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ReportForm.SetReportJob(Object sender, ConsoleJobEventArgs args) The report doesn't exist on the reporting services side. how do I re-deploy this reports? Thanks in advance.

    Read the article

  • Redirect user to dir upon SFTP connection.

    - by Gabriel A. Zorrilla
    Hi guys. I have an FTP user which i log in into the server via SFTP and a key file. Right, lovely, works like a charm. Now, by default the user logs to /home/ftp which is not cool. I'd like to know if there is a way to redirect just before the connection to a dir such as /var/www/site.com/public/files/ Mmm? :)

    Read the article

  • SSRS 2005 inaccessible after install

    - by Gabriel Guimarães
    Hi I've just installed SQL 2005 and Database Engine is ok, however I can't access it for nothing. When I go to http://localhost/reports I get this prompt for a username and password and it fails with 401.1. When I tried to disable kerberos on the virtual directories, nothing changed. I've tried changing the auth to anonymous and get: Internet Explorer cannot display the webpage. When I access from another machine, I get the prompt only once and get this error. Internet Explorer cannot display the webpage. Can't access this with IE or SSMS 2005. If I try to access with Management Studio i get this error: TITLE: Microsoft SQL Server Management Studio The underlying connection was closed: An unexpected error occurred on a receive. (Microsoft.SqlServer.Management.UI.RSClient) ADDITIONAL INFORMATION: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. (System) An existing connection was forcibly closed by the remote host (System) BUTTONS: OK By the way the server info: its a Win 2003 R2 Standard with IIS 6 Can't seem to understand this. Does anyone have a hint?

    Read the article

  • Re-deploy Reports on SCOM Management Packs

    - by Gabriel Guimarães
    I've migrated Reporting Services on a SCOM 2007 R2 install, and noticed that the reports have not being copied. I can create a new report, but the ones I've had because of the management packs are gone. I've tried re-applying the Management Packs however it doesn't re-deploy them and when I try to access for example: Monitoring - Microsoft Windows Print Server - Microsoft Windows Server 2000 and 2003 Print Services - State View - select any item and click Alerts on the right menu. I get the following error: Date: 12/24/2010 12:40:35 PM Application: System Center Operations Manager 2007 R2 Application Version: 6.1.7221.0 Severity: Error Message: Cannot initialize report. Microsoft.Reporting.WinForms.ReportServerException: The item '/Microsoft.SystemCenter.DataWarehouse.Report.Library/Microsoft.SystemCenter.DataWarehouse.Report.Alert' cannot be found. (rsItemNotFound) at Microsoft.Reporting.WinForms.ServerReport.GetExecutionInfo() at Microsoft.Reporting.WinForms.ServerReport.GetParameters() at Microsoft.EnterpriseManagement.Mom.Internal.UI.Reporting.Parameters.ReportParameterBlock.Initialize(ServerReport serverReport) at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ReportForm.SetReportJob(Object sender, ConsoleJobEventArgs args) The report doesn't exist on the reporting services side. how do I re-deploy this reports? Thanks in advance.

    Read the article

  • Revision / backup software for folder?

    - by Gabriel
    I'm looking for a simple backup/revision software that will monitor a folder for new changes and make a backup of newly modified files? I have a folder with some text files, a few Word/Excel files and I'd like to keep backup files of them when they're modified. (It's no more than 50 mb). I'd like what Dropbox does but just locally (not to be stored on the cloud). Thank you. Edit: I'm on Windows XP. And I'm looking for a freeware app, if possible.

    Read the article

  • Split time in arbitrary periods, EXCEL

    - by Gabriel A. Zorrilla
    I have a list with date and quantity of items used IE: 2009.03.18 -1 2009.06.05 -2 2009.06.22 -1 2009.06.29 -2 2009.07.14 -1 2009.07.14 -1 2009.07.14 -2 2009.07.20 -2 2009.07.30 -1 2009.07.30 -1 2009.08.06 -1 2009.08.26 -1 2009.09.15 -1 2009.09.16 -2 2009.09.22 -2 2009.09.23 -2 2009.09.30 -2 2009.10.07 -1 2009.10.08 -2 2009.10.22 -1 2009.11.06 -3 2009.11.17 -2 2009.11.20 -1 2009.11.23 -2 2009.11.23 -1 2009.11.25 -2 2009.11.27 -1 2009.12.02 -2 I need to know how much items i consumed in a determined period, ie, 15 days. I can do it in a monthly basis, basically using the month function to extract the month and work from there, but with an arbitrary time (which is the average lead time from my supplier) dont know how to get a function to split the date list in chunks of 15 (or whatever) days. Any tips? Thanks!

    Read the article

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