Sangahyando | 23 Oct 13:41 2014

Coding Standards and Indentation for PHP

Hi,

I am just starting to code in PHP and have found a coding standard I prefer in which indentation occurs as
shown in the examples below:

Eg 1:

Code:
if ($Stmt = $Mysqli->prepare("SELECT color, pattern, size,
                              manufacturer, mfgSku, storeLocation,
                              aisle, status
                              FROM tblItems WHERE ourSku = ?")) {

Eg 2:

Code:
$flavors = array ('chocolate', 'strawberry', 'vanilla', 'cookie dough', 
                  'chocolate chip', 'mint chocolate chip', 'rocky road',
                  'peach', 'fudge brownie', 'coffee', 'mocha chip');

Eg 3:

Code:
$Stmt->bind_result( $this->_firstName,
                    $this->_lastName,
                    $this->_BillToAddress->address1,
                    $this->_BillToAddress->address2,
                    $this->_BillToAddress->city,
                    $this->_BillToAddress->state,
                    $this->_BillToAddress->zip,
(Continue reading)

Ali Zand | 22 Oct 22:07 2014

Adding features to NetBeans

To whom it may concern,

I have been using NetBeans IDE for a while now and I primarily use it for web development with PHP, HTML, JS, and CSS. This might be a small thing but it would be very good if I could have the option to add a .php page and the js and the css file would add automatically with the same name. I find myself to have to add 3 separate pages with different extensions but the same name every time I need to make a new page.

Thank you
renderedmind | 22 Oct 19:25 2014
Picon

jbutton countdown problem help please!

I'm sure this is super easy but i just cannot figure it out..
This jButton1 says "Start"
but when you click it i want it to change from "start" to "250" and begin to count down 1 each second until it
hits 0. but i'm just not sure how to make a timer for it to count down.
[Image: http://i1102.photobucket.com/albums/g449/1993-00/ineedhelp_zps60f7359c.png ]

rbrmendes | 22 Oct 15:41 2014
Picon

LIST SHOWS NO DATA IN JSP

Good Morning !

I'm trying to display data from a list in the browser , but the information is not displayed . I tried in
several ways but the information does not appear.

I'll post my code :

Code:

public class AlunoDAO extends DAO {
    public List<Aluno> listar() {
        List<Aluno> lista = new ArrayList<>();
        try {
            Connection conexao = getConexao();
            Statement stm = conexao.createStatement();
            ResultSet rs = stm.executeQuery("Select * from aluno");
            while (rs.next()) {
                Aluno aluno = new Aluno();
                aluno.setMatricula(rs.getLong("matricula"));
                aluno.setNome(rs.getString("nome"));
                lista.add(aluno);
            }
            stm.close();
            conexao.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return lista;
    }

}

Code:

 String destino = "sucesso.jsp";

        List<Aluno> lista = new ArrayList<>();

        Aluno aluno = new Aluno();
        AlunoDAO dao = new AlunoDAO();

                    aluno.setMatricula(Long.parseLong(request.getParameter("matricula")));
                    aluno.setNome(request.getParameter("nome"));

        lista = dao.listar();
        request.setAttribute("listaAluno", lista);

        RequestDispatcher rd = request.getRequestDispatcher(destino);
        rd.forward(request, response);

Code:

<% <at>  taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<% <at>  taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<% <at>  taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

Code:

  <table border="1">
            <tr>
                <td>Matricula</td>
                <td>Nome</td>
            </tr>
            <c:forEach var="aluno" items="${listaAluno}">
                <tr>
                    <td>${aluno.matricula}</td>
                    <td>${aluno.nome}</td>
                </tr>
            </c:forEach>
        </table>

Thanks

Todd Nichols | 22 Oct 23:08 2014
Picon

NB? - No Make Command

Hello netbeaners;

I installed netbeans 8.0.1 and tried to build the Welcome_2 sample project. 

It seems it is looking for the Make Command, before it will build. Where do I find this? 



Regards;
Todd 


Thomas Wolf | 22 Oct 17:51 2014
Picon

Has anything changed with CVS recently? NB is messing up some source files!


I’m working off the trunk and my colleague committed some changes to CVS (he uses Eclipse, I use Netbeans 8.01 with all the latest updates).  When I did the usual Project->CVS->Update->Update on my project, the file he had changed didn’t compile due to errors.  Here’s what Netbeans shows me as his changes:



The problem is that the actual changes (as shown in Eclipse) are:


Notice that the changes Netbeans is showing at lines 202-203 weren’t actually real?  It seems to have simply pasted the lines from 210-211 to 202-203?!

Does anyone know of a recent change to the CVS-related modules that might be causing this?  Or is this some cache-corruption issue (although this seems far fetched)?  Is there perhaps a bug open for this already?

Thanks for any info,
Tom

mauro | 22 Oct 14:29 2014
Picon

Auto indent after if in php

Running the latest version. on Windows.

Iv end up with an annoying issue where after typing out:
if(true)

and pressing enter, automatically inserts new indentation.
so i get
if(true)
  {
}

I went over all the formatting options and nothing seemed to change that.

neufena | 22 Oct 10:52 2014
Picon

SLowdowns/hangs on OS X

I run Netbeans (for PHP) on both my work iMac and my personal Macbook Pro.  Both are now running 10.10.

On my MBP Netbeans never has any issues.  However on my work iMac I get frequent slowdowns and hangs.  If I force
quit and reopen I can carry on working.  This has been happening on and off from OS X 10.8 onwards but is
getting more and more annoying.

Does anyone have any tips to work out what the problem is?  Theoretically the iMac is more powerful and has
more RAM than the MBP but has a HDD rather than SSD.

I've done a general clean up of the iMac this morning so that might help a bit but any tips would be great.

albalaji | 22 Oct 07:52 2014
Picon

Frozen on First Run ..

i have windows 8.1 .. i install netbeans 8.0.1 .. 

when i run it the first screen appear and frozen i can not do anything !!!

 -- i remove netbeans then install it again ... the same issue.

need help

Kl1str0n | 22 Oct 04:20 2014
Picon

Goodbye again

I would really like to use netbeans for real work...I really would.

I spend way more time establishing the environment than I do working.

Case in point...I got visual studio to do what I wanted in 2 hours time.

After 3 weeks applying myself to Netbeans I have uninstalled and will buy a copy of visual studio.

All I was trying to do was compile C++ on 64-bit windows and connect to an oracle database.

I really need to work, not work on the environment......

Northchild | 22 Oct 01:12 2014

Newbie Question: How do I make NetBeans update the code to linked files?

Good day,

I have a project running in the IDE. There are a few HTML pages and one CSS page (styles.css) in the
public_html directory. I want to move styles.css to a different directory and have the <link
rel="stylesheet" href="lounge.css"> path update in all of the HTML files that link to this stylesheet.

I know that it's not hugely important to have the IDE automatically update the <link> in just a few HTML pages
in this case, but I'm looking forward to a time when I will need to do this. I know that Dreamweaver will do
this for you, but I'm not sure how NetBeans goes about it.

Thank you for any help. :)


Gmane