Session
| Author: | Arvid Norberg<EMAIL_ADDRESS>|
|---|---|
| Version: | 1.1.0 |
Table of contents
add_torrent_params
Declared in "libtorrent/add_torrent_params.hpp"
The add_torrent_params is a parameter pack for adding torrents to a session. The key fields when adding a torrent are:
- ti - when you have a .torrent file
- url - when you have a magnet link or http URL to the .torrent file
- info_hash - when all you have is an info-hash (this is similar to a magnet link)
one of those fields need to be set. Another mandatory field is save_path. The add_torrent_params object is passed into one of the session::add_torrent() overloads or session::async_add_torrent().
If you only specify the info-hash, the torrent file will be downloaded from peers, which requires them to support the metadata extension. For the metadata extension to work, libtorrent must be built with extensions enabled (TORRENT_DISABLE_EXTENSIONS must not be defined). It also takes an optional name argument. This may be left empty in case no name should be assigned to the torrent. In case it's not, the name is used for the torrent as long as it doesn't have metadata. See torrent_handle::name.
struct add_torrent_params { add_torrent_params (storage_constructor_type sc = default_storage_constructor); enum flags_t { flag_seed_mode, flag_override_resume_data, flag_upload_mode, flag_share_mode, flag_apply_ip_filter, flag_paused, flag_auto_managed, flag_duplicate_is_error, flag_merge_resume_trackers, flag_update_subscribe, flag_super_seeding, flag_sequential_download, flag_use_resume_save_path, flag_pinned, | flag_auto_managed | flag_paused | flag_apply_ip_filter, }; int version; boost::shared_ptr<torrent_info> ti; std::vector<std::string> trackers; std::vector<std::string> url_seeds; std::vector<std::pair<std::string, int> > dht_nodes; std::string name; std::string save_path; std::vector<char> resume_data; storage_mode_t storage_mode; storage_constructor_type storage; void* userdata; std::vector<boost::uint8_t> file_priorities; std::string trackerid; std::string url; std::string uuid; std::string source_feed_url; boost::uint64_t flags; sha1_hash info_hash; int max_uploads; int max_connections; int upload_limit; int download_limit; };
add_torrent_params()
add_torrent_params (storage_constructor_type sc = default_storage_constructor);
The constructor can be used to initialize the storage constructor, which determines the storage mechanism for the downloaded or seeding data for the torrent. For more information, see the storage field.
enum flags_t
Declared in "libtorrent/add_torrent_params.hpp"
| name | value | description |
|---|---|---|
| flag_seed_mode | 1 | If flag_seed_mode is set, libtorrent will assume that all files are present for this torrent and that they all match the hashes in the torrent file. Each time a peer requests to download a block, the piece is verified against the hash, unless it has been verified already. If a hash fails, the torrent will automatically leave the seed mode and recheck all the files. The use case for this mode is if a torrent is created and seeded, or if the user already know that the files are complete, this is a way to avoid the initial file checks, and significantly reduce the startup time. Setting flag_seed_mode on a torrent without metadata (a .torrent file) is a no-op and will be ignored. If resume data is passed in with this torrent, the seed mode saved in there will override the seed mode you set here. |
| flag_override_resume_data | 2 | If flag_override_resume_data is set, flags set for this torrent in this add_torrent_params object will take precedence over whatever states are saved in the resume data. For instance, the paused, auto_managed, sequential_download, seed_mode, super_seeding, max_uploads, max_connections, upload_limit and download_limit are all affected by this flag. The intention of this flag is to have any field in add_torrent_params configuring the torrent override the corresponding configuration from the resume file, with the one exception of save resume data, which has its own flag (for historic reasons). |
| flag_upload_mode | 4 | If flag_upload_mode is set, the torrent will be initialized in upload-mode, which means it will not make any piece requests. This state is typically entered on disk I/O errors, and if the torrent is also auto managed, it will be taken out of this state periodically. This mode can be used to avoid race conditions when adjusting priorities of pieces before allowing the torrent to start downloading. If the torrent is auto-managed (flag_auto_managed), the torrent will eventually be taken out of upload-mode, regardless of how it got there. If it's important to manually control when the torrent leaves upload mode, don't make it auto managed. |
| flag_share_mode | 8 | determines if the torrent should be added in share mode or not. Share mode indicates that we are not interested in downloading the torrent, but merley want to improve our share ratio (i.e. increase it). A torrent started in share mode will do its best to never download more than it uploads to the swarm. If the swarm does not have enough demand for upload capacity, the torrent will not download anything. This mode is intended to be safe to add any number of torrents to, without manual screening, without the risk of downloading more than is uploaded. A torrent in share mode sets the priority to all pieces to 0, except for the pieces that are downloaded, when pieces are decided to be downloaded. This affects the progress bar, which might be set to "100% finished" most of the time. Do not change file or piece priorities for torrents in share mode, it will make it not work. The share mode has one setting, the share ratio target, see session_settings::share_mode_target for more info. |
| flag_apply_ip_filter | 16 | determines if the IP filter should apply to this torrent or not. By default all torrents are subject to filtering by the IP filter (i.e. this flag is set by default). This is useful if certain torrents needs to be excempt for some reason, being an auto-update torrent for instance. |
| flag_paused | 32 | specifies whether or not the torrent is to be started in a paused state. I.e. it won't connect to the tracker or any of the peers until it's resumed. This is typically a good way of avoiding race conditions when setting configuration options on torrents before starting them. |
| flag_auto_managed | 64 | If the torrent is auto-managed (flag_auto_managed), the torrent may be resumed at any point, regardless of how it paused. If it's important to manually control when the torrent is paused and resumed, don't make it auto managed. If flag_auto_managed is set, the torrent will be queued, started and seeded automatically by libtorrent. When this is set, the torrent should also be started as paused. The default queue order is the order the torrents were added. They are all downloaded in that order. For more details, see queuing. If you pass in resume data, the auto_managed state of the torrent when the resume data was saved will override the auto_managed state you pass in here. You can override this by setting override_resume_data. |
| flag_duplicate_is_error | 128 | |
| flag_merge_resume_trackers | 256 | defaults to off and specifies whether tracker URLs loaded from resume data should be added to the trackers in the torrent or replace the trackers. |
| flag_update_subscribe | 512 | on by default and means that this torrent will be part of state updates when calling post_torrent_updates(). |
| flag_super_seeding | 1024 | sets the torrent into super seeding mode. If the torrent is not a seed, this flag has no effect. It has the same effect as calling torrent_handle::super_seeding(true) on the torrent handle immediately after adding it. |
| flag_sequential_download | 2048 | sets the sequential download state for the torrent. It has the same effect as calling torrent_handle::sequential_download(true) on the torrent handle immediately after adding it. |
| flag_use_resume_save_path | 4096 | if this flag is set, the save path from the resume data file, if present, is honored. This defaults to not being set, in which case the save_path specified in add_torrent_params is always used. |
| flag_pinned | 8192 | indicates that this torrent should never be unloaded from RAM, even if unloading torrents are allowed in general. Setting this makes the torrent exempt from loading/unloading management. |
flag_auto_managed | flag_paused | flag_apply_ip_filter
|
8194 |
- version
- filled in by the constructor and should be left untouched. It is used for forward binary compatibility.
- ti
- torrent_info object with the torrent to add. Unless the url or info_hash is set, this is required to be initiazlied.
- trackers
- If the torrent doesn't have a tracker, but relies on the DHT to find peers, the trackers can specify tracker URLs for the torrent.
- url_seeds
- url seeds to be added to the torrent (BEP 17).
- dht_nodes name
- a list of hostname and port pairs, representing DHT nodes to be added to the session (if DHT is enabled). The hostname may be an IP address.
- save_path
the path where the torrent is or will be stored. Note that this may alos be stored in resume data. If you want the save path saved in the resume data to be used, you need to set the flag_use_resume_save_path flag.
Note
On windows this path (and other paths) are interpreted as UNC paths. This means they must use backslashes as directory separators and may not contain the special directories "." or "..".
- resume_data
- The optional parameter, resume_data can be given if up to date fast-resume data is available. The fast-resume data can be acquired from a running torrent by calling save_resume_data() on torrent_handle. See fast resume. The vector that is passed in will be swapped into the running torrent instance with std::vector::swap().
- storage_mode
- One of the values from storage_mode_t. For more information, see storage allocation.
- storage
- can be used to customize how the data is stored. The default storage will simply write the data to the files it belongs to, but it could be overridden to save everything to a single file at a specific location or encrypt the content on disk for instance. For more information about the storage_interface that needs to be implemented for a custom storage, see storage_interface.
- userdata
- The userdata parameter is optional and will be passed on to the extension constructor functions, if any (see add_extension()).
- file_priorities
- can be set to control the initial file priorities when adding a torrent. The semantics are the same as for torrent_handle::prioritize_files().
- trackerid
- the default tracker id to be used when announcing to trackers. By default this is empty, and no tracker ID is used, since this is an optional argument. If a tracker returns a tracker ID, that ID is used instead of this.
- url
If you specify a url, the torrent will be set in downloading_metadata state until the .torrent file has been downloaded. If there's any error while downloading, the torrent will be stopped and the torrent error state (torrent_status::error) will indicate what went wrong. The url may refer to a magnet link or a regular http URL.
If it refers to an HTTP URL, the info-hash for the added torrent will not be the true info-hash of the .torrent. Instead a placeholder, unique, info-hash is used which is later updated once the .torrent file has been downloaded.
Once the info-hash change happens, a torrent_update_alert is posted.
- uuid
- if uuid is specified, it is used to find duplicates. If another torrent is already running with the same UUID as the one being added, it will be considered a duplicate. This is mainly useful for RSS feed items which has UUIDs specified.
- source_feed_url
- should point to the URL of the RSS feed this torrent comes from, if it comes from an RSS feed.
- flags
- flags controlling aspects of this torrent and how it's added. See flags_t for details.
- info_hash
- set this to the info hash of the torrent to add in case the info-hash is the only known property of the torrent. i.e. you don't have a .torrent file nor a magnet link.
- max_uploads max_connections upload_limit download_limit
max_uploads, max_connections, upload_limit, download_limit correspond to the set_max_uploads(), set_max_connections(), set_upload_limit() and set_download_limit() functions on torrent_handle. These values let you initialize these settings when the torrent is added, instead of calling these functions immediately following adding it.
-1 means unlimited on these settings just like their counterpart functions on torrent_handle
cache_status
Declared in "libtorrent/disk_io_thread.hpp"
this struct holds a number of statistics counters relevant for the disk io thread and disk cache.
struct cache_status { cache_status (); std::vector<cached_piece_info> pieces; };
stats_metric
Declared in "libtorrent/session.hpp"
describes one statistics metric from the session. For more information, see the session statistics section.
struct stats_metric { char const* name; int value_index; int type; };
session_proxy
Declared in "libtorrent/session.hpp"
this is a holder for the internal session implementation object. Once the session destruction is explicitly initiated, this holder is used to synchronize the completion of the shutdown. The lifetime of this object may outlive session, causing the session destructor to not block. The session_proxy destructor will block however, until the underlying session is done shutting down.
class session_proxy { session_proxy (); };
session_proxy()
session_proxy ();
default constructor, does not refer to any session implementation object.
session
Declared in "libtorrent/session.hpp"
The session holds all state that spans multiple torrents. Among other things it runs the network loop and manages all torrents. Once it's created, the session object will spawn the main thread that will do all the work. The main thread will be idle as long it doesn't have any torrents to participate in.
You have some control over session configuration through the session::apply_settings() member function. To change one or more configuration options, create a settings_pack. object and fill it with the settings to be set and pass it in to session::apply_settings().
see apply_settings().
class session: public boost::noncopyable { session (fingerprint const& print = fingerprint("LT" , LIBTORRENT_VERSION_MAJOR, LIBTORRENT_VERSION_MINOR, 0, 0) , int flags = start_default_features | add_default_plugins , boost::uint32_t alert_mask = alert::error_notification); session (fingerprint const& print , std::pair<int, int> listen_port_range , char const* listen_interface = "<IP_ADDRESS>" , int flags = start_default_features | add_default_plugins , int alert_mask = alert::error_notification); session (settings_pack const& pack , int flags = start_default_features | add_default_plugins); ~session (); void load_state (lazy_entry const& e); void save_state (entry& e, boost::uint32_t flags = 0xffffffff) const; void refresh_torrent_status (std::vector<torrent_status>* ret , boost::uint32_t flags = 0) const; void get_torrent_status (std::vector<torrent_status>* ret , boost::function<bool(torrent_status const&)> const& pred , boost::uint32_t flags = 0) const; void post_torrent_updates (boost::uint32_t flags = 0xffffffff); void post_session_stats (); void post_dht_stats (); torrent_handle find_torrent (sha1_hash const& info_hash) const; std::vector<torrent_handle> get_torrents () const; void async_add_torrent (add_torrent_params const& params); torrent_handle add_torrent (add_torrent_params const& params, error_code& ec); torrent_handle add_torrent (add_torrent_params const& params); session_proxy abort (); void resume (); void pause (); bool is_paused () const; void set_load_function (user_load_function_t fun); void get_cache_info (cache_status* ret, torrent_handle h = torrent_handle(), int flags = 0) const; feed_handle add_feed (feed_settings const& feed); void remove_feed (feed_handle h); void get_feeds (std::vector<feed_handle>& f) const; bool is_dht_running () const; void set_dht_settings (dht_settings const& settings); void add_dht_router (std::pair<std::string, int> const& node); void add_dht_node (std::pair<std::string, int> const& node); void dht_get_item (sha1_hash const& target); void dht_get_item (boost::array<char, 32> key , std::string salt = std::string()); sha1_hash dht_put_item (entry data); void dht_put_item (boost::array<char, 32> key , boost::function<void(entry&, boost::array<char,64>& , boost::uint64_t&, std::string const&)> cb , std::string salt = std::string()); void add_extension (boost::function<boost::shared_ptr<torrent_plugin>( torrent*, void*)> ext); void add_extension (boost::shared_ptr<plugin> ext); ip_filter get_ip_filter () const; void set_ip_filter (ip_filter const& f); void set_port_filter (port_filter const& f); peer_id id () const; void set_key (int key); bool is_listening () const; unsigned short listen_port () const; unsigned short ssl_listen_port () const; void set_peer_class_filter (ip_filter const& f); void set_peer_class_type_filter (peer_class_type_filter const& f); int create_peer_class (char const* name); void delete_peer_class (int cid); peer_class_info get_peer_class (int cid); void set_peer_class (int cid, peer_class_info const& pci); void remove_torrent (const torrent_handle& h, int options = 0); aux::session_settings get_settings () const; void apply_settings (settings_pack const& s); void pop_alerts (std::deque<alert*>* alerts); std::auto_ptr<alert> pop_alert (); alert const* wait_for_alert (time_duration max_wait); void set_alert_dispatch (boost::function<void(std::auto_ptr<alert>)> const& fun); void delete_port_mapping (int handle); int add_port_mapping (protocol_type t, int external_port, int local_port); enum save_state_flags_t { save_settings, save_dht_settings, save_dht_state, save_encryption_settings, save_feeds, }; enum options_t { delete_files, }; enum session_flags_t { add_default_plugins, start_default_features, }; enum protocol_type { udp, tcp, }; };
~session()
~session ();
The destructor of session will notify all trackers that our torrents have been shut down. If some trackers are down, they will time out. All this before the destructor of session returns. So, it's advised that any kind of interface (such as windows) are closed before destructing the session object. Because it can take a few second for it to finish. The timeout can be set with apply_settings().
load_state() save_state()
void load_state (lazy_entry const& e); void save_state (entry& e, boost::uint32_t flags = 0xffffffff) const;
loads and saves all session settings, including dht_settings, encryption settings and proxy settings. save_state writes all keys to the entry that's passed in, which needs to either not be initialized, or initialized as a dictionary.
load_state expects a lazy_entry which can be built from a bencoded buffer with lazy_bdecode().
The flags arguments passed in to save_state can be used to filter which parts of the session state to save. By default, all state is saved (except for the individual torrents). see save_state_flags_t
get_torrent_status() refresh_torrent_status()
void refresh_torrent_status (std::vector<torrent_status>* ret , boost::uint32_t flags = 0) const; void get_torrent_status (std::vector<torrent_status>* ret , boost::function<bool(torrent_status const&)> const& pred , boost::uint32_t flags = 0) const;
Note
these calls are potentially expensive and won't scale well with lots of torrents. If you're concerned about performance, consider using post_torrent_updates() instead.
get_torrent_status returns a vector of the torrent_status for every torrent which satisfies pred, which is a predicate function which determines if a torrent should be included in the returned set or not. Returning true means it should be included and false means excluded. The flags argument is the same as to torrent_handle::status(). Since pred is guaranteed to be called for every torrent, it may be used to count the number of torrents of different categories as well.
refresh_torrent_status takes a vector of torrent_status structs (for instance the same vector that was returned by get_torrent_status() ) and refreshes the status based on the handle member. It is possible to use this function by first setting up a vector of default constructed torrent_status objects, only initializing the handle member, in order to request the torrent status for multiple torrents in a single call. This can save a significant amount of time if you have a lot of torrents.
Any torrent_status object whose handle member is not referring to a valid torrent are ignored.
post_torrent_updates()
void post_torrent_updates (boost::uint32_t flags = 0xffffffff);
This functions instructs the session to post the state_update_alert, containing the status of all torrents whose state changed since the last time this function was called.
Only torrents who has the state subscription flag set will be included. This flag is on by default. See add_torrent_params. the flags argument is the same as for torrent_handle::status(). see torrent_handle::status_flags_t.
post_session_stats()
void post_session_stats ();
This function will post a session_stats_alert object, containing a snapshot of the performance counters from the internals of libtorrent. To interpret these counters, query the session via session_stats_metrics().
For more information, see the session statistics section.
find_torrent() get_torrents()
torrent_handle find_torrent (sha1_hash const& info_hash) const; std::vector<torrent_handle> get_torrents () const;
find_torrent() looks for a torrent with the given info-hash. In case there is such a torrent in the session, a torrent_handle to that torrent is returned. In case the torrent cannot be found, an invalid torrent_handle is returned.
See torrent_handle::is_valid() to know if the torrent was found or not.
get_torrents() returns a vector of torrent_handles to all the torrents currently in the session.
add_torrent() async_add_torrent()
void async_add_torrent (add_torrent_params const& params); torrent_handle add_torrent (add_torrent_params const& params, error_code& ec); torrent_handle add_torrent (add_torrent_params const& params);
You add torrents through the add_torrent() function where you give an object with all the parameters. The add_torrent() overloads will block until the torrent has been added (or failed to be added) and returns an error code and a torrent_handle. In order to add torrents more efficiently, consider using async_add_torrent() which returns immediately, without waiting for the torrent to add. Notification of the torrent being added is sent as add_torrent_alert.
The overload that does not take an error_code throws an exception on error and is not available when building without exception support. The torrent_handle returned by add_torrent() can be used to retrieve information about the torrent's progress, its peers etc. It is also used to abort a torrent.
If the torrent you are trying to add already exists in the session (is either queued for checking, being checked or downloading) add_torrent() will throw libtorrent_exception which derives from std::exception unless duplicate_is_error is set to false. In that case, add_torrent() will return the handle to the existing torrent.
all torrent_handles must be destructed before the session is destructed!
abort()
session_proxy abort ();
In case you want to destruct the session asynchrounously, you can request a session destruction proxy. If you don't do this, the destructor of the session object will block while the trackers are contacted. If you keep one session_proxy to the session when destructing it, the destructor will not block, but start to close down the session, the destructor of the proxy will then synchronize the threads. So, the destruction of the session is performed from the session destructor call until the session_proxy destructor call. The session_proxy does not have any operations on it (since the session is being closed down, no operations are allowed on it). The only valid operation is calling the destructor:
class session_proxy { public: session_proxy(); ~session_proxy() };
pause() resume() is_paused()
void resume (); void pause (); bool is_paused () const;
Pausing the session has the same effect as pausing every torrent in it, except that torrents will not be resumed by the auto-manage mechanism. Resuming will restore the torrents to their previous paused state. i.e. the session pause state is separate from the torrent pause state. A torrent is inactive if it is paused or if the session is paused.
set_load_function()
void set_load_function (user_load_function_t fun);
This function enables dynamic loading of torrent files. When a torrent is unloaded but needs to be availabe in memory, this function is called from within the libtorrent network thread. From within this thread, you can not use any of the public APIs of libtorrent itself. The the info-hash of the torrent is passed in to the function and it is expected to fill in the passed in vector<char> with the .torrent file corresponding to it.
If there is an error loading the torrent file, the error_code (ec) should be set to reflect the error. In such case, the torrent itself is stopped and set to an error state with the corresponding error code.
Given that the function is called from the internal network thread of libtorrent, it's important to not stall. libtorrent will not be able to send nor receive any data until the function call returns.
The signature of the function to pass in is:
void fun(sha1_hash const& info_hash, std::vector<char>& buf, error_code& ec);
get_cache_info()
void get_cache_info (cache_status* ret, torrent_handle h = torrent_handle(), int flags = 0) const;
Fills in the cache_status struct with information about the given torrent. If flags is session::disk_cache_no_pieces the cache_status::pieces field will not be set. This may significantly reduce the cost of this call.
add_feed()
feed_handle add_feed (feed_settings const& feed);
This adds an RSS feed to the session. The feed will be refreshed regularly and optionally add all torrents from the feed, as they appear.
Before adding the feed, you must set the url field to the feed's url. It may point to an RSS or an atom feed. The returned feed_handle is a handle which is used to interact with the feed, things like forcing a refresh or querying for information about the items in the feed. For more information, see feed_handle.
remove_feed()
void remove_feed (feed_handle h);
Removes a feed from being watched by the session. When this call returns, the feed handle is invalid and won't refer to any feed.
get_feeds()
void get_feeds (std::vector<feed_handle>& f) const;
Returns a list of all RSS feeds that are being watched by the session.
is_dht_running() set_dht_settings()
bool is_dht_running () const; void set_dht_settings (dht_settings const& settings);
set_dht_settings sets some parameters availavle to the dht node. See dht_settings for more information.
is_dht_running() returns true if the DHT support has been started and false otherwise.
get_dht_settings() returns the current settings
add_dht_router() add_dht_node()
void add_dht_router (std::pair<std::string, int> const& node); void add_dht_node (std::pair<std::string, int> const& node);
add_dht_node takes a host name and port pair. That endpoint will be pinged, and if a valid DHT reply is received, the node will be added to the routing table.
add_dht_router adds the given endpoint to a list of DHT router nodes. If a search is ever made while the routing table is empty, those nodes will be used as backups. Nodes in the router node list will also never be added to the regular routing table, which effectively means they are only used for bootstrapping, to keep the load off them.
An example routing node that you could typically add is router.bittorrent.com.
dht_get_item()
void dht_get_item (sha1_hash const& target);
query the DHT for an immutable item at the target hash. the result is posted as a dht_immutable_item_alert.
dht_get_item()
void dht_get_item (boost::array<char, 32> key , std::string salt = std::string());
query the DHT for a mutable item under the public key key. this is an ed25519 key. salt is optional and may be left as an empty string if no salt is to be used. if the item is found in the DHT, a dht_mutable_item_alert is posted.
dht_put_item()
sha1_hash dht_put_item (entry data);
store the given bencoded data as an immutable item in the DHT. the returned hash is the key that is to be used to look the item up agan. It's just the sha-1 hash of the bencoded form of the structure.
dht_put_item()
void dht_put_item (boost::array<char, 32> key , boost::function<void(entry&, boost::array<char,64>& , boost::uint64_t&, std::string const&)> cb , std::string salt = std::string());
store a mutable item. The key is the public key the blob is to be stored under. The optional salt argument is a string that is to be mixed in with the key when determining where in the DHT the value is to be stored. The callback function is called from within the libtorrent network thread once we've found where to store the blob, possibly with the current value stored under the key. The values passed to the callback functions are:
- entry& value
- the current value stored under the key (may be empty). Also expected to be set to the value to be stored by the function.
- boost::array<char,64>& signature
- the signature authenticating the current value. This may be zeroes if there is currently no value stored. The functon is expected to fill in this buffer with the signature of the new value to store. To generate the signature, you may want to use the sign_mutable_item function.
- boost::uint64_t& seq
- current sequence number. May be zero if there is no current value. The function is expected to set this to the new sequence number of the value that is to be stored. Sequence numbers must be monotonically increasing. Attempting to overwrite a value with a lower or equal sequence number will fail, even if the signature is correct.
- std::string const& salt
- this is the salt that was used for this put call.
Since the callback function cb is called from within libtorrent, it is critical to not perform any blocking operations. Ideally not even locking a mutex. Pass any data required for this function along with the function object's context and make the function entirely self-contained. The only reason data blobs' values are computed via a function instead of just passing in the new value is to avoid race conditions. If you want to update the value in the DHT, you must first retrieve it, then modify it, then write it back. The way the DHT works, it is natural to always do a lookup before storing and calling the callback in between is convenient.
add_extension()
void add_extension (boost::function<boost::shared_ptr<torrent_plugin>( torrent*, void*)> ext); void add_extension (boost::shared_ptr<plugin> ext);
This function adds an extension to this session. The argument is a function object that is called with a torrent* and which should return a boost::shared_ptr<torrent_plugin>. To write custom plugins, see libtorrent plugins. For the typical bittorrent client all of these extensions should be added. The main plugins implemented in libtorrent are:
- metadata extension
- Allows peers to download the metadata (.torren files) from the swarm directly. Makes it possible to join a swarm with just a tracker and info-hash.
#include <libtorrent/extensions/metadata_transfer.hpp> ses.add_extension(&libtorrent::create_metadata_plugin);
- uTorrent metadata
- Same as metadata extension but compatible with uTorrent.
#include <libtorrent/extensions/ut_metadata.hpp> ses.add_extension(&libtorrent::create_ut_metadata_plugin);
- uTorrent peer exchange
- Exchanges peers between clients.
#include <libtorrent/extensions/ut_pex.hpp> ses.add_extension(&libtorrent::create_ut_pex_plugin);
- smart ban plugin
- A plugin that, with a small overhead, can ban peers that sends bad data with very high accuracy. Should eliminate most problems on poisoned torrents.
#include <libtorrent/extensions/smart_ban.hpp> ses.add_extension(&libtorrent::create_smart_ban_plugin);
get_ip_filter() set_ip_filter()
ip_filter get_ip_filter () const; void set_ip_filter (ip_filter const& f);
Sets a filter that will be used to reject and accept incoming as well as outgoing connections based on their originating ip address. The default filter will allow connections to any ip address. To build a set of rules for which addresses are accepted and not, see ip_filter.
Each time a peer is blocked because of the IP filter, a peer_blocked_alert is generated. get_ip_filter() Returns the ip_filter currently in the session. See ip_filter.
set_port_filter()
void set_port_filter (port_filter const& f);
apply port_filter f to incoming and outgoing peers. a port filter will reject making outgoing peer connections to certain remote ports. The main intention is to be able to avoid triggering certain anti-virus software by connecting to SMTP, FTP ports.
id()
peer_id id () const;
returns the raw peer ID used by libtorrent. When anonymous mode is set the peer ID is randomized per peer.
set_key()
void set_key (int key);
sets the key sent to trackers. If it's not set, it is initialized by libtorrent. The key may be used by the tracker to identify the peer potentially across you changing your IP.
listen_port() ssl_listen_port() is_listening()
bool is_listening () const; unsigned short listen_port () const; unsigned short ssl_listen_port () const;
is_listening() will tell you whether or not the session has successfully opened a listening port. If it hasn't, this function will return false, and then you can set a new settings_pack::listen_interfaces to try another interface and port to bind to.
listen_port() returns the port we ended up listening on. If the port specified in settings_pack::listen_interfaces failed, libtorrent will try to bind to the next port, and so on. If it fails settings_pack::max_retry_port_bind times, it will bind to port 0 (meaning the OS picks the port). The only way to know which port it ended up binding to is to ask for it by calling listen_port().
If all ports in the specified range fails to be opened for listening, libtorrent will try to use port 0 (which tells the operating system to pick a port that's free). If that still fails you may see a listen_failed_alert with port 0 even if you didn't ask to listen on it.
It is possible to prevent libtorrent from binding to port 0 by passing in the flag session::no_system_port in the flags argument.
The interface parameter can also be a hostname that will resolve to the device you want to listen on. If you don't specify an interface, libtorrent may attempt to listen on multiple interfaces (typically <IP_ADDRESS> and ::). This means that if your IPv6 interface doesn't work, you may still see a listen_failed_alert, even though the IPv4 port succeeded.
The flags parameter can either be 0 or session::listen_reuse_address, which will set the reuse address socket option on the listen socket(s). By default, the listen socket does not use reuse address. If you're running a service that needs to run on a specific port no matter if it's in use, set this flag.
set_peer_class_filter()
void set_peer_class_filter (ip_filter const& f);
Sets the peer class filter for this session. All new peer connections will take this into account and be added to the peer classes specified by this filter, based on the peer's IP address.
The ip-filter essentially maps an IP -> uint32. Each bit in that 32 bit integer represents a peer class. The least significant bit represents class 0, the next bit class 1 and so on.
For more info, see ip_filter.
For example, to make all peers in the range <IP_ADDRESS> - <IP_ADDRESS> belong to their own peer class, apply the following filter:
ip_filter f; int my_class = ses.create_peer_class("200.1.x.x IP range"); f.add_rule(address_v4::from_string("<IP_ADDRESS>") , address_v4::from_string("<IP_ADDRESS>") , 1 << my_class); ses.set_peer_class_filter(f);
This setting only applies to new connections, it won't affect existing peer connections.
This function is limited to only peer class 0-31, since there are only 32 bits in the IP range mapping. Only the set bits matter; no peer class will be removed from a peer as a result of this call, peer classes are only added.
The peer_class argument cannot be greater than 31. The bitmasks representing peer classes in the peer_class_filter are 32 bits.
For more information, see peer classes.
set_peer_class_type_filter()
void set_peer_class_type_filter (peer_class_type_filter const& f);
Sets and gets the peer class type filter. This is controls automatic peer class assignments to peers based on what kind of socket it is.
It does not only support assigning peer classes, it also supports removing peer classes based on socket type.
The order of these rules being applied are:
- peer-class IP filter
- peer-class type filter, removing classes
- peer-class type filter, adding classes
For more information, see peer classes. TODO: add get_peer_class_type_filter() as well
create_peer_class()
int create_peer_class (char const* name);
Creates a new peer class (see peer classes) with the given name. The returned integer is the new peer class' identifier. Peer classes may have the same name, so each invocation of this function creates a new class and returns a unique identifier.
Identifiers are assigned from low numbers to higher. So if you plan on using certain peer classes in a call to set_peer_class_filter(), make sure to create those early on, to get low identifiers.
For more information on peer classes, see peer classes.
delete_peer_class()
void delete_peer_class (int cid);
This call dereferences the reference count of the specified peer class. When creating a peer class it's automatically referenced by 1. If you want to recycle a peer class, you may call this function. You may only call this function once per peer class you create. Calling it more than once for the same class will lead to memory corruption.
Since peer classes are reference counted, this function will not remove the peer class if it's still assigned to torrents or peers. It will however remove it once the last peer and torrent drops their references to it.
There is no need to call this function for custom peer classes. All peer classes will be properly destructed when the session object destructs.
For more information on peer classes, see peer classes.
get_peer_class() set_peer_class()
peer_class_info get_peer_class (int cid); void set_peer_class (int cid, peer_class_info const& pci);
These functions queries information from a peer class and updates the configuration of a peer class, respectively.
cid must refer to an existing peer class. If it does not, the return value of get_peer_class() is undefined.
set_peer_class() sets all the information in the peer_class_info object in the specified peer class. There is no option to only update a single property.
A peer or torrent balonging to more than one class, the highest priority among any of its classes is the one that is taken into account.
For more information, see peer classes.
remove_torrent()
void remove_torrent (const torrent_handle& h, int options = 0);
remove_torrent() will close all peer connections associated with the torrent and tell the tracker that we've stopped participating in the swarm. This operation cannot fail. When it completes, you will receive a torrent_removed_alert.
The optional second argument options can be used to delete all the files downloaded by this torrent. To do so, pass in the value session::delete_files. The removal of the torrent is asyncronous, there is no guarantee that adding the same torrent immediately after it was removed will not throw a libtorrent_exception exception. Once the torrent is deleted, a torrent_deleted_alert is posted.
get_settings() apply_settings()
aux::session_settings get_settings () const; void apply_settings (settings_pack const& s);
Applies the settings specified by the settings_pack s. This is an asynchronous operation that will return immediately and actually apply the settings to the main thread of libtorrent some time later.
pop_alert() pop_alerts() wait_for_alert()
void pop_alerts (std::deque<alert*>* alerts); std::auto_ptr<alert> pop_alert (); alert const* wait_for_alert (time_duration max_wait);
pop_alert() is used to ask the session if any errors or events has occurred. With settings_pack::alert_mask you can filter which alerts to receive through pop_alert(). For information about the alert categories, see alerts.
pop_alerts() pops all pending alerts in a single call. In high performance environments with a very high alert churn rate, this can save significant amount of time compared to popping alerts one at a time. Each call requires one round-trip to the network thread. If alerts are produced in a higher rate than they can be popped (when popped one at a time) it's easy to get stuck in an infinite loop, trying to drain the alert queue. Popping the entire queue at once avoids this problem.
However, the pop_alerts function comes with significantly more responsibility. You pass in an empty std::dequeue<alert*> to it. If it's not empty, all elements in it will be deleted and then cleared. All currently pending alerts are returned by being swapped into the passed in container. The responsibility of deleting the alerts is transferred to the caller. This means you need to call delete for each item in the returned dequeue. It's probably a good idea to delete the alerts as you handle them, to save one extra pass over the dequeue.
Alternatively, you can pass in the same container the next time you call pop_alerts.
wait_for_alert blocks until an alert is available, or for no more than max_wait time. If wait_for_alert returns because of the time-out, and no alerts are available, it returns 0. If at least one alert was generated, a pointer to that alert is returned. The alert is not popped, any subsequent calls to wait_for_alert will return the same pointer until the alert is popped by calling pop_alert. This is useful for leaving any alert dispatching mechanism independent of this blocking call, the dispatcher can be called and it can pop the alert independently.
Note
Although these functions are all thread-safe, popping alerts from multiple separate threads may introduce race conditions in that the thread issuing an asynchronous operation may not be the one receiving the alert with the result.
In the python binding, wait_for_alert takes the number of milliseconds to wait as an integer.
To control the max number of alerts that's queued by the session, see session_settings::alert_queue_size.
save_resume_data_alert and save_resume_data_failed_alert are always posted, regardelss of the alert mask.
set_alert_dispatch()
void set_alert_dispatch (boost::function<void(std::auto_ptr<alert>)> const& fun);
This sets a function to be called (from within libtorrent's netowrk thread) every time an alert is posted. Since the function (fun) is run in libtorrent's internal thread, it may not call any of libtorrent's external API functions. Doing so results in a dead lock.
The main intention with this function is to support integration with platform-dependent message queues or signalling systems. For instance, on windows, one could post a message to an HNWD or on linux, write to a pipe or an eventfd.
add_port_mapping() delete_port_mapping()
void delete_port_mapping (int handle); int add_port_mapping (protocol_type t, int external_port, int local_port);
add_port_mapping adds a port forwarding on UPnP and/or NAT-PMP, whichever is enabled. The return value is a handle referring to the port mapping that was just created. Pass it to delete_port_mapping() to remove it.
enum save_state_flags_t
Declared in "libtorrent/session.hpp"
| name | value | description |
|---|---|---|
| save_settings | 1 | saves settings (i.e. the session_settings) |
| save_dht_settings | 2 | saves dht_settings |
| save_dht_state | 4 | saves dht state such as nodes and node-id, possibly accelerating joining the DHT if provided at next session startup. |
| save_encryption_settings | 32 | save pe_settings |
| save_feeds | 128 | saves RSS feeds |
enum options_t
Declared in "libtorrent/session.hpp"
| name | value | description |
|---|---|---|
| delete_files | 1 | delete the files belonging to the torrent from disk. |
enum session_flags_t
Declared in "libtorrent/session.hpp"
| name | value | description |
|---|---|---|
| add_default_plugins | 1 | this will add common extensions like ut_pex, ut_metadata, lt_tex smart_ban and possibly others. |
| start_default_features | 2 | this will start features like DHT, local service discovery, UPnP and NAT-PMP. |
find_metric_idx()
Declared in "libtorrent/session.hpp"
int find_metric_idx (char const* name);
given a name of a metric, this function returns the counter index of it, or -1 if it could not be found. The counter index is the index into the values array returned by session_stats_alert.
session_stats_metrics()
Declared in "libtorrent/session.hpp"
std::vector<stats_metric> session_stats_metrics ();
This free function returns the list of available metrics exposed by libtorrent's statistics API. Each metric has a name and a value index. The value index is the index into the array in session_stats_alert where this metric's value can be found when the session stats is sampled (by calling post_session_stats()).


e
Academy
Online
In person
In a group
Sign Up
Log In
Help
Give lessons
M
My Profile
My Ads
My Request
Create Ad
Log Out
My Profile
My Ads
My Request
Create Ad
Log Out
Sign In
Log In
Help
Create Ad
Find
your ideal instructor
Online
In person
In a group
Find
your ideal instructor
Learn
anywhere at anytime
Get a tutor
is easier than you think
1
Search what you want to learn
Over 200 skills and growing.
2
Choose the tutor you want
Find the right one for you.
3
Book your lesson in one click
Contact with your teacher.
Learn
any material that you want
Academic
Economics
Physics
Politics
Chemistry
History
Languages
Spanish
English
Arabic
Chinese
Russian
IT
Basic skills
Programming
Excel
Database
Photoshop
Lifestyle
Cooking
Running
Babysitting
Meditation
Nutrition
Art
Acting
Painting
Dance
Photography
Ballet
Music
Guitar
Trumpet
Drums
Violin
Piano
Be part
of our community!
Become teacher
Select Your Students
Find the best fit for your location and schedule, in person or online.
Set Your Rate
Earn what you deserve for your qualifications and experience.
Save time
Motivated and serious students contact with you in just one click.
Sign Up
Sign in with Facebook
or
Already a member?
X
Login
Sign in with Facebook
or
Forgot Password? /
Not yet a member?
X
Forgot password
To retrieve your password, enter in the field below the e-mail address of your account.
Return to Sign-in
X
Search a tutor
Online
In person
In a group
X


| Name | Best For | Operating System | Free Trial | Ratings | Fees |
|---|---|---|---|---|---|
| YouMacro Video Downloader | Download videos from any site. | Windows | Full product is free | 5/5 | Free, No Ads, No Subscriptions |
| By Click Downloader | Downloading videos from any site. | Windows | None | 4.75/5 | Free, Premium: $3.99 |
| Wondershare Uniconverter | Full Featured Video Processing | Windows and Mac | Yes, with limited features | 4.75/5 | Starting at $55.99 per year for the 2-year plan. |
| 4K Video Downloader | 4K, 3D, 360 degree video download and conversion | Windows, Mac, Linux | None | 4.75/5 | Free plan, $15 for one time premium plan for 3 computers. |
| Leawo Video Downloader | Downloading HD videos at 6X faster speed. | Windows & Mac | Available | 4.5/5 | It starts at $29.95 per year |
| iTubeGo | Video grabbing and conversion capabilities. | Windows, Mac, Android. | Free plan available | 4.5/5 | It starts at $9.95 per month for 1PC. |
| SnapDownloader | Downloading video from more than 900 websites. | Windows & Mac | Available for 24 hours | 4.5/5 | It starts at a $ 19.99-lifetime license for 1 computer. |
| ClipGrab | Basic Video capture/download from multiple online platforms | Windows, Mac, Linux | None | 4/5 | Free |
| aTube Catcher | Video and Audio Capturing/ Video to audio conversion | Windows, Mac | None | 4.5/5 | Free |
| JDownloader | Free and open source video downloader | Windows, Mac, Linux, Android, iOS | None | 3.5/5 | Free |
| Clip Converter | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| VideoProc | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| 4k Video Downloader | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| Allavsoft - Video and Music Downloader | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| ByClick Downloader | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| YTD Video Downloader | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| Freemake Video Downloader | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| aTube Catcher | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |
| Any Video Converter | Download, record and convert videos | Windows, Mac, iOS, Android | None | 4/5 | Free |


--- layout: post author: sarco_builders title: We Built a Wind Sock ---
A windsock is an instrument that is used at airports as a dead-simple visual guide to wind speed and direction. It is able to communicate an incredible amount of information in glance. In under a second, a pilot can internalize the wind speed based on where the bend in the sock is:
1st Hoop: 0–3kts (hanging down)
2nd Hoop: 6kts
3rd Hoop: 9kts
4th Hoop: 12kts
5th Hoop: 15kts+ (blowing 90° from ground)
Then based on where the end of the windsock is, the pilot can also see the direction in which the wind is blowing at the runway altitude. All windsocks have these same color patters and wind attributes.
If multiple observations are done the pilot can see the changes in speed and direction of the wind, essential data when you’re landing a small plane. In the above illustration we can see that the wind is blowing from right to left at 3kts or less.
The builders have created a mechanism for token distribution that is based purely on opportunity cost. Its purpose is to distribute tokens in a fair way, but also to serve as a dead-simple indicator for builders, Sarcophagus DAO members, embalmers, archaeologists and other interested parties. This indicator will be extremely valuable for network participants until equilibriums are reached.
It works by distributing 1% of the (fixed) 100,000,000 $SARCO token supply to users who choose to lock their stablecoins into the contract. Any locked coins are distributed $SARCO tokens in direct proportion to their weight in the pool recalculated per second. The contract only supports $USDC, $USDT, and $DAI. The contract runs for exactly one year.
All tokens are liquid and can be unlocked at any time. When the stablecoins are locked into the contract, they are not being used for anything. Just sitting there; and that’s the point.
In the future the builders expect the liquidity mining to allow for more clarity in making decisions. For example, if the DAO was to vote to buy or sell $SARCO tokens in the future, the history of the liquidity mining program transactions overlaid against the average DeFi lending opportunity cost for the period can inform a more accurate and less hand-wavy proposal for vote. Everyone wins here as it is hard to manipulate the past.
The total opportunity cost for the liquidity mining contract can be found by taking the daily DeFi lending rates for each token ($USDC, $USDT and $DAI) from the beginning of the contract (Jan 13th, 00:00 UTC), multiplying them by the value of each token in the contract per day. You can then find the implied token value by dividing the opportunity cost by the number of emitted $SARCO tokens at the time of calculation.
Since lending rates (opportunity cost) are constantly variable, we must decide on a tick increment, one day is the easiest, hourly is even better if you have the data. Strictly speaking lending rates should be calculated per second and volume weighted averaged between all decentralized lending options, but this is a windsock not a dissertation — we’ve just been using data from Compound.
In calculating implied value, there are 7 variables at play:
The change in DeFi lending rates has an effect on the equation equal to locked value, and as you know — yields for different stablecoins can be very different, and can move quickly.


"MOULDY" Of the Gibeonites it is said that “all the bread of their provision was dry and mouldy” (Joshua 9:5, 12). The Hebrew word here rendered “mouldy” (nikuddim) is rendered “cracknels” in 1 Kings 14:3, and denotes a kind of crisp cake. The meaning is that the bread of the Gibeonites had become dry and hard, hard as biscuits, and thus was an evidence of the length of the journey they had travelled.
"MOULDY" Of the Gibeonites it is said that “all the bread of their provision was dry and mouldy” (Joshua 9:5, 12). The Hebrew word here rendered “mouldy” (nikuddim) is rendered “cracknels” in 1 Kings 14:3, and denotes a kind of crisp cake. The meaning is that the bread of the Gibeonites had become dry and hard, hard as biscuits, and thus was an evidence of the length of the journey they had travelled.


1. The Roanoke Times lists "Goodnight Hush" at the Eleanor Wilson Museum of Hollins University.
2. Here's the page at Roanoke Times for the event. It links to the museum's site.
3. The museum's site has an Events page.
4. The museum's calendar has an iCalendar feed!
Here is the iCal URL: http://www.trumba.com/calendars/hollins-events-art.ics.


It's one in the morning on a Tuesday. I have class tomorrow and I cannot even finish the first assignment. All my program has to do is display "Hello, world."
I don't get it. I am supposed to just write "print" before "Hello, World." But how do I run the program? Why does that work? I really spent eleven years reading nonsense words to figure out how to spell to get stuck on this.
Maybe they were right, I am going to be a gas station attendent. They told me otherwise, but I know.
No, no, no. I can figure this out. Let me look at the class notes.
I am absolutely fucked.
I mean, I know I didn't do much reading in highschool nor did I do very much math, but this should be simple. Maybe this is why Mr. O said he couldn't teach me programming, he never was able to learn.
What am I going to tell Jim. I just got to college and I am already hitting a wall.
I am no better than I was.
Let me try this again:
>>> print "Hello world."
Hello, world
Wait, it worked...it actually worked. Let me try it again.
Fuck, why didn't that work.


Params to pass at the underlying requestFunction
Fetch the nearest stops around a specific geo-point
latitude
longitude
Params to pass at the underlying requestFunction
Fetch the daily schedule for a line When this schedule exists, it overrides the schedule fetched by getSchedLines
Params to pass at the underlying requestFunction
Fetch a specific schedule for a line
Masterline Code, you can fetch it through webGetLinesWithMLInfo
Schedule Code, you can fetch it through getScheduleDaysMasterline
Params to pass at the underlying requestFunction
Fetch the different types of schedules for a line
Params to pass at the underlying requestFunction
Fetch all the bus arrivals at a specific stop
Params to pass at the underlying requestFunction
Fetch all lines
Params to pass at the underlying requestFunction
Fetch all the lines along with their Masterline information It is mostly equivalent to webGetLines, but fetches some information useful for fetching schedules afterwards.
Params to pass at the underlying requestFunction
Fetch routes of a single line
Params to pass at the underlying requestFunction
Fetch the path of a route (geo-points) along with its stops (It's a combination of webRouteDetails and {@link @webGetStops})
Params to pass at the underlying requestFunction
Fetch the stops of a route
Params to pass at the underlying requestFunction
Fetch the path of a route (geo-points)
Params to pass at the underlying requestFunction
Fetch the routes passing through a stop
Params to pass at the underlying requestFunction
Generated using TypeDoc
Fetch the locations of all the buses on a route


[gecode-users] Quicksort bug
Christian Schulte
cschulte at kth.se
Wed Dec 17 15:00:06 CET 2008
Hi Michal,
you are absolutely right, our quicksort implementation only handles strict
comparison! And actually, I did it that way because partitioning becomes
more efficient that way.
However, the bug was in the docs which omitted that piece of information
(quicksort is actually one of the oldest parts of Gecode and existed before
Gecode got its documentation)! That's now fixed together with the assertions
you suggested and works for arrays that have more than 2^32 elements (I
chose sizeof(int) * CHAR_BITS, as you can only use integers to specify the
number of elements to sort).
I also fixed the order for TupleSet but not the duplicate issue (just make
the order strict), I'll leave that to Mikael who will be back tomorrow.
Thanks again for your kind effort!
Cheers
Christian
--
Christian Schulte, www.ict.kth.se/~cschulte/
-----Original Message-----
From: Michal D. [mailto:michal.dobrogost at gmail.com]
Sent: Tuesday, December 16, 2008 5:24 AM
To: Christian Schulte
Cc: users at gecode.org
Subject: Re: [gecode-users] Quicksort bug
Hi Christian,
Put the attached file in the same directory as sort.icc. Compile with "g++
-ggdb main.cpp".
The program uses quicksort on an array of 21 uniform elements. I get a seg
fault right on line 121 as predicted (hehe, can't believe my luck, or rather
bad luck). It only happens with the "<" comparison. I haven't tried on a 32
bit system but I don't imagine it would make any difference.
Program received signal SIGSEGV, Segmentation fault.
0x0000000000400dda in Gecode::Support::partition<int, comp> (l=0x800d01084,
r=0x800d010cc, lt=@0x7fffffffea9f) at sort.icc:121
121 while (lt(*(++i),v)) {}
Does Gecode admit the use of asserts? Maybe it should have a simple check
"assert(! lt(L[i], L[i]))" for all elements in the array in debug mode
before launching into the sort? I know the std library containers do this
type of thing (at least in MSVC).
Cheers,
Michal
On Mon, Dec 15, 2008 at 4:32 PM, Christian Schulte <cschulte at kth.se> wrote:
> Hi Michal,
>
> I think that your reasoning is not fully correct:
> - Gecode's quicksort uses O(log n) stackspace: it will always push
> the larger array onto the stack,
> which will be at least n/2 long! That's O(log n).
> - There is no difference (in principle) whether you use a strict or
> non-strict ordering (as the complement
> will be the opposite).
>
> The only problem I see is that 32 was not good enough. Could you be so
> kind and retry what happens with replacing 32 by "sizeof(int) * 64"?
>
> Then, how much memory does your machine have? Then, how deep does the
> stack grow for Quicksort and how many elements does the array have you
> try to sort?
>
> Thanks
> Christian
>
>
> --
> Christian Schulte, www.it.kth.se/~cschulte/
>
> -----Original Message-----
> From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> Behalf Of Michal D.
> Sent: Saturday, December 13, 2008 7:03 PM
> To: users at gecode.org
> Subject: [gecode-users] Quicksort bug
>
> Hi All,
>
> I had one hell of a bug hunt recently. What started as a crash on
> winxp x64 ended up in a "true" being changed to a "false" on freebsd
> (so I could sanely debug into the Gecode code base). The culprit was
> FullTupleCompare
> (gecode/int/extensional/tuple-set.cc) but quicksort also got hit in
> the cross-fire.
>
> FullTupleCompare implements a less than or equal (<=) operator and not
> a strict less than (<) operator. In effect, for the case where both
> tuples are identical up the arity it returns true instead of false.
> This causes quicksort massive problems. See tuple-set.cc.diff for the fix.
>
> The gecode quicksort assumes that its stack will never exceed a depth of
32.
> This was getting exceeded when used on a large tupleset with the above
> comparison operator. However, in general this assumption is wrong.
> Stack usage for quicksort is worst case O(n) depending on the values
> that are chosen for the pivot! Exceeding the stack current results in
> an outright crash as an out of bounds pointer is dereferenced. I toyed
with two fixes:
>
> 1) make push return a success/failure code and if the push fails then
> call quicksort recursively instead of pushing onto the stack. See
sort.icc.diff.
>
> 2) start off with an static stack and expand it dynamically if it's
> exceeded. I'm not sure if Memory::malloc() / Memory::free() are the
> right ways to go about grabbing memory. There is no performance
> penalty if the stack depth does not exceed 32 entries. See sort.icc.diff2.
>
> Both solutions have the overhead of checking if the stack is going to
> exceed
> 32 entries on a push. This doesn't seem significant especially since
> most of the work should be happening in partition. My vote is for fix
> # 2 as it seems to be the more robust solution (no potential stack
overflow).
>
> Cheers,
>
> Michal
>
>
More information about the gecode-users
mailing list


Morpho module
Description
This module affords morphological functions that can be executed on words.
Language
Choose the language:
Stemming
Method
Stem
PoS Conversion
Method
Convert
Normalization
Normalize
Tokenization
Tokenize
Verb Conjugation
Conjugate


My Dog
About Him
Name
My dog's name is Mr. Adam Benjamin Dog. He is named as such because
- Upon hearing Bennie and the Jets by Elton John he started doing a little dance
- Adam as the name given by the breeder
- And Mr. Dog as my little brother's two cents
Age
Bennie is 5 years old. We got him when I was in 4th grade and my brother was in 2nd, which probably explains the whole "Mr. Dog" thing.
Silky Terriers
Wikipedia describes Silkys as follows "The Australian Silky Terrier or simply Silky Terrier is a small breed of dog of the terrier dog type. The breed was developed in Australia, although the ancestral types and breeds were from Great Britain. It is closely related to the Australian Terrier and the Yorkshire Terrier."
Silky Terriers Website


In my presentation I will focus philosophically on the question how we should assess the importance of privacy within the current privacy debate. Recently there has been much attention to the different, far-reaching ways in which our privacy is being invaded. It is commonly referred to as a 'threat to our privacy'. However, this raises the question what exactly is being threatened - and many different claims are made in an attempt to address this, ranging from the importance of consumer control to political notions like freedom and democracy. There seems to be a lack of words to describe what is at stake, and a lack of consensus to defend it properly. This is highly problematic for both privacy activists and ordinary citizens.
I will focus on the following questions: what is privacy and how do we refer to it? Is privacy a "right", a private or public "interest" or can we understand it as a new kind of currency (commodification of our personal data)? And what do these different notions mean for the way we perceive the 'threat'? Furthermore, I will compare the different notions of privacy and what these differences mean in the defense of our privacy. In other words: what could be a proper way to claim our right to privacy?
Laurine Blonk presented and published her philosophical bachelor thesis on the topic of privacy as 'top level' undergraduate research at the Student Research Conference 2015 (www.studentresearchconference.nl).
She has work experience as a lecturer in philosophy and "levensbeschouwing" and also as a research assistant.
Currently she is pursuing a masters degree in both Humanistic Studies (University for Humanistic Studies, Utrecht) and Philosophy (Erasmus University Rotterdam). She is a member of the NLLGG.
Privacy paradox: People say they value privacy, but they don't act according to it.
Ppl don't want to sign up to the conference due to privacy concerns, but will happily fill out a form for a $5 discount.
Privacy is right as a protection agains to much (bureaucratic) power of the state or companies.


THE GENTLE ART.ificial intelligence
Profile
What my colleagues think I do...
What my family and friends think I do...
What I think I do...
What I actually do...
The gentle art
Brazilian Jiu Jitsu
Jiu Jitsu derives from the Japanese "Ju" meaning "gentle" and "Jutsu" meaning "art"; therefore, Jiu Jitsu generally translate to the "gentle art".
martial art - combat sport - ground fighting - joint locks - choke holds - takedowns
OpenPose
Real-time multi-person detection library with the capability of jointly detecting human body, hand, facial and foot keypoints on single images.
open source - supports multiple languages - supports multiple operating systems - 2D keypoint detections - 3D keypoint detections


Preparation time
1-2 hours
Cooking time
10 to 30 mins
Serves
Makes 500g/1lb 2oz pastry
Dietary
Sure, shop-bought puff pastry is fine most of the time. But if you want a really buttery flavour, try making your own rough puff.
Sift the flour and salt into a large mixing bowl, then put the bowl in the fridge for a few minutes to chill. (Keeping the flour and bowl cold will help you to get a better result later and create nice layers of pastry.)
Meanwhile, cut the butter into small cubes.
Using a round-bladed knife, stir the butter into the bowl until each piece is well coated with flour.
Pour in the water, then, working quickly, use the knife to bring everything together to a rough dough.
Gather the dough in the bowl using one hand, then turn it onto the work surface. Squash the dough into a fat, flat sausage, without kneading. Wrap in cling film then chill the dough in the fridge for 15 minutes.
Lightly flour the work surface and the pastry. Roll out the pastry in one direction until it’s about 1cm thick and three times as long as it is wide, or about 45x15cm/18x6in. Straighten up the sides with your hands now and again, and try to keep the top and bottom edges as square as possible.
Fold the bottom third of the pastry up, then the top third down, to make a block about 15x15cm/6x6in. It doesn’t matter if the pastry isn’t exactly the right size - the important thing is that the corners are nice and square.
Turn the dough so that its open edge is facing to the right, like a book. Press the edges of the pastry together with the rolling pin.
Roll out and fold the pastry again, repeating this four times in all to make a smooth dough, with buttery streaks here and there. If the pastry feels greasy at any point, or starts to spring back when as you roll, then cover and chill it for 10 minutes before continuing.
Chill the finished pastry for an hour, or ideally overnight, before using.
When you use the pastry roll it out to about the thickness of a £1 coin, and cook it at 200C/400F/Gas 6 for about 30 minutes.


Sometimes a used brain can make all the difference!
From the top refurbished markets and individual sellers, we got your perfect lappy!
From the top markets and sellers we got your perfect used laptop, refurbished in industrial class service centers with genuine rated parts with warranty, we got you fully covered. We also offers additional insuring schemes and paid extra guarantied repairs, so run your second brain at its full fledge, bring out the maximum productivity.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis esse officia repudiandae ad saepe ex, amet neque quod accusamus rem quia magnam magni dolorum facilis ullam minima perferendis? Exercitationem at quaerat commodi id libero eveniet harum perferendis laborum molestias quia.
{{ seller.description }}
Top Seller
{% endif %}{{ seller.phone_number }}
{{ seller.email }}
There are no sellers to display.


Authors: Fadi Biadsy, Ron J. Weiss, Pedro J. Moreno, Dimitri Kanevsky, Ye Jia
Abstract:
We describe Parrotron, an end-to-end-trained speech-to-speech
conversion model that maps an input spectrogram directly to
another spectrogram, without utilizing any intermediate discrete
representation. The network is composed of an encoder, a spectrogram and phoneme decoders,
followed by a vocoder to synthesize a time-domain waveform. We demonstrate that this model
can be trained to normalize speech from any speaker regardless
of accent, prosody, and background noise, into the voice of a
single canonical target speaker with a fixed accent and consistent
articulation and prosody. We further show that this normalization
model can be adapted to normalize highly atypical speech from
a deaf speaker, resulting in significant improvements in intelligibility and naturalness, measured via a speech recognizer and
listening tests. Finally, demonstrating the utility of this model
on other speech tasks, we show that the same model architecture
can be trained to perform a speech separation task.
In this section, we present examples of running Parrotron to convert atypical speech from a deaf speaker to fluent speech. The model is same as the normalization model above, but trained on a male target speaker voice. We include examples before and after adapting the model on 13.5 hours of speech from a deaf speaker.
After adaptation
Input
Output
Reference Transcript
Here is some information about Oklahoma
When do the girls get to the party?
You can use your regular name outside the game.
Here are listings for Clarks Village near Ann Arbor.
Maybe something happened to them.
Amber India restaurant is open until two A M tomorrow.
Here are your directions.
OK, three hours 45 minutes.
What is the weather tomorrow in Mountain View?
I want to see if Parrotron would work for other languages.
In this section, we present examples of training Parrotron to perform a speech separation task. We train it to identify and extract the loudest speaker in a mix of overlapping 8 speakers.
Examples are from the VCTK corpus licensed under the Open Data Commons Attribution License (ODC-By) v1.0.
(Griffin-Lim Vocoder).
We thank Françoise Beaufays, Michael Brenner, Diamantino Caseiro, Zhifeng Chen, Mohamed Elfeky, Patrick Nguyen, Bhuvana Ramabhadran, Andrew Rosenberg, Jason Pelecanos, Johan Schalkwyk, Yonghui Wu, and Zelin Wu for useful feedback.


NEED A DELICIOUS,JUICY FEELING IN YOUR MOUTH?
THEN LOOK NO FURTHER; PAPITO'S PIZZERIA GOTCHU !
The Restaurant prides itself on best pizzas prepared in a Traditional italian pizza oven for an exquisite taste
CHEESEBURGER PIZZA
CHICKEN TIKKA
BBQ STEAK
Ham pizza
VEG TIKKA
BEEF PEPPERONI
Moses Mbugua
TEL: +25478929986
P.O BOX 325 VALHALLA DRIVE


enum4linux
nmap
[nullinux](https://github.com/m8r0wn/nullinux) Enum OS, domain, shares, directories, users through SMB
CrackMapExec
rpcinfo
smbclient
[SMBmap](https://github.com/ShawnDEvans/smbmap) CME in python? enum shares, drives, drive permissions, contents, up/down, exec commands, PtH, etc.


Roll no
Name
Aggerate no
1
alpha
95
2
beta
94
3
gamma
91
4
delta
90
Alpha is the topper
Full Name
Age
E-mail
Password
Gender
Male
Female
DOB
Select
begineer
intermediate
pro
Send me details
Submit
Password


CSS has pseudo-classes that allow you to select the first instance of a selector at any level in the DOM like :first-of-type()
, but there is no equivalent in CSS for the ability to select only the first instance of an element matching a selector in the entire document (at any level). This would function more like document.querySelector()
in JavaScript.
Using document.querySelector
the ensure it’s the first instance:
this === document.querySelector(test)
@element strong {
eval('document.querySelector("strong") === $it && "$this"') {
background: lime;
}
}
strong[test='this === document.querySelector(`strong`)'] {
background: lime;
}
}


singlecellVR is a browser-contained, free, and open-access tool that allows users to interactively explore published studies or new data through an innovative VR interface. singlecellVR supports clustering, trajectory inference and abstract graph analysis for transcriptomic as well as epigenomic single cell data. We have developed a one-command conversion tool called scvr to make the results of commonly-used single-cell analysis tools compatible with singlecellVR.
singlecellVR can be used to visualize the output of commonly-used single cell analysis tools, including Scanpy/epiScanpy, Seurat, PAGA, and STREAM. singlecellVR also supports multiple cell annotations (e.g. FACS-sorting labels, clustering solutions, pseudotime, etc.), and feature quantification (gene expression levels, transcription factor deviation, etc.).
(1) Scanpy and epiScanpy
(2) Seurat:
(3) PAGA graph:
(4) STREAM trajectories:
singlecellVR is a web tool for single-cell data visualization and exploration. A cheap VR headset is required for the VR visualization (Google Cardboard or clones).
There are several similar versions of a cardboard adapter available for ~$8. This can be purchased on websites like Amazon.com or Google. You can also simply use your computer screen to do initial exploration of the data in 2-D. It is advisable to use a keyboard to unlock the full set of interactive functionalities associated with these key shortcuts:
You can easily connect a keyboard with your smartphone using a bluetooth enabled keyboard (a small portable keyboard can be purchased from Amazon for ~$8). However, you can still use a normal computer and your browser and explore with your mouse and keyboard the 3d transcriptional space with cells, trajectories and the graph abstraction.
Many VR headsets such as Google Cardboard have a single button that allows a user to click the screen of their phone while immersed in a virtual reality experience. By holding down this button, users without a keyboard may move forward in the direction of their gaze.
Users may navigate the virtual reality visualization via a combination of gaze controls and keyboard inputs. A circle, centered in the user’s FOV, indicates the direction that a user will move through the virtual space and also acts as the appendage through which the user will interact with objects in the visualization. Additionally, users may select the "keyboard" button on the menu to render a virtual keyboard. Cardboard users may use this keyboard to search for available features to render on the display. The "Enter/Return" key on the virtual keyboard clears the current search. Subsequently selecting the "keyboard" button will hide the keyboard from view.
The following should resolve the issue for an android phone - the issue has not yet been reported for iOS phones.
singlecellVR is free!
Please cite our preprint Stein DF*, Chen H*, Vinyard ME*, Pinello L. singlecellVR: interactive visualization of single-cell data in virtual reality. BioRxiv, (2020).
Please report an issue on our Github https://github.com/pinellolab/singlecellvr
Core team members:
David Stein, Huidong Chen, Michael Vinyard, Luca Pinello
Team members from Hackseq 2019 Project 15: Virtual and Augmented Reality for Single-Cell Data Exploration:
Michelle Crown, Alexander Dungate, David Lin, Sepand Dyanatkar Motaghed


| Home | Trees | Indices | Help |
|
|---|
|
|
Local Shared Object class, allows easy manipulation of the internals
of a sol
file.
|
|||
new empty dictionary |
|
||
|
|||
|
|||
|
Inherited from Inherited from |
|
|||
|
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
repr(x)
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Sep 7 23:17:51 2009 | http://epydoc.sourceforge.net |


vapi-client-bindings
vmc-client-bindings
vmc-draas-client-bindings
vapi-runtime
nsx-python-sdk
nsx-policy-python-sdk
nsx-vmc-policy-python-sdk
nsx-vmc-aws-integration-python-sdk


UWP Builds
This page describes how to build EZ for the Universal Windows Platform (UWP). For desktop builds, see this page.
Note that only a subset of EZ's functionality is officially maintained and supported on UWP. In general UWP support is not a priority for us.
Prerequisites
Install the desktop Windows prerequisites.
Microsoft Visual Studio
In Visual Studio, install these additional workloads:
- Universal Windows Platform Development
CMake
CMake is used as the build system. For UWP you need to have a custom installation.
Generate the Solution
To generate a solution for UWP, you need to pass a toolchain file to CMake. The file is located in the EZ repository under Code/BuildSystem/CMake/toolchain-winstore.cmake.
Using the CMake GUI
- Start the CMake GUI application.
- Create a new solution by pointing Where to build the binaries to a new location.
- Press Configure once, a dialog will show up to choose the generator.
- Choose the desired Visual Studio generator at the top.
- Depending on your target device, choose the platform. For instance, for HoloLens 1 select Win32.
- At the bottom select Specify toolchain file for cross-compiling.
- On the next screen set the toolchain file PathToEzRepository/Code/BuildSystem/CMake/toolchain-winstore.cmake
Using the command line
Run CMake with this argument: -DCMAKE_TOOLCHAIN_FILE=PathToEzRepository/Code/BuildSystem/CMake/toolchain-winstore.cmake
Building the Code
Open the generated solution with Visual Studio and build everything.


|
.engage
|
:
|
Offer marries to target
|
|
.divorce
|
:
|
Break relationship and become free
|
|
.gotolove
|
:
|
Teleport to your wife or husband
|
|
/clanpenalty
|
:
|
Broadcast info about time of clan penalty
|
|
/attacklist
|
:
|
Broadcast info about clans you've declared war on
|
|
/underattacklist
|
:
|
Broadcast list info about clans that have declared war on you
|
|
/warlist
|
:
|
Broadcast info about the declared war
|
|
/instancezone
|
:
|
Broadcast info about instance zone time reused
|
|
/olympiadstat
|
:
|
Broadcast info about current Grand Olympiad stat (can used on target)
|
|
/mybirthday
|
:
|
Broadcast info about your birth day
|
|
/unstuck
|
:
|
Teleport your to nearest town
|
|
/channelcreate
|
:
|
Create command channel
|
|
/channeldelete
|
:
|
Delete command channel
|
|
/channelinvite
|
:
|
Invite player command channel (Syntaxes /channelinvite Name)
|
|
/channelkick
|
:
|
Kick player from command channel (Syntaxes /channelkick Name)
|
|
/channelleave
|
:
|
Leave command channel
|
|
/channelinfo
|
:
|
Info about command channel
|


Computer Aided Design
We were introduced to another image manipulation editor GIMP as an alternative to Photoshop. As an exercise to warm up to the new software, we edited a profile picture of ours and place a different background behind.
Here is the link of where you can install GIMP on your desktop.
Process
- Using the Paths tool, outline your image or the parts that you would like to keep and press “enter” to make it uneditable
2.
Make sure the layer you place the picture on is below your portrait.
This step is optional, but if you head to “filters” and go to “blur” then “gaussian blur”, it helps to create contrast and blur out the background a little bit.
Exercise 1
To familiarise ourselves with Fusion 360, we were tasked to do three different exercises by replicating the figure provided to us.


Data.Buffer.Lazy.Word8
The Buffer type
Introducing and eliminating Buffers
Basic interface
Transforming Buffers
Reducing Buffers (folds)
Special folds
Building Buffers
Scans
Accumulating maps
Infinite Buffers
Unfolding Buffers
Substrings
Breaking strings
Breaking into many substrings
Predicates
Search for arbitrary substrings
Searching Buffers
Searching by equality
Searching with a predicate
Indexing Buffers
Zipping and unzipping Buffers
Ordered Buffers
Low level conversions
Copying Buffers
Standard input and output
Files
I/O with Handles


CrankyCritic® movie reviews: Splendor Rated [R], 93 minutes Starring Kathleen Robertson, Johnathon Schaech, Matt Keeslar, Kelly MacDonald and Eric Mabius Written and Directed by Gregg Araki
IN SHORT: Two Guys and A Girl.
A threesome is about all that Splendor has in common with last year's Two Girls and A Guy, but the symmetry of words was just too damn attractive to dismiss. And, no, the girls didn't do each other in 2 Girls and the guys don't do each other in Splendor, writer/producer/director/editor Gregg Araki's far lighter and funnier flick. That's more comparison than I'm supposed to do, so let's move on.
Poor, bedraggled, dateless starving actor Veronica (Kathleen Robertson) is lugged to a Halloween rave by her vicious and nasty lesbian best friend Mike (Kelly MacDonald) who has the hots for a singer in the band. [Costuming: V's a tampon. M's the tampon box. They're glued together. Go figure]. Veronica is having a perfectly awful time, not expecting to meet her Prince Charming but . . . there he is. PC is Abel (Johnathon Schaech), a polite, handsome, freelance rock critic dorkily dressed as Prince Charming. It's love at first sight, and the visuals lack only floating animated hearts and cupids to make it, well, in keeping with the twisted and very funny nature of the story to be. For just as V and her PC share their first embrace, the band takes the stage. Behind the drum kit is Zed (Matt Keeslar), properly described as having "the face of an angel and the abs of an underwear model." We'll discover that he, too, is struck, so, what's a gal to do when faced with the daunting prospect of two perfect, although diametrically opposite, potential dates?
Hell, do 'em both, says Mike. Which is a perfectly logical thing to do at age 22. (Hell, it's a perfectly logical thing to do at age 40, though it's a helluva lot harder on the knees, says Cranky.) It's a very funny situation, one which could drag on for at least twoor three seasons of a teevee sitcom, except that this is the movies and the animal vs. intellectual battle plays out better in small spaces. As in 3 people in one oversized apartment that none of them can afford. It works for Friends and it works for Splendor, and we haven't even gotten to the kink in this considerably less than kinky relationship. His name is Ernest. He's a director on one of Veronica's jobs. You can guess his background just by looking at the demographics of our principals.
And what is it about Splendor that has made me say too much? Interestingly enough, the scenes of the threesome and/or Veronica with her friend Mike are all so beautiful designed and photographed that Cranky started thinking, "this looks like a Gap commercial as if shot on a set designed by whoever did Friends." The digs are too big and they're overdesigned up the wazoo -- totally gorgeous, magnificent setpieces. Nothing realistic about any of it, but I can live with that fairy tale feeling (Veronica did drop the Prince Charming/ Knight on Shining Armor reference into the descriptive dialog that frames the film as a flashback), so let's give a proper credit goes to Production Designer Patti Podesta who did fine work. Here's the interesting thing. The scenes with Ernest, the super-rich director dude are all grainy, with the look of a 16mm documentary. Sure enough, DP Jim Fealy has shot both commercials and documentaries. So what's the point of this divergent paragraph?
The point is that if the film story were strong enough, Cranky would not have been distracted by the set design and photography. Again, both are marvelous. But both draw attention from the story and the story is what counts. So points off for distraction.
On average, a first run movie ticket will run you Eight Bucks. Were Cranky able to set his own price to Splendor, he would have paid...
$3.00
Rental level for this old fart. If I were back in the post-college to pre-yuppie days, Splendor would've passed nicely as a dateflick. It's light and funny and most of what you see feels fairly realistic if you buy the reasoning behind the menage.
The Cranky Critic® is a Registered Trademark of, and Copyright © 1999 by, Chuck Schwartz. All Rights Reserved. Cranky on the web at www.crankycritic.com
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Signal transduction by DR3, a death domain-containing receptor related to TNFR-1 and CD95.
Abstract
Tumor necrosis factor receptor-1 (TNFR-1) and CD95 (also called Fas or APO-1) are cytokine receptors that engage the apoptosis pathway through a region of intracellular homology, designated the `` death domain. '' Another death domain-containing member of the TNFR family, death receptor 3 (DR3), was identified and was shown to induce both apoptosis and activation of nuclear factor kappaB. Expression of DR3 appears to be restricted to tissues enriched in lymphocytes. DR3 signal transduction is mediated by a complex of intracellular signaling molecules including TRADD, TRAF2, FADD, and FLICE. Thus, DR3 likely plays a role in regulating lymphocyte homeostasis.


Recently on a call-in radio show the topic was ``Why aren't there any real movie stars anymore? Where are today's Clark Gables, John Waynes and Katharine Hepburns?'' griped the host, as some callers attempted to make cases for Harrison Ford, Tom Cruise and Jodie Foster.
Oddly, no one brought up Mel Gibson, but after ``Conspiracy Theory'' it's unlikely he'll be overlooked next time. If you've ever questioned Gibson's appeal, this serio-comic thriller offers 135 minutes of persuasive evidence as to why he's become one of the world's most reliable box-office draws. ``Conspiracy Theory'' is an unabashed Ode To Mel, written specifically for him by Bryan Helgeland and directed by Richard Donner, who previously led him through the ``Lethal Weapon'' trilogy and ``Maverick.''
Julia Roberts may share top billing, but this is not a duet: Roberts' character isn't even properly introduced until 20 minutes into the picture, and she doesn't fully figure into the action until the second hour.
Donner has always been able to bring out the full spectrum of Gibson, especially the actor's wackier tendencies and his penchant for calling up looks of little-boy innocence in the face of love. ``Conspiracy Theory'' leans heavily on both of these resources, as Gibson portrays spacey New York City cabbie Jerry Fletcher, who sees deception and disinformation everywhere.
Those silver threads in the new $100 bills? Jerry claims they're a tracking device. And the Grateful Dead is always on tour because ``they're British agents.''
``Conspiracy Theory'' spends a lot of time and energy establishing Jerry's lunacy; as was the case in ``Maverick,'' Gibson indulges his passion for ad-libbing and Donner is reluctant to cut away. As a result, the story often comes to a halt so that its star can do his thing.
Not that Helgeland's tale is any ground-breaker itself. Of course, nutty Jerry's homemade newsletter contains one far-fetched theory that proves to be true, prompting chases by alleged CIA psychiatrist Jonas (Patrick Stewart) and his henchmen.
Justice Department investigator Alice Sutton (Roberts), Jerry's secret love, is drawn into the whirlpool as mysterious pasts, hidden identities and old coverups are exposed.
For at least two-thirds of its length, the film is agreeably lighthearted nonsense, with a few genuinely odd details: Jerry's kitchen, for instance, is a paranoiac's dream. Improbabilities and unanswered questions abound, but they're really moot points.
What ``Conspiracy Theory'' is really about is Gibson's talent for charming an audience, and this faux-Hitchcock yarn allows him to play funny, frantic, edgy and infatuated. Though the story abruptly turns serious in the last half-hour, Gibson is continuously charismatic.
Roberts is allotted a few moments to beam her patented smile and even gets a couple of solid freak-out scenes near the end, but she's simply a "special guest star" in Mel's showcase.
Never a terrifically distinctive director, Donner does have a gift for making his stars look dazzling and surrounding them with well-choreographed chaos. He's also extraordinarily self-referential, as he sends Jerry and his pursuers into a revival theater that's presenting ``Ladyhawke,'' that 1985 sword-and-sorcery spectacular directed by, yes, Richard Donner.
James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Given a list of n points, this calculator will use Lagrange interpolation to calculate the unique n-1 degree polynomial passing through those points. You can then enter an input x to evaluate it at.
Enter the points as x,y pairs seperated by spaces - i.e: "3,4 5,9 11,3".
You can generate points for a given secret using the secret encoder.
{% with messages = get_flashed_messages() %} {% for message in messages %}{{ message }}