What is Code: Definition and 957 Discussions

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. C

    Prodigal Student

    Hi, my name's Cass. I finished my bachelors in physics last year. Kind've floating around I guess. I write code, play guitar, make art, and study Japanese. I hope to spend some time away from school and get my priorities straight then maybe go back to gradschool eventually. Nice to meet you!
  2. pairofstrings

    C# Generic Interfaces and Covariance

    Hi. I have the following code: public interface ICovariance<out T> { void Add(T item); T Get(); } How to remove the compile-time error without changing the code of method declaration and by only changing the interface signature? The error is in:void Add(T item); Thanks.
  3. Vick

    Fortran Can Fortran 77 Code Be Used to Debug Python Code for Solving ODEs Using Radau5?

    Hi, I have a piece of Fortran code but I'm not Fortran literate. I'm trying to translate it into Python. I have already made it, but I need someone who can run the Fortran code to compare the values of the variables.
  4. A

    Help debugging MCNP code - particle lost and zero latice element found

    I keep getting particle lost error even though there were no hole in the lattice. Can someone identify any mistake in my code?
  5. Gwen

    Thermal lattice Boltzmann model ignoring source term -- python code help please

    LBM model for phase change- relevant equations found here. Also here. #Thermal LBM #solves 1D 1 phase phase-change #D2Q5 Lattice nx=100 # the number of nodes in x direction lattice direction ny=5 # the number of nodes in y...
  6. shivajikobardan

    Comp Sci How do "min" and "hour" get their values in this C++ code?

    How does "min" and "hour" get their values in this C++ code? Full code here: #include<iostream> using namespace std;class Time { public: int hour; int min; Time() { hour=min=0; } Time(int h,int m) { hour=h; min=m; } Time add (Time t)...
  7. G

    I Angle of Sun by date and zip code?

    I don't know the correct works search to find this info online. I have been doing word searches since about Dec 15, 2022 but not finding what I want.??????? Some where there much be a chart by date and zip code for sun angle. I built a sun dial in the yard to learn the angle of the sun on...
  8. emilmammadzada

    I get this error when I try to run the code MCNPX

    I get this error"bad trouble in imcn in routine pass1 unexpected eof in file depletion.inp" when I try to run the code MCNPX my input file c Depletion pincell input file for MCNPX c Define cells c Cell 1: Fuel 1 0 -1.0 -4 -5 -6 c Cell 2: Cladding 2 0 -2.0 4 -7 c Cell 3: Moderator 3 0 -3.0...
  9. emilmammadzada

    FRENDY nuclear code -- Where to download it? (for ubuntu 22.04)

    I want to compare njoy2016 and frendy codes.If anyone is using frendy nuclear, I wanted to get information about how to download it for ubuntu 22.04 version?
  10. emilmammadzada

    Stopping power and projected range for FLUKA code

    How do I calculate the stopping power or projected range for aluminum in Fulka. And in which output file is this data located?How can I edit a change in the input file?
  11. G

    Please help explain the reason for the errors displayed for my Java code

    //program showing an advantage of using arrays public class Arr3 { public static void main(String []args) { System.out.println("There are 31 days in the month of Jan"); System.out.println("There are 27 days in the month of Feb"); System.out.println("There...
  12. shivajikobardan

    JavaScript What happens when return is executed in this code?

    I'm currently watching tutorials to build projects as I'm still not in a phase where I can carve a project that I want all on my own. Currently, working on a snake game. let speed = 2; let lastPaintTime = 0; //Game functions function main(ctime) { window.requestAnimationFrame(main); if...
  13. James1238765

    I How to do algebra on the Kitaev toric code grid?

    The toric code is a basic computational model as follows: There are 2 operations that can be performed, A and B, on this grid. To compute the value A at each point on the grid, we transform the raw values at each dot (located in between two vertices) according to some predefined operators...
  14. DiracPool

    MATLAB Help converting MATLAB to Scilab code

    Hello, I am having difficulty converting some MATLAB code to Scilab code. Specifically, the problem is with graphing the results of a spiking neuron program. Herer is the program and the article that explains it: https://www.izhikevich.org/publications/spikes.pdf The problem I am having is...
  15. yezia

    Which MSc to do after BSc physics if you love to code?

    Hi everyone! Merry christmas first and I hope you're getting great rest with close ones around :) Well, as title may suggest it, I will graduate soon in physics and I'm not sure of the next step in my academic curriculum. I like theoretical physics, I've touched upon most fondamental physics...
  16. V

    Comp Sci An Introduction to Deep Learning and Modifying Code

    The code with no modifications is at the very bottom. For part 1: loading a mat file into the code, I just put it above the last function but it's going to have to replace the data part of the original code thus I have to extract it out of the file: (I would add the file but I am unsure of how...
  17. M

    C/C++ Errors trying to compile a simple code

    When trying to compile the following c++ code I get the errors I've screenshot // p12 #include <iostream> #include <vector> #include <string> #include <map> class Solution { private: std::vector<int> num = {1,4,5,9,10,40,50,90,100,400,500,900,1000}; std::vector<std::string> sym =...
  18. D

    Online compilers that will run code that features TextIO?

    Hi everyone I've been trying to teach myself coding using the free materials from https://math.hws.edu/javanotes/index.html I've been using online compilers because I got a "Error: Could not find or load main class" message immediately upon installing Eclipse. The online compilers work for...
  19. D

    Learning to Code Game Enemy AI in C++ from Scratch or in Assembly?

    Hello, To keep my questions straightforward they are below. How do I learn how to code Game Enemy AI in C++ from scratch and what are the top resources you recommend(Books, Tutorials, CD-Roms, Videos)? How do I learn how to code Game Enemy AI in Assembly Langauge from scratch and what are the...
  20. G

    I What is the angle of the Sun on June 21 & Dec 21 at US Zip Code 37129?

    What is angle of Sun June 21 & Dec 21 at zip code 37129. I need lowest angle & highest angle and probably angle of sun about Feb 20. Google word search shows nothing. I am probably need using correct word search to find what I want. Several years ago I accidently found a calendar that showed...
  21. K

    Genetic code other than DNA (moved)

    Summary: Curious to find out genetic code other than DNA <mentor> Moved to Discussion, hypothetical discussion Dear PF Forum, It's been a long time since I log into PF. And I hope everybody is in a good health. Recently I had a discussion debate with my friend about other life in this...
  22. sophiatev

    A PD code yields two different knot diagrams

    The PD code [(2, 3, 1, 4), (4, 1, 3, 2)] seems to map to a non-unique knot diagram. I can describe the following two Hopf links with different orientations with this same PD code. As I understand it, while a link diagram does not have a unique PD code, a given PD code should map to just one knot...
  23. MidgetDwarf

    Other Springer Discount Code %40 off.

    Hey there. Here is a springer discount code for %40 off. M3rtp5dd Does PF have a deal with Springer, similar to the agreement with Amazon?
  24. M

    One-line Python Code that returns a sequence of integers

    Hey! 😊 I want to write a one-line Python generator or iterator expression that returns the sequence of integers generated by repeatedly adding the ascii values of each letter in the word “Close” to itself. The first 10 integers in this sequence are: 67, 175, 286, 401, 502, 569, 677, 788, 903...
  25. Zakariya

    Changing the Temperature in an MCNP code

    Hello everybody. I would like to ask a question; if I change the dimensions and densities and the material number identifier ZAID to a specific temperature. Does MCNP change automatically the volume of the cells? or I have to change the volume of each cell manually and indicate it in the cell...
  26. stephen8686

    I Propagation of Angular Spectrum Code

    I'm making a MATLAB code to propagate a gaussian field in the angular spectrum regime (fresnel number >> 1). After Fourier transforming the field, you propagate it: $$U(k_x,k_y,z) = U(k_x,k_y,0)e^{ik_z z}$$ The thing that I am having trouble with is the propagation factor, I have looked at this...
  27. user366312

    Polymer simulation source code in C++ and Python

    I am absolutely new to Polymer simulation. I am trying to understand the simulation by analyzing source code written by others. Can anyone tell me what are the differences between the following three source code in terms of their objectives? Monte-Carlo-simulation-of-polymers...
  28. A

    Need of Tangle calculation using code and Numerically

    = tangle equation = Inequality condition = partial trace formula. To find the tangle, we need the square concurrence value of ABC states as mentioned in a tangle equation. I am not able to find the value of square concurrence.
  29. M

    Comp Sci How does Instruction 2 affect the updates in a flow chart for coding?

    I found this as problem 3/42 from here (copied below for viewing convenience). I'm a little confused about Instruction 2. The way I interpret it, upon the first loop, no evaluation is occurring, but instruction 1 now becomes "increase Box 2 by 2". So now the three instructions are 1) increase...
  30. Mark44

    Interest in post comparing nVidia CUDA code vs. Intel AVX-512 code?

    I've done a bit of CUDA programming lately, to exercise some parallel code on my nVidia graphics card. I also ported implemented the computations in Intel AVX-512 assembly code. The code I wrote takes a bunch (=262,144 = ##2^{18}## to be exact) of points, and calculates the slope and...
  31. C

    Help with this emu8086 assembly language problem please

    Summary:: my code has been successfully showing the right decrement of the letter. however, i tried to put space in between the letter output but its output became repititive letters. this is the original output when i try to put space it become like this i want to put spaces on the output...
  32. shivajikobardan

    MHB What is minimum requirement vs specific requirements to be called in as intelligent agent for any software code piece?

    https://uobrep.openrepository.com/bitstream/handle/10547/223815/ESWA%20agent%20paper%20-v2.pdf;jsessionid=16B243A8F6C1FC1242A75969D18D00B7?sequence=5 here is some information but i am unable to dcode what is minimum requirement vs specific requirements. can you help me a bit in this case?
  33. M

    Python code returning "none"

    Hi PF! I'm trying to write a code that, given a list of integers, will output the next lexicographic permutation. But my output gives me None, and I can't see why. Is it because I am incorrectly calling the reverse function? Any help is greatly appreciated! class Solution(object): def...
  34. shivajikobardan

    MHB Solving Your Problem: Troubleshooting Mistakes in Code

    https://lh6.googleusercontent.com/gIpHfdMTJMBg2-cMkBWqVQYyAUKTwBCzc30JXJ054wfj06IBGeeXFdHd1-VO0J6EFrssOlAe3ntqJaVHSakLZAK8x4BI6pRL5Lb0JWUdDEuaxAm4NPAiUMvtOSLqjrOkH8r0VOv7...
  35. Math Amateur

    LaTeX Please help with this failing Latex code

    [SOLVED]I keep failing to be able to correct the following Latex Code B' = \{ x \in \mathbb{R^n} \ \ | \ \ a_j \leq x_j \leq t_j \text{ and } a_k \leq x_k \leq b_k \{ for } k \neq j \} Can someone help by indicating what's wrong ... Help will be much appreciated Peter
  36. M

    Python How does this recursive code work?

    Hi PF! Here is a code that generates ##n## amount of valid combinations of parenthesis e.g. n = 2 implies (()), ()(). But this wouldn't work )()( or this ))((. def generate(result, s, _open, close, n): # Base condition if close == n: result.append(s) return # If...
  37. JD_PM

    Understanding the source code for an OpenFOAM solver (CFD)

    I am trying to understand the following code (it starts from line 59) and there are pieces I do not understand. argList::addNote ( "Solver for two incompressible, isothermal immiscible fluids with" " phase-change.\n" "Uses VOF (volume of fluid) phase-fraction based...
  38. M

    Executing Specific Python Lines in VS Code on Ubuntu

    Hi PF! I am running VS Code for python on Ubuntu. Is there a way to execute a specific python line? As I currently have it set up, on the terminal input at the bottom of the screen, I can only work through the terminal, so a command like print('hello world') won't do anything. THanks so mcuh!
  39. I

    Prove this inequality about the weights of code words (Coding Theory)

    I'm trying to prove the following: ##wt(x+y) \leq wt(x) + wt(y)##, where "wt(x)" is referring to the weight of a specific code word. Proof: For two code words ##x, y \in F^{n}_2##, we have the inequalities ##0 \leq wt(x)## and ##0 \leq wt(y)##. Adding these together, we have ##0 \leq wt(x) +...
  40. M

    Why is spaces equal to tree_height-1 in the Christmas tree code in Python?

    Hey! :giggle: I found online the following code for a christmas tree in Python : tree_height = input("Enter the tree height : ") tree_height = int(tree_height) spaces = tree_height-1 hashes = 1 stump_spaces = tree_height-1 while tree_height != 0 : for i in range(spaces)...
  41. mark_bose

    I want to write my own Monte Carlo code for Neutron transport

    Hi, i would like to write my own MC code in order to simulate the transport of Neutrons in Nuclear reactors. I know the basics of MC and i have already written a code for homogeneus reactors, my problem is the generalization to more complex geometries made of different materials, such as fuel...
  42. fluidistic

    How to understand this "decompiled" program?

    I am sinking deeply into the cryptocurrencies world. There is a website that shows a "smart contract", a piece of code that is supposed to provide rewards for "staking" a particular token, where the rewards is two different tokens (I am not even sure in which proportion). Usually people who...
  43. jrrunge98

    I Is There a Hidden Pattern in This Sequence of Numbers?

    I have been trying to find a pattern in this sequence of numbers: 72.1, 25.2, 35.1, 58.3, 164.14, 99.8, 23.1, 51.5, 13.2 I have tried every method I can think of like finding the mean, putting them in numerical order, trying to see if the differences between each number has any correlation (It...
  44. R

    Resetting PC & Visual Studio Code - Need Help!

    I tried resetting the PC and reinstalling visual studio code and that does nothing. Any advice would be helpful.
  45. A

    Help Needed: DRAGON/DONJON Code for PWR Analysis

    Hello Everyone, Hope you will be with good health in this situation. I am Ali and i need some help regarding DRAGON/DONJON Code for PWR Analysis if anyone help me i will be very glade Regards Ali
  46. SamRoss

    How can I get the RUN button in Visual Studio Code to turn GREEN again?

    I have been using Visual Studio Code for a couple months now and it has been fine. When I want to run some code, there is usually a little green triangle button in the top right corner that I can click on. A few days ago, that triangle turned white only for Python files (it is still green for...
  47. M

    MHB Multiplication Table Generator

    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) ...
  48. 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-:
  49. shivajikobardan

    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-:
Back
Top