Showing posts with label Windows.Developer. Show all posts
Showing posts with label Windows.Developer. Show all posts

Thursday, March 07, 2013

C# Export to Excel



References:
[1] EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx). http://epplus.codeplex.com/
[2] C# Class for Export DataTable To Excel with Interop http://alandjackson.wordpress.com/2011/01/07/c-export-to-excel-with-interop/
[3] Version of POI Java project at http://poi.apache.org/. POI is an open source project which can help you read/write xls, doc, ppt files. http://npoi.codeplex.com/releases
[4] Sample of NPOI http://www.leniel.net/2009/07/creating-excel-spreadsheets-xls-xlsx-c.html#sthash.5qgu3AiY.dpbs
[5] Good sample for export to excel file http://www.codeproject.com/Articles/20228/Using-C-to-Create-an-Excel-Document

Friday, November 09, 2012

Windows Settings Command Line (.cpl)

Continues working on Windows7
Appwiz.cpl     Add/Remove Programs properties
Desk.cpl       Display properties
Inetcpl.cpl    Internet properties
Intl.cpl       Regional Settings properties
Joy.cpl        Joystick properties
Main.cpl       Mouse, Fonts, Keyboard, and Printers properties
Mmsys.cpl      Multimedia properties
Netcpl.cpl     Network properties (Network Connection)
Sticpl.cpl     Scanners and Cameras properties
Sysdm.cpl      System properties and Add New Hardware wizard
TimeDate.cpl   Date/Time properties
 
 

Wednesday, November 07, 2012

OpenCV 2.4 - Visual Studio 10 - Setting

Configuration Properties
C/C++
  +  General settings
     +  Additional include properties (*.h/*.hpp)
VC++ Directory
  + Library Directories (*.lib)
Linker
  + Additional dependencies (namep.lib nameq.lib namer.lib ... )


Friday, May 25, 2012

Remove backdoor



>netstat -ao  (locate reference to unknow addres, for example
    ovh.net

>taskkill /pid pid

remove from register with regedit

aditional if your clock doesn't work

net stop w32time
w32tm /unregister [ignore error message]
w32tm /unregister [enter a second time]
w32tm /register
reg add hklm\system\currentcontrolset\services\w32time\parameters\ /v NtpServer /t reg_sz /d time.nist.gov /f
net start w32time
w32tm /resync

The default polling time for updating the clock's time is only once every 7 days. This is why the clock gets off by so much (e.g. seconds if not many minutes) until it's the 7th day for your clock to automatically update again. Only then is the clock accurate, but it immediately starts losing time again until it updates in 7 more days. The sources for updating the clock are deadly accurate (NIST = National Institute of Standards and Technology), but the problem is that it doesn't update itself often enough. Here's the fix:

On the XP system change the update (polling time) intervals by doing the following:

1. Type “regedit” in Run located in Start
2. Navigate to the following key in the left pane:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\W32Time\TimeProviders\NtpC lient.
3. In the right pane, double click the entry called SpecialPollInterval.
4. In the Base section of the Edit DWord Value dialog box, click the Decimal option button.
5. Enter the desired interval in seconds (3600 = 1 hour, 1800 = 30 minutes, 86400 = 24 hours, and so forth).
6. Click OK and close the registry editor.


(Originally set at 604,800 seconds, which equals 7 days, or once every week. I have set mine to 1,800 seconds, which updates my clock once every 30 minutes. My clock is never more than a few seconds off...

Saturday, December 10, 2011

Enable SVN log edit (Windows)

Create pre-revprop-change.bat and save it in the /hooks subdirectory for your repository.

set userName=%3
set propertyName=%4
set action=%5

:: Only allow the log message to be changed, but not author, etc.
if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME

:: Only allow modification of a log message, not addition or deletion.
if /I not "%action%" == "M" goto ERROR_ACTION

:: Make sure that the new svn:log message is not empty.
set bIsEmpty=true
for /f "tokens=*" %%g in ('find /V ""') do (
set bIsEmpty=false
)
if "%bIsEmpty%" == "true" goto ERROR_EMPTY

goto :eof

:ERROR_EMPTY
echo Empty svn:log messages are not allowed. >&2
goto ERROR_EXIT

:ERROR_PROPNAME
echo Only changes to svn:log messages are allowed. >&2
goto ERROR_EXIThttp://www.blogger.com/img/blank.gif

:ERROR_ACTION
echo Only modifications to svn:log revision properties are allowed. >&2http://www.blogger.com/img/blank.gif
goto ERROR_EXIT
http://www.blogger.com/img/blank.gif
:ERROR_EXIT
exit /b 1


references:

[1] http://stackoverflow.com/questions/692851/can-i-go-back-and-edit-comments-on-an-svn-checkin
[2] http://stackoverflow.com/questions/197224/what-is-a-pre-revprop-change-hook-in-svn-and-how-do-i-create-it

Thursday, November 24, 2011

Wednesday, September 14, 2011

Saturday, September 03, 2011

ASP.NET::Error de la validación del estado de vista MAC.

Agregar en el archivo web.config lo siguiente:

<pages enableviewstatemac="false">

Friday, August 05, 2011

SQL Server::Identificar versión y edición

Cómo determinar la versión de SQL Server
SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY ('productlevel'), SERVERPROPERTY ('edition')

SELECT @@VERSION

Tuesday, June 07, 2011

SQL Server::SQLCMD

cd C:\Archivos de programa\Microsoft SQL Server\100\Tools\Binn
C:..>SQLCMD -s 192.168.1.30 -U sa -P pass


sp_databases
use

sp_help tablename
select * from SYSOBJECTS where TYPE = 'U' order by NAME


references:
[1] http://msdn.microsoft.com/en-us/library/ms180944.aspx
[2] http://msdn.microsoft.com/en-us/library/ms165702.aspx

Thursday, April 28, 2011

ASP.NET::The timeout period

The timeout period elapsed prior to completion of the operation or the server is not responding.

try below options, set command timeout parameter to 0. It will execute till the end. By default it will timeout in 30 secs.

Using Code:

sqlCommand.CommandTimeout = 0;

Using Connection String: Check the timeout in connection string, try setting it to max...
data source="ServerName;initial catalog=DataBaseName;uid=ID;pwd=Password;Connect Timeout=120"

Using Sql Server:On the SQL Server also you can set timeout of a query. Check with SQL Server DBA's to know the Query time out set on servers.

Using IIS: On IIS also you have timeout setting. In IIS --> Website tab --> Connection time out box . Set the max timeout value (in secs) IIS should maintain idle connection .

check all these possibilities

Running apps

Runtastic (I uninstalled because force to update your device - Internet connection problems) Runkeeper  (Currently testing) Runna (Complex,...