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
# Evaluar archivo por cada 3 líneas | |
# La primera linea representa la cantidad de casos | |
# Evaluar el crédito C primera linea | |
# Evaluar la cantidad de elementos l | |
# Almacenar en un arreglo la cantidad de elementos | |
def execute_solution lines | |
lines.size == 3 ? inner_execution(lines) : false | |
end |
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
module HasVideoConcern | |
extend ActiveSupport::Concern | |
included do | |
has_attached_file :mp4_video_file, | |
:storage => :fog, | |
:fog_credentials => { | |
provider: 'Google', | |
google_storage_access_key_id: '', | |
google_storage_secret_access_key: '' | |
}, |
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
package main | |
import( | |
"fmt" | |
"math" | |
"bufio" | |
"os" | |
"strings" | |
) | |
type HashEntry struct{ |
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
package main | |
import( | |
"fmt" | |
"strconv" | |
) | |
type Node struct { | |
right *Node | |
left *Node | |
parent *Node | |
value int |
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
package main | |
import( | |
"fmt" | |
) | |
func main() { | |
arr := []int{31, 41, 59, 26, 53, 58, 97, 93, 23, 84,1} | |
quick_sort(&arr,0,len(arr)-1) //Initialize with 0 as left and length - 1 as right | |
fmt.Println(arr) //Sorted array |
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
package main | |
import( | |
"fmt" | |
"strconv" | |
) | |
type Node struct{ | |
value int | |
right *Node | |
left *Node |
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
package main | |
import( | |
"fmt" | |
) | |
func main() { | |
// TEST | |
arr := []int{31, 41, 59, 26, 53, 58, 97, 93, 23, 84,1,100,5,23} | |
fmt.Println(merge_sort(arr)) | |
} |
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 urlBase64ToUint8Array(base64String) { | |
const padding = '='.repeat((4 - base64String.length % 4) % 4); | |
const base64 = (base64String + padding) | |
.replace(/\-/g, '+') | |
.replace(/_/g, '/'); | |
const rawData = window.atob(base64); | |
const outputArray = new Uint8Array(rawData.length); | |
for (let i = 0; i < rawData.length; ++i) { |
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
let arreglo [1,2,3,4,5]; | |
let newArreglo = []; | |
for(var i = 0;i < arreglo.length; i++){ | |
if(arreglo[i] % 2 == 0) newArreglo.push(arreglo[i]); | |
} |
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
let arreglo = [1,2,3,4,5]; | |
let newArreglo = arreglo.filter((numero) => numero % 2 == 0 ); |
OlderNewer