.
In case you're interested in the source code, I put in on github. The PDF can be downloaded from here (http://renenyffenegger.ch/blog/files/a4-ruler.pdf).
In case you're interested in the source code, I put in on github. The PDF can be downloaded from here (http://renenyffenegger.ch/blog/files/a4-ruler.pdf).
\b
, at least not in Oracle 11i.
Consider the following table:
Now, I want to find all records that contain the exact word Foo
.
That is, I want, for example A Foo without a Baz
(the fourth record), but I don't want
A FooA BarAndABaz
(the second record) because FooA
is not the exact word Foo
If Oracle supported \b
I could use
To improve matters, I could try
A bit better, but far from perfect. For example, the fifth record (Foo Bar, Baz
) is not returned, because
the \s
doesn't match start of line. So, I improve the where condition:
Yet again, this is far from perfect. I need also record records where Foo
is followed or lead by a non word character (such as ?
or -
):
clip.exe
, that can be used to quickly copy something into the clipboard from cmd.exe
.
For example, if I wanted to copy the current working directory into the clipboard, I'd go
Similarly, if I needed to copy all files within the current directory, I'd do
Also, I can copy the content of a file into the clipboard like so:
Here's a table to demonstrate it:
Now, a select statement with fetch first row only
:
c:\temp\colors.ps1
):
When executed with something like
It prints
Here's a simple module to demonstrate that
And here's a script that uses SomeModule
:
This script can call exp_one
and exp_two
from SomeModule
because these two functions are listed in @EXPORT
. Functions listed in @EXPORT
are by default exported into the user's namespace.
ok_one
, on the other hand, cannot be called directly as it is not listed in @EXPORT
. It can, however, be called so SomeModule::ok_one()
.
Here's another script:
Now, I specify the identifiers I want to have imported into my namespace (qw(ok_one ok_two)
). Accordingly, I can call these.
I cannot call exp_one (which I could call in the first script), because as soon as I begin specifying identifiers to be exported I need to specify all of them.
Of course, it will soon be tiresome to always indicate which functions I want to have imported. Therefore, I can define tags with the %EXPORT_TAGS
hash that groups multiple identifiers under a tag. For example, the tag all imports all functions. In my case, I just used the combined values of @EXPORT
and @EXPORT_OK
. This is demonstrated with the third script:
Lastly, I can import some functions, too: