Combination of Array.find and Array.map.
Array manipulation, ordering, searching, summarizing, etc.
Retrieves a name:pathname Map for a given workspaces config
Generates and consumes source maps
Generates and consumes source maps
Fixes stack traces for files with source maps
Store information about any JS value in a side channel, using a Map
concatenative mapdashery
Is this value a JS Map? This module works cross-realm/iframe, and despite ES6 @@toStringTag.
Fixes stack traces for files with source maps
No description provided.
Map for RDF/JS Sinks including shortcut methods
Immutable Data Collections
Persistent ordered mapping from strings
Converts a source-map from/to different formats and allows adding/changing properties.
[Experimental] - 🚇 File crawling, watching and mapping for Metro
Generate source maps
extracts inlined source map and offers it to webpack
Higher order iterator library for JavaScript/TypeScript.
async.mapLimit's functionality available as a standalone npm module
Easy-to-use query language for PouchDB
Automatically cleanup expired items in a Map
Map and Set with automatic key interning
Packages @jridgewell/trace-mapping and @jridgewell/gen-mapping into the familiar source-map API
Finds the first element for which the block returns non-falsy and returns the value.
This is a quick little gem that uses Google Maps to determine the distance, duration and fuel costs for driving between two user defined points. Just like Google Maps, the starting and destination points can be full addresses, city/state combinations, or just ZIP codes.
A* ruby implementation to find shortest path and map
Find paths C supported on a static map with the A* algorithm.
Parallel iteration methods (map, each, select, reject, find, flat_map, any?, all?, none?, count, reduce) with a configurable thread pool. Results maintain input order.
This gem will gather skiing trail maps from skimap.org, allowing you to find and download maps from sites for resorts across the world.
I couldn't find an easy and convinient way to attach maps to DOM elements with leaflet. So I wrote this plugin which hopefully helps working with leaflet maps.
The core module to process the map data. It provides the the interface to find the shortest route in terms of stoppage between two nodes.
A plugin to allow vagrant to recognize instances of QNX Neutrino RTOS. Guest capabilities are limited to what I can find from other providers and map to QNX. Currently: * halt * change_hostname
==== Topic Maps for Rails (rtm-rails) RTM-Rails is the Rails-Adapter for Ruby Topic Maps. It allows simple configuration of topicmaps in config/topicmaps.yml. ==== Overview From a developer's perspective, RTM is a schema-less database management system. The Topic Maps standard (described below) on which RTM is based provides a way of creating a self-describing schema just by using it. You can use RTM as a complement data storage to ActiveRecord in your Rails apps. ==== Quickstart - existing Rails project jruby script/generate topicmaps Run the command above after installing rtm-rails. This will create * a minimal default configuration: config/topicmaps.yml and * a file with more examples and explanations config/topicmaps.example.yml * a file README.topicmaps.txt which contains more information how to use it and where to find more information * an initializer to load the topicmaps at startup * a rake task to migrate the topic maps backends in your rails application. ==== Quickstart - new Rails project For a new Rails application these are the complete initial steps: jruby -S rails my_topicmaps_app cd my_topicmaps_app jruby -S script/generate jdbc jruby -S script/generate topicmaps # The following lines are necessary because Rails does not have a template # for the H2 database and Ontopia does not support the Rails default SQLite3. sed -e "s/sqlite3/h2/" config/database.yml > config/database.yml.h2 mv config/database.yml.h2 config/database.yml # Prepare the database and then check if all is OK jruby -S rake topicmaps:migrate_backends jruby -S rake topicmaps:check ==== Usage inside the application When everything is fine, let's create our first topic: jruby -S script/console TM[:example].get!("http://example.org/my/first/topic") # and save the topic map TM[:example].commit Access the configured topic maps anywhere in your application like this: TM[:example] To retrieve all topics, you can do TM[:example].topics To retrieve a specific topic by its subject identifier: TM[:example].get("http://example.org/my/topic") Commit the changes to the database permanently: TM[:example].commit ... or abort the transaction: TM[:example].abort More information can be found on http://rtm.topicmapslab.de/ ==== Minimal configuration default: topicmaps: example: http://rtm.topicmapslab.de/example1/ The minimal configuration creates a single topic map, named :example with the locator given. This topic map will be persisted in the same database as your ActiveRecord connection if not specified otherwise. The default backend is OntopiaRDBMS (from the rtm-ontopia gem). A more complete configuration can be found in config/topicmaps.example.yml after running "jruby script/generate topicmaps". It also includes how to specifiy multiple connections to different data stores and so on. ==== Topic Maps Topic Maps is an international industry standard (ISO13250) for interchangeably representing information about the structure of information resources used to define topics, and the relationships between topics. A set of one or more interrelated documents that employs the notation defined by this International Standard is called a topic map. A topic map defines a multidimensional topic space - a space in which the locations are topics, and in which the distances between topics are measurable in terms of the number of intervening topics which must be visited in order to get from one topic to another, and the kinds of relationships that define the path from one topic to another, if any, through the intervening topics, if any. In addition, information objects can have properties, as well as values for those properties, assigned to them. The Topic Maps Data Model which is used in this implementation can be found on http://www.isotopicmaps.org/sam/sam-model/. ==== License Copyright 2009 Topic Maps Lab, University of Leipzig. Apache License, Version 2.0
== DESCRIPTION: Charlie is a library for genetic algorithms (GA) and genetic programming (GP). == FEATURES: - Quickly develop GAs by combining several parts (genotype, selection, crossover, mutation) provided by the library. - Sensible defaults are provided with any genotype, so often you only need to define a fitness function. - Easily replace any of the parts by your own code. - Test different strategies in GA, and generate reports comparing them. Example report: http://charlie.rubyforge.org/example_report.html == INSTALL: * sudo gem install charlie == EXAMPLES: This example solves a TSP problem (also quiz #142): N=5 CITIES = (0...N).map{|i| (0...N).map{|j| [i,j] } }.inject{|a,b|a+b} class TSP < PermutationGenotype(CITIES.size) def fitness d=0 (genes + [genes[0]]).each_cons(2){|a,b| a,b=CITIES[a],CITIES[b] d += Math.sqrt( (a[0]-b[0])**2 + (a[1]-b[1])**2 ) } -d # lower distance -> higher fitness. end use EdgeRecombinationCrossover, InversionMutator end Population.new(TSP,20).evolve_on_console(50) This example finds a polynomial which approximates cos(x) class Cos < TreeGenotype([proc{3*rand-1.5},:x], [:-@], [:+,:*,:-]) def fitness -[0,0.33,0.66,1].map{|x| (eval_genes(:x=>x) - Math.cos(x)).abs }.max end use TournamentSelection(4) end Population.new(Cos).evolve_on_console(500)
This gem is designed to provide a modular, complete, open-source, crowd-sourced mapping of the 650+ IANA/OLSON timezones of the world into Rails' 146 'important' timezones. A search for an existing solution showed that this has been an issue since the inception of ActiveSupport::Timezone as far back as 2012. Approaches which have been suggested included such ideas as: Making your own RTree in a spatially aware database and searching on boundaries, just don't use those timezones (yeah, that makes sense), rely on your users to set their own timezone (doesn't help if you do automated onboarding), find a better sourcing API for timezones based on GeoLookup (they almost all use OLSON/IANA). Rather than doing any of those things, it made more sense to simply complete the mapping that ActiveSupport::Timezone started on and then seemingly abandoned.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.
No description provided.