{"action":"created","comment":{"url":"https://api.github.com/repos/FPGS/EDD/pulls/comments/55121376","id":55121376,"diff_hunk":"@@ -34,36 +53,128 @@ public static Class classTypeOf(Object x) {\n \t * divisores que tiene.\n \t */\n \tpublic static int[] divisors(int n) {\n-\t\tthrow  new NotImplementedException();\n+\t\tint largo=0;\n+\t\tif(n>0){\n+\t\t\tfor(int i=1; i<=n; i++){\n+\t\t\t\tif(n%i==0){\n+\t\t\t\t\tlargo++;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}else return null;\n+\t\tint d[] = new int[largo];\n+\t\tfor (int i = n, j = 0; i > 0; i--) {\n+\t\t\tif(n % i == 0){\n+\t\t\t\td[j] = i;\n+\t\t\t\tj++;\n+\t\t\t}\n+\t\t}\n+\t\treturn d;\n \t}\n \n \t/*\n \t * Toma como parámetros una cadena de caracteres y devuelve cierto si la cadena resulta ser un palíndromo\n \t */\n \tpublic static boolean checkIsPalindrome(String cadena) {\n-\t\tthrow  new NotImplementedException();\n+\t\treturn palindrome(cadena);\n+\t}\n+\tpublic static boolean palindrome(String cadena){\n+\t\tString tildes = \"áéíóúàèìòùäëïöüñãõâêîôûçÁÀÄÃÂÉÈËÊÍÌÏÎÓÒÖÕÔÚÙÜÛÑÇ\";\n+\t\tString sustituir = \"aeiouaeiouaeiounaoaeioucaaaaaeeeeiiiiooooouuuunc\";\n+\t\tString nueva = \"\";\n+\t\tString inver = \"\";\n+\t\tif(cadena==null)\n+\t\t\treturn false;\n+\t\tcadena = cadena.toLowerCase();\n+\t\tfor(int i = 0; i < cadena.length(); i++){\n+\t\t\tif (Character.isLetter(cadena.charAt(i))) {\n+\t\t\t\tif (tildes.indexOf(cadena.charAt(i)) != -1){\n+\t\t\t\t\tnueva += sustituir.charAt(tildes.indexOf(cadena.charAt(i)));\n+\t\t\t\t}else{\n+\t\t\t\t\tnueva += cadena.charAt(i);\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\n+\t\tfor(int i = nueva.length()-1; i>=0; i--){\n+\t\t\tinver += nueva.charAt(i);\n+\t\t}\n+\t\tif(nueva.equals(inver)){\n+\t\t\t\treturn true;\n+\t\t}else return false;\n \t}\n-\n \t/*\n \t * Pedir un número de 0 a 99 y mostrarlo escrito. Por ejemplo, para 56\n \t * mostrar: cincuenta y seis\n \t */\n \tpublic static String speakToMe(int n) {\n-\t\tthrow  new NotImplementedException();\n-\t}\n+\t\tString[] d = {\"Cero\",\"Diez\",\"Veinte\",\"Treinta\",\"Cuarenta\",\"Cincuenta\",\n+\t\t\t\t  \"Sesenta\",\"Setenta\",\"Ochenta\",\"Noventa\"};\n \n+\t\t  String[] u = {\"\",\"uno\",\"dos\",\"tres\",\"cuatro\",\"cinco\",\"seis\",\"siete\",\n+\t\t\t\t  \"ocho\",\"nueve\",\"Diez\",\"Once\",\"Doce\",\"Trece\",\"Catorce\",\"Quince\",\"Dieciseis\",\n+\t\t\t\t  \"Diecisiete\",\"Dieciocho\",\"Diecinueve\"};\n+\n+\t\t  String numero=\"\";\n+\n+\t\t  if(n==0){\n+\t\t\t  numero=\"\";\n+\t\t\t  numero=d[0];\n+\t\t\t  return numero;\n+\t\t  }else if(n<20){\n+\t\t\t  numero=\"\";\n+\t\t\t  numero=u[n];\n+\t\t\t  return numero;\n+\t\t  }else if((n%10)==0){\n+\t\t\t  numero=\"\";\n+\t\t\t  numero=d[n/10];\n+\t\t\t  return numero;\n+\t\t  }else{\n+\t\t\t  numero=\"\";\n+\t\t\t  numero=d[n/10]+\" y \"+u[n%10];\n+\t\t\t  return numero;\n+\t\t  }\n+\t}\n \t/*\n \t * este metodo devuelve cierto si el año de la fecha es bisiesto fecha\n \t * dd-MM-yyyy\n \t */\n \tpublic static boolean isLeapYear(String fecha) {\n-\t\tthrow  new NotImplementedException();\n+\t\tint anio;\n+\t\ttry {\n+\t\t\tanio = Integer.parseInt(fecha.substring(6));\n+\t\t}catch (NumberFormatException e) {\n+\t\t\treturn false;\n+\t\t}catch(IndexOutOfBoundsException i){\n+\t\t\treturn false;\n+\t\t}\n+\t\tif((anio%100)==0 && (anio%400)!=0)\n+\t\t\treturn false;\n+\t\tif((anio%4)==0)\n+\t\t\treturn true;\n+\t\telse\n+\t\t\treturn false;\n \t}\n-\n \t/*\n \t * este metodo devuelve cierto si la fecha es válida\n \t */\n \tpublic static boolean isValidDate(String date) {\n-\t\tthrow  new NotImplementedException();\n+\t\tint dia, mes, anio;\n+\t\ttry{\n+\t\t\tdia=Integer.parseInt(date.substring(0, 2));\n+\t\t\tmes=Integer.parseInt(date.substring(3,5));\n+\t\t\tanio=Integer.parseInt(date.substring(6));\n+\t\t}catch (NumberFormatException e) {\n+\t\t\treturn false;\n+\t\t}catch(IndexOutOfBoundsException i){\n+\t\t\treturn false;\n+\t\t}\n+\t\tif(anio>0){\n+\t\t\tif((dia<=31 && dia>0) && (mes==1 || mes==3 || mes==5 || mes==7 || mes==8 || mes==10 || mes==12))","path":"FP/src/main/java/fp/Calculator.java","position":179,"original_position":179,"commit_id":"26bc8a1d6efbdd3104f19269900e934005848587","original_commit_id":"26bc8a1d6efbdd3104f19269900e934005848587","user":{"login":"JoTerrance","id":6041670,"avatar_url":"https://avatars.githubusercontent.com/u/6041670?v=3","gravatar_id":"","url":"https://api.github.com/users/JoTerrance","html_url":"https://github.com/JoTerrance","followers_url":"https://api.github.com/users/JoTerrance/followers","following_url":"https://api.github.com/users/JoTerrance/following{/other_user}","gists_url":"https://api.github.com/users/JoTerrance/gists{/gist_id}","starred_url":"https://api.github.com/users/JoTerrance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoTerrance/subscriptions","organizations_url":"https://api.github.com/users/JoTerrance/orgs","repos_url":"https://api.github.com/users/JoTerrance/repos","events_url":"https://api.github.com/users/JoTerrance/events{/privacy}","received_events_url":"https://api.github.com/users/JoTerrance/received_events","type":"User","site_admin":false},"body":"(mes==1 || mes==3 || mes==5 || mes==7 || mes==8 || mes==10 || mes==12) refactoriza a  isMonthInValidRange\r\n(dia<=31 && dia>0) refactoriza a  isDayInValidRange","created_at":"2016-03-05T13:57:26Z","updated_at":"2016-03-05T13:57:26Z","html_url":"https://github.com/FPGS/EDD/pull/44#discussion_r55121376","pull_request_url":"https://api.github.com/repos/FPGS/EDD/pulls/44","_links":{"self":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/comments/55121376"},"html":{"href":"https://github.com/FPGS/EDD/pull/44#discussion_r55121376"},"pull_request":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/FPGS/EDD/pulls/44","id":61809782,"html_url":"https://github.com/FPGS/EDD/pull/44","diff_url":"https://github.com/FPGS/EDD/pull/44.diff","patch_url":"https://github.com/FPGS/EDD/pull/44.patch","issue_url":"https://api.github.com/repos/FPGS/EDD/issues/44","number":44,"state":"open","locked":false,"title":"test con cambios","user":{"login":"DeaMaria","id":16117668,"avatar_url":"https://avatars.githubusercontent.com/u/16117668?v=3","gravatar_id":"","url":"https://api.github.com/users/DeaMaria","html_url":"https://github.com/DeaMaria","followers_url":"https://api.github.com/users/DeaMaria/followers","following_url":"https://api.github.com/users/DeaMaria/following{/other_user}","gists_url":"https://api.github.com/users/DeaMaria/gists{/gist_id}","starred_url":"https://api.github.com/users/DeaMaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeaMaria/subscriptions","organizations_url":"https://api.github.com/users/DeaMaria/orgs","repos_url":"https://api.github.com/users/DeaMaria/repos","events_url":"https://api.github.com/users/DeaMaria/events{/privacy}","received_events_url":"https://api.github.com/users/DeaMaria/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-05T11:39:23Z","updated_at":"2016-03-05T13:57:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4c7d54f2fe05d54008312e8c07c96a5370d950e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FPGS/EDD/pulls/44/commits","review_comments_url":"https://api.github.com/repos/FPGS/EDD/pulls/44/comments","review_comment_url":"https://api.github.com/repos/FPGS/EDD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FPGS/EDD/issues/44/comments","statuses_url":"https://api.github.com/repos/FPGS/EDD/statuses/26bc8a1d6efbdd3104f19269900e934005848587","head":{"label":"DeaMaria:master","ref":"master","sha":"26bc8a1d6efbdd3104f19269900e934005848587","user":{"login":"DeaMaria","id":16117668,"avatar_url":"https://avatars.githubusercontent.com/u/16117668?v=3","gravatar_id":"","url":"https://api.github.com/users/DeaMaria","html_url":"https://github.com/DeaMaria","followers_url":"https://api.github.com/users/DeaMaria/followers","following_url":"https://api.github.com/users/DeaMaria/following{/other_user}","gists_url":"https://api.github.com/users/DeaMaria/gists{/gist_id}","starred_url":"https://api.github.com/users/DeaMaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeaMaria/subscriptions","organizations_url":"https://api.github.com/users/DeaMaria/orgs","repos_url":"https://api.github.com/users/DeaMaria/repos","events_url":"https://api.github.com/users/DeaMaria/events{/privacy}","received_events_url":"https://api.github.com/users/DeaMaria/received_events","type":"User","site_admin":false},"repo":{"id":52441544,"name":"EDD","full_name":"DeaMaria/EDD","owner":{"login":"DeaMaria","id":16117668,"avatar_url":"https://avatars.githubusercontent.com/u/16117668?v=3","gravatar_id":"","url":"https://api.github.com/users/DeaMaria","html_url":"https://github.com/DeaMaria","followers_url":"https://api.github.com/users/DeaMaria/followers","following_url":"https://api.github.com/users/DeaMaria/following{/other_user}","gists_url":"https://api.github.com/users/DeaMaria/gists{/gist_id}","starred_url":"https://api.github.com/users/DeaMaria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeaMaria/subscriptions","organizations_url":"https://api.github.com/users/DeaMaria/orgs","repos_url":"https://api.github.com/users/DeaMaria/repos","events_url":"https://api.github.com/users/DeaMaria/events{/privacy}","received_events_url":"https://api.github.com/users/DeaMaria/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DeaMaria/EDD","description":"","fork":true,"url":"https://api.github.com/repos/DeaMaria/EDD","forks_url":"https://api.github.com/repos/DeaMaria/EDD/forks","keys_url":"https://api.github.com/repos/DeaMaria/EDD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DeaMaria/EDD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DeaMaria/EDD/teams","hooks_url":"https://api.github.com/repos/DeaMaria/EDD/hooks","issue_events_url":"https://api.github.com/repos/DeaMaria/EDD/issues/events{/number}","events_url":"https://api.github.com/repos/DeaMaria/EDD/events","assignees_url":"https://api.github.com/repos/DeaMaria/EDD/assignees{/user}","branches_url":"https://api.github.com/repos/DeaMaria/EDD/branches{/branch}","tags_url":"https://api.github.com/repos/DeaMaria/EDD/tags","blobs_url":"https://api.github.com/repos/DeaMaria/EDD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DeaMaria/EDD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DeaMaria/EDD/git/refs{/sha}","trees_url":"https://api.github.com/repos/DeaMaria/EDD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DeaMaria/EDD/statuses/{sha}","languages_url":"https://api.github.com/repos/DeaMaria/EDD/languages","stargazers_url":"https://api.github.com/repos/DeaMaria/EDD/stargazers","contributors_url":"https://api.github.com/repos/DeaMaria/EDD/contributors","subscribers_url":"https://api.github.com/repos/DeaMaria/EDD/subscribers","subscription_url":"https://api.github.com/repos/DeaMaria/EDD/subscription","commits_url":"https://api.github.com/repos/DeaMaria/EDD/commits{/sha}","git_commits_url":"https://api.github.com/repos/DeaMaria/EDD/git/commits{/sha}","comments_url":"https://api.github.com/repos/DeaMaria/EDD/comments{/number}","issue_comment_url":"https://api.github.com/repos/DeaMaria/EDD/issues/comments{/number}","contents_url":"https://api.github.com/repos/DeaMaria/EDD/contents/{+path}","compare_url":"https://api.github.com/repos/DeaMaria/EDD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DeaMaria/EDD/merges","archive_url":"https://api.github.com/repos/DeaMaria/EDD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DeaMaria/EDD/downloads","issues_url":"https://api.github.com/repos/DeaMaria/EDD/issues{/number}","pulls_url":"https://api.github.com/repos/DeaMaria/EDD/pulls{/number}","milestones_url":"https://api.github.com/repos/DeaMaria/EDD/milestones{/number}","notifications_url":"https://api.github.com/repos/DeaMaria/EDD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DeaMaria/EDD/labels{/name}","releases_url":"https://api.github.com/repos/DeaMaria/EDD/releases{/id}","deployments_url":"https://api.github.com/repos/DeaMaria/EDD/deployments","created_at":"2016-02-24T12:45:12Z","updated_at":"2016-02-24T12:45:13Z","pushed_at":"2016-03-05T11:36:50Z","git_url":"git://github.com/DeaMaria/EDD.git","ssh_url":"git@github.com:DeaMaria/EDD.git","clone_url":"https://github.com/DeaMaria/EDD.git","svn_url":"https://github.com/DeaMaria/EDD","homepage":null,"size":413,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FPGS:master","ref":"master","sha":"0e5cdae7ee64b1b97b8cb46c6255492413499adf","user":{"login":"FPGS","id":16159865,"avatar_url":"https://avatars.githubusercontent.com/u/16159865?v=3","gravatar_id":"","url":"https://api.github.com/users/FPGS","html_url":"https://github.com/FPGS","followers_url":"https://api.github.com/users/FPGS/followers","following_url":"https://api.github.com/users/FPGS/following{/other_user}","gists_url":"https://api.github.com/users/FPGS/gists{/gist_id}","starred_url":"https://api.github.com/users/FPGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FPGS/subscriptions","organizations_url":"https://api.github.com/users/FPGS/orgs","repos_url":"https://api.github.com/users/FPGS/repos","events_url":"https://api.github.com/users/FPGS/events{/privacy}","received_events_url":"https://api.github.com/users/FPGS/received_events","type":"Organization","site_admin":false},"repo":{"id":42181950,"name":"EDD","full_name":"FPGS/EDD","owner":{"login":"FPGS","id":16159865,"avatar_url":"https://avatars.githubusercontent.com/u/16159865?v=3","gravatar_id":"","url":"https://api.github.com/users/FPGS","html_url":"https://github.com/FPGS","followers_url":"https://api.github.com/users/FPGS/followers","following_url":"https://api.github.com/users/FPGS/following{/other_user}","gists_url":"https://api.github.com/users/FPGS/gists{/gist_id}","starred_url":"https://api.github.com/users/FPGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FPGS/subscriptions","organizations_url":"https://api.github.com/users/FPGS/orgs","repos_url":"https://api.github.com/users/FPGS/repos","events_url":"https://api.github.com/users/FPGS/events{/privacy}","received_events_url":"https://api.github.com/users/FPGS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FPGS/EDD","description":"","fork":false,"url":"https://api.github.com/repos/FPGS/EDD","forks_url":"https://api.github.com/repos/FPGS/EDD/forks","keys_url":"https://api.github.com/repos/FPGS/EDD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FPGS/EDD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FPGS/EDD/teams","hooks_url":"https://api.github.com/repos/FPGS/EDD/hooks","issue_events_url":"https://api.github.com/repos/FPGS/EDD/issues/events{/number}","events_url":"https://api.github.com/repos/FPGS/EDD/events","assignees_url":"https://api.github.com/repos/FPGS/EDD/assignees{/user}","branches_url":"https://api.github.com/repos/FPGS/EDD/branches{/branch}","tags_url":"https://api.github.com/repos/FPGS/EDD/tags","blobs_url":"https://api.github.com/repos/FPGS/EDD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FPGS/EDD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FPGS/EDD/git/refs{/sha}","trees_url":"https://api.github.com/repos/FPGS/EDD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FPGS/EDD/statuses/{sha}","languages_url":"https://api.github.com/repos/FPGS/EDD/languages","stargazers_url":"https://api.github.com/repos/FPGS/EDD/stargazers","contributors_url":"https://api.github.com/repos/FPGS/EDD/contributors","subscribers_url":"https://api.github.com/repos/FPGS/EDD/subscribers","subscription_url":"https://api.github.com/repos/FPGS/EDD/subscription","commits_url":"https://api.github.com/repos/FPGS/EDD/commits{/sha}","git_commits_url":"https://api.github.com/repos/FPGS/EDD/git/commits{/sha}","comments_url":"https://api.github.com/repos/FPGS/EDD/comments{/number}","issue_comment_url":"https://api.github.com/repos/FPGS/EDD/issues/comments{/number}","contents_url":"https://api.github.com/repos/FPGS/EDD/contents/{+path}","compare_url":"https://api.github.com/repos/FPGS/EDD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FPGS/EDD/merges","archive_url":"https://api.github.com/repos/FPGS/EDD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FPGS/EDD/downloads","issues_url":"https://api.github.com/repos/FPGS/EDD/issues{/number}","pulls_url":"https://api.github.com/repos/FPGS/EDD/pulls{/number}","milestones_url":"https://api.github.com/repos/FPGS/EDD/milestones{/number}","notifications_url":"https://api.github.com/repos/FPGS/EDD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FPGS/EDD/labels{/name}","releases_url":"https://api.github.com/repos/FPGS/EDD/releases{/id}","deployments_url":"https://api.github.com/repos/FPGS/EDD/deployments","created_at":"2015-09-09T14:02:32Z","updated_at":"2016-02-24T16:35:43Z","pushed_at":"2016-03-05T11:39:24Z","git_url":"git://github.com/FPGS/EDD.git","ssh_url":"git@github.com:FPGS/EDD.git","clone_url":"https://github.com/FPGS/EDD.git","svn_url":"https://github.com/FPGS/EDD","homepage":null,"size":425,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":1,"forks":25,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/44"},"html":{"href":"https://github.com/FPGS/EDD/pull/44"},"issue":{"href":"https://api.github.com/repos/FPGS/EDD/issues/44"},"comments":{"href":"https://api.github.com/repos/FPGS/EDD/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FPGS/EDD/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/FPGS/EDD/statuses/26bc8a1d6efbdd3104f19269900e934005848587"}}}}