What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2021-08-30 23:13:01
bash print count of unique words in column
# Example usage: awk -F '\t' '{print $7}' input_file | sort | uniq -c # Breakdown: # awk returns the 7th tab-delimited column/field of the input_file # sort sorts the entries so that duplicate entries are adjacent # uniq -c returns the counts of each typ... Add solution -
Javascript 2021-08-30 20:55:01
javascript code to loop through array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Shell/Bash 2021-08-30 19:24:01
fsl label
#!/bin/sh # List co-ordinates of each labeled region in an atlas with fslstats. # Use preoption -K < indexMask > will generate seperate n submasks from # indexMask, for indexvalues 1..n where n is the maximum index value # in indexMask, and gene... Add solution -
Python 2021-08-30 19:18:02
word search puzzle python
An improved (shorter, more efficient) version of the above: #!/usr/bin/python # -*- coding: utf-8 -*- puzzle='''F Y Y H N R D R L J C I N U A A W A A H R N T K L P N E C I L F S A P E O G O T P N H P O L A N D ''' clues = ['ITALY', 'HOLLAND'... Add solution -
Other 2021-08-30 19:16:02
dotcms combined content pull
## First, set your lists #set($newsList = $dotcontent.pull("+structureName:CcNewsStories ...")) #set($sparkList = $dotcontent.pull("+structureName:CcSparkContents ... ")) #set($vergeList = $dotcontent.pull("+structureName:CcVerge... Add solution -
Shell/Bash 2021-08-30 10:09:02
powreshell function cleanup
function CleanUp { # Delete directory content Get-ChildItem -Path ($PSScriptRoot + "\Files") -Recurse | ForEach-Object { $_.Delete()} Get-ChildItem -Path ($PSScriptRoot + "\Temp") -Recurse | ForEach-Object { $_.Delete()} G... Add solution -
Java 2021-08-30 05:53:02
cannot find symbol java
The "Cannot find symbol" errors generally occur when you try to reference an undeclared variable in your code. A "Cannot find symbol" error means that the compiler cannot do this. Your code appears to be referring to something that the... Add solution -
Other 2021-08-30 05:44:02
alamofire cancel all request
Alamofire.SessionManager.default.session.getTasksWithCompletionHandler { (sessionDataTask, uploadData, downloadData) in sessionDataTask.forEach { $0.cancel() } uploadData.forEach { $0.cancel() } downloadData.forEach { $0.cancel() } } Add solution