FileObject
.
The Filesystems API permits module authors to access files in a uniform manner: e.g. you may be unaware of whether a "file object" you are using is a plain disk file, or a JAR entry.
A FileSystem is a namespace for FileObjects - a FileSystem has a root folder, which is a FileObject, which may have child files and folders - just like a file system on disk. A FileSystem may or may not represent actual files on disk; this API can be used to represent any hierarchical storage of file-like data.
From the perspective of the Filesystems API, all files consist of byte streams (albeit with MIME types). Usually, the functionality of this API will actually be used indirectly, via the Loaders API, which abstracts away most of the details of files and presents data in terms of DataObjects, which typically represent the parsed content of a file and provide objects to programmatically access that content via DataObject.getCookie().
FileObjects
for a user's data on disk are typically a thin wrapper around
java.io.File
; elements of NetBeans' internal configuration
are also FileObjects
, these typically representing data
actually stored in an XML file inside a module's jar.
There are a few differences from traditional file-access APIs, such as monitoring files/folders for changes. This section gives examples of the more common tasks associated with using filesystems.
FileObject
which represents it.
If you need to get a file object corresponding to a file on disk, use:
fileObject = FileUtil.toFileObject(new File("/some/path/to/file.txt"));
FileUtil
also has methods for working with archive (ZIP/JAR) entries. File objects corresponding
to archive entries are read-only but otherwise behave much like disk files.
To find all the folders and files directly contained in this folder, you may use:
FileObject children[]=folder.getChildren();Occasionally you may need to present a given file object as a URL; for example, to display it in a web browser. This is straightforward:
URL url = file.getURL(); HtmlBrowser.URLDisplayer.getDefault().showURL(url);
FileObject subfolder=folder.createFolder("sub"); FileObject newfile=subfolder.createData("NewSource", "java");
You can delete a file easily:
newfile.delete();If you want to rename a file, you must first take out a lock on the file, to make sure that no one else is actively using the file at the same time. Then you may rename it:
FileLock lock = null; try { lock=newfile.lock(); } catch (FileAlreadyLockedException e) { // Try again later; perhaps display a warning dialog. return; } try { newfile.rename(lock, "NewSrc", "java"); } finally { // Always put this in a finally block! lock.releaseLock(); }If you want to move a file into a different directory (or even file system), you cannot use
rename(...)
; the easiest way is
to use a NetBeans helper method:
FileObject someFile; FileObject whereTo; FileUtil.moveFile(someFile, whereTo, "YourSource");Note that in the current API set, it is neither possible nor necessary to lock folders (e.g. when creating new children), as normally locks are used to protect data files from conflicts between the Editor, the Explorer, and so on. If in the future there are thread-related problems associated with improper simultaneous access to the same folder, support for folder locking could be added to the Filesystems API.
Similarly, there is no support currently for nonexclusive read locks - if you require exclusion of writers during a read, you must take out a regular write lock for the duration of the read. This is not normally necessary, since typically only the Editor will be reading and writing the contents of the file, and other file operations do not involve information which could be partially corrupted between threads. If necessary, the API includes facilities for read-many/write-one locks.
BufferedReader from=new BufferedReader(new InputStreamReader(someFile.getInputStream())); try { String line; while ((line=from.readLine()) != null) { // do something with line } finally { from.close(); } FileLock lock; try { lock=someFile.lock(); } catch (FileAlreadyLockedException e) { return; } try { PrintWriter to=new PrintWriter(someFile.getOutputStream(lock)); try { to.println("testing..."); to.println("1..2..3.."); } finally { to.close(); } } finally { lock.releaseLock(); }
someFile.addFileChangeListener(new FileChangeAdapter() { public void fileChanged(FileEvent ev) { System.out.println("Contents changed."); } public void fileAttributeChanged(FileAttributeEvent ev) { System.out.println(ev.getName() + ": " + ev.getOldValue() + " -> " + ev.getNewValue()); } });All events affecting existing files are actually fired twice, once from the file itself and once from its containing folder, so you may just want to listen on the parent folder. Also, file creation events are fired on the folder only, of course:
FileObject someFolder=someFile.getParent(); someFolder.addFileChangeListener(new FileChangeAdapter() { public void fileChanged(FileEvent ev) { System.out.println("Contents of " + ev.getFile() + " changed."); } public void fileDataCreated(FileEvent ev) { System.out.println("File " + ev.getFile() + " created."); } });
FileObject.getMIMEType()
reports a basic MIME type for a file, which can used to classify it for
editing and other purposes.
If you need to influence the MIME type resolution process, you can register a MIMEResolver
.
To simplify this process you can register a MIMEResolver
declaratively.
It is not only easier (no coding needed) but can be more efficient by
sharing results among multiple declared resolvers.
See the declarative MIME resolvers how-to for more information about this.
Each file object resides on a FileSystem
which handles a large tree of files. Normally you need
not be aware of this, since the "Master Filesystem" module automatically handles creation of whatever
FileSystem
s are needed to represent any files on disk, as well as any ZIP/JAR entries for archives
on disk (using JarFileSystem
). It is possible to implement your own filesystem for specialized
purposes (normally by subclassing AbstractFileSystem
and perhaps registering a corresponding
URLMapper
).
The Filesystems API also includes a couple of special implementations which are used by the NetBeans core
to assemble the system filesystem used for application configuration, and could also be used by module writers
in some circumstances: MultiFileSystem
and XMLFileSystem
. See their Javadoc for more
information.


(PHP 4 >= 4.1.0, PHP 5, PHP 7)
nl_langinfo — Query language and locale information
$item
) : stringnl_langinfo() is used to access individual elements of the locale categories. Unlike localeconv(), which returns all of the elements, nl_langinfo() allows you to select any specific element.
item
item
may be an integer value of the element or the
constant name of the element. The following is a list of constant names
for item
that may be used and their description.
Some of these constants may not be defined or hold no value for certain
locales.
| Constant | Description |
|---|---|
| LC_TIME Category Constants | |
ABDAY_(1-7) |
Abbreviated name of n-th day of the week. |
DAY_(1-7) |
Name of the n-th day of the week (DAY_1 = Sunday). |
ABMON_(1-12) |
Abbreviated name of the n-th month of the year. |
MON_(1-12) |
Name of the n-th month of the year. |
AM_STR |
String for Ante meridian. |
PM_STR |
String for Post meridian. |
D_T_FMT |
String that can be used as the format string for strftime() to represent time and date. |
D_FMT |
String that can be used as the format string for strftime() to represent date. |
T_FMT |
String that can be used as the format string for strftime() to represent time. |
T_FMT_AMPM |
String that can be used as the format string for strftime() to represent time in 12-hour format with ante/post meridian. |
ERA |
Alternate era. |
ERA_YEAR |
Year in alternate era format. |
ERA_D_T_FMT |
Date and time in alternate era format (string can be used in strftime()). |
ERA_D_FMT |
Date in alternate era format (string can be used in strftime()). |
ERA_T_FMT |
Time in alternate era format (string can be used in strftime()). |
| LC_MONETARY Category Constants | |
INT_CURR_SYMBOL |
International currency symbol. |
CURRENCY_SYMBOL |
Local currency symbol. |
CRNCYSTR |
Same value as CURRENCY_SYMBOL . |
MON_DECIMAL_POINT |
Decimal point character. |
MON_THOUSANDS_SEP |
Thousands separator (groups of three digits). |
MON_GROUPING |
Like "grouping" element. |
POSITIVE_SIGN |
Sign for positive values. |
NEGATIVE_SIGN |
Sign for negative values. |
INT_FRAC_DIGITS |
International fractional digits. |
FRAC_DIGITS |
Local fractional digits. |
P_CS_PRECEDES |
Returns 1 if CURRENCY_SYMBOL precedes a positive value. |
P_SEP_BY_SPACE |
Returns 1 if a space separates CURRENCY_SYMBOL from a positive value. |
N_CS_PRECEDES |
Returns 1 if CURRENCY_SYMBOL precedes a negative value. |
N_SEP_BY_SPACE |
Returns 1 if a space separates CURRENCY_SYMBOL from a negative value. |
P_SIGN_POSN |
|
N_SIGN_POSN |
|
| LC_NUMERIC Category Constants | |
DECIMAL_POINT |
Decimal point character. |
RADIXCHAR |
Same value as DECIMAL_POINT . |
THOUSANDS_SEP |
Separator character for thousands (groups of three digits). |
THOUSEP |
Same value as THOUSANDS_SEP . |
GROUPING |
|
| LC_MESSAGES Category Constants | |
YESEXPR |
Regex string for matching "yes" input. |
NOEXPR |
Regex string for matching "no" input. |
YESSTR |
Output string for "yes". |
NOSTR |
Output string for "no". |
| LC_CTYPE Category Constants | |
CODESET |
Return a string with the name of the character encoding. |
Returns the element as a string, or FALSE
if item
is not valid.
Note: 此函数未在 Windows 平台下实现。


Personal cloud is the individual’s collection of digital content, services and apps which are seamlessly accessible across any device.The personal cloud is not a tangible entity, but rather the realization of four different types of experience in which users store, synchronize,stream and share content on a contextual basis, moving from one platform, screen and location to another.Founded on interconnected services and applications, it both reflects and sets consumers’ expectations for how next-generation computing services will work.


#include <OpenCVImageAdapter.h>
Inheritance diagram for OpenCVImageAdapter:
Public Member Functions | |
| OpenCVImageAdapter (IplImage *im) | |
| virtual | ~OpenCVImageAdapter () |
| virtual double | getPixel (int row, int column, int channel) const |
| virtual void | setPixel (double value, int row, int column, int channel) |
Protected Member Functions | |
| template<typename T> | |
| double | getPixelT (int row, int column, int channel) const |
| template<typename T> | |
| void | setPixelT (double value, int row, int column, int channel) |
| double | getPixeldoNothing (int row, int column, int channel) const |
| void | setPixeldoNothing (double value, int row, int column, int channel) |
Protected Attributes | |
| IplImage * | mIplImage |
| double(OpenCVImageAdapter::* | getPixelfptr )(int row, int column, int channel) const |
| void(OpenCVImageAdapter::* | setPixelfptr )(double value, int row, int column, int channel) |
The OpenCVImageAdapter class is inherited from the OvImageAdapter and provides a wrapper around OpenCV's IplImage allowing the OpenVis3D library functions to access the dimensions and datatype of the image, and provides get and set methods to alter image pixels.
| OpenCVImageAdapter::OpenCVImageAdapter | ( | IplImage * | im | ) |
to prevent the default constructor from being used
| OpenCVImageAdapter::~OpenCVImageAdapter | ( | ) | [virtual] |
Destructor.
| double OpenCVImageAdapter::getPixel | ( | int | row, | |
| int | column, | |||
| int | channel | |||
| ) | const [virtual] |
Returns a pixel value at a particular row, column and color channel.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
Implements OvImageAdapter.
| double OpenCVImageAdapter::getPixeldoNothing | ( | int | row, | |
| int | column, | |||
| int | channel | |||
| ) | const [protected] |
Dummy function for use when internal IplImage pointer is null or data type unknown.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| double OpenCVImageAdapter::getPixelT | ( | int | row, | |
| int | column, | |||
| int | channel | |||
| ) | const [protected] |
Internal template function to handle any image datatype. Returns a pixel value at a particular row, column and color channel.
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| void OpenCVImageAdapter::setPixel | ( | double | value, | |
| int | row, | |||
| int | column, | |||
| int | channel | |||
| ) | [virtual] |
Sets a pixel value at a particular row, column and color channel.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
Implements OvImageAdapter.
| void OpenCVImageAdapter::setPixeldoNothing | ( | double | value, | |
| int | row, | |||
| int | column, | |||
| int | channel | |||
| ) | [protected] |
Dummy function for use when internal IplImage pointer is null or data type unknown.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
| void OpenCVImageAdapter::setPixelT | ( | double | value, | |
| int | row, | |||
| int | column, | |||
| int | channel | |||
| ) | [protected] |
Internal template function to handle any image datatype. Sets a pixel value at a particular row, column and color channel.
| value | value to be set | |
| row | row of the image | |
| column | column of the image | |
| channel | channel of the image |
double(OpenCVImageAdapter::* OpenCVImageAdapter::getPixelfptr)(int row, int column, int channel) const [protected] |
function pointer used to store getpixel function appropriate for image datatype
IplImage* OpenCVImageAdapter::mIplImage [protected] |
saved pointer to OpenCV IplImage object
void(OpenCVImageAdapter::* OpenCVImageAdapter::setPixelfptr)(double value, int row, int column, int channel) [protected] |
function pointer used to store setpixel function appropriate for image datatype


An Electromagnetic Wave in a Conductor (Part 2)
Introduction
Last week we used Maxwell’s equations to derive an expression for the wavevector of an electromagnetic wave within a conductor. We found that the wavevector turns out to be a complex number given by:
\[\begin{equation} \widetilde{k} = \omega \sqrt{ \mu \epsilon - \frac{i \mu \sigma}{\omega} } = \frac{\widetilde{n} \omega}{c} \end{equation}\]where
\[\begin{equation} \widetilde{n} = c \sqrt{ \mu \epsilon - \frac{i \mu \sigma}{\omega} } \end{equation}\]Of course, you can solve for the real and imaginary parts of \(\widetilde{n}\) or \(\widetilde{k}\) using a little bit of algebra. However, that doesn’t tell us what complex values actually mean. For that, we will simply look back to the formula for a plane wave of light.
The Plane Wave
The electric field of a plane wave of light propagating in some material has the form:
\[\begin{equation} \vec{E}(\vec{r}) = \vec{E}_o e^{i(\vec{k} \cdot \vec{r} + \omega t)} = \vec{E}_o e^{i\vec{k} \cdot \vec{r}} e^{i\omega t} \end{equation}\]In this plane wave the wavevector, refractive index, speed of light, and frequency of the light wave are all related by a dispersion relationship:
\[\begin{equation} ck = n\omega \Rightarrow k = \frac{n\omega}{c} \end{equation}\]We will assume that the propagation of light is along the z-direction, meaning that the plane wave expression reduces down to:
\[\begin{equation} \vec{E}(z) = \vec{E}_o e^{ikz} e^{i\omega t} \end{equation}\]Additionally, we will ignore the \(\omega t\) term for the time being, just so we can get a sense of the shape of the wave without worrying about the oscillations of the wave.
\[\begin{equation} \vec{E}(z) = \vec{E}_o e^{ikz} \end{equation}\]If k is a real number, then the expression above has the form of a regular, old, oscillating wave. However, if the wavevector is complex, something interesting happens. Let \(\widetilde{k}\) be complex and \(k_1\) and \(k_2\) be real numbers:
\[\begin{equation} \widetilde{k} = k_1 + ik_2 \end{equation}\]Then:
\[\begin{align} \vec{E}(z) &= \vec{E}_o e^{i\widetilde{k}z}\\ &= \vec{E}_o e^{i(k_1 + ik_2)z}\\ &= \vec{E}_o e^{ik_1z + i^2k_2z}\\ &= \vec{E}_o e^{ik_1z - k_2z}\\ &= \vec{E}_o e^{ik_1z} e^{-k_2z}\\ \end{align}\]The real part of \(\widetilde{k}\) (and by extension \(\widetilde{n}\)) determines the wavevector of the light in the material. The imaginary part of \(\widetilde{k}\) (and by extension \(\widetilde{n}\)) is seen in a negative exponential term. This means that the electric field decays - the light wave can only penetrate part of the way into the conductor. This is called the skin depth of the wave in the conductor.
You can use the interactive plot below to see how changing \(k_1\) and \(k_2\) will affect the magnitude of the electromagnetic wave as a function of z-position. The blue curve represents the real part of the electric field while the red curve represents the imaginary part. The initial magnitude of the electric field has been scaled to one, just to provide a consistent starting point for the analysis.
| \(k_1\) | 40.0 \(m^{-1}\) | |
| \(k_2\) | 0.0 \(m^{-1}\) | |
| The real part of the electric field is in BLUE while the imaginary part of the electric field is in RED. |


Whether you're completely new to using RESTful APIs or it's second nature, this is the place to learn everything there is to know about creating custom OrderCloud applications.
{{course.Description}}


Enter any raw text.
James Madison tried to purchase insurance for 1600 Worcester Ave using AmEx card<PHONE_NUMBER>09488. Mr. Madison sincerely hoped that none of his sensitive data would be compromised... especially his old policy number which was PL7202JLEHS92891.
Show me the scrubbed data.


Dashboard |
UnhappyHappy
Values |
Statistics |
Mood
Equilibrium
Support
Lifestyle
Wellness |
Lifestyle |
DietExercise
UnhealthyHealthy
Support |
FriendsFamily
ColleaguesProfessionals
AloneConnected
Equilibrium |
SchoolWork
SelfHome
UnbalancedBalanced
Settings Content
Device:
Overall:
Lifestyle:
Support:
Equilibrium:
Diet:
Exercise:
Recreation:
Meditation:
Self:
Work:
Home:
School:
Family:
Friends:
Colleagues:
Professionals:


Tim doesn't mind taking risks when it comes to using features they have not seen before.
Tim doesn’t mind taking risks using features of technology that haven’t been proven to work. When they are presented with challenges because they have tried a new way that doesn’t work, it doesn’t change their attitudes toward technology.