This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int contarRepetidos(ArrayList<Objeto> a) { | |
| Map<Integer, Integer> freqMap = new HashMap<Integer, Integer>(); | |
| for (Objeto obj : a) { | |
| freqMap.put(obj.getValor(), (freqMap.get(obj.getValor()) == null ? 1 : (freqMap.get(obj.getValor()) + 1))); | |
| } | |
| return Collections.max(freqMap.values()); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- content to be placed inside <body>…</body> --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Hola mundo desde el titulo</title> | |
| </head> | |
| <body> | |
| <h1>Hola Mundo</h1> | |
| <br /> | |
| <h1>HTML Hypertext Markup Language</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body{ | |
| font-family:Tahoma,Arial,sans-serif; | |
| font-size: 13px; | |
| color:black; | |
| background:white; | |
| margin:8px; | |
| } | |
| h1{ | |
| font-size:19px; | |
| margin-top:15px; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getData(url) { | |
| var data; | |
| $.ajax({ | |
| async: false, //thats the trick | |
| url: url, | |
| dataType: 'json', | |
| success: function (response) { | |
| data = response; | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| max = maximum(|x|, |y|) | |
| min = minimum(|x|, |y|) | |
| r = min / max | |
| return max*sqrt(1 + r*r) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| var original = document.title; | |
| var timeout; | |
| var defaultTimes = 5; | |
| window.flashTitle = function (newMsg, howManyTimes) { | |
| function step() { | |
| document.title = (document.title == original) ? newMsg : original; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --SQL Server | |
| UPDATE table SET DateToModify = DATEADD(YEAR, -1, DateToModify) | |
| where YEAR(DateToModify) = 2015 | |
| --MySQL | |
| UPDATE table SET DateToModify = DATE_ADD(DateToModify, INTERVAL 1 YEAR) | |
| where YEAR(DateToModify) = 2015 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| REM dir / -B > fileList.txt | |
| REM for /f "tokens=1,2,3" %i in (fileList.txt) DO ren "%i %j %k" %k | |
| for /f "tokens=1,2,3" %i in ('dir / -B') DO ren "%i %j %k" %k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var tasks = foos.Select(DoSomethingAsync).ToList(); | |
| await Task.WhenAll(tasks); | |
| var results = await Task.WhenAll(tasks); | |
| return await Task.WhenAll(tasks); | |
| var tasks = foos.Select(foo => DoSomethingAsync(foo)).ToList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Ignore Visual Studio temporary files, build results, and | |
| ## files generated by popular Visual Studio add-ons. | |
| ## | |
| ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore | |
| # User-specific files | |
| *.suo | |
| *.user | |
| *.userosscache | |
| *.sln.docstates |
OlderNewer