Thursday, April 29, 2010

[nslu2-linux] Re: Help with IceS - PERL quesion

 

http://trac.nslu2-linux.org/optware/changeset/11582

(took a little hack in adding the perl support because of cross compilation)

Our autobuilder is having some problem. So the ipkg won't appear in the feeds for a few days.

If you cannot wait, try setup a build environment and build the ipk binary yourself. Or ask some one to build it for you.

Regards,

-Brian

--- In nslu2-linux@yahoogroups.com, "threeeyedtoad" <threeeyedtoad@...> wrote:
>
> I believe I'm very, very close to solving the problem of streaming music via icecast while using mpd as the playlist manager - with no transcoding.
>
> My success currently seems to hinge on being able to use a PERL module written for use with Ices0.
>
> I've successfully installed Ices0 (0.4-1) from the ipkg feed for unslung. However, when I attempt to use ices with the PERL module I have, I receive this message:
>
> Initialization of playlist handler failed. [This binary has no support for embedded perl]
> Ices Exiting...
>
> A quick search on this error reveals that I may be looking at a re-compile:
>
> http://icecast.imux.net/viewtopic.php?t=6799
>
> http://svn.xiph.org/icecast/trunk/ices0/INSTALL
>
> I know Ices does work on my Slug without attempting to use the PERL module, as I've tested it with Icecast, and it works fine.
>
> Please, please - would it be possible for the maintainer of the ipkg feed to add in support for PERL to Ices0?
>
> It all feels so very, very close...
>

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Welcome to Mom Connection! Share stories, news and more with moms like you.


Hobbies & Activities Zone: Find others who share your passions! Explore new interests.

.

__,_._,___

[nslu2-linux] Accessing the on-board GPIO

 

I am using Slugosbe v5.3 in a slug.

The Xscale chip provides 16 GPIO connections, and nominally these are all used by the slug. Each provides facilities for input and/or output of one bit, plus the facility to cause a user-catchable interrupt upon input.

However, we know perfectly well that slugos does not use them all. For a start, the two 'disc' leds are not used, and are in principle available for other hacks. Moreover, I am planning to implement the ForcePowerAlwaysOn hack, which means the power button and its green light are also available (indeed, by the time my slug has been embedded, there will be no way to press the power button even if you wanted to). I also intend to bring out the i2c bus, and what I want to do is to arrange that an interrupt can be sent back from the i2c bus (a facility provided by the bus expander ship I intend to use) so that, when a button is pressed an interupt will be generated and caught, avoiding the need to run a continuous polling loop.

So the question is: is there some way within Slugos to interact directly with the GPIO (there must be some such mechanism somewhere, because the publicly accessible i2c interface must use it, but it might be well concealed within the system). For sure that would be the neatest way to implement what I want.

But if that is not possible (without writing special Slugos drivers, which I would prefer to avoid), would the following ghastly hack work?

The plan is to connect the interrupt signal from the i2c bus so that it effectively "presses" the unused power button (The INT signal is just a simple 'pulldown'). Currently, when that button is pressed, the ensuing interrupt is caught and causes a call to 'shutdown -h now'. So I shall simply remove shutdown (specifically shutdown.sysvinit) from /sbin and replace it with a script of my own choosing.

Indeed, I have tried this, and pressing the button duly called my script, and the slug continued running regardless.

And finally, if I do shut down the slug (by pulling the power plug, or when there is a power cut), is there some way to cause it to die graceffully. Presumably, a large capacitor across the 5V supply would be neede to buy time, but would I also need to tell it what was afoot, or would the cpmplicated power control system automatically do that for me (maybe that would simply call my "script", but I could probably detect that somehow)?

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Welcome to Mom Connection! Share stories, news and more with moms like you.


Hobbies & Activities Zone: Find others who share your passions! Explore new interests.

.

__,_._,___

Wednesday, April 28, 2010

[Java] Re: Facing issue with BufferedWriter

 

My apologies,

I was thinking backwards flushing before the write call. Changing the event
order solved my issue.

Chris

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

[Java] Facing issue with BufferedWriter

 

Hello,

I'm facing an issue while playing with BufferedWriter: got a loop with ten
iterations. Debugging through the console via System.out.println, I can see
the 10 lines it was supposed to display. But when I call the
BufferedWriter's write() method, the last line isn't written.

I'm not sure where the problem is. Can anyone help me with a workaround?

Current Output:

> Case #1: 2 3

Case #2: 1 4

Case #3: 4 5

Case #4: 29 46

Case #5: 11 56

Case #6: 4 5

Case #7: 40 46

Case #8: 16 35

Case #9: 55 74

Desired Output:

> Case #1: 2 3

Case #2: 1 4

Case #3: 4 5

Case #4: 29 46

Case #5: 11 56

Case #6: 4 5

Case #7: 40 46

Case #8: 16 35

Case #9: 55 74

Case #10: 7 9

import java.io.BufferedReader;
>
> import java.io.BufferedWriter;
>
> import java.io.File;
>
> import java.io.FileReader;
>
> import java.io.FileWriter;
>
> import java.io.IOException;
>
> import java.util.ArrayList;
>
>
>>
>> public class A1 {
>
> static int count=1;
>
> public static void main(String[] args) {
>
> new A1().start(args[0]);
>
> }
>
> public void start(String s){
>
> try {
>
> File f = new File(s);
>
> FileReader fr;
>
> fr = new FileReader(f);
>
> BufferedReader br = new BufferedReader(fr);
>
> int cases = Integer.parseInt(br.readLine());
>
> File fw = new File("output.txt");
>
> f.createNewFile();
>
> FileWriter fwr = new FileWriter(fw);
>
> BufferedWriter bw = new BufferedWriter(fwr);
>
> ArrayList<Integer> items = new ArrayList<Integer>();
>
> ArrayList<String> result = new ArrayList<String>();
>
> for (int i = 0; i<cases; i++){
>
> items.clear();
>
> int money = Integer.parseInt(br.readLine());
>
> Integer.parseInt(br.readLine()); // itemNum
>
> for (String r: br.readLine().split("\\s+")) {
>
> try{
>
> items.add(Integer.parseInt(r));
>
> } catch (Exception e) {;
>
> e.printStackTrace();
>
> }
>
> }
>
> result.add((doCalc(money,items)));
>
> }
>
> fr.close();
>
> for (String x: result){
>
> bw.flush();
>
> bw.write(x);
>
> }
>
>
>> } catch (IOException e) {
>
> e.printStackTrace();
>
> }
>
> }
>
>
>> public String doCalc(int c, ArrayList<Integer> a){
>
> String msg = "";
>
> for(int i=0;i<a.size();i++) {
>
> for(int j=i+1;j<a.size();j++){
>
> if ((a.get(i) + a.get(j))== c){
>
> msg += "Case #" + count + ": " + (i+1) + " " + (j+1) + "\n";
>
> // System.out.println("Case #" + count + ": " + (i+1) + " " + (j+1));
>
> count++;
>
> break;
>
> }
>
> }
>
> if (!msg.isEmpty())
>
> break;
>
> }
>
> return msg;
>
> }
>
> }
>
>
>
First lines of the input file:

10
>
> 100
>
> 3
>
> 5 75 25
>
> 200
>
> 7
>
> 150 24 79 50 88 345 3
>
> 8
>
> 8
>
> 2 1 9 4 4 56 90 3
>
>

Chris

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

Re: [Java] Help me (Urgent)

 

You can use HttpRequest, HttpResponse to connect with desktop application to web, with port no 80. and u should use socket programming

--- On Mon, 19/4/10, jainpriyank95 <no_reply@yahoogroups.com> wrote:

From: jainpriyank95 <no_reply@yahoogroups.com>
Subject: [Java] Help me (Urgent)
To: Java_Official@yahoogroups.com
Date: Monday, 19 April, 2010, 6:25 PM

 

Hi,
how can i connect with web (html/jsp) in java desktop application to make chat messenger like yahoo messenger.

please give me idea abt that to develop chat messenger

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

[Java] Want to Get Interface like MyHeritage Family Tree

 

Hello Friends !!

We are Developing JAVA EE of Family Tree

We want the Graphical Interface of Family Tree like www.myheritage.com &
www.geni.com

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

[Java] Get primary key of newly inserted record in JPA

 

Hello !!

We have to insert data in Multiple Tables Using JPA .
means Using Entity Manager's methods .
like persist() etc..

We are facing problems that how can we get primary key's value of newly
inserted record?

so please give solution to get Primary key of just last inserted
record.

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

Tuesday, April 27, 2010

[Java] Error in Java program

 

Dear Alli have problem in a Java program, i'm not java developer i want to run this program only to use it in my research in networking field
as appear in the attached pic1- i run the program then appear GUI interface2- i determine the parameters for the network topology (using defaults)3-i choose the output file and choose Java Exe4-i click on build topology button5- the error appear here  { java.lang.NoClassDefFoundError: Main/Brite  Exception in thread "main"}thanks

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
Visit http://aiaiai.com or http://jgame.org for more groups to join.
Java Official Group is created for the following topics: Java 2 Enterprise Edition - J2EE, Java 2 Standard Edition - J2SE, Java 2 Micro Edition - J2ME, XML, XSL, XSD, XPATH, Web Services, Jini, JXTA for all type of Java Geeks.
Whoever posts spam / ads / job related message will be BANNED IMMEDIATELY
.

__,_._,___

Monday, April 26, 2010

[LINUX_Newbies] Re: Telnet & SSH on the same box...

 

On 27Apr2010 07:44, David Neeley <dbneeley@gmail.com> wrote:
| The PuTTY application does both telnet and SSH in the same app, and
| should be pretty easy to install and configure.

I think the OP wanted to enable the server side of telnet and ssh on his
server. Putty is client side.

Cheers,
--
Cameron Simpson <cs@zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

[...] since digital bearer certificate technology, the most economical method
for doing business on the net, is entirely based on digital signatures, which
in turn are entirely based on very strong public key cryptography, all
business on the internet will eventually require very strong cryptography. In
other words, if you don't have unbreakable key sizes, you can't issue digital
certificates to pay for things with. It would be like having paper money
which is easy to forge. - Robert Hettinga <rah@shipwright.com>

__._,_.___
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
.

__,_._,___

[LINUX_Newbies] Telnet & SSH on the same box...

 

The PuTTY application does both telnet and SSH in the same app, and
should be pretty easy to install and configure.

David

__._,_.___
Recent Activity:
To unsubscribe from this list, please email LINUX_Newbies-unsubscribe@yahoogroups.com & you will be removed.
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Welcome to Mom Connection! Share stories, news and more with moms like you.


Hobbies & Activities Zone: Find others who share your passions! Explore new interests.

.

__,_._,___

Re: [nslu2-linux] Trying to install debian on an NSLU2

 



On 26 April 2010 15:45, Don Sharp <don.dws@googlemail.com> wrote:


On 26 April 2010 14:33, Mike Westerhof <mwester@dls.net> wrote:
 

Don Sharp wrote:
> Hello
>
> I am trying to upgrade an NSLU2 with unslung firmware following the
> suggestions on http://www.cyrius.com/debian/nslu2/unpack.html.
>
> The NSLU2 was some time ago flashed with the unslung firmware and has
> no external storage.
>
> Under the heading "Boot the system" I put the slug into upgrade mode
> and tried writing the lenny firmware with the command
>
> # upslug2 -i nslu2debfirmware_sda2-2.6.26-19
> [no NSLU2 machines found in upgrade mode]
>
>

The message is telling the truth :) So either your network cable is
damaged, or the NSLU2 is not on the same network as your host (the
upgrade protocol will not pass through firewalls or through routers
(this means *through* a router, it passes freely between the various
ports on the switch built into the typical home router/firewall
appliance)) -- or your NSLU2 is not, in fact, in upgrade mode.

How did you enter upgrade mode?
-Mike (mwester)
 
Powered up with reset button depressed.

The two machines are attached to different interconnected switches. This may be at the core of the problem and I will investigate this as soon as I get a chance.

Thank you very much for the information. I'll update the list as soon as I get the chance to try both machines on the same switch.

TVM

Don Sharp

Connected linux host and slug to the same switch. Put slug in upgrade mode.

# upslug2
LKG7F9531 00:0f:66:7f:95:31 Product ID: 1 Protocol ID:0 Firmware Version: R23V29 [0x2329]
# upslug2 -i nslu2debfirmware_sda2-2.6.26-19
LKG7F9531 00:0f:66:7f:95:31 Product ID: 1 Protocol ID:0 Firmware Version: R23V29 [0x2329]
Upgrading LKG7F9531 00:0f:66:7f:95:31
    . original flash contents  * packet timed out
    ! being erased             - erased
    u being upgraded           U upgraded
    v being verified           V verified

  Display:
    <status> <address completed>+<bytes transmitted but not completed>
  Status:
    * timeout occured          + sequence error detected

  7fffff+000000 ...VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Rebooting... done

Hooray!

Thank you very much indeed for showing me the way.

Don Sharp
 



__._,_.___
Recent Activity:
.

__,_._,___

Re: [nslu2-linux] Help with IceS - PERL quesion

 

   I'm guessing whoever compiled Ices 0.4 for the unslung ipkg feed may not get these messages from the Yahoo group.

   Anyone else out there able to lend a hand?

   Much obliged...

On Sat, Apr 24, 2010 at 12:58 AM, threeeyedtoad <threeeyedtoad@gmail.com> wrote:
 

I believe I'm very, very close to solving the problem of streaming music via icecast while using mpd as the playlist manager - with no transcoding.

My success currently seems to hinge on being able to use a PERL module written for use with Ices0.

I've successfully installed Ices0 (0.4-1) from the ipkg feed for unslung. However, when I attempt to use ices with the PERL module I have, I receive this message:

Initialization of playlist handler failed. [This binary has no support for embedded perl]
Ices Exiting...

A quick search on this error reveals that I may be looking at a re-compile:

http://icecast.imux.net/viewtopic.php?t=6799

http://svn.xiph.org/icecast/trunk/ices0/INSTALL

I know Ices does work on my Slug without attempting to use the PERL module, as I've tested it with Icecast, and it works fine.

Please, please - would it be possible for the maintainer of the ipkg feed to add in support for PERL to Ices0?

It all feels so very, very close...


__._,_.___
Recent Activity:
.

__,_._,___

Re: [nslu2-linux] Trying to install debian on an NSLU2

 



On 26 April 2010 14:33, Mike Westerhof <mwester@dls.net> wrote:
 

Don Sharp wrote:
> Hello
>
> I am trying to upgrade an NSLU2 with unslung firmware following the
> suggestions on http://www.cyrius.com/debian/nslu2/unpack.html.
>
> The NSLU2 was some time ago flashed with the unslung firmware and has
> no external storage.
>
> Under the heading "Boot the system" I put the slug into upgrade mode
> and tried writing the lenny firmware with the command
>
> # upslug2 -i nslu2debfirmware_sda2-2.6.26-19
> [no NSLU2 machines found in upgrade mode]
>
>

The message is telling the truth :) So either your network cable is
damaged, or the NSLU2 is not on the same network as your host (the
upgrade protocol will not pass through firewalls or through routers
(this means *through* a router, it passes freely between the various
ports on the switch built into the typical home router/firewall
appliance)) -- or your NSLU2 is not, in fact, in upgrade mode.

How did you enter upgrade mode?
-Mike (mwester)
 
Powered up with reset button depressed.

The two machines are attached to different interconnected switches. This may be at the core of the problem and I will investigate this as soon as I get a chance.

Thank you very much for the information. I'll update the list as soon as I get the chance to try both machines on the same switch.

TVM

Don Sharp
 
> I then try
>
> # upslug2 --target="00:0F:66:7F:95:31" \
> -i nslu2debfirmware_sda2-2.6.26-19
> Upgrading LKG7F9531 00:0f:66:7f:95:31
> . original flash contents * packet timed out
> ! being erased - erased
> u being upgraded U upgraded
> v being verified V verified
>
> Display:
> <status> <address completed>+<bytes transmitted but not completed>
> Status:
> * timeout occured + sequence error detected
>
> * 0+000000 ........................................................
>
> Hangs with above message on screen. I left the process running for 15
> minutes and the slug's ethernet light was gaily flashing away, so a
> conversation was in progress. I am assuming that there was an infinite
> retry sequence in progress. When power-cycled the slug happily boots
> into its unslung linux.
>
> I would appreciate any suggestions as to what to try next. The message
> that I am seeing is not the one shown on
> http://www.cyrius.com/debian/nslu2/install.html
> The zero offset is probably trying to tell me something but I would
> appreciate some help in making progress.
>
> Is jffs2 perhaps a factor here?
>
> I'd appreciate any help anyone can offer.
>
> TIA
>
> Don Sharp
>
>


__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.


Welcome to Mom Connection! Share stories, news and more with moms like you.


Hobbies & Activities Zone: Find others who share your passions! Explore new interests.

.

__,_._,___