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
| // The original practices that should not be altered | |
| const initialPractices = ["prayer", "dua"]; | |
| // Function to add a new practice, maintaining immutability | |
| const addPractice = (practices, newPractice) => [...practices, newPractice]; | |
| // Fuzzy comparison to check how much we've strayed from the original path | |
| const fuzzyComparator = (set1, set2) => { | |
| const intersection = set1.filter(practice => set2.includes(practice)); | |
| return intersection.length / Math.max(set1.length, set2.length); |
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
| // Define the concept of human free will | |
| const human_free_will = true | |
| // Call the function to simulate a human making a choice and determining the outcome | |
| // Output the result of the simulation | |
| simulate_human_choice('Go to the gym') | |
| .then(outcome => { | |
| console.log(`Outcome: ${outcome}`) | |
| }) | |
| .catch(error => console.log(`ReferenceError: ${error}`)); |
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
| //modified from https://stackoverflow.com/a/15878837/273743 | |
| string ExecuteCommandSync(object command) | |
| { | |
| try | |
| { | |
| // create the ProcessStartInfo using "cmd" as the program to be run, | |
| // and "/c " as the parameters. | |
| // Incidentally, /c tells cmd that we want it to execute the command that follows, | |
| // and then exit. | |
| System.Diagnostics.ProcessStartInfo procStartInfo = |
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
| /*! normalize.css commit fe56763 | MIT License | github.com/necolas/normalize.css */ | |
| html { | |
| box-sizing: border-box; | |
| font-family: sans-serif; | |
| font-size: 16px; | |
| -ms-overflow-style: scrollbar; | |
| -ms-text-size-adjust: 100%; | |
| -webkit-tap-highlight-color: transparent; | |
| -webkit-text-size-adjust: 100%; } |
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.exports = { | |
| entry: './src/js/index.js', | |
| output: { | |
| filename: './dist/js/index.js' | |
| }, | |
| module: { | |
| loaders: [{ | |
| loader: 'babel', | |
| exclude: /node_modules/, | |
| include: '/src/', //include should be in 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
| // deparam | |
| // | |
| // Inverse of $.param() | |
| // | |
| // Taken from jquery-bbq by Ben Alman | |
| // https://github.com/cowboy/jquery-bbq/blob/master/jquery.ba-bbq.js | |
| var deparam = function( params, coerce ) { | |
| var obj = {}, | |
| coerce_types = { 'true': !0, 'false': !1, 'null': null }; | |
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 { | |
| width: 960px; | |
| } | |
| /* | |
| TODO: After verse ends (img.num), put a border-left | |
| table.morphologyTable tr td.ic<img.num{ | |
| background:red; | |
| } | |
| */ |
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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html> | |
| <head> | |
| <title>Print Part of a Page With jQuery</title> | |
| <script type="text/javascript" src="jquery-1.3.2.js"></script> | |
| <script type="text/javascript" src="jquery.print.js"></script> | |
| <script type="text/javascript"> | |
| // When the document is ready, initialize the link so | |
| // that when it is clicked, the printable area of the |