Nathan Campos 23 Junior Poster

I've tried this it worked in part, since the dots wont get smaller there are just a lot of big dots

Nathan Campos 23 Junior Poster

I was looking at a page called Javascript: Convert Strings to Binary (and representing in a nerdy way!) where you can convert a String into binary dots using Javascript and I loved that, but how I can do that? Since the code isn't for making that grid...

Nathan Campos 23 Junior Poster

Hello,
My friend gave me a code to try a bit. What it does is that it gets a text and format it. Here it is:

function boldAndItalicize(text) {
  return text.replace(/&/g, '&').replace(/</g, '<')
      .replace(/(\*+)([^*]{1,1024})(\*+)/g,
               function (whole, open, content, close) {
                 if (open.length === close.length) {
                   switch (open.length) {
                     case 1: return '<i>' + content + '</i>';
                     case 2: return '<b>' + content + '</b>';
                   }
                 }
                 return whole;
               });
}

But I want to know how I could input a plain text file(like test.txt , that is on the same folder as the script) in the text parameter?

Best Regards,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

I'm still not seeing a "getString()" method for TextField, or setString(), either. getText() and setText(), yes, but not getString or setString.
This shouldn't be your problem - calling non-existent methods doesn't throw an NPE.
To get this exception, your textBox3 must be null.
Put in this line before the call to textBox3 to test this:

System.out.println("textBox3 "+textBox3==null?"is":"is not"+"null");

Now I got this:

is notnull
TRACE: <at java.lang.OutOfMemoryError>, Exception caught in Display class
java.lang.OutOfMemoryError
   (stack trace incomplete)
Nathan Campos 23 Junior Poster

textField is the name of the class, and the type is a TextField , remember that I'm at J2ME

Nathan Campos 23 Junior Poster

Yes, I was asking if the textField is JTextField, because there is no getString() function for a JTextField. Where you call textField.getString(), are you sure there is a value received from this? Put a System.out.println(textField.getString()) before you initialise test.

textField has text entered :)

Nathan Campos 23 Junior Poster

String test = null? If you want to create an empty string use String test = ""; Not sure if that's where your problem lies.

textField.getString()

Is this a JTextField?

This is what I got now:

TRACE: <at java.lang.NullPointerException:   0>, Exception caught in Display class
java.lang.NullPointerException:   0
        at mp.releaser.MPReleaser.commandAction(MPReleaser.java:130)
        at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46
        at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74
        at com.sun.midp.chameleon.layers.SoftButtonLayer.commandSelected(), bci=11
        at com.sun.midp.chameleon.layers.MenuLayer.pointerInput(), bci=188
        at com.sun.midp.chameleon.CWindow.pointerInput(), bci=88
        at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handlePointerEvent(), bci=19
        at com.sun.midp.lcdui.DisplayEventListener.process(), bci=296
        at com.sun.midp.events.EventQueue.run(), bci=179
        at java.lang.Thread.run(Thread.java:680)

Line 130 Is the last one:

String test = null;
        test = "tst" + textField.getString() + "test";
        textBox3.setString(test);
Nathan Campos 23 Junior Poster

Hello,
I'm building a program that gets the value of a TextField, concatenate with some other Strings and then display them on a TextBox when the ScreenCommand is clicked, the problem is that it's calling a NullPointerException. My code is like this(of course it has a lot more stuff):

/* .... */
        } else if (command == submitCommand) {
            FirstPart();
            // write pre-action user code here
            switchDisplayable(null, getTextBox3());
            // write post-action user code here
        }
/* .... */

public void FirstPart() {
    String test = null;
    test = "tst" + textField.getString() + "test";
    textBox3.setString(test);
}
/* .... */

And I get this when I click the menu:

TRACE: <at java.lang.NullPointerException:   0>, Exception caught in Display class
java.lang.NullPointerException:   0
        at mp.releaser.MPReleaser.FirstPart(MPReleaser.java:535)
        at mp.releaser.MPReleaser.commandAction(MPReleaser.java:128)
        at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46
        at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74
        at com.sun.midp.chameleon.layers.SoftButtonLayer.commandSelected(), bci=11
        at com.sun.midp.chameleon.layers.MenuLayer.pointerInput(), bci=188
        at com.sun.midp.chameleon.CWindow.pointerInput(), bci=88
        at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handlePointerEvent(), bci=19
        at com.sun.midp.lcdui.DisplayEventListener.process(), bci=296
        at com.sun.midp.events.EventQueue.run(), bci=179
        at java.lang.Thread.run(Thread.java:680)

What should I do to correct this?

Best Regards,
Nathan Paulino Campos

*PS: Netbeans should have a `NullPointerException` corrector tool :P*

Nathan Campos 23 Junior Poster

I'm trying to adapt the opensource code from the page Drag and Drop in MobileSafari, here is a snippet of the code I've changed from:

function jsonFlickrApi(data) {
		for (var i = 0; i < data.photos.photo.length; i++) {
			var p = data.photos.photo[i],
				img = document.createElement("img");
			img.src = 'http://farm'+p.farm+'.static.flickr.com/'+p.server+'/'+p.id+'_'+p.secret+'_m.jpg';
			img.className = "movable";
			img.xfmTX = Math.random()*(window.innerWidth-240);
			img.xfmTY = Math.random()*(window.innerHeig?        ndom()*(wsndo>b-his).hide();
                });
                // to w.Damg.Uidiv>
    p9bU15" tabtttttttttttord9;/ar lickrApi(data) {
		for (varT= dit		for (varT= dit		for (varT= dit		s a snippe i++) {
			var p = data.photos.photo[i],
				img = docte thahahahahahahaha`e= diqo			img.clasf-    t-ti HTf4g    <divcS
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    
    <title>Edit - Stack Overflow</title>
    <link rel="stylesheet" type="text/css" href="http://sstatic.net/stackoverflow/all.css?v=dbbe6b2e88cb">
    <link rel="shortcut icon" href="http://sstatic.net/stackoverflow/img/favicon.ico">
    <link rel="apple-touch-icon" href="http://sstatic.net/stackoverflow/img/apple-touch-icon.png">
    <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">
    
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    
    <script type="text/javascript" src="http://sstatic.net/js/master.min.js?v=66d89fbc893d"></script>
    <script type="text/javascript">
    var imagePath='http://sstatic.net/stackoverflow/img/';
    var inboxUnviewedCount = 0;
    </script>
    
    <script src="http://sstatic.net/js/question.js?v=831020582915" type="text/javascript"></script>
    
    <script type="text/javascript">
        $(function() {        
            $("#wmd-input").focus();
            $("#title").focus();
            $("#revisions-list").change(function() { window.location = '/posts/4628925/edit/' + $(this).val(); });        
        });        
    </script>


        <script type="text/javascript">gauth.informStackAuth('http://stackauth.com');</script>

</head>
<body class="ask-page">
    <noscript><div id="noscript-padding"></div></noscript>
    <div id="notify-container"></div>

    <div id="overlay-header"></div>
    <div id="custom-header"></div>
    <div class="container">
        <div id="header">
            <div id="portalLink">
                
                <a class="genu" href="http://stackexchange.com">Stack Exchange</a>
                
            </div>
            <div id="topbar">
                <div id="hlinks">
                    <span id="hlinks-user">
                  <a href="/users/recent/126353" title="you have no new replies"><span class="envelope-off"> </span></a> 
                  <a href="/users/126353/nathan-campos" >Nathan Campos</a> <a href="/privileges"><span class="reputation-score" title="your reputation; view reputation privileges">3,538</span></a><span title="11 silver badges"><span class="badge2"></span><span class="badgecount">11</span></span><span title="36 bronze badges"><span class="badge3"></span><span class="badgecount">36</span></span>
 <span class="lsep">|</span>

                  </span>
                  <span id="hlinks-nav">
                  <a href="/users/logout?returnurl=%2fposts%2f4628925%2fedit">log out</a>
 <span …
Nathan Campos 23 Junior Poster

I don't know how to do this in Tasm, but i wrote a article at CodeProject some time ago using MASM32, take a look: http://www.codeproject.com/KB/DLL/intro_to_dlls_in_masm.aspx

Hope this helps!

Nathan Campos 23 Junior Poster

Hello,
I'm learning C# and i want to know how i can add a item in a ListBox like this, the user click in a button, then it creates a item in the ListBox and in the ListBox the user digits what he want in that field, when the user want to edit it he only double click in the item and he edits that value, but i don't know how to do this.

Best Regards,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Nooooooooo!
Now DaniWeb is like StackOverflow! :(
With this reputation!

Nathan Campos 23 Junior Poster

Hello,
I use Nasm as my default Assembler, but with a couple days i was testing MASM and now i want to know how many users here use this Assembler.

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Thanks very much reganstar!

Nathan Campos 23 Junior Poster

Hello,
I'm a brazilian, but my friend is chinese and he buyed a notebook here in Brazil(Don't have chinese support installed) and my Windows XP CD don't have all that files to install the language pack, then how i can get the language pack?

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Hello,
I'm starting in the development under PocketC and i want to know if here in DaniWeb we have other users that are using the same software.

Regards,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

In my opinion C# is a C++, but like Java and .Net because you can only develop using it are all shareware.

Thanks!

Nathan Campos 23 Junior Poster

Hahahhahahahaha!

Nathan Campos 23 Junior Poster

It's time to decide!
In a couple of time i will be back with the answer!

Nathan Campos 23 Junior Poster

stdafx.h in Visual Studio, have to be included on the project don't matter, but it have to be there!

Nathan Campos 23 Junior Poster

Planing ahead is my forte, but first i have to try both and i do this at this time!

Nathan Campos 23 Junior Poster

Please, i need to decide this today, and in only 2 hours!!!

Nathan Campos 23 Junior Poster

Hahahahahhaha!
Very nice Matty!

Nathan Campos 23 Junior Poster

I'm learning to use the Microsoft Visual Studio and i hate this stdafx.h header!

GNU is better in my opinion!

Nathan Campos 23 Junior Poster

Don't use <pre> and </pre>!, use the code tags: [ code=cplusplus ]...[ /code ], without spaces!

Thanks!

Nathan Campos 23 Junior Poster

Because i hate .Net and C#, in my opinion!
And C is much more like C++, than if i go to develop on it will be more easy to learn!

Thanks!

Nathan Campos 23 Junior Poster

Other things, please put better descriptions as Salem says and this isn't the right forum to talk about C, use the C forum here in DaniWeb!

Thanks!

Nathan Campos 23 Junior Poster

Hello,
At this times i need to decide something that will chage my life forever, it is: Continue with C++ and the possibility to compile my programs at my HP Jornada 720(Handheld PC) and in my PC only and NOT for my j720, or learn C and start my mobile development carrer with eVC++(One of my dreams). What i choose?

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Hello,
Because of my new and the most of the future projects, i'm needing to learn C and use Windows, but because of this, i don't know how to use the Windows API, then i'm asking for an example of using DeleteFile function.

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Put the code tags!

Thanks!

Nathan Campos 23 Junior Poster

Hello,
I'm trying to download the binarys of the FPC ver. 2.1.2 Win32, because i need to develop a program that i only can compile it in this version of FPC, then if you have the binary of this version of a link to it i will be very happy.

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

That's good!, a site for our classes!

Very nice!

Nathan Campos 23 Junior Poster

Don't put this dirty words in your title, put better titles and that explain what you need!

Thanks!

Bladtman242 commented: I did explain my needs, i even did so in the title thank you, please read before making angry posts +0
VernonDozier commented: Perfectly reasonable post. There is no need to swear. +24
Nathan Campos 23 Junior Poster

And just another thing: Please put better titles, like: Trying to build a record app, Help in Records...
It's better ad more organized.

Nathan Campos 23 Junior Poster

Huh, it's hidden, now i understand!

Nathan Campos 23 Junior Poster

XAMP is very nice!
See this two links:
- Documentation About XAMP
- IBM - Install XAMP

Hope it helps!

Nathan Campos 23 Junior Poster

I approve your opinion!
You never know!

Nathan Campos 23 Junior Poster

Thanks very much!!!!!!!!

Nathan Campos 23 Junior Poster

huh!!!!

Nathan Campos 23 Junior Poster

Huh, now i'm thinking the same!

Nathan Campos 23 Junior Poster

If you're on Windows, you can write a program that adds the association on the Windows registry, it's the most easy way!

Nathan Campos 23 Junior Poster

That's very nice alishujahx!
I can see the class and just one more thing: Congratulation for your very very nice idea!

Congratulations!!!!!

Nathan Campos 23 Junior Poster

See here my console log:

ubuntu@eeepc:~$ g++ -IB:/home/ubuntu/.zlib/include comp.cpp -LB:/home/ubuntu/.zlib/lib -llibz
/usr/bin/ld: cannot find -llibz
collect2: ld returned 1 exit status
ubuntu@eeepc:~$

And if i try zlib:

ubuntu@eeepc:~$ g++ -IB:/home/ubuntu/.zlib/include comp.cpp -LB:/home/ubuntu/.zlib/lib -lzlib
/usr/bin/ld: cannot find -lzlib
collect2: ld returned 1 exit status
ubuntu@eeepc:~$

I tryed this two modes, because the lib file name is libz.a

Only one question more: You can compile this in your compiler?

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

I'm in Brazil, but my time that i can view the lessons are about 2:30 pm to 10 pm in Brazil, that haves the timezone GMT -3.

Thanks!

Nathan Campos 23 Junior Poster

It's VOIP technology, it's like an telephone, but for internet!

Nathan Campos 23 Junior Poster

It's very simple to use, is like the others IMs, but it's better for Voice and Video chat!
Read More!

Nathan Campos 23 Junior Poster

Tom Gunn is right, and another thing, please put the code highlighting, like this: [ code=cplusplus ] ... [ /code ], but without spaces.

Thanks!

MosaicFuneral commented: wgaf -1
Nathan Campos 23 Junior Poster

I'm going o add you, my Skype is ubuntu-nathan, if someone want to add me too, i will be very happy, but remember that i'm learning C++.

Thanks For The Future Help!

Nathan Campos 23 Junior Poster

Hello,
I'm learning C++ and trying to build my own file zipper, because i like very much to work with zip files, but now i want to build my own zipper and it's so hard to find good resources to start. As you can see in my previous posts i was trying to correct the only code snippet that i've founded in Google, but it's getting so much errors.

Then the only thing that i want is a very good snippet to start my zipper, remember that i want to build a zipper, not an unzipper.

Thanks,
Nathan Paulino Campos

Nathan Campos 23 Junior Poster

Thanks codejoust, i'm starting and i don't know much things about how to search for gems, you can post a good site to search for gems, because i do a search in Google and i didn't get any good sources.

Thanks!