Code Monkey home page Code Monkey logo

propertied's People

Contributors

agarciasc avatar aisamu avatar alvarogarcia7 avatar michaelklishin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

propertied's Issues

request to make keys into keywords

I have code like this:

(def db-props (p/load-from (io/resource "db.properties")))
(def db-props-keywords (into {} 
  (for [[k v] db-props] [(keyword k) v])))

...and I end up passing the map to Korma to connect to my database.

I'm not very good at clojure, but I get the impression that clojure maps tend to use keywords as keys. It would be nice if propertied allowed this.

If I get a pointer or two on how you'd like to see this implemented, I can submit a pull request.

java.lang.Error: java.io.FileNotFoundException : Too many open files

I am using propertied for a project I am doing which reads a .properties file and makes a write to it a LOT of times per second which is causing the following:

java.lang.Error: java.io.FileNotFoundException : Too many open files

I think the problem is that with-open must be used inside store-to and load-from in order to ensure that the file is closed and the file handle is destroyed.

The insane part is that I can only reproduce this on Ubuntu machine and not with Macos.

Also, I need to mention that I am using clojure.java.io/file to pass as sink parameter to load-from and store-to.

Thank you for your time

Alex

Loading UTF-8 localized property files

Hello, in my project I am loading localized property files which are in UTF-8, and the default implementation of Properties.load() does not support UTF-8. The workaround is to create a custom InputStreamReader with the encoding enabled. As this misfeature renders the otherwise wonderful propertied library unusable for such cases, I suggest to think of some kind of a fix for it.

Here's my java pseudocode example for loading UTF-8 properties:

    InputStream is = // get an input stream from file
    Properties res = new Properties();
    try {
        res.load(new InputStreamReader(is, "UTF-8"));
    } catch (IOException e) {
        e.printStackTrace();
    } finally {
        try {
            is.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.