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.
TL;DR Summary: How to understand the code determining the plot
Hi; this is the code I have been given for a H-R diagram of M35; I understand the inversion concept.. The plot is below. I am trying to understand the code that creates its position and size and how to alter it to a more...
In the Dark Ages, resistor values were indicated by colored bans, and we all had to memorize the code. (This was back when they were bigger than a speck of dust)
My question is - why colored bands? Caps have numbers printed on them (as do some resistors). Why fool with bands if you can just...
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!
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.
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.
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...
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)...
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...
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...
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?
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?
//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...
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...
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...
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...
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...
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...
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 =...
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...
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...
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...
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...
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...
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...
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...
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...
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...
= 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.
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...
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...
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...
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?
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...
[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
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...
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...
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!
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) +...
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)...
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...
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...
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...
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
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...