Skip to content

Instantly share code, notes, and snippets.

View andremilk's full-sized avatar

André Luiz Guimarães de Souza Leite andremilk

View GitHub Profile
@Override
public void adicionarProva() throws Exception {
int tamLista = this.getProvas().size();
if(tamLista >= MAX_PROVAS)
return;
String message = "Digite a prova de numero" + (tamLista + 1);
this.getProvas().add(new Prova((tamLista == 0 ? 4: 6), DataHandler.entradaNota(message)));
}
@Override
public void gerarParcial() {
double primeiraParte = 0;
ArrayList<Prova> p = this.getProvas();
for(int i = 0; i <= 4; i++) {
primeiraParte += p.get(i).getNota();
}
this.setMediaParcial(((primeiraParte / 5) + (p.get(5).getNota() * p.get(5).getPeso()) / 10));
}
@Override
public void gerarParcial() {
double primeiraParte = 0;
ArrayList<Prova> p = this.getProvas();
for(int i = 0; i <= 4; i++) {
primeiraParte += p.get(i).getNota();
}
this.setMediaParcial(((primeiraParte / 5) * 6 + (p.get(5).getNota() * p.get(5).getPeso()) / 10));
}
p = [0 0 1 1; 0 1 0 1];
t = [0 0 0 1];
plotpv(p, t)
net = newp(minmax(p), 1);
net.iw{1, 1} = [-1.2 -0.5];
net.b{1} = 1;
plotpc(net.iw{1, 1}, net.b{1});
p = [0 0 1 1; 0 1 0 1];
t = [0 0 0 1];
plotpv(p, t)
net = newp([-2 2; -2 2], 1);
net.iw{1, 1} = [1 2];
net.b{1} = -2.5;
plotpc(net.iw{1}, net.b{1});
p = [0 0 1 1; 0 1 0 1];
t = [0 0 0 1];
plotpv(p, t)
net = newp(minmax(p), 1);
net.iw{1, 1} = [1 2];
net.b{1} = -2.5;
plotpc(net.iw{1}, net.b{1});
sudo ./build
strophe_wrap.c: In function ‘_wrap_xmpp_log’:
strophe_wrap.c:4259:8: error: incompatible types when assigning to type ‘va_list’ from type ‘struct __va_list_tag *’
strophe_wrap.c: In function ‘_wrap__xmpp_conn_t_parser_set’:
strophe_wrap.c:6522:3: error: unknown type name ‘XML_Parser’
strophe_wrap.c:6523:3: error: unknown type name ‘XML_Parser’
strophe_wrap.c:6539:28: warning: assignment makes pointer from integer without a cast [enabled by default]
strophe_wrap.c: In function ‘_wrap__xmpp_conn_t_parser_get’:
strophe_wrap.c:6554:3: error: unknown type name ‘XML_Parser’
strophe_wrap.c:6563:10: warning: assignment makes integer from pointer without a cast [enabled by default]
log function: 0x1ee4660
set_error_handler function: 0x1ee4970
step function: 0x1ee4a50
quit function: 0x1ee43a0
plugins table: 0x1ee3330
_M table: 0x1ee3250
server table: 0x1ee2bc0
logger function: 0x1ed3430
_PACKAGE
eventable function: 0x1ee5000
-- Change these:
local jid, password = "user@example.com", "secret";
-- This line squishes verse each time you run,
-- handy if you're hacking on Verse itself
--os.execute("squish --minify-level=none verse");
require "verse".init("client");
c = verse.new();
dekozo@dekozo-laptop:~/verse/doc$ lua example.lua
lua: /usr/local/share/lua/5.1/verse.lua:6706: module 'lxp' not found:
no field package.preload['lxp']
no file './lxp.lua'
no file '/usr/local/share/lua/5.1/lxp.lua'
no file '/usr/local/share/lua/5.1/lxp/init.lua'
no file '/usr/local/lib/lua/5.1/lxp.lua'
no file '/usr/local/lib/lua/5.1/lxp/init.lua'
no file '/usr/share/lua/5.1/lxp.lua'
no file '/usr/share/lua/5.1/lxp/init.lua'