|
There is plenty of information about barcodes to be found by doing some simple research. That should form the first part of your project.
I'm not sure what you mean by "Image encryption", but it is impossible to suggest which option you should choose as only you know what your skills are, and which subject you are most familiar with.
It's time for a new signature.
|
|
|
|
|
I need to create a chart that show as a portlet in Liferay. I have download a "chartdirector" from [ChartDirector] and intend to show one of a chart inside it which call "zoomscrolldemo.jsp", but the problem is, i have no idea on how to "import" the .jsp page as a portlet and show it in Liferay. Can anyone give me a clue on how to do it? Anyone been solve this before?
|
|
|
|
|
As Richard replied to your most recent question,
"Repeating your original question is unlikely to yield a different answer. Try the documentation first and search for other liferay users or forums on the internet. They are much more likely to get you the answer you need."
Couldn't have said it better myself.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
I need to do a conditional assign. The logic is such that there are lots of variables of one type that are assigned based on the state of some data.
Imagin these two classes:
class Foo {
Bar bar;
boolean isSet;
}
class Bar {
}
Now, I'be got lots of Foo s and lots of Bar s. and for each pair the assignment is:
if (foo != null && foo.isSet) {
bar = foo.bar;
}
I'm having to copy/paste this ad nasium and want to be able to write a wraper method to do the check and make the assignment. The best I've got is:
class Foo {
Bar bar;
boolean isSet;
static Bar getBarIfSet(Foo foo, Bar bar) {
if (foo != null && foo.isSet) {
return foo.bar;
}
return bar;
}
}
But that's a bit messy as it has to be called liek this:
bar = Foo.getBarIfSet(foo, bar)
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
I would try and get rid of the Foo class all together. Maybe you could replace it by a single collection, say a dictionary (map), which holds the relationship Bar->nextBar.
So each time your current code creates a Foo with isSet true, just add an entry in the dictionary. However this may only work if you know in advance which bar is going to be replaced...
|
|
|
|
|
Luc Pattyn wrote: which bar is going to be replaced...
Dats da problem. All the foo's come in over the network and so they need to be unpacked - what I have no control over - so I get a Foo, and work out which Bar it goes to...
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
there is a loophole in your desciption: how can you associate a Foo with a Bar?
And if there is at most one Foo for each Bar, you could create a dictionary/map thingy that represents the replace operations, then bulk execute them.
|
|
|
|
|
I've got in one class a load of foo's lets call them aFoo, bFoo, cFoo, etc. There is an argument to array them but that really is not feasible. In another place we have the Bars - redLion, whiteHart, horseAndGroom, etc.
Currently it's all:
if (aFoo != null && aFoo.isSet) {
redLion = aFoo.bar;
}
if (bFoo != null && bFoo.isSet) {
whiteHart = bFoo.bar;
}
if (cFoo != null && cFoo.isSet) {
horseAndGroom = cFoo.bar;
}
It's getting kind of annoying renaming the variables n,000 times.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
if there is no logical or algorithmic link between some Foo's and some Bar's, all you can do is link them explicitly, in any style you like. Examples:
1.
yours:
if (aFoo != null && aFoo.isSet) {
redLion = aFoo.bar;
}
2.
also yours:
someStaticMethod(aFoo, redLion);
3.
my alternative, meaningful only if it (or parts of it) is needed more than once (syntax now resembles C#) so it can get initialized once:
Dictionary<Bar,Foo> map=new Dictionary<Bar,Foo>();
map.Add(redLion,aFoo);
map.Add(whiteHart,bFoo);
...
and used many times:
foreach(KeyValuePair<Bar,Foo> kvp in map) {
someStaticMethod(kvp.Value, kvp.Key);
}
BTW: I like the way you give your questions some sense of reality
|
|
|
|
|
Does anyone know a good tutorial of how to configuare RichFaces on Eclipse ?
Paul.
|
|
|
|
|
If set up a small EJB in netbeans and deployed it through Glassfish,
In the same netbeans instance I have a client that should connect:
Context context = null;
this.remoteBean = null;
try
{
context = new InitialContext();
System.out.println("Got ic" + context);
this.remoteBean = (VotingRemote) context.lookup("VotingBean");
}
catch (NamingException ex)
{
System.out.println("Lookup failed: " + ex);
}
Am I doing something stupid [probably] ot get this error:
07-Sep-2010 19:55:22 com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: localhost; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2348)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:2369)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:212)
at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.<init>(SocketOrChannelConnectionImpl.java:225)
at com.sun.corba.ee.impl.transport.SocketOrChannelContactInfoImpl.createConnection(SocketOrChannelContactInfoImpl.java:104)
at com.sun.corba.ee.impl.protocol.CorbaClientRequestDispatcherImpl.beginRequest(CorbaClientRequestDispatcherImpl.java:159)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.request(CorbaClientDelegateImpl.java:156)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.invoke(BootstrapResolverImpl.java:77)
at com.sun.corba.ee.impl.resolver.BootstrapResolverImpl.list(BootstrapResolverImpl.java:129)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.list(CompositeResolverImpl.java:30)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.list(CompositeResolverImpl.java:30)
at com.sun.corba.ee.impl.resolver.CompositeResolverImpl.list(CompositeResolverImpl.java:30)
at com.sun.corba.ee.impl.orb.ORBImpl.list_initial_services(ORBImpl.java:1238)
at com.sun.appserv.naming.S1ASCtxFactory.<clinit>(S1ASCtxFactory.java:141)
at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:78)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at client.VotingClient.<init>(VotingClient.java:76)
at client.VotingClient$3.run(VotingClient.java:280)
This is getting up my left nostril!
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
|
|
|
|
|
hi,
i have the basic knowledge about java, i can read and understand a simple java code...
but i m looking for guidance on how i can get good java programming skills. i have solid basics knowledge and did very well at school,
but unfortunately i did not get the opportunity to take the next step and be able to write real and functioning useful programs.
can somebody help show me the way?? i m also wondering if java is the best language for building software...
thanks in advance...
...i have heard that one can participate in open source projects in order to gain programming skills while "participating in the open source society"...
but i guess one need to get a certain level of skills first...
|
|
|
|
|
Take a look here[^] at the various Java tutorials, from beginner to advanced. As to whether Java is the 'best' language, that really depends on market forces. You should look around your own environment at the sort of jobs that are being advertised to see what skills are most in demand.
It's time for a new signature.
|
|
|
|
|
|
One of the best way to become a good programmer is not only to take part in project(even that is one of the best way) but to rather advance in algorithms with Design patterns: Controller, Decorator, Wrapper, Delegate, etc.
Look for tutorial with design patterns. Many open source application use design patterns, actually all of them.
Paul.
|
|
|
|
|
Hi, thanks for your answer!
i actually have had a course in design patterns and i did pretty well (i got a B..lol).
But as you mentioned, i thought participating in a project would help me a lot to practice what i know and learn more in the same time.
i guess being in group with more experienced programmers would help me put things together.
do you happen to know how i can participate in those open source Project???
i m kind of tired of just theory, i could use some practice. The good thing with these projects is that you learn while doing something useful....
Thanks
|
|
|
|
|
|
|
I am a newbie for liferay. I have created a test.jsp that will display "hello world" as an output. And I wonder how to "import" the test.jsp to liferay as a portlet.
Can anybody guide me through this? I really have no idea how to do this.
|
|
|
|
|
Try the documentation[^]. There is little point in developing a program if you have no idea how to implement it.
It's time for a new signature.
|
|
|
|
|
thanks for replied.
The test.jsp is just for testing purpose. In fact i want to "import" a graph that is created by chartDirector, i dont knw how to display it as a portlet in liferay.
Can anyone show me the example of how to accomplish this?
|
|
|
|
|
Repeating your original question is unlikely to yield a different answer. Try the documentation first and search for other liferay users or forums on the internet. They are much more likely to get you the answer you need.
It's time for a new signature.
|
|
|
|
|
i found a way already.
firstly, build a .war file for the web site.
then in liferay, install the .war, and it is prepared to be drag and drop as a new application.
|
|
|
|
|
Hi,
I am able to extract the text from the PDF file using the PDFStripper, but I would like to read the Table of content of the PDF document. How can I do that? How do I know the Page I am reading is Table of Contents? and also how to differentiate the Chapter heading and the subsection of chapter of the Table of Content?
Any help in this is highly appreciated.
Thanks
Neil
|
|
|
|
|
Do NOT cross post in multiple forums. I makes collaborating on an answer near impossible.
|
|
|
|