Search Results

Search found 9 results on 1 pages for 'omry'.

Page 1/1 | 1 

  • setting nproc in /etc/security/limit.conf prevents ssh login

    - by omry
    I am trying to use /etc/security/limit.conf on Linux (Debian) to limit the number of processes per user. for starters, I tried to limit my own user processes by adding this to /etc/security/limit.conf: omry hard nproc 100 this locked my user out of ssh. I could open new processes (verified with su omry), but could not log into ssh with that user : sshd reported this in it's log: fatal: setreuid 1000: Resource temporarily unavailable also, I am certain my user is not running anything near 100 processes (actually 6). what can be the reason for this?

    Read the article

  • monit syntax error : "if 5 restarts within 5 cycles then alert"

    - by omry
    I am trying to get an alert from monit if it fails to restart a service 5 times, but I get a syntax error /etc/monit/monit.d/engine.conf:5: Error: syntax error 'alert' this is the engine.conf file: check process engine with pidfile /var/run/engine.pid group engine start program = "/etc/init.d/engine start" stop program = "/etc/init.d/engine stop" if 5 restarts within 5 cycles then alert any idea what's wrong with it?

    Read the article

  • Using custom std::set comparator

    - by Omry
    I am trying to change the default order of the items in a set of integers to be lexicographic instead of numeric, and I can't get the following to compile with g++: file.cpp: bool lex_compare(const int64_t &a, const int64_t &b) { stringstream s1,s2; s1 << a; s2 << b; return s1.str() < s2.str(); } void foo() { set<int64_t, lex_compare> > s; s.insert(1); ... } I get the following error: error: type/value mismatch at argument 2 in template parameter list for ‘template<class _Key, class _Compare, class _Alloc> class std::set’ error: expected a type, got ‘lex_compare’ what am I doing wrong?

    Read the article

  • |Ideas for applications using face detection and recognition

    - by Omry
    Full disclosure: I work at face.com. Face.com just launched a free (up to an hourly limit) face detection and recognition REST API. We got a very handy API sandbox that developers can use to play the API and to see what it can and can't do. Besides the obvious point of letting you guys know about the API, I wanted to hear from you what kind of applications you think can be developed with it. Some pretty obvious ideas: Face based login (not entirely secure but still fun). Automatic face crop for sites that let users upload photos (dating sites etc) Some kind of integration into augmented reality games There is no right or wrong answers here, use your imagination :).

    Read the article

  • invalid conversion from ‘float**’ to ‘const float**’

    - by Omry
    I have a function that receives float** as an argument, and I tried to change it to take const float**. the compiler (g++) didn't like it and issued : invalid conversion from ‘float**’ to ‘const float**’ this makes no sense to me, I know (and verified) that I can pass char* to a function that takes const char*, so why not with const float** ?

    Read the article

  • log4j/log4cxx : exclusive 1 to 1 relation between logger and appender

    - by Omry
    Using the xml configuration of log4cxx (which is identical in configuration to log4j). I want to have a certain logger output exclusively to a specific appender (have it the only logger which outputs to that appender). I found that it's possible to bind a logger to a specific appender like this: <logger name="LoggerName"> <level value="info"/> <appender-ref ref="AppenderName"/> </logger> but it that logger still outputs to the root appender because I have this standard piece in the conf file: <root> <priority value="DEBUG"/> <appender-ref ref="OtherAppender"/> </root> How can I exclude that logger from the root logger? in other words, how do I configure the log such that all loggers inherit the appenders of the root logger except a specific logger?

    Read the article

  • Monitor memory usage of child process

    - by Omry
    I have a Linux daemon that forks a few children and monitors them for crashes (restarting as needed). It will be great if the parent could monitor the memory usage of child processes - to detect memory leaks and restart child processes when the go beyond a certain size. How can I do this?

    Read the article

  • java.awt.HeadlessException thrown from HeadlessGraphicsEnvironment.getDefaultScreenDevice

    - by Omry
    I need to do some image processing on a java server (Debian with java version "1.6.0_12"), and I am receiving java.awt.HeadlessException from my code: java.awt.HeadlessException at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:64) at WaxOn.getDefaultConfiguration(WaxOn.java:341) Even when java.awt.headless is set to true (as evident by this code printing so): if (!java.awt.GraphicsEnvironment.isHeadless()) { logger.warn("Headless mode is not enabled"); } else { logger.info("Headless mode"); } This is the code that throws the exception: public static GraphicsConfiguration getDefaultConfiguration() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); return gd.getDefaultConfiguration(); } Any idea how to solve this?

    Read the article

  • Compiling C++ when two classes references one another

    - by Omry
    I am trying to write a simple wrapper around a connection pointer that will return it to the pool when the wrapper is destroyed. but it wont compile because the ConnectionPool and AutoConn need each other to be declared. I tried to use forward deceleration but it didn't work. how do I solve this? (using g++) class Connection {}; class ConnectionPool { Connection *m_c; public: AutoConn getConn() { return AutoConn(this, m_c); // by value } void releaseConnection(Connection *c) { } }; class AutoConn { ConnectionPool* m_pool; Connection *m_connection; public: AutoConn(ConnectionPool* pool, Connection *c) : m_pool(pool), m_connection(c) {} ~AutoConn() { m_pool->releaseConnection(m_connection); } };

    Read the article

1