Posts by Manuel Jose • 123 points
13 posts
-
0
votes1
answer206
viewsQ: Save objects to Java file
I have the following code: package p10; import java.io.*; import java.util.*; import myinputs.Ler; public class P10 { public static boolean verificawl (int i) throws ExcecaoWhile {…
-
1
votes2
answers127
viewsQ: Use of the "Instance of"
public class AlunoLicenciatura extends Aluno{ private String curso; private ArrayList<Disciplina> l_dis; public AlunoLicenciatura(String curso,Aluno a){…
-
0
votes0
answers972
viewsQ: Deep search - python
import csv with open('cidades.csv', 'r') as f: list2 = [tuple(line.values()) for line in csv.DictReader(f)] def dfs_helper(list2, start_city, end_city): pilha = [] visited = [] adj_cities =…
-
0
votes1
answer130
viewsQ: Index of tuples in a list - python
Organisation of information in the file (City, City, Distance) import csv with open('cidades.csv', 'r') as f: list1 = [tuple(line.values()) for line in csv.DictReader(f)] for i in list1:…
-
2
votes1
answer1043
viewsQ: Read Data from a. csv file and pass line values to Tuple
The data in the.csv cities file is organized as follows: Lisbon,Madrid,600 Madrid, Paris,650 import csv with open('cidades.csv', 'r') as f: # Somente r para leitura do arquivo list1 =…
-
2
votes1
answer527
viewsQ: Runtimeerror: maximum number of recursive calls exceeded - python
fibonacci_cache = {} def fibonacci(n): if n in fibonacci_cache: return fibonacci_cache[n] if n==1: value=1 elif n==2: value=1 elif n>2: value=fibonacci(n-1) + fibonacci(n-2)…
-
2
votes1
answer48
viewsQ: Write Dice from one list to another list
T = [0,0,0,1,0,0,0,-1,0] def acoes(T): listaAction=[] for i in T: if(T[i]==0): listaAction.append(T.index(i)) return listaAction print(acoes(T)) How do I write T-list indexes that have value 0 in…
-
0
votes1
answer106
viewsQ: Distinct number problem in java
package totoloto; import myinputs.*; public class Totoloto { /** * @param args the command line arguments */ public static void main(String[] args) { int aux, k = 0, l, i, j, u; int t = 0, s; int[]…
-
0
votes0
answers48
viewsQ: How to add Class Imagick (php)?
<?php $images = new Imagick(glob('dog.JPG')); foreach($images as $image) { $image->thumbnailImage(1024,0); } $images->writeImages(); Returned the following error Fatal error: Class…
phpasked Manuel Jose 123 -
1
votes1
answer415
viewsQ: how to install imagemagick on Magic ( Xampp)
I was trying to install the imagemagick on the mac, I opened the terminal and ran the following command ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)".…
-
0
votes1
answer1004
viewsQ: Permissions error when trying to send a PHP file
<html> <body> <form action="" method="post" enctype="multipart/form-data"> Selecione : <input name="arquivo" type="file"> <input type="submit" value="Enviar">…
-
0
votes1
answer96
viewsQ: Return image upload in index.php
I uploaded an image and by clicking "send" I want you to show me the image on the index.php page. Displaying image in the browser Code: <html> <body> <form method="post"…
-
1
votes1
answer305
viewsQ: several foreign SQL keys
I have the following table: items (ref) the attribute "ref" as the primary key of the table, may have associated several secondary keys in other tables [ex:Tabela1(ref) and table2(ref) being "ref"…