Code Definition and 960 Threads

In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communication channel or storage in a storage medium. An early example is an invention of language, which enabled a person, through speech, to communicate what they thought, saw, heard, or felt to others. But speech limits the range of communication to the distance a voice can carry and limits the audience to those present when the speech is uttered. The invention of writing, which converted spoken language into visual symbols, extended the range of communication across space and time.
The process of encoding converts information from a source into symbols for communication or storage. Decoding is the reverse process, converting code symbols back into a form that the recipient understands, such as English or/and Spanish.
One reason for coding is to enable communication in places where ordinary plain language, spoken or written, is difficult or impossible. For example, semaphore, where the configuration of flags held by a signaler or the arms of a semaphore tower encodes parts of the message, typically individual letters, and numbers. Another person standing a great distance away can interpret the flags and reproduce the words sent.

View More On Wikipedia.org
  1. M

    Python Is This Python Multiplication Table Code Correct?

    Hey! 😊 I want to write a function in Python that returns the multiplication table $20\times 20$. We do that using lists in lists, right? I have written the following : def mul_table() : Prod = [] Table = [] for i in range(21) : for j in range(21) ...
  2. shivajikobardan

    Python What does this code signify in relation to boolean logic?

    my_age = 10 if my_age >= 100: print("One hundred years old! Very impressive.") elif my_age <= 3: print("Awwww. Just a baby.") else: print("Ah - a very fine age indeed") https://www.fullstackpython.com/blog/python-basic-data-types-booleans.html Article says-:
  3. shivajikobardan

    Python Python-What does this code signifies in relation to boolean logic?

    my_age = 10 if my_age >= 100: print("One hundred years old! Very impressive.") elif my_age <= 3: print("Awwww. Just a baby.") else: print("Ah - a very fine age indeed") https://www.fullstackpython.com/blog/python-basic-data-types-booleans.html Article says-:
  4. mesa

    Looking for a good source to find FPGA developers for ADC PCB spinouts

    Summary:: I am trying to find some good folks with knowledge in FOGA coding for some ADC boards our EEs are spinning out, but am having terrible luck so far... I am trying to find some good folks with knowledge in FPGA coding for some ADC boards our EEs are spinning out for pulse heigh...
  5. O

    Simulation Code for Earth's Historical Temperature Record

    I am new to the field of climate change. Are there publicly available simulation code for Earth's temperature history, going back, say 2000 years, with a resolution on the order of years? Thank you very much.
  6. C

    I have a few questions about Formalization & Pseudo-code

    Hello, I have a few questions and I'd appreciate if you can please help me. 1. If I want to say "for every ## i \in \Bbb N ## and ## 0 \leq j \leq i ## define ## A_{i,j} := i ## and ## B_{i,j} := i \cdot j ## ", then is the logical formula used for this is as such?: ## \forall i \in \Bbb N...
  7. steve1763

    A Knill-Laflamme condition Shors code

    The K-L condition has projection operators onto the codespace for the error correction code, as I understand it. My confusion I think comes primarily from what exactly these projections are? As in, how would one find these projections for say, the Shor 9-qubit code?
  8. C

    I Implementation of Correlated Gaussian Random Fields Model

    Hello everyone. I have been recently working in an optimization model in the presence of uncertainty. I have read https://www.researchgate.net/publication/310742108_Efficient_Simulation_of_Stationary_Multivariate_Gaussian_Random_Fields_with_Given_Cross-Covariance in which, a methodology for...
  9. Mohammad-gl

    MATLAB Graphene band structure Matlab code

    I have this code for 3D band structure of graphene but i can't understand why while graphene first brillouin zone is hexagonal but here a rectangle form of first brillouin zone is used?E0 = 0; % coloumb integral V = -2.7; % hopping integral [eV] acc = 1.41; % c-c bond length [Angstrom] lattice =...
  10. Arman777

    How to clone git repo and run a code in repo directory

    I have downloaded JupyterLab Neon Theme, and I can run it without a problem, but I want to change some things on the custom.css file. However, when I change that file, I need to do something called development installation. However, I have no idea how to do it properly. I mean, what steps...
  11. S

    B Find Numerical Relativity Source Code

    Where can I find numerical relativity source code?
  12. Wrichik Basu

    [Bash] Use of brackets in this code snippet

    Disclaimer: I am an absolute beginner in bash scripting. I spent the whole evening trying to make this code snippet work as intended. The program is supposed to sort an array using bubble sort algorithm. #!/bin/bash arr=(7 -1 9 2 11 -13 5) for (( i=0; i<(( ${#arr[@]} - 1 )); i++ )) ; do...
  13. S

    MATLAB Calculating the time taken for an asteroid mission using MATLAB

    Using MATLAB, I am trying to calculate the time taken for a spacecraft to travel from Earth to a near Earth asteroid and then returning back to Earth but so far I have had no luck. Furthermore, I want to plot a Hohmann transfer and calculate the mass of fuel required for this mission. If...
  14. Eclair_de_XII

    LaTeX Feedback on my LaTeX code please

    \newcommand\func{\(f\)} \newcommand\myset[1][math]{\ifthenelse{\equal{math}{#1}}{\(K\)}{K}} \newcommand\diff[4]{\(|#1-#2|#4#3\)} \newcommand\ball[3]{\diff{#1}{#2}{#3}{<}} \newcommand\Fllab[2]{\diff{f(#1)}{f(#2)}{\epsilon}{\geq}} \newcommand\term[2][n_k]{\({#2}_{#1}\)}...
  15. N

    Help requested with translating math into code (Not homework)

    The paper is https://core.ac.uk/display/10365043 (12MB pdf) My purpose is to construct parametised spiral bevel gears (using OpenSCAD). I know how to produce a correctly formed circular cut (cylindrical) crown gear profile. My problem is mapping that to a conical surface. I am looking for...
  16. PainterGuy

    LaTeX How do I fix this generated LaTex code for a matrix?

    Hi, I'm using Scientific Workplace to write LaTex and it generates the code shown below for the given matrix. I don't think the generated code is standard LaTex in this particular instance. How can I fix it without making too many modifications? I mean if there is a simple way to fix it. Thank...
  17. B

    Are Moderna/Pfizer/JJ/AZ using the same code for the spike?

    Given the variants of the corona virus now appearing, I was wondering, Are Moderna, Pfizer and Johnson and Johnson and Astrazeneca all using the same genetic code to create the spike protein? Or more specifically, the spike protein that's made by our body, is it the identical spike protein in...
  18. user366312

    Python Kindly explain this source code for me

    Check this link: How to override the copy/deep-copy operations for a Python object? Can anyone explain, in layman's terms, what is going on in this source code? from copy import copy, deepcopy class MyClass(object): def __init__(self): print('init') self.v = 10...
  19. F

    Find Z-bus using Z building algorithm using MATLAB code

    I tried to write to the code, but I got confused in line 46 & 59.Every new added bus increases the dimension of the Z matrix, and since we have 3 busses, the dimension of Z should be [3x3]. I formed a for loop in case of adding a new bus to add a new row and new column (increases the...
  20. A

    Help with Matlab Problem: Commenting Code & Finding Errors

    Hi! I really need help with the following Matlab problem. What does this code do? I need to comment what the important lines of this code do. Also the code contains several errors which i need to find. Here is the program: clear all; close all; clc; Maxi=50; tab=[1 :Maxi] ; tab(1)=0; while...
  21. Northmeadow

    NRC Event Report SCRAM Code help

    I am a dedicated nuclear physics and radiology enthusiast who often looks at the NRC’s event notification reports for information about our countries nuclear industry and the status of our reactors. And every time I read the report and an event occurs at a commercial reactor they are required to...
  22. F

    Write MATLAB code to find Y bus for any bus system

    Here's my work: clc; clear all; % Ybus by step by step method for an any bus system % | From | To | R | X | gsh | B | T|ysh % | Bus | Bus | pu | pu | pu | pu | ph-sh linedata = [1 2 0 -5 0...
  23. UFSJ

    Python Help with .dot code for Graphviz

    Hi guys! I'm completely new with dot code to make graph by graphviz and I'm calling by any help. I would like to make a network of, approximately, 1500 nodes, with each node with its position (geographic coordinate) and its own group of bounded nodes. Some nodes have the same position. These...
  24. Linda8888

    Question for a pointer code fragment

    (I am not sure what does "(MyType **)" means after the '=' sign at the second line) The output is :
  25. Linda8888

    (C language)why does this code fail to compile

    // MyStruct.h typedef struct { int a; float b; char c; } MyStruct;// HisStruct.h #include "MyStruct.h" typedef struct { MyStruct a; int b; } HisStruct;// HerStruct.h #include "MyStruct.h" typedef struct { MyStruct a; float b; } HerStruct;// main.c #include "HisStruct.h" #include...
  26. Arman777

    Python Running a Github File on VS code for windows 10- File system problem (

    I am doing a cosmological work and I need to run a code form this github page https://github.com/ja-vazquez/SimpleMC I download the whole repository as .zip file and I inserted into my desktop. Then I opened it through vs code and this is how it looks like The problem is that, when I run...
  27. M

    (CFD) Problem with C code for 1D linear convection equation

    This is my c program below. Again everything works as expected up until the highlighted lines or the second for loop. When i run my program to output the arrays contents i get bizarre numbers that are not correct. # include <math.h> # include <stdlib.h> # include <stdio.h> # include <time.h>int...
  28. appletree23

    Python Finding the stability of a system using Python code

    I'm given this code to plot the system for task 1 where my teacher have used some random numbers just to show us how the code can be used: The code makes a plot that is given below: So my professor just gave us this code and plot without saying anything more. All the students in the class...
  29. C

    Covering credit card 3 digit code

    What would be the best way to cover the 3 digit code at the back of a credit card? Some suggest using correcting liquid (but it is easy to remove it and apply new one). Many restaurants still get our cards to swipe at their counter. Only very few go to table to swipe it. Also sometimes we gave...
  30. Pooyannikeghbali

    Fortran Extract values from ASCII file in GIS by Fortran code

    I want to read values from the ASCII file of GIS by Fortran code. In GIS, an area has meshed. Each mesh has an individual value (e.g. velocity of water). Here is the website that shows how the ASCII file is working in GIS. https://en.wikipedia.org/wiki/Esri_grid I want to know if anybody has...
  31. k1120

    Python Python code to calculate the age of the Universe using the Hubble constant

    honestly just need some help here i understand the physics just not how to code it or the syntax of python
  32. aero_student

    Engineering Help on fixing DATCOM code for SA-2 Guideline / V-75 Dvina

    CASEID MACH 0.5 DIM M $FLTCON NMACH = 1.0, MACH(1)=0.50, NALPHA = 6.0, ALSCHD(1) = -5.0, 0.0, 5.0, 10.0, 15.0, 20.0, NALT = 3.0, ALT(1) = 0.0, 5000.0, 10000.0, WT = 2287.0, LOOP = 3.0$ $SYNTHS XCG = 5.3, ZCG = 0.0, XW = 4.0, ZW = 0.25, XH = 8.5, ZH = 0.25, XV = 8.5, ZV = 0.25$ $BODY NX = 10.0...
  33. Y

    C/C++ What could be causing my program to hang on cin.getline() in C++ code?

    I have no idea why the program got hung on cin.getline() in my program. cin >> works just find. Here is the program. It is the really scaled down version of my long program. I just deleted all the irrelevant things. The structure is defined in the header file. I use debug to step through the...
  34. WhiteWolf98

    MATLAB How to make a while loop stop when reaching a certain value

    m_1 = 1; C_p1 = 2219; T_1in = 100 + 273.15; T_1out = 75 + 273.15; Q_1 = (m_1)*C_p1*(T_1in-T_1out); while Q_1 ~= 30000 T_1outnew = T_1out + 0.1; Q_1 = (m_1)*C_p1*(T_1in-T_1outnew); T_1out = T_1outnew; end T_1outnew keeps increasing, but the code never stops; and naturally, Q...
  35. S

    Code / Software for Dynamic Balancing (Free / Open Source)

    I am thinking of doing a DIY project in which one sub-task would be to dynamically balance a small assembly that will be spun up by, for example, a small motor taken from a DVD drive. As a test case, here is a setup where we would like to adjust screws S1 to S6 such that the cylinder is...
  36. G

    SF code cracking vs real mathematics

    After i read about RSA encoding, it looks like as if one need an alternate history universe to justify that in the not so far (cyberpunk) future the coded message of an important person involved in shady business can be cracked in reasonable time, let alone during a single night. I read that...
  37. P

    Comp Sci Answer: Fixing Error in TextAnalyzer Java Code

    My current attemp is: import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class TextAnalyzer { private int lineCount; private int wordCount; private int[] frequencies = new int[26]; public int...
  38. A

    Comp Sci How to Structure Java String Code in a Static Main Method?

    here the class name is test153 sent is the sentence entered l is the length of the sentence w is the variable storing each word temporarily before printing.
  39. Monsterboy

    Comp Sci Optimal code for the array problem

    Starting with a 1-indexed array of zeros and a list of operations, for each operation add a value to each of the array element between two given indices, inclusive. Once all operations have been performed, return the maximum value in your array. For example, the length of your array of zeros ...
  40. B

    Having trouble setting up mern in Visual Studio code

    I am having an error setting up mern https://www.digitalocean.com/community/tutorials/getting-started-with-the-mern-stack#testing-api I have to assume I didn't follow the instruction properly.The error is under Database section from the link above. When I type require('dotenv').config() into...
  41. M

    MHB How Do You Calculate the Total Weight of a Huffman Code?

    Hey! 😊 We are given the following letters with the respective frequencies: \begin{equation*}\begin{matrix}a/2 & b/4 & c/7 & d/6 & e/4 & f/5 & g/8 & h/10 & i/3 & j/11\end{matrix}\end{equation*} For that I have applied the Huffman code and I got the following tree: Now it is asked for the...
  42. scottdave

    Probability of a 4 character code without repetition

    The lessons show using Permutations and Combinations for other problems in this section, but we were having difficulty what to choose to put in those formulas. I used this approach: We have 10 numeric and 6 alphabetic = 16 total possible. Let's look at the first digit numeric, and the next 3...
  43. PainterGuy

    LaTeX How to convert MathML code into LATEX code

    Hi again, I'm trying a new program, Scientific Workplace 6, which let's me produce a zip file with four different options as shown below. I just noticed that I could open these zip files in browser and format of the document remains intact. I only tried "Zip file with MathJax". Do you know...
  44. A

    Comp Sci Recursive Double code to Calculate the sum of the square roots <= a number

    #include<stdio.h> #include<math.h> double foo(int n){ if(n==1){ return(1); } if(n!=0){ return( sqrt((n)+foo(n-1) ) ); } } int main(){ int num; printf("Enter the number: "); scanf("%d",&num); foo(num); printf(" %lf ",foo(num)); return(0); }I...
  45. S

    Python X error correction code in ProjectQ Python

    I have been trying write a code in for error correction. I am new to programming and am unable to understand what is not alright. Can anyone please suggest some explanation? from projectq.ops import All, CNOT, H, Measure, Rz, X, Z from projectq import MainEngine from projectq.meta import...
  46. M

    C/C++ What is happening to num and den in this C++ code for Stieltjes polynomials?

    I'm not at all C++ literate, but I need to understand what a C++ code is doing for a math problem regarding the Stieltjes polynomials. Especially, I want to know what is happening to the "num" and "den" in the code; the code is in this link: Stieltjes
  47. Amik

    Mastering Physics access code -- 1 book versus 3 books?

    I want to buy the access code for university physics 14th edition.I know there are 3 volumes for this books.Is there one access code for 3 books or just one for each volume?
  48. Glype11

    B Odds of Drawing Sequence 4457: Calculating Probability

    Suppose we have a code: 4457 If these numbers are randomly drawn what are the odds of drawing those numbers? Here's my approach: The available numbers range from 0123456789 and there are four columns, minus the numbers which were drawn gives: 1/(10^4-4)~0.01% Now what about the odds of...
  49. P

    Comp Sci Mars Rover Project code w/ Arduino

    Mentor note: I have removed author information and have enclosed the code below in code tags. First library: MarsRover_lineFinder2.ino #include <ZumoShield.h> #include "MRlinelib.h" #include <QTRSensors.h> #include <Pushbutton.h> #include <ZumoReflectanceSensorArray.h> #include <ZumoMotors.h>...
Back
Top