Skip to content

Instantly share code, notes, and snippets.

Avatar
🐤

Nick Mancuso nmancus1

🐤
View GitHub Profile
View perfect.c
/* perfect.c: find all perfect numbers up to a bound */
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <pthread.h>
#include <assert.h>
int num_perfect_global = 0; // global number of perfect numbers
int * local_perfects; // local total of perfect nums
View NoWhitespaceBefore.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
<property name="severity" value="warning"/>
View nowhitespacebeforeAST.txt
➜ nowhitespacebefore git:(issue-8849-nowhitespacebefore) ✗ java -jar /home/nick/IdeaProjects/checkstyle/target/checkstyle-8.37-SNAPSHOT-all.jar -t InputNoWhitespaceBeforeTextBlocksTabIndent.java
PACKAGE_DEF -> package [2:0]
|--ANNOTATIONS -> ANNOTATIONS [2:57]
|--DOT -> . [2:57]
| |--DOT -> . [2:46]
| | |--DOT -> . [2:39]
| | | |--DOT -> . [2:28]
| | | | |--DOT -> . [2:22]
| | | | | |--DOT -> . [2:11]
| | | | | | |--IDENT -> com [2:8]
View JavadocType.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
<property name="severity" value="warning"/>
View output_from_anim2txt.txt
out.anim (kind = ANIM_HEAT, dim = 2):
lengths = {20, 20}
ranges = {[0.000000,1.000000], [0.000000,1.000000], [0.000000,100.000000]}
nframes = 51
frame_size = 400
Frame 0, x=0:
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Frame 0, x=1:
0.00 0.00 0.00 99.61 99.61 99.61 99.61 99.61 99.61 99.61
View output_from_anim_run.txt
This file has been truncated, but you can view the full file.
diffusion2d: nx=20 ny=20 k=0.050000 nstep=5000 wstep=100.
diffusion2d: creating ANIM file out.anim with 51 frames, 20500 bytes.
0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
0.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 0.00
0.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 0.00
0.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 0.00
0.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 0.00
0.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 0.00
View gist:3b0b53fce111a64dfb2aeb7a0e63106f
/* Name : diffusion2d.c.
Author : Stephen F. Siegel, University of Delaware
Sequential version of 2d diffusion, creating an animation in ANIM
format. The length and width of a metal plate is 1. The perimeter
is frozen at 0 degrees (fixed boundary condition). The interior points
starts off at 100 degrees, and their temperatures change over time
due to heat diffusion. See function quit for usage.
*/
#include <stdlib.h>
View DesignForExtension.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
<property name="severity" value="warning"/>
View FinalClass.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
<property name="severity" value="warning"/>
View Indentation.xml
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<!-- do not change severity to 'error', as that will hide errors caused by exceptions -->
<property name="severity" value="warning"/>
You can’t perform that action at this time.