Search Results

Search found 2524 results on 101 pages for 'rach 90'.

Page 7/101 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Rotating 2D Object

    - by Vico Pelaez
    Well I am trying to learn openGL and want to make a triangle move one unit (0.1) everytime I press one of the keyboard arrows. However i want the triangle to turn first pointing the direction where i will move one unit. So if my triangle is pointing up and I press right the it should point right first and then move one unit in the x axis. I have implemented the code to move the object one unit in any direction, however I can not get it to turn pointing to the direction it is going. The initial position of the Triangle is pointing up. #define LENGTH 0.05 float posX = -0.5, posY = -0.5, posZ = 0; float inX = 0.0 ,inY = 0.0 ,inZ = 0.0; // what values???? void rect(){ glMatrixMode(GL_PROJECTION); glLoadIdentity(); glPushMatrix(); glTranslatef(posX,posY,posZ); glRotatef(rotate, inX, inY, inZ); glBegin(GL_TRIANGLES); glColor3f(0.0, 0.0, 1.0); glVertex2f(-LENGTH,-LENGTH); glVertex2f(LENGTH-LENGTH, LENGTH); glVertex2f(LENGTH, -LENGTH); glEnd(); glPopMatrix(); } void display(){ //Clear Window glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); rect(); glFlush(); } void init(){ glClearColor(0.0, 0.0, 0.0, 0.0); glColor3f(1.0, 1.0, 1.0); } float move_unit = 0.01; bool change = false; void keyboardown(int key, int x, int y) { switch (key){ case GLUT_KEY_UP: if(rotate = 0) posY += move_unit; else{ inX = 1.0; rotate = 0; } break; case GLUT_KEY_RIGHT: if(rotate = -90) posX += move_unit; else{ inX = 1.0; // is this value ok?? rotate -= 90; } break; case GLUT_KEY_LEFT: if(rotate = 90) posX -= move_unit; else{ inX = 1.0; // is this value ok??? rotate += 90; } break; case GLUT_KEY_DOWN: if(rotate = 180) posY -= move_unit; else{ inX = 1.0; rotate += 180; } break; case 27: // Escape button exit(0); break; default: break; } glutPostRedisplay(); } int main(int argc, char** argv){ glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(500,500); glutInitWindowPosition(0, 0); glutCreateWindow("Triangle turn"); glutSpecialFunc(keyboardown); glutDisplayFunc(display); init(); glutMainLoop()

    Read the article

  • Sign an OpenSSL .CSR with Microsoft Certificate Authority

    - by kce
    I'm in the process of building a Debian FreeRadius server that does 802.1x authentication for domain members. I would like to sign my radius server's SSL certificate (used for EAP-TLS) and leverage the domain's existing PKI. The radius server is joined to domain via Samba and has a machine account as displayed in Active Directory Users and Computers. The domain controller I'm trying to sign my radius server's key against does not have IIS installed so I can't use the preferred Certsrv webpage to generate the certificate. The MMC tools won't work as it can't access the certificate stores on the radius server because they don't exist. This leaves the certreq.exe utility. I'm generating my .CSR with the following command: openssl req -nodes -newkey rsa:1024 -keyout server.key -out server.csr The resulting .CSR: ******@mis-ke-lnx:~/G$ openssl req -text -noout -in mis-radius-lnx.csr Certificate Request: Data: Version: 0 (0x0) Subject: C=US, ST=Alaska, L=CITY, O=ORG, OU=DEPT, CN=ME/emailAddress=MYEMAIL Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:a8:b3:0d:4b:3f:fa:a4:5f:78:0c:24:24:23:ac: cf:c5:28:af:af:a2:9b:07:23:67:4c:77:b5:e8:8a: 08:2e:c5:a3:37:e1:05:53:41:f3:4b:e1:56:44:d2: 27:c6:90:df:ae:3b:79:e4:20:c2:e4:d1:3e:22:df: 03:60:08:b7:f0:6b:39:4d:b4:5e:15:f7:1d:90:e8: 46:10:28:38:6a:62:c2:39:80:5a:92:73:37:85:37: d3:3e:57:55:b8:93:a3:43:ac:2b:de:0f:f8:ab:44: 13:8e:48:29:d7:8d:ce:e2:1d:2a:b7:2b:9d:88:ea: 79:64:3f:9a:7b:90:13:87:63 Exponent: 65537 (0x10001) Attributes: a0:00 Signature Algorithm: sha1WithRSAEncryption 35:57:3a:ec:82:fc:0a:8b:90:9a:11:6b:56:e7:a8:e4:91:df: 73:1a:59:d6:5f:90:07:83:46:aa:55:54:1c:f9:28:3e:a6:42: 48:0d:6b:da:58:e4:f5:7f:81:ee:e2:66:71:78:85:bd:7f:6d: 02:b6:9c:32:ad:fa:1f:53:0a:b4:38:25:65:c2:e4:37:00:16: 53:d2:da:f2:ad:cb:92:2b:58:15:f4:ea:02:1c:a3:1c:1f:59: 4b:0f:6c:53:70:ef:47:60:b6:87:c7:2c:39:85:d8:54:84:a1: b4:67:f0:d3:32:f4:8e:b3:76:04:a8:65:48:58:ad:3a:d2:c9: 3d:63 I'm trying to submit my certificate using the following certreq.exe command: certreq -submit -attrib "CertificateTemplate:Machine" server.csr I receive the following error upon doing so: RequestId: 601 Certificate not issued (Denied) Denied by Policy Module The DNS name is unavailable and cannot be added to the Subject Alternate name. 0x8009480f (-2146875377) Certificate Request Processor: The DNS name is unavailable and cannot be added to the Subject Alternate name. 0x8009480f (-2146875377) Denied by Policy Module My certificate authority has the following certificate templates available. If I try to submit by certreq.exe using "CertificiateTemplate:Computer" instead of "CertificateTemplate:Machine" I get an error reporting that "the requested certificate template is not supported by this CA." My google-foo has failed me so far on trying to understand this error... I feel like this should be a relatively simple task as X.509 is X.509 and OpenSSL generates the .CSRs in the required PKCS10 format. I can't be only one out there trying to sign a OpenSSL generated key on a Linux box with a Windows Certificate Authority, so how do I do this (perferably using the off-line certreq.exe tool)?

    Read the article

  • Read array dump output and generates the correspondent XML file

    - by Christian
    Hi, The text below is the dump of a multidimensional array, dumped by the var_dump() PHP function. I need a Java function that reads a file with a content like this (attached) and returns it in XML. For a reference, in site http://pear.php.net/package/Var_Dump/ you can find the code (in PHP) that generates dumps in XML, so all neeeded logic is there (I think). I will be waiting for your feedback. Regards, Christian array(1) { ["Processo"]= array(60) { ["Sistema"]= string(6) "E-PROC" ["UF"]= string(2) "RS" ["DataConsulta"]= string(19) "11/05/2010 17:59:17" ["Processo"]= string(20) "50000135320104047100" ["NumRegistJudici"]= string(20) "50000135320104047100" ["IdProcesso"]= string(30) "711262958983115560390000000001" ["SeqProcesso"]= string(1) "1" ["Autuado"]= string(19) "08/01/2010 12:04:47" ["StatusProcesso"]= string(1) "M" ["ComSituacaoProcesso"]= string(2) "00" ["Situacao"]= string(9) "MOVIMENTO" ["IdClasseJudicial"]= string(10) "0000000112" ["DesClasse"]= string(18) "INQUÉRITO POLICIAL" ["CodClasse"]= string(6) "000120" ["SigClasse"]= string(3) "INQ" ["DesTipoInquerito"]= string(0) "" ["CodCompetencia"]= string(2) "21" ["IdLocalidadeJudicial"]= string(4) "7150" ["ClasseSigAutor"]= string(5) "AUTOR" ["ClasseDesAutor"]= string(5) "AUTOR" ["ClasseSigReu"]= string(7) "INDICDO" ["ClasseDesReu"]= string(9) "INDICIADO" ["ClasseCodReu"]= string(2) "64" ["TipoAcao"]= string(8) "Criminal" ["TipoProcessoJudicial"]= string(1) "2" ["CodAssuntoPrincipal"]= string(6) "051801" ["CodLocalidadeJudicial"]= string(2) "00" ["IdAssuntoPrincipal"]= string(4) "1504" ["IdLocalizadorOrgaoPrincipal"]= string(30) "711264420823128430420000000001" ["ChaveConsulta"]= string(12) "513009403710" ["NumAdministrativo"]= NULL ["Magistrado"]= string(28) "RICARDO HUMBERTO SILVA BORNE" ["IdOrgaoJuizo"]= string(9) "710000085" ["IdOrgaoJuizoOriginario"]= string(9) "710000085" ["DesOrgaoJuizo"]= string(45) "JUÍZO FED. DA 02A VF CRIMINAL DE PORTO ALEGRE" ["SigOrgaoJuizo"]= string(10) "RSPOACR02F" ["CodOrgaoJuizo"]= string(9) "RS0000085" ["IdOrgaoSecretaria"]= string(9) "710000084" ["DesOrgaoSecretaria"]= string(31) "02a VF CRIMINAL DE PORTO ALEGRE" ["SigOrgaoSecretaria"]= string(9) "RSPOACR02" ["CodOrgaoSecretaria"]= string(9) "RS0000084" ["IdSigilo"]= string(1) "0" ["IdUsuario"]= string(30) "711262951173995330420000000001" ["DesSigilo"]= string(10) "Sem Sigilo" ["Localizador"]= string(25) "EM TRÂMITE ENTRE PF E MPF" ["TotalCda"]= int(0) ["DesIpl"]= string(8) "012/2010" ["Assunto"]= array(1) { [0]= array(4) { ["IdAssuntoJudicial"]= string(4) "1504" ["SeqAssunto"]= string(1) "1" ["CodAssunto"]= string(6) "051801" ["DesAssunto"]= string(84) "Moeda Falsa / Assimilados (arts. 289 e parágrafos e 290), Crimes contra a Fé Pública" } } ["ParteAutor"]= array(1) { [0]= array(12) { ["IdPessoa"]= string(30) "771230778800100040000000000508" ["TipoPessoa"]= string(3) "ENT" ["Nome"]= string(15) "POLÍCIA FEDERAL" ["Identificacao"]= string(14) "79621439000191" ["SinPartePrincipal"]= string(1) "S" ["IdProcessoParte"]= string(30) "711262958983115560390000000002" ["IdProcessoParteAtributo"]= NULL ["IdRepresentacao"]= NULL ["TipoRepresentacao"]= NULL ["AtributosProcessoParte"]= NULL ["Relacao"]= NULL ["Procurador"]= array(6) { [0]= array(4) { ["Nome"]= string(25) "SOLON RAMOS CARDOSO FILHO" ["Sigla"]= string(13) "cor-sr-dpf-rs" ["IdUsuarioProcurador"]= string(30) "711262893271855450420000000001" ["TipoUsuario"]= string(3) "CPF" } [1]= array(4) { ["Nome"]= string(18) "LUCIANA IOP CECHIN" ["Sigla"]= string(11) "luciana.lic" ["IdUsuarioProcurador"]= string(30) "711262946806708880420000000001" ["TipoUsuario"]= string(3) "CPF" } [2]= array(4) { ["Nome"]= string(31) "ALEXANDRE DA SILVEIRA ISBARROLA" ["Sigla"]= string(15) "drcor-sr-dpf-rs" ["IdUsuarioProcurador"]= string(30) "711262949451860560420000000001" ["TipoUsuario"]= string(3) "CPF" } [3]= array(4) { ["Nome"]= string(24) "JUCÉLIA TERESINHA PISONI" ["Sigla"]= string(11) "jucelia.jtp" ["IdUsuarioProcurador"]= string(30) "711262950492275450420000000001" ["TipoUsuario"]= string(3) "CPF" } [4]= array(4) { ["Nome"]= string(32) "MARCOS ANTONIO SIQUEIRA PICININI" ["Sigla"]= string(13) "picinini.masp" ["IdUsuarioProcurador"]= string(30) "711262951173995330420000000001" ["TipoUsuario"]= string(3) "APF" } [5]= array(4) { ["Nome"]= string(20) "PRISCILLA BURLACENKO" ["Sigla"]= string(12) "priscilla.pb" ["IdUsuarioProcurador"]= string(30) "711262955631630740420000000001" ["TipoUsuario"]= string(3) "DPF" } } } } ["ParteReu"]= array(1) { [0]= array(11) { ["IdPessoa"]= string(30) "711262958983115560390000000001" ["TipoPessoa"]= string(2) "PF" ["Nome"]= string(8) "A APURAR" ["Identificacao"]= NULL ["SinPartePrincipal"]= string(1) "S" ["IdProcessoParte"]= string(30) "711262958983115560390000000001" ["IdProcessoParteAtributo"]= NULL ["IdRepresentacao"]= NULL ["TipoRepresentacao"]= NULL ["AtributosProcessoParte"]= NULL ["Relacao"]= NULL } } ["OutraParte"]= array(1) { [0]= array(10) { ["Nome"]= string(26) "MINISTÉRIO PÚBLICO FEDERAL" ["CodTipoParte"]= string(3) "114" ["DesTipoParte"]= string(3) "MPF" ["SinPolo"]= string(1) "N" ["Identificacao"]= string(13) "3636198000192" ["SinPartePrincipal"]= string(1) "N" ["IdProcessoParte"]= string(30) "711262958983115560390000000003" ["IdPessoa"]= string(30) "771230778800100040000000000217" ["TipoPessoa"]= string(3) "ENT" ["Procurador"]= array(1) { [0]= array(4) { ["Nome"]= string(25) "MARIA VALESCA DE MESQUITA" ["IdUsuarioProcurador"]= string(30) "711265220162198740420000000001" ["TipoUsuario"]= string(1) "P" ["Sigla"]= string(5) "pr528" } } } } ["DadoComplementar"]= array(6) { [0]= array(5) { ["DesDadoComplem"]= string(21) "Antecipação de Tutela" ["ValorDadoComplem"]= string(13) "Não Requerida" ["IdDadoComplementar"]= string(1) "1" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000003" ["IdDadoComplementarValor"]= string(1) "4" } [1]= array(5) { ["DesDadoComplem"]= string(16) "Justiça Gratuita" ["ValorDadoComplem"]= string(13) "Não Requerida" ["IdDadoComplementar"]= string(1) "4" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000001" ["IdDadoComplementarValor"]= string(1) "3" } [2]= array(5) { ["DesDadoComplem"]= string(15) "Petição Urgente" ["ValorDadoComplem"]= string(3) "Não" ["IdDadoComplementar"]= string(1) "5" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000004" ["IdDadoComplementarValor"]= string(1) "2" } [3]= array(5) { ["DesDadoComplem"]= string(22) "Prioridade Atendimento" ["ValorDadoComplem"]= string(3) "Não" ["IdDadoComplementar"]= string(1) "2" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000006" ["IdDadoComplementarValor"]= string(1) "2" } [4]= array(5) { ["DesDadoComplem"]= string(9) "Réu Preso" ["ValorDadoComplem"]= string(3) "Não" ["IdDadoComplementar"]= string(1) "6" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000002" ["IdDadoComplementarValor"]= string(1) "2" } [5]= array(5) { ["DesDadoComplem"]= string(24) "Vista Ministério Público" ["ValorDadoComplem"]= string(3) "Sim" ["IdDadoComplementar"]= string(1) "3" ["NumIdProcessoDadoComplem"]= string(30) "711262958983115560390000000005" ["IdDadoComplementarValor"]= string(1) "1" } } ["SemPrazoAbrir"]= bool(true) ["Evento"]= array(8) { [0]= array(18) { ["IdProcessoEvento"]= string(30) "711269271039215440420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(3) "166" ["SeqEvento"]= string(1) "8" ["DataHora"]= string(19) "22/03/2010 12:19:16" ["SinExibeDesEvento"]= string(1) "S" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= string(7) "90 DIAS" ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(37) "PETIÇÃO PROTOCOLADA JUNTADA - 90 DIAS" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(7) "ap18785" ["idUsuario"]= string(30) "711263330517182580420000000001" ["DesPeticao"]= string(25) "DILAÇÃO DE PRAZO DEFERIDA" ["DescricaoCompleta"]= string(75) "PETIÇÃO PROTOCOLADA JUNTADA - 90 DIAS - DILAÇÃO DE PRAZO DEFERIDA - 90 DIAS" } [1]= array(18) { ["IdProcessoEvento"]= string(30) "711269032501923580420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(3) "166" ["SeqEvento"]= string(1) "7" ["DataHora"]= string(19) "19/03/2010 18:04:59" ["SinExibeDesEvento"]= string(1) "S" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= string(7) "90 DIAS" ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(37) "PETIÇÃO PROTOCOLADA JUNTADA - 90 DIAS" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(5) "pr700" ["idUsuario"]= string(30) "711262976146980920420000000002" ["DesPeticao"]= string(25) "DILAÇÃO DE PRAZO DEFERIDA" ["DescricaoCompleta"]= string(75) "PETIÇÃO PROTOCOLADA JUNTADA - 90 DIAS - DILAÇÃO DE PRAZO DEFERIDA - 90 DIAS" } [2]= array(19) { ["IdProcessoEvento"]= string(30) "711268077089625240420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(3) "165" ["SeqEvento"]= string(1) "6" ["DataHora"]= string(19) "08/03/2010 16:55:48" ["SinExibeDesEvento"]= string(1) "N" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(13) "picinini.masp" ["idUsuario"]= string(30) "711262951173995330420000000001" ["Documento"]= array(2) { [0]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711268077089625240420000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(4) "CERT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [1]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711268077089625240420000000002" ["SeqDocumento"]= string(1) "2" ["SigTipoDocumento"]= string(4) "DESP" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(26) "PEDIDO DE DILAÇÃO DE PRAZO" ["DescricaoCompleta"]= string(26) "PEDIDO DE DILAÇÃO DE PRAZO" } [3]= array(19) { ["IdProcessoEvento"]= string(30) "711267732906972600420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(2) "52" ["SeqEvento"]= string(1) "5" ["DataHora"]= string(19) "04/03/2010 17:20:29" ["SinExibeDesEvento"]= string(1) "N" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(5) "pr700" ["idUsuario"]= string(30) "711262976146980920420000000002" ["Documento"]= array(1) { [0]= array(6) { ["IdUsuario"]= string(30) "711262976146980920420000000002" ["IdDocumento"]= string(30) "711267732906972600420000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(3) "PET" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(7) "PETIÇÃO" ["DescricaoCompleta"]= string(7) "PETIÇÃO" } [4]= array(19) { ["IdProcessoEvento"]= string(30) "711265889365256290420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(3) "165" ["SeqEvento"]= string(1) "4" ["DataHora"]= string(19) "11/02/2010 09:59:04" ["SinExibeDesEvento"]= string(1) "N" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(13) "picinini.masp" ["idUsuario"]= string(30) "711262951173995330420000000001" ["Documento"]= array(2) { [0]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711265222866995860420000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(4) "PORT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [1]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711265222866995860420000000002" ["SeqDocumento"]= string(1) "2" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(26) "PEDIDO DE DILAÇÃO DE PRAZO" ["DescricaoCompleta"]= string(26) "PEDIDO DE DILAÇÃO DE PRAZO" } [5]= array(19) { ["IdProcessoEvento"]= string(30) "711263991150788270420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(2) "52" ["SeqEvento"]= string(1) "3" ["DataHora"]= string(19) "20/01/2010 10:50:05" ["SinExibeDesEvento"]= string(1) "N" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(13) "picinini.masp" ["idUsuario"]= string(30) "711262951173995330420000000001" ["Documento"]= array(4) { [0]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263991150788270420000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(4) "DECL" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [1]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263991150788270420000000002" ["SeqDocumento"]= string(1) "2" ["SigTipoDocumento"]= string(4) "DECL" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [2]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263991150788270420000000003" ["SeqDocumento"]= string(1) "3" ["SigTipoDocumento"]= string(4) "DECL" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [3]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263991150788270420000000004" ["SeqDocumento"]= string(1) "4" ["SigTipoDocumento"]= string(4) "DECL" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(7) "PETIÇÃO" ["DescricaoCompleta"]= string(7) "PETIÇÃO" } [6]= array(19) { ["IdProcessoEvento"]= string(30) "711263955058688620420000000001" ["IdEvento"]= string(3) "228" ["IdTipoPeticaoJudicial"]= string(2) "52" ["SeqEvento"]= string(1) "2" ["DataHora"]= string(19) "20/01/2010 00:40:39" ["SinExibeDesEvento"]= string(1) "N" ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "4" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["CodEvento"]= string(10) "0000000852" ["DesEvento"]= string(27) "PETIÇÃO PROTOCOLADA JUNTADA" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(13) "picinini.masp" ["idUsuario"]= string(30) "711262951173995330420000000001" ["Documento"]= array(6) { [0]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [1]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000002" ["SeqDocumento"]= string(1) "2" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [2]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000003" ["SeqDocumento"]= string(1) "3" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [3]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000004" ["SeqDocumento"]= string(1) "4" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [4]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000005" ["SeqDocumento"]= string(1) "5" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [5]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711263229632249660420000000006" ["SeqDocumento"]= string(1) "6" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(7) "PETIÇÃO" ["DescricaoCompleta"]= string(7) "PETIÇÃO" } [7]= array(19) { ["IdProcessoEvento"]= string(30) "711262958983115560390000000001" ["IdEvento"]= string(3) "430" ["IdTipoPeticaoJudicial"]= NULL ["SeqEvento"]= string(1) "1" ["DataHora"]= string(19) "08/01/2010 12:04:47" ["SinExibeDesEvento"]= NULL ["SinUsuarioInterno"]= string(1) "N" ["IdGrupoEvento"]= string(1) "0" ["SinVisualizaDocumentoExterno"]= string(1) "N" ["Complemento"]= NULL ["DesEventoSemComplemento"]= string(56) "Distribuição/Atribuição Ordinária por sorteio eletrônico" ["CodEvento"]= string(6) "030101" ["DesEvento"]= string(56) "Distribuição/Atribuição Ordinária por sorteio eletrônico" ["DesAlternativaEvento"]= NULL ["Usuario"]= string(13) "picinini.masp" ["idUsuario"]= string(30) "711262951173995330420000000001" ["Documento"]= array(4) { [0]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711262956008922510390000000001" ["SeqDocumento"]= string(1) "1" ["SigTipoDocumento"]= string(4) "PORT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [1]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711262956008922510390000000002" ["SeqDocumento"]= string(1) "2" ["SigTipoDocumento"]= string(4) "OFIC" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [2]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711262956008922510390000000003" ["SeqDocumento"]= string(1) "3" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } [3]= array(6) { ["IdUsuario"]= string(30) "711262951173995330420000000001" ["IdDocumento"]= string(30) "711262956008922510390000000004" ["SeqDocumento"]= string(1) "4" ["SigTipoDocumento"]= string(3) "OUT" ["IdSigilo"]= string(1) "0" ["DesSigilo"]= string(10) "Sem Sigilo" } } ["DesPeticao"]= string(56) "Distribuição/Atribuição Ordinária por sorteio eletrônico" ["DescricaoCompleta"]= string(56) "Distribuição/Atribuição Ordinária por sorteio eletrônico" } } ["ValCausa"]= string(4) "0.00" ["OrgaoJul"]= string(45) "JUÍZO FED. DA 02A VF CRIMINAL DE PORTO ALEGRE" ["CodOrgaoJul"]= string(9) "RS0000085" ["OrgaoColegiado"]= NULL ["CodOrgaoColegiado"]= NULL ["CodOrgaoColegiadoSecretaria"]= NULL } }

    Read the article

  • How do I Handle Ties When Ranking Results in MySQL?

    - by Laxmidi
    Hi, How does one handle ties when ranking results in a mysql query? I've simplified the table names and columns in this example, but it should illustrate my problem: SET @rank=0; SELECT student_names.students, @rank := @rank +1 AS rank, scores.grades FROM student_names LEFT JOIN scores ON student_names.students = scores.students ORDER BY scores.grades DESC So imagine the the above query produces: Students Rank Grades Al 1 90 Amy 2 90 George 3 78 Bob 4 73 Mary 5 NULL William 6 NULL Even though Al and Amy have the same grade, one is ranked higher than the other. Amy got ripped-off. How can I make it so that Amy and Al have the same ranking, so that they both have a rank of 1. Also, William and Mary didn't take the test. They bagged class and were smoking in the boy's room. They should be tied for last place. The correct ranking should be: Students Rank Grades Al 1 90 Amy 1 90 George 3 78 Bob 4 73 Mary 5 NULL William 5 NULL If anyone has any advice, please let me know. Thank you! -Laxmidi

    Read the article

  • echo is not working in my php-gdlibrary page

    - by tismon varghese
    Hi, i am trying to create an ellipse using php gd library; also i want to display something under the ellipse. but the usual echo will not work with this. somebody please help me to find the reason and suggest a solution. this is my php code header('Content-type: image/png'); $handle = imagecreate(100, 100); $background = imagecolorallocate($handle, 255, 255, 255); $red = imagecolorallocate($handle, 255, 0, 0); $green = imagecolorallocate($handle, 0, 255, 0); $blue = imagecolorallocate($handle, 0, 0, 255); for ($i = 60; $i > 50; $i--) { imagefilledarc($handle, 50, $i, 100, 50, 0, 90, $darkred, IMG_ARC_PIE); imagefilledarc($handle, 50, $i, 100, 50, 90, 360 , $darkblue, IMG_ARC_PIE); } imagefilledarc($handle, 50, 50, 100, 50, 0, 90, $red, IMG_ARC_PIE); imagefilledarc($handle, 50, 50, 100, 50, 90, 225 , $blue, IMG_ARC_PIE); imagefilledarc($handle, 50, 50, 100, 50, 225, 360 , $green, IMG_ARC_PIE); imagepng($handle); thanks in advance tismon

    Read the article

  • Normal pointer vs Auto pointer (std::auto_ptr)

    - by AKN
    Code snippet (normal pointer) int *pi = new int; int i = 90; pi = &i; int k = *pi + 10; cout<<k<<endl; delete pi; [Output: 100] Code snippet (auto pointer) Case 1: std::auto_ptr<int> pi(new int); int i = 90; pi = &i; int k = *pi + 10; //Throws unhandled exception error at this point while debugging. cout<<k<<endl; //delete pi; (It deletes by itself when goes out of scope. So explicit 'delete' call not required) Case 2: std::auto_ptr<int> pi(new int); int i = 90; *pi = 90; int k = *pi + 10; cout<<k<<endl; [Output: 100] Can someone please tell why it failed to work for case 1?

    Read the article

  • determining if value is in range with 0=360 degree problem.

    - by Raven
    Hi, I am making a piece of code for DirectX app. It's meaning is to not show faces that are not visible. Normaly it would be just using Z-buffer, but I'm making many moves and rotations of mesh, so I would like to not do them and save computing power. I will describe this on cube. You are looking from the front so you see just one face and you don't need to rotate the 5 that left. If you would have one side of cube from 100*100 meshes, it would be great to not have to turn around 50k meshes that you really don't need. So I have stored X,Y,Z rotation of camera(the Z rotation I'm not using), and also X,Y,Z rotation of faces. In this cube simplified I would see faces that makes this statement true: cRot //camera rotation in degrees oRot //face rotation in degrees if(oRot.x > cRot.x-90 && oRot.x < cRot.x+90 && oRot.y > cRot.y-90 && oRot.y < cRot.y+90) But there comes a problem. If I will rotate arround, the camera can get to value 330 for exapmple. In this state, I would see front and right side of cube. Right side have rotation 270 so that's allright in IF statement. Problem is with 0 rotation of front face, which is also 360 degrees. So my question is how to make this statement to work, because when I use modulo, it will be failing for that right side and in this way it won't work for 0=360.

    Read the article

  • Bitmap issue in Samsung Galaxy S3

    - by user1531240
    I wrote a method to change Bitmap from camera shot : public Bitmap bitmapChange(Bitmap bm) { /* get original image size */ int w = bm.getWidth(); int h = bm.getHeight(); /* check the image's orientation */ float scale = w / h; if(scale < 1) { /* if the orientation is portrait then scaled and show on the screen*/ float scaleWidth = (float) 90 / (float) w; float scaleHeight = (float) 130 / (float) h; Matrix mtx = new Matrix(); mtx.postScale(scaleWidth, scaleHeight); Bitmap rotatedBMP = Bitmap.createBitmap(bm, 0, 0, w, h, mtx, true); return rotatedBMP; } else { /* if the orientation is landscape then rotate 90 */ float scaleWidth = (float) 130 / (float) w; float scaleHeight = (float) 90 / (float) h; Matrix mtx = new Matrix(); mtx.postScale(scaleWidth, scaleHeight); mtx.postRotate(90); Bitmap rotatedBMP = Bitmap.createBitmap(bm, 0, 0, w, h, mtx, true); return rotatedBMP; } } It works fine in another Android device, even Galaxy Nexus but in Samsung Galaxy S3, the scaled image doesn't show on screen. I tried to mark the bitmapChange method , let it show the original size Bitmap on screen but S3 also show nothing on screen. The information of variables in eclipse is here. The information of sony xperia is here. xperia and other device is working fine.

    Read the article

  • Synfony2 validation changes invalid integer to 0

    - by Craig
    I've added validation to a form and found that in some cases it is losing the invalid data I am feeding it and saving 0s instead. The output at the bottom shows that if I post the latitude as 'zzzzzz' (clearly not a number nor between -90 and 90) the form is declared as valid and saved with the value 0 How can that happen given that I have declared the input must be a number? ProxyType.php buildForm() $builder ->add('siteName', null, array('label' => 'Site name')) .... ->add('latitude', 'number', array('label' => 'Latitude')) ->add('longitude', 'number', array('label' => 'Longitude')) .... ; ProxyController.php createAction .... $postData = $request->request->get('niwa_pictbundle_proxytype'); $this->get('logger')->info('Posted latitude = '.$postData['latitude']); $form = $this->createForm(new ProxyType(), $entity); $form->bindRequest($request); if ($form->isValid()) { $this->get('logger')->info('Form declared valid : latlong ('.$entity->getLatitude().','.$entity->getLongitude().')'); .... validation.yml Acme\PictBundle\Entity\Proxy: properties: longitude: - Min: { limit: -180 } - Max: { limit: 180 } latitude: - Max: { limit: 90 } - Min: { limit: -90 } Output [2012-09-28 02:05:30] app.INFO: Posted latitude = zzzzzz [] [] [2012-09-28 02:05:30] app.INFO: Form declared valid : latlong (0,0) [] []

    Read the article

  • Microsoft Excel 2010

    - by Bruce
    I've one "master" sheet in the Excel 2010 file with all my outstanding orders detail and also reflecting how many days the orders have been outstanding. I've 4 other sheets, I'd like to extract the orders from the "master" sheet to to each of these sheets grouping them into these criteria. The 4 sheets need to reflect as follows <60 Days 60 Days <90 Days 90 Days <120 Days 120 Days Can someone assist?

    Read the article

  • Windows periodically disconnects, reconnects to the network

    - by einpoklum
    My setup: I have a PC with a Gigabyte GA-MA78S2H motherboard (Realtek Gigabit wired Ethernet on-board). I have the latest drivers (at least the latest driver for the NIC. I'm connecting via an Edimax BR-6216Mg (again, wired connection). For some reason I experience short periodic disconnects and reconnects. Specifically, Skype disconnects, tries to connect, succeeds after a short while; incoming SFTP sessions get dropped; using a browser, I sometime get stuck in the DNS lookup or connection to the website and a page won't load. A couple of seconds later, a reload works. All this happens with Windows XP SP3. With Windows 7, it also happens. (When I initially wrote this question I didn't notice it.) ipconfig for my adapter: Ethernet adapter Local Area Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller Physical Address. . . . . . . . . : 00-1D-7D-E9-72-9E Dhcp Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.0.2 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.254 DHCP Server . . . . . . . . . . . : 192.168.0.254 DNS Servers . . . . . . . . . . . : 192.117.235.235 62.219.186.7 Lease Obtained. . . . . . . . . . : Saturday, March 10, 2012 8:28:20 AM Lease Expires . . . . . . . . . . : Friday, January 26, 1906 2:00:04 AM A result of some tests a couple of the disconnects: C:\Documents and Settings\eyalroz.BAKNUNIN>nslookup google.com DNS request timed out. timeout was 2 seconds. *** Can't find server name for address 192.117.235.235: Timed out DNS request timed out. timeout was 2 seconds. *** Can't find server name for address 62.219.186.7: Timed out *** Default servers are not available Server: UnKnown Address: 192.117.235.235 DNS request timed out. timeout was 2 seconds. DNS request timed out. timeout was 2 seconds. *** Request to UnKnown timed-out C:\Documents and Settings\eyalroz.BAKNUNIN>ping 194.90.1.5 Pinging 194.90.1.5 with 32 bytes of data: Control-C ^C C:\Documents and Settings\eyalroz.BAKNUNIN>tracert -d 194.90.1.5 Tracing route to 194.90.1.5 over a maximum of 30 hops 1 <1 ms <1 ms <1 ms 192.168.0.254 2 * * 11 ms 10.168.128.1 3 14 ms 13 ms 14 ms 212.179.160.142 4 * * * Request timed out. 5 * * * Request timed out. 6 * * 47 ms 62.219.189.169 7 31 ms 27 ms 32 ms 62.219.189.150 8 15 ms 14 ms 16 ms 192.114.65.202 9 15 ms 15 ms 11 ms 212.143.10.66 10 13 ms 29 ms 31 ms 212.143.12.234 11 35 ms 15 ms 18 ms 212.143.8.72 12 22 ms 22 ms 16 ms 194.90.1.5 I usually ping 194.90.1.5 (which is not at my ISP) with 15ms response time and no losses. Things I've done/tried: [2012-03-26] I replaced the cable; I thought that made a difference, but the disconnects were back a while later, so that wasn't it. Updated the NIC driver. Tried reducing the MTU (used a utility called Dr. TCP); there was no effect. I updated my board BIOS revision (which caused all the HW to be "reinstalled" or re-identified - successfully). I installed another NIC, and tried switching to it - same effect with the on-board NIC. A while back I tried another router (although it was an Edimax model) - same problem. Connected the computer directly, with no router. Same problem. ping -t to the router (192.168.0.254) gives pongs, nothing is lost, and time is < 1 ms almost always (sometimes it says 1 or 2 ms). This is the case also during the disconnects.

    Read the article

  • Scanner Daily Duty Cycle

    - by Juanp
    I'm comfused with the concept of 'Daily Duty Cycle'. For example if I have a scanner that the spec is: PPM (pages per minute): 90 and DDC (Daily Duty Cycle): 800. I am interested in scanning ONLY 10 hours continuously, what would it be the best choice: 90 * 60 * 10 = 54.000 or (800 / 24) * 10 = 333 It is very different results. what would it be the best option?

    Read the article

  • hyperv machine guest loads slow

    - by Dani Avni
    this is by far one of the strangest things I have seen. I have a win 2008R2 cluster with a CSV. the CSV itself is on an iSCSI storage (hitachi HUS 110) basic config of the two hosts in the cluster is Dell R610 Win 2008 R2 with all patches 64GB 1 NIC for host access 2 NICs for guest access 2 NICs for iSCSI these machine work great and I can load a 2008R2 test guest machine on them in less than 90 seconds after the above config is running for over a year, I now need to add a new host. now the host is Dell R620 (Still intel but different CPU) Win 2008 R2 with all patches 64GB 1 NIC for host access 2 NICs for guest access 2 NICs for iSCSI I added this new host to the domain and to the cluster, I gave it access to the CSV and I tried loading the same guest machine that loads in 90 seconds in the other hosts. the machine loads in about 6 minutes. no matter how many times I try this the old hosts load the machine in about 90 seconds and this new host in around 6 minutes to eliminate any problems with the iSCSI connection, I added a new LUN and directly accessed it from the new host and I was working at around 300MB/s so no problem there. I also tested the connection between the other hosts and the new one and network is working fine there too. to eliminate problems in HyperV, I copied the machine to the local disk of the new host and it loaded in less than 20 seconds. now is the point were things get a lot stranger: in my tests I tried installing a fresh windows guest machine to the CSV from the new host. I noticed that while the fresh windows was installing, my test guest was loading in less than 90 seconds even on the new host (I repeated this a few times). If I paused the fresh install guest and tried loading the test guest again it loaded in 6 minutes. and again after I resumed the guest installation the test guest loaded fast. after the fresh windows was also loaded, I ran tests loading the fresh window and my test machine. each one of them loaded in about 5 minutes when I tried loading them separately. however when I started both of them in the same time they both loaded in around 2.5 minutes it seems that the iSCSI disk access is only working if it is under some load (although I never got to above 10% utilization according to the task manager) does anyone have any idea what could be the problem?

    Read the article

  • Scanner Dayly Duty Cycle

    - by Juanp
    I'm comfused with the concept of 'Daily Duty Cycle'. For example if I have a scanner that the spec is: PPM (pages per minute): 90 and DDC (Daily Duty Cycle): 800. and I am interested in scanning ONLY 10hours continuously, what would it be the best choice: 90 * 60 * 10 = 54.000 or (800 / 24) * 10 = 333 It is very different results. what would it be the best option?

    Read the article

  • How do I make the first row of an Excel chart be treated as a heading when it's a number?

    - by Andrew Grimm
    Given a data sample like Prisoner 24601 0.50 Day 1 80 90 Day 2 81 89 Day 3 82 90 Day 4 81 91 What's the easiest way to tell Excel that 24601 and 0.50 are data series names rather than Y axis values when creating a line chart? Approaches I'm aware of: Turn Prisoner numbers into text by having ="24601" and ="0.50" Only select rows 2 onwards as data, and then add in the labels once the graph has been created? Approaches that don't appear to work: Ask Excel to format the first row's numbers as text.

    Read the article

  • Basic Weight Questions with HAProxy

    - by Kyle Brandt
    Do weights assigned to servers only effect the balance within that particular backend? When implementing weights for the first time, if I give all the servers in a backend the same number, would that be the same as before when there we no weights? How do I calculate just how much traffic I am shiffting by adjust weights by certain amounts. For example: server web1 10.10.10.10 weight 100 server web2 10.10.10.11 weight 100 server web3 10.10.10.12 weight 90 server web4 10.10.10.13 weight 90

    Read the article

  • Android Rotate Matrix

    - by jitm
    Hello, I have matrix. This matrix represents array x and y coordinates. For example float[] src = {7,1,7,2,7,3,7,4}; I need to rotate this coordinates to 90 degrees. I use android.graphics.Matrix like this: float[] src = {7,1,7,2,7,3,7,4}; float[] dist = new float[8]; Matrix matrix = new Matrix(); matrix.preRotate(90.0f); matrix.mapPoints(dist,src); after operation rotate I have array with next values -1.0 7.0 -2.0 7.0 -3.0 7.0 -4.0 7.0 Its is good for area with 360 degrees. And how do rotate in area from 0 to 90? I need set up center of circle in this area but how ? Thanks.

    Read the article

  • Counting number of children in hierarchical SQL data

    - by moontear
    Hello, for a simple data structure such as so: ID parentID Text Price 1 Root 2 1 Flowers 3 1 Electro 4 2 Rose 10 5 2 Violet 5 6 4 Red Rose 12 7 3 Television 100 8 3 Radio 70 9 8 Webradio 90 For reference, the hierarchy tree looks like this: ID Text Price 1 Root |2 Flowers |-4 Rose 10 | |-6 Red Rose 12 |-5 Violet 5 |3 Electro |-7 Television 100 |-8 Radio 70 |-9 Webradio 90 I'd like to count the number of children per level. So I would get a new column "NoOfChildren" like so: ID parentID Text Price NoOfChildren 1 Root 8 2 1 Flowers 3 3 1 Electro 3 4 2 Rose 10 1 5 2 Violet 5 0 6 4 Red Rose 12 0 7 3 Television 100 0 8 3 Radio 70 1 9 8 Webradio 90 0 I read a few things about hierarchical data, but I somehow get stuck on the multiple inner joins on the parentIDs. Maybe someone could help me out here. moon

    Read the article

  • Counting number of children in hierarchical SQL data

    - by moontear
    for a simple data structure such as so: ID parentID Text Price 1 Root 2 1 Flowers 3 1 Electro 4 2 Rose 10 5 2 Violet 5 6 4 Red Rose 12 7 3 Television 100 8 3 Radio 70 9 8 Webradio 90 For reference, the hierarchy tree looks like this: ID Text Price 1 Root |2 Flowers |-4 Rose 10 | |-6 Red Rose 12 |-5 Violet 5 |3 Electro |-7 Television 100 |-8 Radio 70 |-9 Webradio 90 I'd like to count the number of children per level. So I would get a new column "NoOfChildren" like so: ID parentID Text Price NoOfChildren 1 Root 8 2 1 Flowers 3 3 1 Electro 3 4 2 Rose 10 1 5 2 Violet 5 0 6 4 Red Rose 12 0 7 3 Television 100 0 8 3 Radio 70 1 9 8 Webradio 90 0 I read a few things about hierarchical data, but I somehow get stuck on the multiple inner joins on the parentIDs. Maybe someone could help me out here. moon

    Read the article

  • Does the 80/20 rule of time management apply to developers?

    - by Dean
    Jeff's recent article linked to a time management example of the First Fit Decreasing algorithm, which talked about the Pareto principle (or, the 80/20 rule) of time management, that is, that 80% of the work we produce in 20% of our time. Now we've all heard the programmer quote: The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. But all jokes aside, it is often as if 20% of your code is to do what you want, and the other 80% is to handle exceptions... so does the 80/20 rule really apply to developers? Does anyone have any examples of why it does / does not apply to us?

    Read the article

  • GROUP BY as a way to pick the first row from a group of similar rows, is this correct, is there any

    - by FipS
    I have a table which stores test results like this: user | score | time -----+-------+------ aaa | 90% | 10:30 bbb | 50% | 9:15 *** aaa | 85% | 10:15 aaa | 90% | 11:00 *** ... What I need is to get the top 10 users: user | score | time -----+-------+------ aaa | 90% | 11:00 bbb | 50% | 9:15 ... I've come up with the following SELECT: SELECT * FROM (SELECT user, score, time FROM tests_score ORDER BY user, score DESC, time DESC) t1 GROUP BY user ORDER BY score DESC, time LIMIT 10 It works fine but I'm not quite sure if my use of ORDER BY is the right way to pick the first row of each group of sorted records. Is there any better practice to achieve the same result? (I use MySQL 5)

    Read the article

  • Code coordinates to match compass bearings

    - by pinnacler
    Right now in Matlab (0,0) is the origin, 0 degrees / 2pi would be to the right of the cartesian plane and angles are measured counter clockwise with 90 degrees being at the top. I'm trying to write a simulator where the coordinates would match a compass bearing. 0/360 degrees or 2pi would be at the top and 90 degrees would be on the right. Any idea how to code in Matlab or c++? I'd imaging it'd be a matrix flipped about the x axis and rotated 90 degrees but I'm at a total loss. Phil

    Read the article

  • How to get array keys in Javascript?

    - by DisgruntledGoat
    I have an array created with this code: var widthRange = new Array(); widthRange[46] = { sel:46, min:0, max:52 }; widthRange[66] = { sel:66, min:52, max:70 }; widthRange[90] = { sel:90, min:70, max:94 }; I want to get each of the values 46, 66, 90 in a loop. I tried for (var key in widthRange) but this gives me a whole bunch of extra properties (I assume they are functions on the object). I can't use a regular for loop since the values are not sequential.

    Read the article

  • Box2D body rotation with setTransform

    - by thobens
    I' having a problem rotating a body with setTransform(), The body has multiple sensors that should rotate with the player. The rotation works but it rotates around the bodys local 0,0 position instead of the center. Note that the game is in a top-down perspective and the player can go in four different directions, thus I need to rotate him immediately (in one tick) in 90 degrees steps. Up: Down: I can't find a way to set the rotation center. Here's the code I use to rotate it: float angle = direction * 90 * MathUtils.degRad; // direction is an int value from 0 to 3 body.setTransform(body.getPosition(), angle); I also tried body.getLocalCenter().set() and bc.body.getMassData().center.set() but it didn't seem to have any effect. How can I rotate the body around its center?

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >