Search Results

Search found 28 results on 2 pages for 'bozho'.

Page 1/2 | 1 2  | Next Page >

  • Why do password strength requirements exist? [migrated]

    - by Bozho
    Password strength is now everything, and they force you to come up with passwords with digits, special characters, upper-case letters and whatnot. Apart from being a usability nightmare (even I as a developer hate it when a website requires a complex password), what are the actual benefits of having strong passwords (for website authentication)? Here are the prerequisites of a system that handles authentication properly: store passwords using bcrypt (or at least use salt+hash) - hard-to-impossible to find the original password when an attacker gets the database lock subsequent password attempts with a growing cooldown - no brute-force via the site

    Read the article

  • Reasons why mod_jk wouldn't work and how to trace them

    - by Bozho
    I've been using one server, then I reinstalled everything on another server, and the mod_jk stopped working. Here is the situation: apache 2.0 sitting "in front" mod_jk used to connect to the apache to tomcat tomcat 6.0.26 used to server the actual requests I followed this tutorial. The result is: accessing http://mysite.com opens the index.html in /var/www/ accessing http://mysite.com:8080/ works OK the logs at /var/logs/apache2 show everything is OK: [Mon Mar 29 22:01:53.310 2010] [28349:3075389184] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [Mon Mar 29 22:01:53 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status [Mon Mar 29 22:01:53 2010] [notice] Apache/2.2.9 (Debian) mod_jk/1.2.26 configured -- resuming normal operations I compared the server.xml, jk.conf, sites-enabled/mysite from the new server to those from the old one and they are identical. The domain name is the same (I updated the DNS record today, and it has refreshed successfully) So the question is, what can go wrong? Is there another place where problems would be logged, if such occur?

    Read the article

  • Apache Virtual host not recognized

    - by Bozho
    I've been using one server, then I reinstalled everything on another server, and the mod_jk stopped working. Here is the situation: apache 2.0 sitting "in front" mod_jk used to connect to the apache to tomcat tomcat 6.0.26 used to server the actual requests I followed this tutorial. The result is: accessing http://mysite.com opens the index.html in /var/www/ accessing http://mysite.com:8080/ works OK the logs at /var/logs/apache2 show everything is OK: [Mon Mar 29 22:01:53.310 2010] [28349:3075389184] [info] init_jk::mod_jk.c (2830): mod_jk/1.2.26 initialized [Mon Mar 29 22:01:53 2010] [warn] No JkShmFile defined in httpd.conf. Using default /var/log/apache2/jk-runtime-status [Mon Mar 29 22:01:53 2010] [notice] Apache/2.2.9 (Debian) mod_jk/1.2.26 configured -- resuming normal operations I compared the server.xml, jk.conf, sites-enabled/mysite from the new server to those from the old one and they are identical. The domain name is the same (I updated the DNS record today, and it has refreshed successfully) So the question is, what can go wrong? Is there another place where problems would be logged, if such occur? Update What I can be almost certain of is that the virtual host is not recognized. It is always forwarded to the default virtual host. So, how to make sure the virtual host is recognized and working?

    Read the article

  • Which WordPress plugin adds support for Java syntax highlighting? [closed]

    - by Bozho
    In wordpress.com-hosted blogs syntax highlighting is working, but on a newly privately installed WordPress blog it is not. So I assume there is a plugin for this. I tried wp-syntax and bbcode plugins - no success. So, which is this plugin, that allows programming language code to be highlighted: [code language="Java"] public class SomeClass {..} [/code] Update: I'm talking about the WordPress software, not the wordpress.com service. I was just giving an example (wordpress.com) of what is to be achieved.

    Read the article

  • Eclipse shows splash screen and closes. How to fix?

    - by Bozho
    Today I restarted my machine, and Eclipse (3.5, downloaded recently) shows a strange behaviour: shows splash screen for less than a sec quits This is in 100% of the cases, so I can't start Eclipse at all. Where can I find logs about this? I deleted all eclipse resources and re-unzipped it. Same thing. I have enough memory (IntelliJ runs fine), and my anti-virus software doesn't show any activity related to closing eclipse. Any ideas what might have caused this?

    Read the article

  • Javassist: how to create proxy of proxy?

    - by Bozho
    I'm creating proxies with javassist ProxyFactory. When creating a single proxy all works fine. However, when I pass a proxied class to the proxying mechanism, it fails with javassist.bytecode.DuplicateMemberException: duplicate method: setHandler in com.mypackage.Bean_$$_javassist_0_$$_javassist_1 I'm creating the proxies with this: public Object createProxiedInstance(Object originalInstance) throws Exception { Class<?> originalClass = instance.getClass(); ProxyFactory factory = new ProxyFactory(); factory.setSuperclass(originalClass); factory.setHandler(new MethodHandler() {..}); Class<T> proxyClass = factory.createClass(); return proxyClass.newInstance(); } So, how do I create proxies of proxies? Update: The actual problems is that each proxy implements the ProxyObject which defines setHandler(..) method. So the 2nd proxy is trying to redefine the method, instead of overriding it in the subclass.

    Read the article

  • Why does Java read its default settings from the system

    - by Bozho
    Java is reading the locale, timezone and encoding information (and perhaps more) from the system it is installed on. This often brings bad surprises (brought me one just yesterday). Say your development and production servers are set to have TimeZone GMT+2. Then you deploy on a production server set to GMT. a 2-hour shift may not be easy to observe immediately. And although you can pass a TimeZone to your calendars, APIs might be instantiating calendars (or dates) using the default timezone. Now, I know one should be careful with these settings, but are easy to miss, hence make programs more error-prone. So, why doesn't Java have its own defaults - UTF-8, GMT, en_US (yes, I'm on non-en_US locale, but having it as default is fine). Applications could read the system settings via some API, if needed. Thus programs would be more predictable. So, what is the reason behind this decision?

    Read the article

  • Url shortening algorithm

    - by Bozho
    Now, this is not strictly about URL shortening, but my purpose is such anyway, so let's view it like that. Of course the steps to URL shortening are: Take the full URL Generate a unique short string to be the key for the URL Store the URL and the key in a database (a key-value store would be a perfect match here) Now, about the 2nd point. Here's what I've come up with: ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); UUID uuid = UUID.randomUUID(); dos.writeLong(uuid.getMostSignificantBits()); String encoded = new String(Base64.encodeBase64(baos.toByteArray()), "ISO-8859-1"); String shortUrl = StringUtils.left(6); // returns the leftmost 6 characters // check if exists in database, repeat until it does not I wonder if this is good enough. Is it?

    Read the article

  • Is JavaEE really portable?

    - by Bozho
    I'm just implementing a JavaEE assignment I was given on an interview. I have some prior experience with EJB, but nothing related to JMS and MDBs. So here's what I find through the numerous examples: application servers bind their topics and queues to different JNDI names - for example topic/queue, jms the activationConfig property is required on JBoss, while in the Sun tutorial it is not. after starting my application, jboss warns me that my topic isn't bound (it isn't actually - I haven't bound it, but I expect it to be bound automatically - in fact, in an example for JBoss 4.0 automatic binding does seem to happen). A suggested solution is to map it in some jboss files or even use jboss-specific annotations. This might be just JBoss, but since it is certified to implement to spec, it appears the spec doesn't specify these these things. And there all the alleged portability vanishes. So I wonder - how come it is claimed that JavaEE is portable and you can take an ear and deploy it on another application server and it magically runs, if such extremely basic things don't appear to be portable at all. P.S. sorry for the rant, but I'm assume I might be doing/getting something wrong, so state your opinions.

    Read the article

  • Selenium fails to find component after dom update (reRender)

    - by Bozho
    I'm testing a richfaces application with selenium. It works fine, unless I use reRender. (for those unfamiliar with richfaces - whenever an ajax request finished, parts of the DOM are updated/chagned/removed). So, after a reRender selenium (the IDE at least) fails to locate the elements which were within the reRendered area. Both FireBug and WebDeveloper locate the elements, and on "view source" the elements are there. So, is there a way to tell selenium to update its DOM "knowledge" with the latest changes? Firefox 3.5.6, latest version of Selenium IDE.

    Read the article

  • How to auto create a JMS topic/queue on JBoss in a portable and per-application way?

    - by Bozho
    It's simple: I have an MDB and an EJB that sends messages to a topic (or queue). JBoss complains that the topic is not bound to the JNDI context. I want to have the topic/queue to be automatically created at best, or at least to have a standard way to define it, per application (say, in ejb-jar/META-INF) this question and this blogpost show us how to do it in an application server specific way. This surely works, but: I want to use the @MessageDriven annotation I want the setting not to be global for the application server I want the setting to be portable

    Read the article

  • How to add response headers based on Content-type, or getting Content-type before the response is co

    - by Bozho
    I want to set the Expires header for all image/* and text/css. I'm doing this in a Filter. However: before calling chain.doFilter(..) the Content-type is not yet "realized" after calling chain.doFilter(..) the Content-type is set, but so is content-length, which forbids adding new headers (at least in Tomcat implementation) I can use the extensions of the requested resource, but since some of the css files are generated by richfaces by taking them from inside jar-files, the name of the file isn't x.css, but is /xx/yy/zz.xcss/DATB/.... So, is there a way to get the Content-type before the response is committed.

    Read the article

  • What problems do you find with this view on domain-driven design?

    - by Bozho
    I just wrote a long (and messy) blogpost about my view on domain-driven design at present day, with frameworks like spring and hibernate massively in use. I'd ask you to spot any problems with my views on the matter - why this won't work, why it isn't giving the benefits of DDD, why it is not a good idea in general. The blogpost is here (I don't think I need to copy-paste it on SO - if you think I should, tell me). I know the question is subjective, but it is aimed at gathering the most predominant opinions. (I'm tagging Java, since the frameworks discussed are Java frameworks)

    Read the article

  • Why people are so afraid of using clone() (on collection and JDK classes) ?

    - by Bozho
    A number of times I've argued that using clone() isn't such a bad practice. Yes, I know the arguments. Bloch said it's bad. He indeed did, but he said that implementing clone() is bad. Using clone on the other hand, especially if it is implemented correctly by a trusted library, such as the JDK, is OK. Just yesterday I had a discussion about an answer of mine that merely suggests that using clone() for ArrayList is OK (and got no upvotes for that reason, I guess). If we look at the @author of ArrayList, we can see a familiar name - Josh Bloch. So clone() on ArrayList (and other collections) is perfectly fine. (Just look at the implementation). Same goes for Calendar and perhaps most of the java.lang and java.util classes. So, give me a reason why not to use clone() with JDK classes?

    Read the article

  • Are people really using Google App Engine, or they are just playing with it because "the cloud is co

    - by Bozho
    Since there are 1500+ questions for google-app-engine, I was wondering: what are people actually using it for? are they doing something for their companies or startups? are they just playing around with it because "the cloud is cool"? are they using it because it's the "java free hosting"? (answers from actual GAE users are preferable, but logical assumptions from others are welcome) Update: I was asking (as tagged) about the Java aspect of GAE.

    Read the article

  • How to add response headers based on Content-type; getting Content-type before the response is commi

    - by Bozho
    I want to set the Expires header for all image/* and text/css. I'm doing this in a Filter. However: before calling chain.doFilter(..) the Content-type is not yet "realized" after calling chain.doFilter(..) the Content-type is set, but so is content-length, which forbids adding new headers (at least in Tomcat implementation) I can use the extensions of the requested resource, but since some of the css files are generated by richfaces by taking them from inside jar-files, the name of the file isn't x.css, but is /xx/yy/zz.xcss/DATB/.... So, is there a way to get the Content-type before the response is committed.

    Read the article

  • Why new String(bytes, enc).getBytes(enc) does not return the original byte array?

    - by Bozho
    I made the following "simulation": byte[] b = new byte[256]; for (int i = 0; i < 256; i ++) { b[i] = (byte) (i - 128); } byte[] transformed = new String(b, "cp1251").getBytes("cp1251"); for (int i = 0; i < b.length; i ++) { if (b[i] != transformed[i]) { System.out.println("Wrong : " + i); } } For cp1251 this outputs only one wrong byte - at position 23. For KOI8-R - all fine. For cp1252 - 4 or 5 differences. What is the reason for this and how can this be overcome? I know it is wrong to represent byte arrays as strings in whatever encoding, but it is a requirement of the protocol of a payment provider, so I don't have a choice. Update: representing it in ISO-8859-1 works, and I'll use it for the byte[] part, and cp1251 for the textual part, so the question remains only out of curiousity

    Read the article

  • Is it a good practice for a .js file to rely on variables declared in the including html

    - by Bozho
    In short: <script type="text/javascript"> var root = '${config.root}'; var userLanguage = '${config.language}'; var userTimezone = '${config.timezone}'; </script> <script type="text/javascript" src="js/scripts.js"></script> And then, in scripts.js, rely on these variables: if (userLanguage == 'en') { .. } The ${..} is simply a placeholder for a value in the script that generates the page. It can be php, jsp, asp, whatever. The point is - it is dynamic, and hence it can't be part of the .js file (which is static). So, is it OK for the static javascript file to rely on these externally defined configuration variables? (they are mainly configuration, of course). Or is it preferred to make the .js file be served dynamically as well (i.e. make it a .php / .jsp, with the proper Content-Type), and have these values defined in there.

    Read the article

1 2  | Next Page >