Tmp
A simple temporary file and directory creator for node.js.
About
This is a widely used library to create temporary files and directories in a node.js environment.
Tmp offers both an asynchronous and a synchronous API. For all API calls, all the parameters are optional. There also exists a promisified version of the API, see tmp-promise.
Tmp uses crypto for determining random file names, or, when using templates, a six letter random identifier. And just in case that you do not have that much entropy left on your system, Tmp will fall back to pseudo random numbers.
You can set whether you want to remove the temporary file on process exit or not.
If you do not want to store your temporary directories and files in the standard OS temporary directory, then you are free to override that as well.
An Important Note on Previously Undocumented Breaking Changes
All breaking changes that had been introduced, i.e.
- tmpdir must be located under the system defined tmpdir root.
- Spaces being collapsed into single spaces
- Removal of all single and double quote characters
have been reverted in v0.2.2 and tmp should now behave as it did before the introduction of these breaking changes.
Other breaking changes, i.e.
- template must be relative to tmpdir
- name must be relative to tmpdir
- dir option must be relative to tmpdir
are still in place.
In order to override the system's tmpdir, you will have to use the newly introduced tmpdir option.
An Important Note on Compatibility
See the CHANGELOG for more information.
Version 0.2.2
Since version 0.2.2, all support for node version < 12 has been dropped.
Version 0.1.0
Since version 0.1.0, all support for node versions < 0.10.0 has been dropped.
Most importantly, any support for earlier versions of node-tmp was also dropped.
If you still require node versions < 0.10.0, then you must limit your node-tmp dependency to versions below 0.1.0.
Version 0.0.33
Since version 0.0.33, all support for node versions < 0.8 has been dropped.
If you still require node version 0.8, then you must limit your node-tmp dependency to version 0.0.33.
For node versions < 0.8 you must limit your node-tmp dependency to versions < 0.0.33.
How to install
npm install tmp
Usage
Please also check API docs.
Graceful cleanup
If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary object removal.
To enforce this, you can call the setGracefulCleanup()
method:
const tmp = require('tmp');
tmp.setGracefulCleanup();
Asynchronous file creation
Simple temporary file creation, the file will be closed and unlinked on process exit.
const tmp = require('tmp');
tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
console.log('File: ', path);
console.log('Filedescriptor: ', fd);
// If we don't need the file anymore we could manually call the cleanupCallback
// But that is not necessary if we didn't pass the keep option because the library
// will clean after itself.
cleanupCallback();
});
Synchronous file creation
A synchronous version of the above.
const tmp = require('tmp');
const tmpobj = tmp.fileSync();
console.log('File: ', tmpobj.name);
console.log('Filedescriptor: ', tmpobj.fd);
// If we don't need the file anymore we could manually call the removeCallback
// But that is not necessary if we didn't pass the keep option because the library
// will clean after itself.
tmpobj.removeCallback();
Note that this might throw an exception if either the maximum limit of retries for creating a temporary name fails, or, in case that you do not have the permission to write to the directory where the temporary file should be created in.
Asynchronous directory creation
Simple temporary directory creation, it will be removed on process exit.
If the directory still contains items on process exit, then it won't be removed.
const tmp = require('tmp');
tmp.dir(function _tempDirCreated(err, path, cleanupCallback) {
if (err) throw err;
console.log('Dir: ', path);
// Manual cleanup
cleanupCallback();
});
If you want to cleanup the directory even when there are entries in it, then
you can pass the unsafeCleanup
option when creating it.
Synchronous directory creation
A synchronous version of the above.
const tmp = require('tmp');
const tmpobj = tmp.dirSync();
console.log('Dir: ', tmpobj.name);
// Manual cleanup
tmpobj.removeCallback();
Note that this might throw an exception if either the maximum limit of retries for creating a temporary name fails, or, in case that you do not have the permission to write to the directory where the temporary directory should be created in.
Asynchronous filename generation
It is possible with this library to generate a unique filename in the specified directory.
const tmp = require('tmp');
tmp.tmpName(function _tempNameGenerated(err, path) {
if (err) throw err;
console.log('Created temporary filename: ', path);
});
Synchronous filename generation
A synchronous version of the above.
const tmp = require('tmp');
const name = tmp.tmpNameSync();
console.log('Created temporary filename: ', name);
Advanced usage
Asynchronous file creation
Creates a file with mode 0644
, prefix will be prefix-
and postfix will be .txt
.
const tmp = require('tmp');
tmp.file({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' }, function _tempFileCreated(err, path, fd) {
if (err) throw err;
console.log('File: ', path);
console.log('Filedescriptor: ', fd);
});
Synchronous file creation
A synchronous version of the above.
const tmp = require('tmp');
const tmpobj = tmp.fileSync({ mode: 0o644, prefix: 'prefix-', postfix: '.txt' });
console.log('File: ', tmpobj.name);
console.log('Filedescriptor: ', tmpobj.fd);
Controlling the Descriptor
As a side effect of creating a unique file tmp
gets a file descriptor that is
returned to the user as the fd
parameter. The descriptor may be used by the
application and is closed when the removeCallback
is invoked.
In some use cases the application does not need the descriptor, needs to close it without removing the file, or needs to remove the file without closing the descriptor. Two options control how the descriptor is managed:
discardDescriptor
- iftrue
causestmp
to close the descriptor after the file is created. In this case thefd
parameter is undefined.detachDescriptor
- iftrue
causestmp
to return the descriptor in thefd
parameter, but it is the application's responsibility to close it when it is no longer needed.
const tmp = require('tmp');
tmp.file({ discardDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
// fd will be undefined, allowing application to use fs.createReadStream(path)
// without holding an unused descriptor open.
});
const tmp = require('tmp');
tmp.file({ detachDescriptor: true }, function _tempFileCreated(err, path, fd, cleanupCallback) {
if (err) throw err;
cleanupCallback();
// Application can store data through fd here; the space used will automatically
// be reclaimed by the operating system when the descriptor is closed or program
// terminates.
});
Asynchronous directory creation
Creates a directory with mode 0755
, prefix will be myTmpDir_
.
const tmp = require('tmp');
tmp.dir({ mode: 0o750, prefix: 'myTmpDir_' }, function _tempDirCreated(err, path) {
if (err) throw err;
console.log('Dir: ', path);
});
Synchronous directory creation
Again, a synchronous version of the above.
const tmp = require('tmp');
const tmpobj = tmp.dirSync({ mode: 0750, prefix: 'myTmpDir_' });
console.log('Dir: ', tmpobj.name);
mkstemp like, asynchronously
Creates a new temporary directory with mode 0700
and filename like /tmp/tmp-nk2J1u
.
IMPORTANT NOTE: template no longer accepts a path. Use the dir option instead if you
require tmp to create your temporary filesystem object in a different place than the
default tmp.tmpdir
.
const tmp = require('tmp');
tmp.dir({ template: 'tmp-XXXXXX' }, function _tempDirCreated(err, path) {
if (err) throw err;
console.log('Dir: ', path);
});
mkstemp like, synchronously
This will behave similarly to the asynchronous version.
const tmp = require('tmp');
const tmpobj = tmp.dirSync({ template: 'tmp-XXXXXX' });
console.log('Dir: ', tmpobj.name);
Asynchronous filename generation
Using tmpName()
you can create temporary file names asynchronously.
The function accepts all standard options, e.g. prefix
, postfix
, dir
, and so on.
You can also leave out the options altogether and just call the function with a callback as first parameter.
const tmp = require('tmp');
const options = {};
tmp.tmpName(options, function _tempNameGenerated(err, path) {
if (err) throw err;
console.log('Created temporary filename: ', path);
});
Synchronous filename generation
The tmpNameSync()
function works similarly to tmpName()
.
Again, you can leave out the options altogether and just invoke the function without any parameters.
const tmp = require('tmp');
const options = {};
const tmpname = tmp.tmpNameSync(options);
console.log('Created temporary filename: ', tmpname);
Options
All options are optional :)
name
: a fixed name that overrides random name generation, the name must be relative and must not contain path segmentsmode
: the file mode to create with, falls back to0o600
on file creation and0o700
on directory creationprefix
: the optional prefix, defaults totmp
postfix
: the optional postfixtemplate
:mkstemp
like filename template, no default, must includeXXXXXX
once for random name generation, e.g. 'foo-bar-XXXXXX'.dir
: the optional temporary directory that must be relative to the system's default temporary directory. absolute paths are fine as long as they point to a location under the system's default temporary directory. Any directories along the so specified path must exist, otherwise a ENOENT error will be thrown upon access, as tmp will not check the availability of the path, nor will it establish the requested path for you.tmpdir
: allows you to override the system's root tmp directorytries
: how many times should the function try to get a unique filename before giving up, default3
keep
: signals that the temporary file or directory should not be deleted on exit, default isfalse
- In order to clean up, you will have to call the provided
cleanupCallback
function manually.
- In order to clean up, you will have to call the provided
unsafeCleanup
: recursively removes the created temporary directory, even when it's not empty. default isfalse
detachDescriptor
: detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collectiondiscardDescriptor
: discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection


Wrapper for af_index. More...
#include <index.h>
Public Member Functions | |
| index () | |
| Default constructor. | |
| ~index () | |
| index (const int idx) | |
| Implicit int converter. | |
| index (const af::seq &s0) | |
| Implicit seq converter. | |
| index (const af_seq &s0) | |
| Implicit seq converter. | |
| index (const af::array &idx0) | |
| Implicit int converter. | |
| index (const index &idx0) | |
| Copy constructor. | |
| bool | isspan () const |
| Returns true if the af::index represents a af::span object. | |
| const af_index_t & | get () const |
| Gets the underlying af_index_t object. | |
| index & | operator= (const index &idx0) |
| Assigns idx0 to this index. | |
Wrapper for af_index.
This class is a wrapper for the af_index struct in the C interface. It allows implicit type conversion from valid indexing types like int, af::seq, af_seq, and af::array.
| ~index | ( | ) |
| index | ( | const int | idx | ) |
Implicit int converter.
Indexes the af::array at index idx
| [in] | idx | is the id of the index |
| const af_index_t & get | ( | ) | const |
Gets the underlying af_index_t object.
| bool isspan | ( | ) | const |
Assigns idx0 to this index.
| [in] | idx0 | is the index to be assigned to the /ref af::index |


Unfortunately, you are too young to vote. However you can still be informed about voting for the future. Here are some links to help you learn:
You can vote! Here are some sites where you can vote as well as some to find your nearest polling location or dropbox:
Please enter a valid age number.


For a successful build, Xcode 3.1 and Mac OS X 10.5 SDK are required.
BaseTen has several subprojects, namely BaseTenAppKit and a plug-in for Interface Builder 3. The default target in BaseTen.xcodeproj, BaseTen + GC, builds them as well; the plug-in and the AppKit framework will appear in the subprojects' build folders, which are set to the default folder. The built files will be either in build folders in the subprojects' folders or in the user-specified build folder. The documentation will be in the Documentation folder.
The files needed to build the release disk image are in the SVN repository as well. Doxygen is needed during the process. To create the DMG, follow these steps:
cd ReleaseDMG
. ./create_release_dmg.sh
. The built DMG will appear in the ReleaseDMG folder. ./create_release_dmg.sh -–without-latex
instead. The PDF manual won't be included on the DMG, though.


Just a simple way to create masks to your currency form fields with jQuery.
### Show Time!
To view a complete demonstration of it’s features and usage, access our examples page!
### Usage:
html
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="jquery.maskMoney.js" type="text/javascript"></script>
</head>
<body>
<input type="text" id="currency" />
</body>
<script type="text/javascript">
$(function(){
$("#currency").maskMoney();
})
</script>
### Options:
The options that you can set are:
symbol
: the symbol to be displayed before the value entered by the user(example: “US$”). default: ‘’symbolStay
: set if the symbol will stay in the field after the user exists the field. default: falsethousands
: the thousands separator. default: ‘,’decimal
: the decimal separator. default: ‘.’precision
: how many decimal places are allowed. default: 2defaultZero
: when the user enters the field, it sets a default mask using zero. default: trueallowZero
: use this setting to prevent users from inputing zero. default: falseallowNegative
: use this setting to prevent users from inputing negative values. default: falseIMPORTANT: if you try to bind maskMoney to a read only field, nothing will happen, since we ignore completely read only fields. So, if you have a read only field, try to bind maskMoney to it, it will not work. Even if you change the field removing the readonly property, you will need to re-bind maskMoney to make it work.
### Bonus!
We have 2 bonus methods that can be useful to you:
.maskMoney('destroy')
which removes maskMoney from an element..maskMoney('mask')
which causes maskMoney to actually apply the mask to your input.### Contributors:
### License:
jQuery-maskMoney is released under the MIT license.


What are the main topics in the surveys?
Each question relates to one of five topics.
School Climate refers to the attitudes, feelings, and interpersonal relationships associated with the school environment. Subtopics include bullying, safety, attendance, discipline, and relationships. All respondents are asked questions about school climate.
Instruction refers to teaching and learning within the classroom and through assigned coursework. Subtopics include teaching, student engagement, data usage, and District support. All respondents are asked questions about school climate.
Parent/Guardian-Community Ties includes questions intended to capture the level of connection between a school, its parents/guardians, and its surrounding community. Subtopics include outreach, communication quality, guardian involvement, and networks. These questions appear on the parent/guardian, teacher, and principal surveys.
School Leadership refers to decision-making related to the school and the overall management of its building and staff. Subtopics include leadership decisions, feedback, and school focus priorities. These questions appear on the parent/guardian, teacher, and principal surveys.
Professional Capacity refers to the cultivation and mastery of instructional practice within the school. Subtopics include professional development, peer collaboration, and opportunities for innovation. These questions appear on the teacher and principal surveys only.
Click the “Topic Report” bar and select a school in the green bar above to see a radar chart and tables displaying survey feedback by topic and subtopic. These reports use topic and subtopic scores, which are numeric versions of survey responses. The higher the score, the more positive the response.
This report uses topic and subtopic average scores scaled from 0 to 10 (where 10 is the highest score).
Color Key
≥ 9.0
Excellent
8.0 - 8.9
7.0 - 7.9
Good
6.0 - 6.9
5.0 - 6.0
Needs attention
< 5.0
i.s.
Too few responses
n/a
Not applicable for this group
Select a respondent group and topic to view the average school-level scores for that topic on the map for {{ctrl.CYTD}}. You can zoom or scroll within the map, and you can switch your view to see scores on a 0-10 scale or “% most positive.” (The “% most positive” is the percent of respondents that selected the most positive response.)
Select a respondent group and topic to view the average topic score by network. Bars display averages for {{$ctrl.CYTD}}. Circles display averages for {{$ctrl.PYTD}}. Each bar and circle represents a learning network. You can click on a network to see all schools in that network. For student and parent topics, you can also click on a school to view the scores by grade level. You can switch your view to see scores on a 0-10 scale or “% most positive.” (“% most positive” is the percent of respondents that selected the best response.)


Meet Your Mate
Here we go!!
Survey Questions
About You
Name (Required)
Link to Photo Image (Required)
Question 1
You like to take risks and challenges excite you.
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 2
Generally speaking, are you an open minded person
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 3
Money is important to me
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 4
I am an animals lover
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 5
I enjoy playing/watching sports
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 6
Religion is very important to me
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 7
I am the life of the party
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 8
I complete my responsibilities before I go have fun
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 9
I like to travel
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Question 10
Being around family energizes me
1 (Strongly Disagree)
2
3
4
5 (Strongly Agree)
Select an Option
Submit
Submit
×
Best Match


LANGLEY, VA—A report released Tuesday by the CIA's Office of the Inspector General revealed that the CIA has mistakenly obscured hundreds of thousands of pages of critical intelligence information with black highlighters.
According to the report, sections of the documents— "almost invariably the most crucial passages"—are marred by an indelible black ink that renders the lines impossible to read, due to a top-secret highlighting policy that began at the agency's inception in 1947.
CIA Director Porter Goss lamented the fact that the public will probably never know the particulars of several historic events, such as:
You might also like
CIA To Shift Focus To Greeing Cards


A Fire upon the Deep; Vernor Vinge; Mass Market Paperback; $5.39;
The Peace War; Vernor Vinge; Hardcover; $25.00 (Back Ordered)
True Names : And the Opening of the Cyberspace Frontier; Vernor Vinge; Paperback; $14.95 (Back Ordered);
Marooned in Realtime; Vernor Vinge; Hardcover (Hard to Find)
Marooned in Realtime; Vernor Vinge; Paperback (Hard to Find)
The Peace War; Vernor Vinge; Hardcover (Hard to Find)
The Peace War; Vernor Vinge; Paperback (Hard to Find)
Tatja Grimm's World; Vernor Vinge; Paperback (Hard to Find)


@(account: model.Account, sshKeys: List[model.SshKey])(implicit context: app.Context) @import context._ @import view.helpers._ @html.main("SSH Keys"){
Need help? Check out our guide to generating SSH keys or troubleshoot common SSH Problems
There are no SSH keys with access to your account.
This is a list of SSH keys associated with your account. Remove any keys that you do not recognize.
@_root_.ssh.SshUtil.fingerPrint(key.publicKey).getOrElse("Key is invalid.")


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# File 'manifests/params.pp', line 6
class smokeping::params {
$version = 'present'
$enable = true
$start = true
$mode = 'master'
$master_url = 'http://somewhere/cgi-bin/smokeping.cgi'
$shared_secret = '/etc/smokeping/slavesecrets.conf'
$slave_secrets = '/etc/smokeping/smokeping_secrets'
$slave_name = 'slave1'
$slave_dir = '/etc/smokeping/config.d/slaves.d'
$slave_location = ''
$slave_display_name = ''
$slave_color = ''
$master_name = 'default'
$owner = 'Peter Random'
$contact = 'root@localhost'
$mailhost = 'my.mail.host'
$syslogfacility = 'local0'
$syslogpriority = 'info'
$cgi_remark_top = 'Welcome to the SmokePing website of xxx Company. Here you will learn all about the latency of our network.'
$cgi_title_top = 'Network Latency Grapher'
$probes = [ { name => 'FPing', binary => '/usr/bin/fping', step => '300' } ]
$default_probe = 'FPing'
$alerts_to = 'root@localhost'
$alerts_from = 'root@localhost'
$alerts = [ {
name => 'someloss',
alert_type => 'loss',
pattern => '>0%,*12*,>0%,*12*,>0%',
edgetrigger => false,
comment => 'loss 3 times in a row',
} ]
# /etc/smokeping appears to be generally consistent cross-platform
$targets_dir = '/etc/smokeping/config.d/targets.d'
$path_smokemail = '/etc/smokeping/smokemail'
$path_tmail = '/etc/smokeping/tmail'
# The major cross-platform differences consist of user account variations
# and where files reside on disk:
if $::osfamily == 'Debian' or $::operatingsystem == 'Ubuntu' {
$daemon_user = 'smokeping'
$daemon_group = 'smokeping'
$path_sendmail = '/usr/sbin/sendmail'
$path_imgcache = '/var/cache/smokeping/images'
$path_imgurl = '../smokeping/images'
$path_datadir = '/var/lib/smokeping'
$path_piddir = '/var/run/smokeping'
$cgiurl = 'http://some.url/smokeping.cgi'
$webserver_user = 'www-data'
$webserver_group = 'www-data'
$package_perldoc = 'perl-doc'
} elsif $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
# The Fedora RPM seems to run in foreground mode as root. This probably
# isn't the best decision, but we shouldn't try and adjust how the OS
# package runs, rather feedback/commits should go upstream to the OS
# distributor/packager.
#
# Note that many thirdparty Smokeping RPMs for EL tend to be rebuilds of
# the Fedora one, so best to fix in Fedora first, then tackle the other
# third party repositories.
$daemon_user = 'root'
$daemon_group = 'root'
$path_sendmail = '/usr/sbin/sendmail'
$path_imgcache = '/var/lib/smokeping/images'
$path_imgurl = '/smokeping/images'
$path_datadir = '/var/lib/smokeping/rrd'
$path_piddir = '/var/run/smokeping'
$cgiurl = 'http://localhost/smokeping/sm.cgi'
$webserver_user = 'apache'
$webserver_group = 'apache'
$package_perldoc = 'perl-Pod-Perldoc'
}
}
|


JavaScript objects are written with curly braces. Object properties are written as name:value pairs, separated by commas.


An automation electronic butler to collect and present data
n8n.io
The collector
Build some workflows
Directus
The data definition
Define the data
Metabase
The presenter
Create cool dashboards


Members
Last updated: June 7, 2023
For information on how to become an ACF member, see the About page.