Excel - oznacz myszką wybrany wiersz
Thursday, June 4th, 2009 | VBA | No Comments
Private Declare Function GetKeyState Lib “user32″ (ByVal nVirtKey As Long) As Integer
Private Const kCapital = 20
Private Const kNumlock = 144
Private Const TargetCol = 3
Public Function CapsLock() As Boolean
CapsLock = KeyState(kCapital)
End Function
Private Function KeyState(lKey As Long) As Boolean
KeyState = CBool(GetKeyState(lKey))
End Function
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If CapsLock Then
For Each cell In Target.Cells
x = ActiveSheet.Cells(cell.Row, TargetCol)
x = Abs(x - 1)
ActiveSheet.Cells(cell.Row, TargetCol).Value = x
Next
End If
End Sub
Sub dodaj_formatowanie()
Range(”A1:D31″).Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:=”=$D1=1″
Selection.FormatConditions(1).Interior.ColorIndex = 36
End Sub
Uzupełnienie braków w ciągłości, kumulacja
Thursday, May 28th, 2009 | Uncategorized | No Comments
data baza;
input dzien kumulacja;
cards;
1 1
2 3
8 4
10 8
15 9
22 15
27 18
30 20
;run;
data temp;
set baza;
output;
ile_brakuje = max(((lag(dzien)-dzien)+1)*-1,0);
do x = 1 to ile_brakuje;
nowy_dzien = dzien - x;
drop ile_brakuje x;
output;
end;
run;
data nowa_baza;
set temp;
dzien = coalesce(nowy_dzien,dzien);
keep kumulacja dzien;
run;
proc sort data= nowa_baza;
by dzien;
run;
Top N wartości dla każdej grupy w pojedyńczym zapytaniu
Thursday, May 21st, 2009 | Uncategorized | No Comments
w pojedyńczym zapytaniu, wow
http://rickosborne.org/blog/index.php/2008/01/07/sql-getting-top-n-rows-for-a-grouped-query/
SELECT c.*, d.ranknum
FROM girl AS c
INNER JOIN (
SELECT a.id, COUNT(*) AS ranknum
FROM girl AS a
INNER JOIN girl AS b ON (a.hair = b.hair) AND (a.score <= b.score)
GROUP BY a.id
HAVING COUNT(*) <= 3
) AS d ON (c.id = d.id)
ORDER BY c.hair, d.ranknum
Nowości w Datamining
Monday, March 9th, 2009 | Data Mining | No Comments
Nowe oprogramowanie Wolframa wyławia nieustrukturyzowane dane z Sieci, strukturyzuje je, uruchamia na nich swoje algorytmy i w efekcie generuje „fakty” i „odpowiedzi” w odpowiedzi na zapytania zadawane poprzez przypominający Google formularz wyszukiwania.
Przegląd muzyczny, dla odmiany
Sunday, March 1st, 2009 | Muzycznie | 1 Comment
Leon Jackson - Creative
Michael Buble - Sway
Tom Jones - If He Should Ever Leave You
Andy Williams - Can’t Take My Eyes Off You (Oct. 1967)
Frank Sinatra - Fly Me To The Moon
Badania Operacyjne
Friday, February 27th, 2009 | Badania Operacyjne | No Comments
VBA MsWord - Document Mining
Friday, February 13th, 2009 | Data Mining, VBA | No Comments
http://word.mvps.org/FAQs/MacrosVBA/index.htm
Ms Word - VBA - MVPS - FAQ
http://www.kayodeok.btinternet.co.uk/favorites/kbofficeword.htm
Using Visual Basic .NET from VBA to Serialize Word Documents as XML
http://msdn.microsoft.com/en-us/library/aa140276(office.10).aspx
Transforming Word Documents into the XSL-FO Format
http://msdn.microsoft.com/en-us/library/aa537167(office.11).aspx
XSL-FO is an intermediate form that results from applying an XSLT style sheet to an XML structured document. The XML-FO form describes how pages appear when presented to a reader, such as a Web browser. Currently, there are no readers that directly interpret an XSL-FO document. To interpret them, you must run them through a formatter, along with other data, such as graphics and font metrics, to create a final displayable or printable file. Possible formats for the resulting file include Adobe’s Portable Document Format (PDF) and Hypertext Markup Language (HTML).
When compared to Cascading Style Sheets (CSS), XSL-FO provides a more sophisticated visual layout model. You can use CSS to apply specific style elements to an XML or HTML document. By contrast, XSL-FO is a language for describing a complete document. It includes everything needed to paginate and format a document. Some of the formatting supported by XSL-FO, but not by CSS, includes right-to-left and top-to-bottom text, footnotes, margin notes, page numbers in cross-references, and more. Note that while CSS is primarily intended for use on the Web, XSL-FO is designed for broader use. As an example, you could use an XSL-FO document to lay out an XML document as a printed book. You could write a completely separate XSL-FO document to transform the same XML document into HTML.
XPath Tutorial - WC3 School
http://www.w3schools.com/xpath/default.asp
XPath is a language for finding information in an XML document. XPath is used to navigate through elements and attributes in an XML document.
XSL-FO Tutorial
http://www.w3schools.com/xslfo/xslfo_intro.asp
What XSL-FO is, and how to use XSL-FO to format your XML documents for output.
Drzewa decyzyjne
Tuesday, January 13th, 2009 | Data Mining | No Comments
Dwa linki:
Ang: http://www.autonlab.org/tutorials/dtree18.pdf
Pl: http://www.fizyka.umk.pl/~duch/zajecia/05SemMagInf/03DT.pdf
![]()
Macro SAS - operacje na datach
Wednesday, January 7th, 2009 | SAS | No Comments
http://analytics.ncsu.edu/sesug/2006/SC11_06.PDF
%let StartDate = %Sysevalf( ‘01JAN2004′d ) ;
%let EndDate = %Sysevalf( ‘01JAN2006′d ) ;%let Date = %Sysfunc( InputN( 01JAN2006 , Date9 ) ) ;
%let Date2 = %Sysfunc( PutN( &Date , Date9 ) ) ;%let NumOfMonths = %Sysfunc( Intck( Month , &StartDate , &EndDate ) ) ;
%let NewDate = %Sysfunc( Intnx( Month , &StartDate , &NumOfMonths ) ) ;
%Sysevalf - Evaluates arithmetic and logical expressions using floating-point arithmetic
%Sysfunc - Execute SAS functions (nie obsługuje funkcji put, input, lag i kilku innych)
By zapisać datę do stringa użyj kodu:
…
translate(put(data,ddmmyy10.),”-”,”/”) as moja_data format=$18.,
catx (” “, “Przypominamy, ze dnia”, calculated moja_data) as text
…
Projektowanie aplikacji VBA
Wednesday, December 10th, 2008 | VBA | No Comments
Microsoft Developer Network prezentuje przewodnik dotyczący projektowania aplikacji w środowisku OfficeXP. Projektowanie, debugowanie, obsługa błędów, na co zwrócic uwagę podczas projektowania interfejsu użytkownika, bezpieczeństwo i kilka podobnych zagadnień.
Warto rzucić okiem przed rozpoczęciem większego projektu, albo kiedy brakuje pomysłów “co jeszcze mogę poprawić” przed ostatecznym zakończeniem projektu.
http://msdn.microsoft.com/en-us/library/aa140974(office.10).aspx