I'm working with leiningen for the first time and trying to use
clojure.java.jdbc. All the docs I see use 'sql' before the jdbc
commands. How do I set up the sql symbol. Nothing I've tried seems to
work.
Bill
--
You received this message because you are subscribed to the Google
Groups "Clojure"
I think I understand what you're looking for. I have the same
concern.
There very best Java book I have found is "The Java Developer's
Almanac"
by Patrick Chan. Volume 2 covers Swing and Volume 1 covers
everything
else. No nonsense, just answers with great examples.
Bill
On May 23, 12:16 pm
Can anyone help me with this? I get the following error:
Exception in thread "main" java.lang.IllegalArgumentException:
Parameter declaration dosync should be a vector (jjJack.clj:22)
Line 22 is the ns statement - no other error line in my program is
listed. I've used dosync many times. Every
27;s not syntax aware.
>
> I've tried doing this in parentheses-balanced expressions as well, but still
> no smarts. I use this feature not only to keep my code neat but also to make
> syntax errors visually obvious; it won't help for this if the indentation
> isn
ng of [] or {} (less important for me).
>
> Thanks,
>
> -Lee
>
> On Mar 14, 2011, at 8:06 AM, WoodHacker wrote:> The file you need should be
> there. First look under the Document/
> > Language Support menu item. You should see and entry for Clojure.
> > Try checking
sh-us...@lists.ems.ru.
On Mar 13, 9:49 am, Shantanu Kumar wrote:
> Do I need a plugin? I downloaded the stock 2.0.3-1 version of the
> editor and it doesn't even seem to syntax-highlight the Clojure code.
>
> Regards,
> Shantanu
>
> On Mar 13, 5:09 pm, WoodHacker wrote:> If
If you are looking for a very good editor for Clojure try Bluefish.
It's been around for ever, is very stable, and does everything you
would want an editor to do. And it now works with Clojure.
http://bluefish.openoffice.nl
Bill
--
You received this message because you are subscribed to th
Hi,
I have a simple general question about variables used in Clojure.
Often you have an object that must be referenced because it is
established at run time and not known beforehand. Lets say we have
an block object and it has a certain height. We create a reference
to the block's height and u
Hi,
I'm trying to get the midi sound class in Java to work in Clojure.
Everything seems to work fine except for the conversion of the
following Java code:
MidiChannel[] channels = synthesizer.getChannels;
I've tried just dumping the channels into a Clojure object -
(let [channels
Is it possible to create a map key from an integer or string to be
used for retrieving data dynamically from a map?
Bill
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts fro
I'm converting the java code examples in Killer Game Programming in
Java by Andrew Davison to Clojure and am having great fun doing it.
But I've hit wall where I can't seem to get the code to work.
The following code moves an animated gif strip to a java array:
public BufferedImage[] loadStripI
nil.
>
> On Mon, Jan 10, 2011 at 8:32 PM, WoodHacker wrote:
> > Hi,
>
> > Can anybody explain to me how to create a multidimensional array of
> > floats such as:
>
> > [[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]]
>
> > Anything I try gives me errors.
>
>
When all else fails, read the directions.
Thanks for the help.
On Jan 10, 4:44 pm, Ken Wesson wrote:
> On Mon, Jan 10, 2011 at 4:40 PM, WoodHacker wrote:
> > The question was how to place data in the array, not create it. I've
> > been
> > doing that. How do y
wa (make-array Float/TYPE 4 4))
#'user/wa
user=> wa
#
user=> (aset-float wa 0 0 & 1.0)
java.lang.Exception: Unable to resolve symbol: & in this context
(NO_SOURCE_FILE:5)
user=>
What am I missing?
On Jan 10, 10:08 am, Albert Cardona wrote:
> 2011/1/10 WoodHacker :
>
Hi,
Can anybody explain to me how to create a multidimensional array of
floats such as:
[[1.0 1.0 2.0 2.0] [3.0 2.2 4.0 0.0]]
Anything I try gives me errors.
Bill
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
Hi all,
Can anyone help me with this? I have a program with multiple
files. The program uses various data references, which may be
accessed from different files. To facilitate this I usually put ref
variables in a separate file and then :use that file in all the
various modules that make up
.This is done all the time, but I have
no idea how to do it in Clojure.
Bill
On Sep 30, 8:16 am, Laurent PETIT wrote:
> You have probably mistaken this clojure group for another ...
>
> 2010/9/30 WoodHacker > I have a keyboard paste problem,
> but I think it has more general
> >
I have a keyboard paste problem, but I think it has more general
interest. When the user types Control V in a JTextPane, data from
the clipboard will be pasted into the text. I want to act on that
pasted text. I can easily capture the keystroke. The problem is
that my capture takes place BE
Yes, but I don't want to load all the parts at once. I may have four
records that will be part of MyFoo,
but I only ever need one - maybe List3 in this case.That's why
it's dynamic and why I have the
problem in the first place.
Bill
On Jul 28, 12:40 pm, Armando Blancas
wrote:
> > It seem t
Hi Stu
It is as simple as that. What I'm really working on is my own
editor. The file in question is the lexer
for various program types.The editor never knows what type of file
will be loaded until it's loaded. At
that point the proper lexer should be loaded and stored so that the
nex
The confusion over type and instance was a sloppy example. Sorry.
But in your solution I'm confused by one thing. You create and
instance of Foo in the let and then assoc the new value of List1 to
it.
This has two problems. One is that the loaded data is not
permanent. The other is that th
All the examples of defrecord I see seem simple enough and when I
experiment in the REPL I get things to work as they should. However,
when I move to 'real' code I can't get it to work at all.
The problem at hand is simple enough - I want to create a record that
hold records. For example I have
> So I wonder how much making the first few baby steps easier is really
> going to help the uptake of Clojure. I have to imagine that the kind
> of person that can't figure out a CLASSPATH is going to have his head
> explode when he has to figure out how to restructure all his
> iterations in ter
On May 29, 9:44 am, James Reeves wrote:
> On 29 May 2010 14:19, WoodHacker wrote:
>
> > I'm working on a simple imaging problem. I want to copy an array of
> > pixels to an image buffer. That means that I have to deal both with
> > an array and a matrix (x and
I've been working with Lisp and Scheme for the past few years and have
migrated to Clojure because of the JVM. I think I get functional
programming, but one problem is giving me fits.
I'm working on a simple imaging problem. I want to copy an array of
pixels to an image buffer. That means t
Can someone explain to me why this doesn't work:
(let [ p "Bill/"
sep (System/getProperty "file.separator")
]
(if (= (last p) sep)
(println "found separator")
(println "no separator")
)
The (= (last p) sep) always returns false. If I print
I thank all the people who have sent me solutions to my Conj
problem. Unfortunately, none of them seem to work.
The issue is adding a value to a defined vector - (def savedColors
[black, white])
One solution was given as: (swap! savedColors conj newcolor)
This produces still the following run
ou really need
> references. You haven't supplied enough context for us to make that
> call.
>
> -Per
>
> On Tue, Mar 23, 2010 at 8:35 PM, WoodHacker wrote:
> > I understand howconjworks. But how do you add a value to a
> > persistent vector? You have to
I understand how conj works.But how do you add a value to a
persistent vector?You have to add the new item to the vector with
(conj vector item), but how do you assign the return value to the
persistent vector. So far I have it working with a def -- (def
vector (conj vector item)) -- but
When I try to use JColorChooser in Clojure I get the followinf error:
Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: No matching method found:
showDialog for class javax.swing.JColorChooser
Shouldn't showDioalog be there? What and I doing wrong. Here's the
code:
(
When I run the following:
(for [y (range 4)] (for [x (range 4)] (println x y)))
I get what I expect - 0 0, 1 0, 2 0, 3 0 etc., but at the end of
each y loop I also get 4 nils.
((0 0
1 0
2 0
3 0
nil nil nil nil) (0 1
1 1
2 1
3 1
nil nil nil nil) (0 2
What's going on? And how do I fix it?
Hi All,
Can anyone explain how I can get a traditional Mac OS menubar to
appear at the top of the screen?
Normally I would use (System/setProperty
"apple.laf.useScreenMenuBar", "true") and then
(.setJMenuBar ...) in my main frame.
This does not appear to work. The menu shows up in the frame i
32 matches
Mail list logo