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.
I have a C++ code, test.cpp, and am using OpenMPI when running it. I followed the instructions here and it appears to have called OpenMPI correctly. I can compile and run the code perfectly fine from the command line but I just have to specify "TMPDIR=/tmp" before running it, i.e.:
$ mpic++...
Homework Statement
For our final test preparation we were given a few problems to write and this is one of them:
I would be very grateful if you could help me find the easiest way to solve it.
Homework Equations
3. The Attempt at a Solution [/B]
First let me tell you my plan for writing this...
Homework Statement
The kind of problems i we are currently dealing with in school are like this:
Find the order of complexity of the function
Homework Equations
3. The Attempt at a Solution [/B]
Im suppose to guess or calculate the complexity of this based on code sample. Its in Pascal and...
Does anyone know what the open source code is called that hysys was built on so I can file a freedom of information act paper work. I would also like to do this for NEC-2 for antenna radiation modeling.
Sometimes I include Mathematica code. Is is possible to include this option when including code in the thread for the language option? For example, would be nice to have a heading as "Mathematica" in the following code insert rather than "text":
my mathematica code
Does anyone have an open source code or know how to code propagation of multi gaussian beams through multiple interfaces using the ABCD matrix approach? And this is using ultrasound and not optics. Please let me know if anyone can help out in this
Homework Statement
This is a problem of the 10-minute test we had today in school.
Its written in Pascal and it is asked of us to analyze it and figure out what is the output when it runs without writing it down.
Homework Equations
3. The Attempt at a Solution [/B]
I wrote it in the editor...
https://www.washingtonpost.com/world/national-security/russian-hackers-penetrated-us-electricity-grid-through-a-utility-in-vermont/2016/12/30/8fc90cc4-ceec-11e6-b8a2-8c2a61b0436f_story.html?utm_term=.3d3f0ce2546f
Source: Signs of Russian Hack Found in Vermont Utility System | NBC Chicago...
Dear PF Forum,
Can someone help me with this matter?
I want to ask a question in PF concerning a particular video.
You'll see that the video popped up in my thread.
I use insert link above.
But what I want to do is simply, insert the link, so the use can click the video to watch it without...
Homework Statement
Define a procedure that does the following:
From the string of numbers from 1 - 9 it creates a list that contains the numbers that are bigger than the preceding number and adds the smaller ones to a sub-list. Example:
string='3057842103'
print(numbers_in_list(string))...
Homework Statement
# Sudoku [http://en.wikipedia.org/wiki/Sudoku]
# is a logic puzzle where a game
# is defined by a partially filled
# 9 x 9 square of digits where each square
# contains one of the digits 1,2,3,4,5,6,7,8,9.
# For this question we will generalize
# and simplify the game.
#...
Homework Statement
For a following differential equation
d^2y/dx^2-4y=(e^x)/x
Find the solution using numerical methods
Homework Equations
d^2y/dx^2-4y=(e^x)/x
The Attempt at a Solution
%num
dx=0.01;
x=1:dx:3;
l=zeros(1,length(x));
m=zeros(1,length(x));
l(1)=1;
m(1)=0.25;
for...
Hey guys. I got a project in which I'm working on right now and I got to use a microcontroller in it. The microcontroller is a PIC 18F2550 and I have to receive data whenever I send the 'a' character via the serial port(RS232). The data I'm suposed to receive is generated with the ADC from the...
The statement:
In every ABC triangle, the laws of sine (a/sinA = b/sinB = c/sinC) & cosine (c2 = a2 + b2 -2*a*b*cosC) are valid, where a, b & c are the sides opposite to A, B & C respectively.
Write a program that calculates and prints on the computer's screen, the length of c, and also the...
Homework Statement
A small list of business firms have their own registar number which is between 10000 and 30000. The first 4 digits represent the firm and the fifth digit is the control digit. The number is valid if the sum of all its digits are divisible by 7. Create a program which checks...
Homework Statement
I just started learning pascal (school curricuulum) and am finding it quite boring compared to python. After skipping a few lessons i came today and we had this code shown. I know it creates a matrix and then transposes it but am misunderstanding the details of the code and...
# Use Dave's suggestions to finish your daysBetweenDates
# procedure. It will need to take into account leap years
# in addition to the correct number of days in each month.
def nextDay(year, month, day):
n=month
if (n==1 or n==3 or n==5 or n==7 or n==8 or n==10 or n==12) and day < 31...
Hello,
1. Homework Statement
I find diffuculties to transform fscanf and to apply the discrete wavelet transform order 2 from matla to python.
Homework Equations
This is the MATLAB code:
D_P=fopen('distance_profil.txt','r');
i=0;
while(feof(D_P)==0)% test for end of file
i=i+1...
"Gotta catch 'em all"
e.g.
try {
// something that might fail for reasons I don't want to anticipate
}
catch (Exception ex) {
// do something
}
I believe there are justifications for doing this:
Inside the try block I'm using a class from a 3rd party library that doesn't have...
Since i don't know how to write code here on forums i will upload a picture and explain what's it about.
In the picture there are three codes that define the same procedure of finding the biggest number out of three given. The first code in the picture is defining a procedure called...
Hi,
I am a bit perplexed by the codes on some old ceramic disk New Old Stock capacitors. Here are some examples.
This one measures close to 68 pf.
CM = MFG ?
U2J = ?
75J = I assume 75 pf and the J = the tolerance of 5%
1KV = 1000 volts
This one measures around 60 pf.
68J
N750
1KV
This one...
Hi, I am looking to buy a code editor for my iphone so i can code on it. I don't know any of these but they are most if not all paid and i was thinking of asking for your help in choosing one of them. I would like it to be a python editor but it should also support other languages. It is also...
I am suppose to write a code that print put the url of a link given below. The url is defined to start where the first " appears and end where the last " url appears starting from the start_link. Its actually the last project from te lecture 1 in Udacity and the forst code of mine.. but its...
I have around ~24 PDF files I want to edit. I want to delete the first page of each file OR scan for certain text in the file/delete the text (whichever implementation is easier). What would be the most convenient and straight forward coding language to do this with and what would be my starting...
As an exercise, I am trying to solve the 2nd-order wave equation:
$$ \frac {\partial ^2 E}{\partial t^2} = c^2 \frac {\partial ^2 E}{\partial z^2} $$
Over a domain of (in SI units):
## z = [0,L=5]##m, ##t = [0,t_{max} = 5]##s, ##c = 1## m/s
and boundary/initial conditions:
## E(z[0]=0,t) =...
Homework Statement
For my research we need to utilize a MINUIT (fortran based) code to compute error values.
We are working on an 'example' minuit library to further our understanding of the code. I am not well-versed in FORTRAN, but we are currently having a problem:
1. Understanding where...
Hi guys,
I understand there is a way to "fold" the function lines of my HTML/Javascript code into single lines "function" blocks like I can do in notepad++.
I tried setting up code-folding in Netbeans using Tools/Options/Editor/Folding and enabled code folding and restarted Netbeans but...
My understanding is that genes code for proteins that then do a certain function.
Apart from mitosis in an organism, I heard that cells (in forms of stem cells) are also produced and released into the body. I guess these would be all the floating around the body cells? Or the nerve cells that...
The issue I am having is setting up the actual program for the problem. I am having trouble interpreting the code and, because of that, having issues getting it to work properly. The whole thing was written with Matlab and the goal was to write a function that could simulate the motion of a...
I am testing the MCNPX plugging MCUNED to make calculations with neutron generators. After the compilation many examples to test the installation are provided. But one of them (I attached the code below) starts but it never finish. Just keeps in the first rendezvous. I first though in a problem...
I was wondering if you guys could help me design (code) a slick code block in my blog like the one here that the reader could scroll? I'm very new to HTML and Java but if I could get just a little help, I would work on it. I really don't have a clue how to add the following to my HTML file but...
I wish to be able to create android and iphone games and apps but currently know nothing about programming. With this in mind, what do you suggest doing first in a form that you suggest the programming language i start learning first, textbook that i should use and program that i will write on...
Here are my Fortran codes:
program test
implicitnone
integer*4 nxProjPad, cf, numViews, cc, index, indRad, iv, i, INDEX1, d, n
real*4 v4, v5, RSS, S1, F1, gMDL
real*4, dimension(:), allocatable :: array, sum, cumsum, transpose, log, SS1, SSs
nxProjPad=185
numViews=180...
Am currently working on a project relating to quantum cryptography. will be pleased if someone will help with source code for quantum key distribution algorithm
I'm trying to understand this python CAMB code: http://camb.readthedocs.io/en/latest/CAMBdemo.html
Scroll down to In[29] and In[30] to see it.
It's an integration over chi (comoving distance), yet scipy.integrate.quad is not called. It seems that the fun stuff happens in the last for-loop in...
anyone help me to convert this sample code of Gaussian Cone shape of random number code in Matlab into C++
function GaussianCone
clear all; clc;
mx=10000; my=mx; mz=mx;
z=[1:1:mz]';
sigma=0.01; R=0.5; mu=0;
sigmax=sigma+R*z;
sigmay=sigma+R*z;
x=zeros(mx,1)...
I've been learning the absolute basics of a few programming languages and feel like I want to start taking a more "practical" approach to learning, so I've been looking into source code.
My question is pretty simple, where do I start? How do I identify the structure of the files that go into...
Here's a question that's been on my mind for a while (I use c#) does the number of lines in your program affect the speed of your program? Let's say you had a program that skipped over one trillion lines, and another who skipped over ten lines. The lines could be inside an if statement who's...
Allo,
I have got VSC and have been using it for JavaScript in Unity. Also, I am new to VSC. However, I have been wanting to use it for writing C and C++ for just standard compiling and executing. Is there some way to run '.c' Visual Studio Code in, let's say, on command prompt. I have heard I...
Homework Statement
Working on a FORTRAN based code for some work.
Not sure what's wrong with it.
Homework EquationsThe Attempt at a Solution
The section of the code that is causing the problem is:
OPEN( UNIT = 17,FILE='updateddata.txt',STATUS='UNKNOWN')
DO I = 1, 146
READ( 17, 703)...
Hi people,
I've "enrolled" into the edx MITx 6.00.2x course on python and data science, but I don't plan to get a certificate and I started so late that all the problems I'm facing aren't due anymore so I think this gives me the right to seek help here.
Basically the task is to simulate some...
Homework Statement
gamma beam (γ) consequent of co 60 [this source have two beam; 1.1732mev(99.88%) & 1.3325mev(0.12%)] radiation behind the concrete block [ 300×300×20 cm] (thickness is 20 cm).
analysis and plot Gamma-Ray Attenuation at 5 cm layers (4 layer) and plot spectrum of exited...
The way the classes and functions are named confuses me. What is the program trying to do?
class Y {
long y;
public:
Y() {
y = 4;
}
long get(long yy) {
long ret = yy * y;
y = yy;
return ret;
}
};
class X {
long x;
Y y;
public:
X() {
x = 7;
}
void Xx(long xx) {
x += y.get(xx);
}
int get() {...
An interesting article on the connected nature of things on the internet:
http://arstechnica.com/information-technology/2016/03/rage-quit-coder-unpublished-17-lines-of-javascript-and-broke-the-internet/
Hello, MHB Community! (Wave)
We have several tools on our toolbar that make posted source code stand out and preserve whitespace so that your indentation is preserved, making it easier to read and copy/paste for those who wish to take it and run it for testing.
For general code, you will find...
I want to write a octave code(It can be another language I want to know how should I think to write a such a code ) to obtain graphene structure like in the figure.
This code should give me a graphene sheet which in size I want when I enter the position of the atoms in the lattice.I think that...
From what I've seen, most engineers - outside software engineers - work with Matlab and spreadsheets like Excel. I don't know how to code in Matlab yet, so I'm not sure about how different it is from traditional programming languages like C/C++.
I'm more interested in Control Engineers - and...
Hi,
The Steane code is an error correcting code with n=7 physical qubits, n=1 logical qubits (this is clear so far) but there is also the term "distance" d as in the in the case of the Steane code d=3. I am still struggling to understand what that actually means. We have defined the distance...