rename files

    for i in 2mD* ; do
    mv $i test-"$i";

    for i in P* ; do
    new=`echo $i | sed s/"Picture "/course-Picture_/g`;
    mv "$i" $new;

File re-namer (http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-12.html#ss12.3)

File re-namer (http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-12.html#ss12.4)

ICAO Phonetic Alphabet (alpha bravo charlie)

ICAO Phonetic Alphabet

A - Alpha

J - Juliett

S - Sierra

B - Bravo

K - Kilo

T - Tango

C - Charlie

L - Lima

U - Uniform

D - Delta

M - Mike

V - Victor

E - Echo

N - November

W - Whiskey

F - Foxtrot

O - Oscar

X - X-ray

G - Golf

P - Papa

Y - Yankee

H - Hotel

Q - Quebec

Z - Zulu

I - India

R - Romeo

0 - Zero

4 - Four

8 - Eight

1 - One

5 - Five

9 - Nine

2 - Two

6 - Six

3 - Three

7 - Seven

Section 2. Radio Communications Phraseology and Techniques
Chapter 14. Phraseology


nedit / keyboard shortcuts (accelerator keys) are not working ...

copied from: http://www.nedit.org/faq/sect_bugs.php#N900

You have probably NumLock or CapsLock ON ...

1. The keyboard shortcuts (accelerator keys) are not working when 'Caps' or 'Num Lock' are switched on. Have I overlooked something obvious?

You haven't overlooked anything, it's a Motif design flaw. Netscape painfully works around this and the Alt/Meta key reversal on Sun workstations by internally re-implementing the Motif menu accelerator mechanism. NEdit will likely follow suit with the release of version 5.2.

Another possibility (writes Peter Daifuku of SGI):

There's another answer which unfortunately isn't widespread as yet. For an X11R6.3 X server supporting the XKB extension, there is a mechanism to ignore the NumLock and CapsLock key as modifiers. The file /usr/lib/X11/xkb/X0-config.keyboard should contain the string IgnoreLockMods=NumLock+Lock . For systems with multiple displays, display 1 would be controlled by the file X1-config.keyboard, etc.

On SGI systems, this mechanism is support on IRIX 6.2 with X server patch 1574 or later, on IRIX 6.3 and IRIX 6.4 and all later releases.

2. Sometimes NEdit inserts instead of saving the file when I type ^S. Other keyboard shortcuts (accelerator keys) don't work either.

You have probably NumLock or CapsLock ON. See the answer to this question. 3. I use the numeric keypad really often, so I keep NumLock on. But NEdit shortcuts don't work when NumLock is on.

The bug is not in NEdit, but in Motif. This is fixed as of NEdit 5.2, but that might not help you much. Older versions have the same problem.

Here's how you tell X to interpret the keypad keys as numbers without turning NumLock on. Create a file .Xmodmap in your home directory, and put the following lines in it:

    keycode 79 = KP_7
    keycode 80 = KP_8
    keycode 81 = KP_9
    keycode 83 = KP_4
    keycode 84 = KP_5
    keycode 85 = KP_6
    keycode 87 = KP_1
    keycode 88 = KP_2
    keycode 89 = KP_3
    keycode 90 = KP_0
    keycode 91 = KP_Decimal

Then make sure the script that starts your X session parses this file with the command:

    xmodmap -merge ~/.Xmodmap

This script can be ~/.xinitrc (called by startx) or something like Xsession if you use xdm/kdm/gdm. Then again, it might be an entirely different script on some systems.

Then turn off numlock, and just continue using the keypad. The only thing is, you loose the alternate set of functions (cursor/home/pgdown/etc).

101 useful Run Commands in Windows XP

copied from pcworld ...

Guys do you use the Run feature in Windows XP? For most, this feature
remains unused (or rarely used). Why is that? Well, First off nearly
all of the Run Commands Correspond to a particular Control Panel Item
or a Utility, Tool or Task that can be accessed through Windows. There
are, however, tools and utilities that I bet you never knew you had
that can be accessed through the Run feature. The main reason most
people don't use the Run feature is because they don't know the
Commands. So, to solve that problem, I decided to put together the
following listing, which lists 101 Run Commands and what they
correspond too...

    Go to Start Button ===>> Run & try this below commands

    Accessibility Controls: access.cpl

    Add Hardware Wizard: hdwwiz.cpl

    Add/Remove Programs: appwiz.cpl

    Administrative Tools: control.exe admintools

    Automatic Updates: wuaucpl.cpl

    Bluetooth Transfer Wizard: fsquirt

    Calculator: calc

    Certificate Manager: certmgr.msc

    Character Map: charmap

    Check Disk Utility: chkdsk

    Clipboard Viewer: clipbrd

    Command Prompt: cmd

    Component Services: dcomcnfg

    Computer Management: compmgmt.msc

    Date and Time Properties: timedate.cpl

    DDE Shares: ddeshare

    Device Manager: devmgmt.msc

    Direct X Control Panel (if installed)*: directx.cpl

    Direct X Troubleshooter: dxdiag

    Disk Cleanup Utility: cleanmgr

    Disk Defragment: dfrg.msc

    Disk Management: diskmgmt.msc

    Disk Partition Manager: diskpart

    Display Properties: control.exe desktop

    Display Properties: desk.cpl

    Display Properties (w/Appearance Tab Preselected): control.exe color

    Dr. Watson System Troubleshooting Utility: drwtsn32

    Driver Verifier Utility: verifier

    Event Viewer: eventvwr.msc

    File Signature Verification Tool: sigverif

    Findfast: findfast.cpl

    Folders Properties: control.exe folders

    Fonts: control.exe fonts

    Fonts Folder: fonts

    Free Cell Card Game: freecell

    Game Controllers: joy.cpl

    Group Policy Editor (XP Prof): gpedit.msc

    Hearts Card Game: mshearts

    Iexpress Wizard: iexpress

    Indexing Service: ciadv.msc

    Internet Properties: inetcpl.cpl

    Java Control Panel (if installed): jpicpl32.cpl

    Java Control Panel (if installed): javaws

    Keyboard Properties: control.exe keyboard

    Local Security Settings: secpol.msc

    Local Users and Groups: lusrmgr.msc

    Logs You Out Of Windows: logoff

    Mcft Chat: winchat

    Minesweeper Game: winmine

    Mouse Properties: control.exe mouse

    Mouse Properties: main.cpl

    Network Connections: control.exe netconnections

    Network Connections: ncpa.cpl

    Network Setup Wizard: netsetup.cpl

    Nview Desktop Manager (if installed): nvtuicpl.cpl

    Object Packager: packager

    ODBC Data Source Administrator: odbccp32.cpl

    On Screen Keyboard: osk

    Opens AC3 Filter (if installed): ac3filter.cpl

    Password Properties: password.cpl

    Performance Monitor: perfmon.msc

    Performance Monitor: perfmon

    Phone and Modem Options: telephon.cpl

    Power Configuration: powercfg.cpl

    Printers and Faxes: control.exe printers

    Printers Folder: printers

    Private Character Editor: eudcedit

    Quicktime (If Installed): QuickTime.cpl

    Regional Settings: intl.cpl

    Registry Editor: regedit

    Registry Editor: regedit32

    Removable Storage: ntmsmgr.msc

    Removable Storage Operator Requests: ntmsoprq.msc

    Resultant Set of Policy: rsop.msc

    Resultant Set of Policy (XP Prof): rsop.msc

    Scanners and Cameras: sticpl.cpl

    Scheduled Tasks: control.exe schedtasks

    Security Center: wscui.cpl

    Services: services.msc

    Shared Folders: fsmgmt.msc

    Shuts Down Windows: shutdown

    Sounds and Audio: mmsys.cpl

    Spider Solitare Card Game: spider

    SQL Client Configuration: cliconfg

    System Configuration Editor: sysedit

    System Configuration Utility: msconfig

    System File Checker Utility: sfc

    System Properties: sysdm.cpl

    Task Manager: taskmgr

    Telnet Client: telnet

    User Account Management: nusrmgr.cpl

    Utility Manager: utilman

    Windows Firewall: firewall.cpl

    Windows Magnifier: magnify

    Windows Management Infrastructure: wmimgmt.msc

    Windows System Security Tool: syskey

    Windows Update Launches: wupdmgr

    Windows XP Tour Wizard: tourstart

    Wordpad: write


BLOG / HTML / special characters





For display of special characters, refer to

If you have to, say, change a lot of < into <, type the code as it
is in Notepad, then use (in the menu bar) EDIT > REPLACE to replace
all the <

Peter (Blog*Star 2006 and 2007)


MAKE - automatic variables

10.5.3 Automatic Variables

Suppose you are writing a pattern rule to compile a `.c' file into a `.o' file: how do you write the `cc' command so that it operates on the right source file name? You cannot write the name in the command, because the name is different each time the implicit rule is applied.

What you do is use a special feature of make, the automatic variables. These variables have values computed afresh for each rule that is executed, based on the target and prerequisites of the rule. In this example, you would use `$@' for the object file name and `$<' for the source file name.

It's very important that you recognize the limited scope in which automatic variable values are available: they only have values within the command script. In particular, you cannot use them anywhere within the target list of a rule; they have no value there and will expand to the empty string. Also, they cannot be accessed directly within the prerequisite list of a rule. A common mistake is attempting to use $@ within the prerequisites list; this will not work. However, there is a special feature of GNU make, secondary expansion (see Secondary Expansion), which will allow automatic variable values to be used in prerequisite lists.

Here is a table of automatic variables:


The file name of the target of the rule. If the target is an archive member, then `$@' is the name of the archive file. In a pattern rule that has multiple targets (see Introduction to Pattern Rules), `$@' is the name of whichever target caused the rule's commands to be run.


The target member name, when the target is an archive member. See Archives. For example, if the target is foo.a(bar.o) then `$%' is bar.o and `$@' is foo.a. `$%' is empty when the target is not an archive member.


The name of the first prerequisite. If the target got its commands from an implicit rule, this will be the first prerequisite added by the implicit rule (see Implicit Rules).


The names of all the prerequisites that are newer than the target, with spaces between them. For prerequisites which are archive members, only the member named is used (see Archives).


The names of all the prerequisites, with spaces between them. For prerequisites which are archive members, only the member named is used (see Archives). A target has only one prerequisite on each other file it depends on, no matter how many times each file is listed as a prerequisite. So if you list a prerequisite more than once for a target, the value of $^ contains just one copy of the name. This list does not contain any of the order-only prerequisites; for those see the `$|' variable, below.


This is like `$^', but prerequisites listed more than once are duplicated in the order they were listed in the makefile. This is primarily useful for use in linking commands where it is meaningful to repeat library file names in a particular order.


The names of all the order-only prerequisites, with spaces between them.


The stem with which an implicit rule matches (see How Patterns Match). If the target is dir/a.foo.b and the target pattern is a.%.b then the stem is dir/foo. The stem is useful for constructing names of related files. In a static pattern rule, the stem is part of the file name that matched the `%' in the target pattern.

In an explicit rule, there is no stem; so `$*' cannot be determined in that way. Instead, if the target name ends with a recognized suffix (see Old-Fashioned Suffix Rules), `$*' is set to the target name minus the suffix. For example, if the target name is `foo.c', then `$*' is set to `foo', since `.c' is a suffix. GNU make does this bizarre thing only for compatibility with other implementations of make. You should generally avoid using `$*' except in implicit rules or static pattern rules.

If the target name in an explicit rule does not end with a recognized suffix, `$*' is set to the empty string for that rule.

`$?' is useful even in explicit rules when you wish to operate on only the prerequisites that have changed. For example, suppose that an archive named lib is supposed to contain copies of several object files. This rule copies just the changed object files into the archive:

lib: foo.o bar.o lose.o win.o
ar r lib $?

Of the variables listed above, four have values that are single file names, and three have values that are lists of file names. These seven have variants that get just the file's directory name or just the file name within the directory. The variant variables' names are formed by appending `D' or `F', respectively. These variants are semi-obsolete in GNU make since the functions dir and notdir can be used to get a similar effect (see Functions for File Names). Note, however, that the `D' variants all omit the trailing slash which always appears in the output of the dir function. Here is a table of the variants:


The directory part of the file name of the target, with the trailing slash removed. If the value of `$@' is dir/foo.o then `$(@D)' is dir. This value is . if `$@' does not contain a slash.


The file-within-directory part of the file name of the target. If the value of `$@' is dir/foo.o then `$(@F)' is foo.o. `$(@F)' is equivalent to `$(notdir $@)'.



The directory part and the file-within-directory part of the stem; dir and foo in this example.



The directory part and the file-within-directory part of the target archive member name. This makes sense only for archive member targets of the form archive(member) and is useful only when member may contain a directory name. (See Archive Members as Targets.)



The directory part and the file-within-directory part of the first prerequisite.



Lists of the directory parts and the file-within-directory parts of all prerequisites.



Lists of the directory parts and the file-within-directory parts of all prerequisites, including multiple instances of duplicated prerequisites.



Lists of the directory parts and the file-within-directory parts of all prerequisites that are newer than the target.

Note that we use a special stylistic convention when we talk about these automatic variables; we write “the value of `$<'”, rather than “the variable <” as we would write for ordinary variables such as objects and CFLAGS. We think this convention looks more natural in this special case. Please do not assume it has a deep significance; `$<' refers to the variable named < just as `$(CFLAGS)' refers to the variable named CFLAGS. You could just as well use `$(<)' in place of `$<'.


RCS ident fields

man ident

    "$Author: $"
    The login name of the user who checked in the revi­sion.

    "$Date: $"
    The date and time the revision was checked in.

    "$Header: $"
    A standard header containing the full pathname of the
    RCS file, the revision number, the date and time, the author,
    the state, and the locker (if locked).

    "$Id: $"
    Same as $Header$, except that the RCS filename is without
    a path.

    "$Locker: $"
    The login name of the user who locked the revision
    (empty if not locked).

    "$Log: $"
    The log message supplied during checkin. For
    ident's purposes, this is equivalent to $RCSfile$.

    "$Name: $"
    The symbolic name used to check out the revision, if any.

    "$RCSfile: $"
    The name of the RCS file without a path.

    "$Revision: $"
    The revision number assigned to the revision.

    "$Source: $"
    The full pathname of the RCS file.

    "$State: $"
    The state assigned to the revision with the -s
    option of rcs(1) or ci(1).


VBA getConfig: retreive key:value from a config sheet

    Function getConfig(key As String) As String
    Dim i As Integer
    Dim xKey As String, strFila As String
    Dim sh

    Set sh = Sheets("config")

    For i = 1 To 500
    strFila = Trim(Str$(i))
    xKey = sh.Range("A" + strFila).Value

    If (key = xKey) Then
    getConfig = sh.Range("B" & strFila).Value
    Exit Function
    End If

    If (xKey = "[end]") Then Exit For

    Next i

    MsgBox "ERROR key not found in config page: [" & key & "]", _
    vbOKOnly + vbCritical, "ERROR"

    End Function

Outlook security error: A program is trying to send mail using Item.Send

Outlook Email Security Update :

Also see Reinforcing Dialog-Based Security, a paper by two U.S. Air Force Academy professors that demonstrates how to get around the object model guard prompts using VBScript code and the SendKeys method to, in effect, click the buttons on the prompts.

Reinforcing Dialog-Based Security
Reinforcing Dialog-Based Security
Martin C. Carlisle, Scott D. Studer
Proceedings of the 2001 IEEE
Workshop on Information Assurance and Security
United States Military Academy, West Point, NY, 5-6 June, 2001
Reinforcing Dialog-Based Security

    Sub bypass()
    Dim fName As String, fDesc As Integer

    fName = getConfig("bypassFile")
    fDesc = FreeFile

    Open fName For Output As fDesc
    Print #fDesc, "Set fso = CreateObject(""WScript.Shell"")"
    Print #fDesc, "While fso.AppActivate(""Microsoft Outlook"") = FALSE"
    Print #fDesc, "wscript.sleep 1000"
    Print #fDesc, "Wend"
    Print #fDesc, "wscript.sleep 7000"
    Print #fDesc, "fso.SendKeys ""{LEFT}"", True"
    Print #fDesc, "fso.SendKeys ""{ENTER}"", True"
    Close #fDesc

    Shell ("WScript.exe " & fName)

    End Sub

    Sub sendMail(strSubject As String, strBody As String)

    Dim OutApp As Object
    Dim OutMail As Object

    Dim strTo As String

    strTo = getConfig("mailTo")

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    Call bypass

    On Error Resume Next
    With OutMail
    .to = strTo
    .CC = ""
    .BCC = ""
    .Subject = strSubject
    .body = strBody
    .Send 'or use .Display
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing

    End Sub

Wait Method

Wait Method (VBA help)

Pauses a running macro until a specified time. Returns True if the specified time has arrived.

Important The Wait method suspends all Microsoft Excel activity and may prevent you from performing other operations on your computer while Wait is in effect. However, background processes such as printing and recalculation continue.


expression Required. An expression that returns an Application object.

Time Required Variant. The time at which you want the macro to resume, in Microsoft Excel date format.

This example pauses a running macro until 6:23 P.M. today.

    Application.Wait "18:23:00"

This example pauses a running macro for approximately 10 seconds.

    newHour = Hour(Now())
    newMinute = Minute(Now())
    newSecond = Second(Now()) + 10
    waitTime = TimeSerial(newHour, newMinute, newSecond)
    Application.Wait waitTime

This example displays a message indicating whether 10 seconds have passed.

    If Application.Wait(Now + TimeValue("0:00:10")) Then
    MsgBox "Time expired"
    End If

How to use SendKeys to imitate the keyboard


How to use SendKeys to imitate the keyboard

Posted: 15 Apr 04

If you perform the process using the keyboard you will note that things do not happen instantly on screen - especially the initial opening of a dialog box where the action takes place. The main problem with SendKeys is that the code usually runs faster than Windows can carry out the required activity - this is especially so if manipulating an external (not the one with the code) application or opening a dialog box or menu. We therefore need to slow the action down by using Wait statements. SendKeys also has its own "Wait" argument True or False which needs to be used correctly. One example of using it set to True is when manipulating external applications that require extra time to carry out actions. This is not always sufficient, so extra code is required.

A big key to success in this area is to break down the process into small steps. It does need a bit of trial and error to get it right. Experience shows that operators are prepared to wait a bit longer if it works. Sometimes the speed of external applications varies so much that the job is impossible using SendKeys, when using API calls with KeyUp and KeyDown work better. This area is never an exact science. See VBA Help 'SendKeys' and 'Shell' for more information.

This is some sample code to demonstrate the principle :-

    Sub SET_A3()
    '- change Printer setting to A3 size
    '- nb. assumes current setting is A4
    Dim AltKey As String
    Dim CtrlKey As String
    Dim ShiftKey As String
    Dim TabKey As String
    Dim EnterKey As String
    AltKey = "%"
    CtrlKey = "^"
    ShiftKey = "+"
    TabKey = "{TAB}"
    EnterKey = "~"
    '- open print dialog
    SendKeys AltKey & "(FP)", False
    '- delay 1 second
    Application.Wait Now + TimeValue("00:00:01")
    '- open printer properties
    SendKeys AltKey & "(R)", False
    '- tab to paper size
    SendKeys TabKey, False
    SendKeys TabKey, False
    '- change A4 to A3
    SendKeys "{UP}", False
    '- Enter twice
    SendKeys EnterKey, False
    SendKeys EnterKey, False
    End Sub

SendKeys Statement, (VBA help)

Sends one or more keystrokes to the active window as if typed at the keyboard.


SendKeys string[, wait]

The SendKeys statement syntax has these named arguments:

Part Description
string Required. String expression specifying the keystrokes to send.
Wait Optional. Boolean value specifying the wait mode. If False (default), control is returned to the procedure immediately after the keys are sent. If True, keystrokes must be processed before control is returned to the procedure.


Each key is represented by one or more characters. To specify a single keyboard character, use the character itself. For example, to represent the letter A, use "A" for string. To represent more than one character, append each additional character to the one preceding it. To represent the letters A, B, and C, use "ABC" for string.

The plus sign (+), caret (^), percent sign (%), tilde (~), and parentheses ( ) have special meanings to SendKeys. To specify one of these characters, enclose it within braces ({}). For example, to specify the plus sign, use {+}. Brackets ([ ]) have no special meaning to SendKeys, but you must enclose them in braces. In other applications, brackets do have a special meaning that may be significant when dynamic data exchange (DDE) occurs. To specify brace characters, use {{} and {}}.

To specify characters that aren't displayed when you press a key, such as ENTER or TAB, and keys that represent actions rather than characters, use the codes shown below:

    Key Code
    END {END}
    ENTER {ENTER}or ~
    ESC {ESC}
    TAB {TAB}
    F1 {F1}
    F2 {F2}
    F3 {F3}
    F4 {F4}
    F5 {F5}
    F6 {F6}
    F7 {F7}
    F8 {F8}
    F9 {F9}
    F10 {F10}
    F11 {F11}
    F12 {F12}
    F13 {F13}
    F14 {F14}
    F15 {F15}
    F16 {F16}

To specify keys combined with any combination of the SHIFT, CTRL, and ALT keys, precede the key code with one or more of the following codes:

    Key Code
    SHIFT +
    CTRL ^
    ALT %

To specify that any combination of SHIFT, CTRL, and ALT should be held down while several other keys are pressed, enclose the code for those keys in parentheses. For example, to specify to hold down SHIFT while E and C are pressed, use "+(EC)". To specify to hold down SHIFT while E is pressed, followed by C without SHIFT, use "+EC".

To specify repeating keys, use the form {key number}. You must put a space between key and number. For example, {LEFT 42} means press the LEFT ARROW key 42 times; {h 10} means press H 10 times.

Note You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows or Macintosh. Sendkeys also can't send the PRINT SCREEN key {PRTSC} to any application.

SendKeys Statement Example

This example uses the Shell function to run the Calculator application included with Microsoft Windows. It uses the SendKeys statement to send keystrokes to add some numbers, and then quit the Calculator. (To see the example, paste it into a procedure, then run the procedure. Because AppActivate changes the focus to the Calculator application, you can't single step through the code.). On the Macintosh, use a Macintosh application that accepts keyboard input instead of the Windows Calculator.

    Dim ReturnValue, I
    ReturnValue = Shell("CALC.EXE", 1) ' Run Calculator.
    AppActivate ReturnValue ' Activate the Calculator.
    For I = 1 To 100 ' Set up counting loop.
    SendKeys I & "{+}", True ' Send keystrokes to Calculator
    Next I ' to add each value of I.
    SendKeys "=", True ' Get grand total.
    SendKeys "%{F4}", True ' Send ALT+F4 to close Calculator.


ISO 3166 Codes & Top level domains

International Country Codes


The following information was downloaded on 15 June
1995 from "http://www.ics.uci.edu/WebSoft/wwwstat/country-codes.txt">http://www.ics.uci.edu/WebSoft/wwwstat/country-codes.txt.
Additional useful information may be found in the "Table of Global and
Country Top Level Internet Domains, which is dated 16 April 1995 (as of 15
June 1995), and is stored at "http://www.isoc.org/domains.html">http://www.isoc.org/domains.html


    AD Andorra
    AE United Arab Emirates
    AF Afghanistan
    AG Antigua and Barbuda
    AI Anguilla
    AL Albania
    AM Armenia
    AN Netherlands Antilles
    AO Angola
    AQ Antarctica
    AR Argentina
    AS American Samoa
    AT Austria
    AU Australia
    AW Aruba
    AZ Azerbaijan
    BA Bosnia and Herzegovina
    BB Barbados
    BD Bangladesh
    BE Belgium
    BF Burkina Faso
    BG Bulgaria
    BH Bahrain
    BI Burundi
    BJ Benin
    BM Bermuda
    BN Brunei Darussalam
    BO Bolivia
    BR Brazil
    BS Bahamas
    BT Bhutan
    BV Bouvet Island
    BW Botswana
    BY Belarus
    BZ Belize
    CA Canada
    CC Cocos (Keeling) Islands
    CF Central African Republic
    CG Congo
    CH Switzerland
    CI Cote D'Ivoire (Ivory Coast)
    CK Cook Islands
    CL Chile
    CM Cameroon
    CN China
    CO Colombia
    CR Costa Rica
    CS Czechoslovakia (former)
    CU Cuba
    CV Cape Verde
    CX Christmas Island
    CY Cyprus
    CZ Czech Republic
    DE Germany
    DJ Djibouti
    DK Denmark
    DM Dominica
    DO Dominican Republic
    DZ Algeria
    EC Ecuador
    EE Estonia
    EG Egypt
    EH Western Sahara
    ER Eritrea
    ES Spain
    ET Ethiopia
    FI Finland
    FJ Fiji
    FK Falkland Islands (Malvinas)
    FM Micronesia
    FO Faroe Islands
    FR France
    FX France, Metropolitan
    GA Gabon
    GB Great Britain (UK)
    GD Grenada
    GE Georgia
    GF French Guiana
    GH Ghana
    GI Gibraltar
    GL Greenland
    GM Gambia
    GN Guinea
    GP Guadeloupe
    GQ Equatorial Guinea
    GR Greece
    GS S. Georgia and S. Sandwich Isls.
    GT Guatemala
    GU Guam
    GW Guinea-Bissau
    GY Guyana
    HK Hong Kong
    HM Heard and McDonald Islands
    HN Honduras
    HR Croatia (Hrvatska)
    HT Haiti
    HU Hungary
    ID Indonesia
    IE Ireland
    IL Israel
    IN India
    IO British Indian Ocean Territory
    IQ Iraq
    IR Iran
    IS Iceland
    IT Italy
    JM Jamaica
    JO Jordan
    JP Japan
    KE Kenya
    KG Kyrgyzstan
    KH Cambodia
    KI Kiribati
    KM Comoros
    KN Saint Kitts and Nevis
    KP Korea (North)
    KR Korea (South)
    KW Kuwait
    KY Cayman Islands
    KZ Kazakhstan
    LA Laos
    LB Lebanon
    LC Saint Lucia
    LI Liechtenstein
    LK Sri Lanka
    LR Liberia
    LS Lesotho
    LT Lithuania
    LU Luxembourg
    LV Latvia
    LY Libya
    MA Morocco
    MC Monaco
    MD Moldova
    MG Madagascar
    MH Marshall Islands
    MK Macedonia
    ML Mali
    MM Myanmar
    MN Mongolia
    MO Macau
    MP Northern Mariana Islands
    MQ Martinique
    MR Mauritania
    MS Montserrat
    MT Malta
    MU Mauritius
    MV Maldives
    MW Malawi
    MX Mexico
    MY Malaysia
    MZ Mozambique
    NA Namibia
    NC New Caledonia
    NE Niger
    NF Norfolk Island
    NG Nigeria
    NI Nicaragua
    NL Netherlands
    NO Norway
    NP Nepal
    NR Nauru
    NT Neutral Zone
    NU Niue
    NZ New Zealand (Aotearoa)
    OM Oman
    PA Panama
    PE Peru
    PF French Polynesia
    PG Papua New Guinea
    PH Philippines
    PK Pakistan
    PL Poland
    PM St. Pierre and Miquelon
    PN Pitcairn
    PR Puerto Rico
    PT Portugal
    PW Palau
    PY Paraguay
    QA Qatar
    RE Reunion
    RO Romania
    RU Russian Federation
    RW Rwanda
    SA Saudi Arabia
    Sb Solomon Islands
    SC Seychelles
    SD Sudan
    SE Sweden
    SG Singapore
    SH St. Helena
    SI Slovenia
    SJ Svalbard and Jan Mayen Islands
    SK Slovak Republic
    SL Sierra Leone
    SM San Marino
    SN Senegal
    SO Somalia
    SR Suriname
    ST Sao Tome and Principe
    SU USSR (former)
    SV El Salvador
    SY Syria
    SZ Swaziland
    TC Turks and Caicos Islands
    TD Chad
    TF French Southern Territories
    TG Togo
    TH Thailand
    TJ Tajikistan
    TK Tokelau
    TM Turkmenistan
    TN Tunisia
    TO Tonga
    TP East Timor
    TR Turkey
    TT Trinidad and Tobago
    TV Tuvalu
    TW Taiwan
    TZ Tanzania
    UA Ukraine
    UG Uganda
    UK United Kingdom
    UM US Minor Outlying Islands
    US United States
    UY Uruguay
    UZ Uzbekistan
    VA Vatican City State (Holy See)
    VC Saint Vincent and the Grenadines
    VE Venezuela
    VG Virgin Islands (British)
    VI Virgin Islands (U.S.)
    VN Viet Nam
    VU Vanuatu
    WF Wallis and Futuna Islands
    WS Samoa
    YE Yemen
    YT Mayotte
    YU Yugoslavia
    ZA South Africa
    ZM Zambia
    ZR Zaire
    ZW Zimbabwe

    COM US Commercial
    EDU US Educational
    GOV US Government
    INT International
    MIL US Military
    NET Network
    ORG Non-Profit Organization
    ARPA Old style Arpanet
    NATO Nato field


    ISO 3166 Codes & Top level domains

    Code Country Conn Notes main nameserver

    AD Andorra
    AE United Arab Emirates * ns.uu.net
    AF Afghanistan
    AG Antigua and Barbuda * upr1.upr.clu.edu
    AI Anguilla
    AL Albania P gwd2i.cnuce.cnr.it
    AM Armenia Ex-USSR
    AN Netherland Antilles
    AO Angola
    AQ Antarctica FI * luxor.cc.waikato.ac.nz
    AR Argentina FI B * ns.uu.net
    AS American Samoa
    AT Austria FI B * pythia.edvz.univie.ac.at
    AU Australia FI * munnari.oz.au
    AW Aruba
    AZ Azerbaidjan Ex-USSR
    BA Bosnia-Herzegovina Ex-Yugoslavia
    BB Barbados * upr1.upr.clu.edu
    BD Bangladesh
    BE Belgium FI B * ub4b.buug.be
    BF Burkina Faso * orstom.orstom.fr
    BG Bulgaria FI B * pythia.ics.forth.gr
    BH Bahrain B * Gulfnet
    BI Burundi
    BJ Benin
    BM Bermuda * ns.uu.net
    BN Brunei Darussalam
    BO Bolivia * ns.uu.net
    BR Brazil FI B * fpsp.fapesp.br
    BS Bahamas * upr1.upr.clu.edu
    BT Buthan
    BV Bouvet Island
    BW Botswana * hippo.ru.ac.za
    BY Belarus * Ex-USSR
    BZ Belize P upr1.upr.clu.edu
    CA Canada FI B * relay.cdnnet.ca
    CC Cocos (Keeling) Isl.
    CF Central African Rep.
    CG Congo
    CH Switzerland FI B * scsnms.switch.ch
    CI Ivory Coast
    CK Cook Islands
    CL Chile FI B * dcc.uchile.cl
    CM Cameroon FI * in .fr domain inria.inria.fr
    CN China PFI * iraun1.ira.uka.de
    CO Colombia B * cunixd.cc.columbia.edu
    CR Costa Rica FI B * ns.cr
    CS Czechoslovakia FI B * still works... ns.cesnet.cz
    CU Cuba * igc.org
    CV Cape Verde
    CX Christmas Island
    CY Cyprus B * pythia.ics.forth.gr
    CZ Czech Republic FI * ns.cesnet.cz
    DE Germany FI B * deins.informatik.uni-dortmund.de
    DJ Djibouti
    DK Denmark FI B * ns.dknet.dk
    DM Dominica P upr1.upr.clu.edu
    DO Dominican Republic P upr1.upr.clu.edu
    DZ Algeria *
    EC Ecuador FI B * ecua.net.ec
    EE Estonia FI * Ex-USSR uvax2.kbfi.ee
    EG Egypt PFI B * frcu.eun.eg
    EH Western Sahara
    ES Spain FI B * sun.rediris.es
    ET Ethiopia
    FI Finland FI B * funet.fi
    FJ Fiji * truth.waikato.ac.nz
    FK Falkland Isl.(Malvinas)
    FM Micronesia
    FO Faroe Islands P danpost.uni-c.dk
    FR France FI B * inria.inria.fr
    FX France (European Ter.) ???
    GA Gabon
    GB Great Britain (UK) FI * X.400 & IP ns1.cs.ucl.ac.uk
    GD Grenada P upr1.upr.clu.edu
    GE Georgia * Ex-USSR ns.eu.net
    GH Ghana
    GI Gibraltar
    GL Greenland
    GP Guadeloupe (Fr.)
    GQ Equatorial Guinea
    GF Guyana (Fr.)
    GM Gambia
    GN Guinea
    GR Greece FI B * pythia.ics.forth.gr
    GT Guatemala * ns.uu.net
    GU Guam (US)
    GW Guinea Bissau
    GY Guyana
    HK Hong Kong FI B * hp9000.csc.cuhk.hk
    HM Heard & McDonald Isl.
    HN Honduras * ns.uu.net
    HR Croatia FI * Ex-Yugo dns.srce.hr
    HT Haiti
    HU Hungary FI B * sztaki.hu
    ID Indonesia * ns.uu.net
    IE Ireland FI B * nova.ucd.ie
    IL Israel FI B * relay.huji.ac.il
    IN India FI B * sangam.ncst.ernet.in
    IO British Indian O. Terr.
    IQ Iraq
    IR Iran B *
    IS Iceland FI B * isgate.is
    IT Italy FI B * dns.nis.garr.it
    JM Jamaica * upr1.upr.clu.edu
    JO Jordan
    JP Japan FI B * jp-gate.wide.ad.jp
    KE Kenya * rain.psg.com
    KG Kirgistan Ex-USSR
    KH Cambodia
    KI Kiribati
    KM Comoros
    KN St.Kitts Nevis Anguilla P upr1.upr.clu.edu
    KP Korea (North) P
    KR Korea (South) FI B * ns.kaist.ac.kr
    KW Kuwait FI * No BITNET dns.kuniv.edu.kw
    KY Cayman Islands
    KZ Kazachstan * Ex-USSR in .su domain
    LA Laos
    LB Lebanon P
    LC Saint Lucia P upr1.upr.clu.edu
    LI Liechtenstein PFI * scsnms.switch.ch
    LK Sri Lanka * ns.eu.net
    LR Liberia
    LS Lesotho * hippo.ru.ac.za
    LT Lithuania PFI * Ex-USSR aun.uninett.no
    LU Luxembourg FI B * menvax.restena.lu
    LV Latvia FI * Ex-USSR lapsene.mii.lu.lv
    LY Libya
    MA Morocco P
    MC Monaco
    MD Moldavia Ex-USSR
    MG Madagascar
    MH Marshall Islands
    ML Mali
    MM Myanmar
    MN Mongolia
    MO Macau * hkuxb.hku.hk
    MP Northern Mariana Isl.
    MQ Martinique (Fr.)
    MR Mauritania
    MS Montserrat
    MT Malta P ns.iunet.it
    MU Mauritius
    MV Maldives
    MW Malawi
    MX Mexico FI B * mtecv1.mty.itesm.mx
    MY Malaysia FI B * mimos.my
    MZ Mozambique * hippo.ru.ac.za
    NA Namibia * rain.psg.com
    NC New Caledonia (Fr.)
    NE Niger * in .fr domain inria.inria.fr
    NF Norfolk Island
    NG Nigeria
    NI Nicaragua * ns.uu.net
    NL Netherlands FI B * sering.cwi.nl
    NO Norway FI B * nac.no
    NP Nepal
    NR Nauru
    NT Neutral Zone
    NU Niue
    NZ New Zealand FI * truth.waikato.ac.nz
    OM Oman
    PA Panama B *
    PE Peru B * rain.psg.com
    PF Polynesia (Fr.)
    PG Papua New Guinea * munnari.oz.au
    PH Philippines * ns.uu.net
    PK Pakistan * ns.uu.net
    PL Poland FI B * danpost.uni-c.dk
    PM St. Pierre & Miquelon
    PN Pitcairn
    PT Portugal FI B * ns.dns.pt
    PR Puerto Rico (US) FI B * sun386-gauss.pr
    PW Palau
    PY Paraguay * ns.uu.net
    QA Qatar
    RE Reunion (Fr.) FI * In .fr domain inria.inria.fr
    RO Romania FI B * roearn.ici.ac.ro
    RU Russian Federation P Ex-USSR
    RW Rwanda
    SA Saudi Arabia B * GulfNet
    SB Solomon Islands
    SC Seychelles
    SD Sudan
    SE Sweden FI B * sunic.sunet.se
    SG Singapore FI B * solomon.technet.sg
    SH St. Helena
    SI Slovenia FI * Ex-Yugos via .yu klepec.yunac.yu
    SJ Svalbard & Jan Mayen Is
    SK Slovak Republic FI * ns.eunet.sk
    SL Sierra Leone
    SM San Marino
    SN Senegal * rain.psg.com
    SO Somalia
    SR Suriname P upr1.upr.clu.edu
    ST St. Tome and Principe
    SU Soviet Union FI B * Still used. ns.eu.net
    SV El Salvador
    SY Syria
    SZ Swaziland
    TC Turks & Caicos Islands
    TD Chad
    TF French Southern Terr.
    TG Togo
    TH Thailand FI * chulkn.chula.ac.th
    TJ Tadjikistan Ex-USSR
    TK Tokelau
    TM Turkmenistan * Ex-USSR in .su domain
    TN Tunisia FI B * alyssa.rsinet.tn
    TO Tonga
    TP East Timor
    TR Turkey FI B * knidos.cc.metu.edu.tr
    TT Trinidad & Tobago P upr1.upr.clu.edu
    TV Tuvalu
    TW Taiwan FI B * moevax.edu.tw
    TZ Tanzania
    UA Ukraine FI * Ex-USSR via .su ns.eu.net
    UG Uganda
    UK United Kingdom FI B * ISO 3166 is GB ns1.cs.ucl.ac.uk
    UM US Minor outlying Isl.
    US United States FI * see note (4) venera.isi.edu
    UY Uruguay B * ns.uu.net
    UZ Uzbekistan Ex-USSR
    VA Vatican City State
    VC St.Vincent & Grenadines P upr1.upr.clu.edu
    VE Venezuela FI * nisc.jvnc.net
    VG Virgin Islands (British)
    VI Virgin Islands (US) *
    VN Vietnam *
    VU Vanuatu
    WF Wallis & Futuna Islands
    WS Samoa
    YE Yemen
    YU Yugoslavia FI B * Bitnet is cut klepec.yunac.yu
    ZA South Africa FI * rain.psg.com
    ZM Zambia
    ZR Zaire
    ZW Zimbabwe * rain.psg.com

    See section Main nameservers for the next top
    level domains (*rs.internic.net*):

    ARPA Old style Arpanet * alias still works ns.nic.ddn.mil
    COM Commercial FI * ns.internic.net
    EDU Educational FI B * ns.internic.net
    GOV Government FI * ns.internic.net
    INT International field FI * used by Nato ns1.cs.ucl.ac.uk
    MIL US Military FI * ns.nic.ddn.mil
    NATO Nato field * soon to be deleted
    NET Network FI * ns.internic.net
    ORG Non-Profit OrganizationFI * ns.internic.net


python: comments

There are two styles of comments in python

    # single line comment

    " " " (this line MUST be valid indented in the block!)
    this is a multiline comment
    which spawns many lines
    The quick brown fox jumps over the lazy dog
    The quick brown fox jumps over the lazy dog
    The quick brown fox jumps over the lazy dog
    the next end line may be NOT indented!
    " " "

multiline comments are also used to embed what are called doc strings in a function, i.e.:

    class school:

    """ this class is useful for defining a type of school (1rst. level indented)
    with its strength,affiliation,address etc
    this class has following methods and properties
    def affiliation(board):
    def address(add):

in above piece of code the triple qouted string not only is a comment
but when i declare an object say

    t = school





will return those comments


the quick brown fox jumps over the lazy dog


    The quick brown fox jumps over the lazy dog 0123456789

    The quick brown fox jumped over the lazy dog's typewriter
    The quick brown fox jumped over the sleeping lazy dog
    The quick red fox jumps over the lazy brown dog

    El veloz murcielago hindu comia feliz cardillo y kiwi
    La ciguena tocaba el saxofon detras del palenque de paja


shell: expresiones aritmeticas

Hay dos posibilidades, utilizar el operador aritmetico $(()):

    echo $i

o bien el comando shell 'expr':

    i=`expr $i + 1`
    echo $i


noclobber / shell options / overwrite files

    set -o noclobber
    set -C (es equivalente al anterior)

overwrite: NOT ALLOWED

    % set -C
    % ll > 1
    bash: 1: cannot overwrite existing file
    % set | grep SHELLOPTS

overwrite: ALLOWED

    % set +C
    % ll > 1
    % set | grep SHELLOPTS

create or set a file to null length

is this form a valid form to create or to set a file to length = 0???


# ---
Joachim Schmitz
Provided the variable $FILE isn't empty: yes
Bye, Jojo

# ---
If $FILE might contain spaces or shell metacharacters it should be
enclosed in double quotes.

Mans Rullgard

Only with bash or with POSIX shells when they are interactive.
But it's always better to quote variables anyway.


# ---

Not with every shell (not with bash where you need to quote
$FILE, not with shells like zsh that have a default command when
you don't provide any).

: > "$FILE"

is more correct and more portable and more legible.

":" can be replaced with any command that doesn't output
anything like true, eval... but ":" is the best bet as it's in
every shell and it's builtin in everyshell.



regular expresions / eval / php

revisar, tomado de:


Archive for the ‘PHP’ Category
Using PHP to highlight links in html
Sunday, March 4th, 2007 by Rob Thomson

Seems to me that there are loads of code samples that show you how to ‘auto highlight’ email addresses and web addresses in a string. Useful, but what happens when the link is already surrounded by an A tag?

I put together this little function (a little dirty but effective) to ‘ignore’ links that are already surrounded by an A tag. This prevents any unexpected double linking of your code.

function findlinks($string){

$string = $string ;

# regular expresion to find matches
$href_regex =”<”; // 1 start of the tag
$href_regex .=”\s*”; // 2 zero or more whitespace
$href_regex .=”a”; // 3 the a of the tag itself
$href_regex .=”\s+”; // 4 one or more whitespace
$href_regex .=”[^>]*”; // 5 zero or more of any character that is _not_ the end of the tag
$href_regex .=”href”; // 6 the href bit of the tag
$href_regex .=”\s*”; // 7 zero or more whitespace
$href_regex .=”=”; // 8 the = of the tag
$href_regex .=”\s*”; // 9 zero or more whitespace
$href_regex .=”[\”‘]?”; // 10 none or one of ” or ‘
$href_regex .=”(”; // 11 opening parenthesis, start of the bit we want to capture
$href_regex .=”[^\”‘ >]+”; // 12 one or more of any character _except_ our closing characters
$href_regex .=”)”; // 13 closing parenthesis, end of the bit we want to capture
$href_regex .=”[\”‘ >]”; // 14 closing chartacters of the bit we want to capture

$regex = “/”; // regex start delimiter
$regex .= $href_regex; //
$regex .= “/”; // regex end delimiter
$regex .= “i”; // Pattern Modifier - makes regex case insensative
$regex .= “s”; // Pattern Modifier - makes a dot metacharater in the pattern
// match all characters, including newlines
$regex .= “U”; // Pattern Modifier - makes the regex ungready

# first find and subst out all text area content
preg_match_all($regex, $string, $regs);
# replace all textarea content with a custom tag
$count = “1″;
foreach($regs[”0″] as $tag){
$string = str_replace($tag,”{link-” . $count . “}”,$string);
$textarea[] = array(”field” => “{link-” . $count . “}”,”data” => $tag);

$string = preg_replace(”/([\w\.]+)(@)([\S\.]+)\b/i”,”$0“,$string);
$string = preg_replace(”/((http(s?):\/\/)|(www\.))([\S\.]+)\b/i”,”$2$4$5“, $string);

# reassemble to handle php code input into text areas
foreach($textarea as $x){
$string = str_replace($x[field],$x[data],$string);

return trim($string);

Anyone got anything better than this?

Posted in PHP | No Comments »
Using EVAL to parse an html file
Sunday, March 4th, 2007 by Rob Thomson

Every now and again I stumble upon a little bit of code that just ‘works’. Anyone who as ever coded in PHP and tried to ‘eval’ and html file is almost certain to have ended up a bit frustrated. It would seem that eval can only process pure PHP, and not a file that has any html tags etc in it.

Never mind! After trawling the net for a while I found this great code snippet that does the trick.

function eval_buffer($string) {
$return = ob_get_contents();
return $return;

function eval_print_buffer($string) {
eval(”print $string[2];”);
$return = ob_get_contents();
return $return;

function eval_html($string) {
$string = preg_replace_callback(”/(<\?=)(.*?)\?>/si”,
return preg_replace_callback(”/(<\?php|<\?)(.*?)\?>/si”,


Works perfectly!


send mail / VBA excel





maybe that helps:

    Sub NeueMail2Outbox()

    Dim ol, olns, p_out As Outlook.MAPIFolder
    Dim neumail As Outlook.MailItem, empfänger

    Set ol = CreateObject("Outlook.Application")
    Set olns = ol.GetNamespace("MAPI")
    Set p_out = olns.GetDefaultFolder(olFolderOutbox)

    neumail = p_out.Items.Add

    With neumail
    .Recipient.Add "Bernd Meier"
    .Subject = "Einladung"
    .Body = "Einladung zum Gartenfest" _
    & vbCr & "Wann? Am 20. Juni 2000" _
    & vbCr & "Wo? Biergarten Zur Linde, München"
    ' For Each empfänger In neumail.Recipients()
    ' empfänger.Resolve
    ' Next
    ' .Send
    End With




that page shows how to use MS CDO

- i enabled its reference, and worked fine with the simple example

    Sub Mail1()

    Set objMessage = CreateObject("CDO.Message")
    objMessage.Subject = "Example CDO Message"
    objMessage.From = "toto@toto.com"
    objMessage.To = "tata@tata.com"
    objMessage.TextBody = "This is some sample message text."

    '==This section provides the configuration information for the remote
    SMTP server.
    '==Normally you will only change the server name or IP.

    objMessage.Configuration.Fields.item _
    ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

    'Name or IP of Remote SMTP Server
    objMessage.Configuration.Fields.item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
    = "smtp.toto.com"

    'Server port (typically 25)
    objMessage.Configuration.Fields.item _
    ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25


    '==End remote SMTP server configuration section==


    End Sub



Norman Jones


piping text lines / "Here Documents"

Many ways to do this. Here's two:

    prog << EOF
    line 1
    line 2
    line N


    (echo "line 1"
    echo "line 2"
    echo "line N") | prog

The "<< EOF" syntax creates what is usually called a "here is" document.
The shell takes all of the lines up to (but not including) the line that
begins "EOF" (in column 1), writes all those lines to a temporary file,
and then feeds that file as standard input to "prog", just as in your
original example (except that the shell is doing the work for you). When
"prog" has finished executing, the temporary file is deleted. You can
replace "EOF" by any string that does not appear in the input; the "<<" is
the important part.

Another version of it uses the syntax "<<-EOF". The effect of the "-" is
to allow the terminating EOF to be on a line that has leading white space
on it; it is an instruction to ignore any leading white space in the data
(all of the data, not just the EOF line).

It's usually better to use the facilities provided by the shell rather
than writing out the equivalent code using some other technique. Less code
usually leads to fewer bugs and easier maintenance, because it is
hopefully more readable that way. It's probably a bit more efficient to
use the "<< XXX" method, but not by a lot in this instance (unless you're
doing it very many times).

Steve Thompson


    % (echo "juan"; echo "1"; echo "alba") | sort

    % sort << XXXX
    > 5
    > 2
    > 5
    > 1
    > b
    > c
    > XXXX


"Advanced Bash-Scripting Guide"
And check the chapter about "Here Documents".
Michael Heiming


    echo "line 1"
    echo "line 2"
    echo "line N"

    } | prog


    printf "%s\n" "line 1" \
    "line 2" ... \
    "line N" | prog

Chris F.A. Johnson


One person already gave an example that uses the "<< EOF" syntax,
but if you really need to group commands' output together into
a pipe, and you have to commands (and not just interpolated strings),
you can do this:

    echo "line 1"
    echo "line 2"
    echo "line 3"
    } | prog

Personally I like this since it is more flexible. You can chain

    { echo 1; echo 2; } | { read x; read y; echo "$x / $y"; } | bc -l

Or nest them:

    echo 1
    echo 2
    echo 3
    } | sed -e 's/$/x/'
    echo 4
    } | sed -e 's/$/y/'

Also, in some cases, a better solution might be to use a function.

- Logan


Win XP monitor counters


César H

Lo que deseas hacer es posible a través del 'Monitor de sistema' para ello ve a

Inicio -> ejecutar -> perfmon.msc

y simplemente agregas los contadores que necesitas,
para este caso puedes agregar los contadores:

    [Bytes enviados/s] [Bytes recibidos/s]

asi como también puedes agregar los contadores

    [Paquetes recibidos/s] / [Paquetes enviados/s]

todos del objeto Interfaz de red

luego puedes cambiar la presentación de gráfico por la de informe
y hay tendrás todos los datos que necesitas


On May 23, 12:19 am, Daniel Martín [MVP Windows]

> En Windows XP, se mostrará en bytes o paquetes dependiendo de la información
> que le proporcione el controlador de red. Simplemente, si con esos datos
> puede mostrar bytes, los mostrará; en caso contrario, mostrará la cantidad
> de paquetes enviados/recibidos. No hay un valor de Registro o similar para
> cambiar esto, es por diseño.


> requiero conocer la cantidad de bytes transmitidos/recibidos por la
> interfase de red.

> en xp hago:
> strat -> settings -> network connections

> en esa ventana clickeo la interfase que me interesa (XXX) y me sale
> una ventana con el STATUS de XXX, que en tab general aparece la
> actividad que deseo, pero la unidad es PACKETS.

> ahora bien, este paquete cuantos bits, o bytes tiene? en versiones
> anteriores de windos la unidad era bytes, ahora estoy confundido.


extraction of function prototypes from C source file


Cproto generates function prototypes and variable declarations from
C source code. Cproto can also convert function definitions between the
old style and the ANSI C style. This conversion will overwrite the
original files, however, so be sure to make a backup copy of your original
files in case something goes wrong. Since cproto uses a Yacc generated
parser, it shouldn't be confused by complex function definitions as much
as other prototype generators) because it uses a Yacc generated parser.

Cproto will be useful for C programmers, so install cproto if you are going
to do any C programming.


    rpm -Uvh -vv cproto-4.7c-3.src.rpm

    /usr/src/packages/SOURCES % ll
    1219 Sep 9 2004 cproto-4.6-bison.patch
    267 Sep 9 2004 cproto-4.6-varargs.patch
    1762 Sep 9 2004 cproto-4.6.1-patch
    118592 Jun 25 2004 cproto-4_7c.tgz

    gunzip cproto-4_7c.tgz
    tar -xvf cproto-4_7c.tar
    cd cproto-4_7c

      cproto $(SRCS) > ./prototypes_aux.h

protoize works for C (except that it changes the parameter types).
cproto also works for C (doesn't change the parameter types).


Thomas E. Dickey


I am sure there is a better solution than this, but in case no one
steps forward with one:


I don't know the answer to your question but I do know that some IDE's
have a tree view which includes functions prototypes. If your job was
on a medium to large scale you could automate the extraction using
that code. Simply modify the IDE such that it logs the function
prototypes as it adds them to the tree view. Unless you run into some
difficulty, I do not see why this logging code should take longer than
a few minutes to add.

Hope this helps,


Options Controlling C Dialect
`-aux-info FILENAME'
Output to the given filename prototyped declarations for all
functions declared and/or defined in a translation unit, including
those in header files. This option is silently ignored in any
language other than C.

Besides declarations, the file indicates, in comments, the origin
of each declaration (source file and line), whether the
declaration was implicit, prototyped or unprototyped (`I', `N' for
new or `O' for old, respectively, in the first character after the
line number and the colon), and whether it came from a declaration
or a definition (`C' or `F', respectively, in the following
character). In the case of function definitions, a K&R-style list
of arguments followed by their declarations is also provided,
inside comments, after the declaration.

$(CC) -c $(CFLAGS) -aux-info $<.X -o $@ $<


windows XP: logon / logout scripts

ok dani, MUCHAS gracias! funciono perfecto

On May 7, 10:40 am, "Dani" wrote:

> Con el editor de politicas puedes lanzar comandos en el inicio / cierre de
> sesion, si es xp pro abrelo

start -> run -> gpedit.msc -> user configuration -> windows settings -> scripts (logon/logoff)

"rhXX" escribió en el mensaje

> > existe algun campo en los registros que me permita introducir la
> > corrida de un programa cuando se cierra el windows?
> > es decir el equivalente para el startup de incluirlo en este registro:
HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Windows\CurrentVersion\RunOnce


empty RECYCLE BIN without dialog

Ramón Sola / ramonSello.s...@Sellomvps.org / MVP Windows - Shell/User
Este pequeño programa te puede servir:

Al ejecutarlo se vacía la papelera sin confirmación, ventana de progreso ni


from: http://www.odi.ch/prog/emptybin.php

// emptybin.cpp : Defines the entry point for the application.

#include "stdafx.h"

int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
return 0;

tks to all, ramon, odi, ...


sandbox / format

    test 1
    test 1
    test 1

esto es para probar

hay que ver que es esto
hay que ver que es esto
hay que ver que es esto

hay que ver que es esto
hay que ver que es esto
hay que ver que es esto