Programming Theory

3K

Solutions

24

Articles & Videos

4K

Contributors

Programming theory deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features, along with introductory programming concepts like program structure, variable declaration and conditional and looping constructs. Sub-disciplines include the formal semantics of programming languages, type theory, program analysis and transformation, comparative programming language analysis, metaprogramming, domain-specific languages, compiler construction and run-time systems.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have been reading about the Turing machine lately.  My question for you does the average laptop meet criteria for being a turing machine?  It works different, but I think it can do everything a turning machine can do.

Would you agree or disagree?

Thanks.
0
On Demand Webinar: Networking for the Cloud Era
LVL 8
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Hi all,
Does anyone plan before they code?

I usually just dive straight in, I know what I want a certain script to do, but the actual structure, functions, queries etc, I discover and code on the go.

Does anyone write a simplified version of their code before they start (in Word or something)? If so, do you use any specialised tools?
0
A slightly theoretical question.

A company is developing a cloud service based on PHP/mySQL etc. They have the source code on their own servers.

However, they want to start using external developers to create particular features.

How can they share part of the source code with those developers, without giving them access to the whole thing?

I was thinking that something like GitHub might support that, but it doesnt appear that it does.

Any ideas, or products you know of?
It would essentially be giving a certain developer access to a certain file, and then revoking that access when they had completed their work. I guess it would also need some sort of version control.
1
I am trying to sort a multi-dimensional array.  In my code, I capture data (item 'ID' and 'Priority' value) from my SharePoint list and dump it into an array as objects.  For some odd reason, it does not get inserted in the order I expected so I am trying to sort the array by the 'ID'.
Here's my code that created the array of objects.
/*Array will contain two values, item id and new priority value. Global so it can be used in multiple functions.*/
var items = [];
var itemsID = [];
var projItemArray = new Array();
var i = 0;	

/*-------------------------------------------------------------------------------------------------------*/
//Success on data retrieval from 'retrieveListItems()'. Transforms HTML table to datatable and creates
//range functionality.
/*-------------------------------------------------------------------------------------------------------*/		
function onQuerySucceeded(sender, args) {
    var listItemInfo = '';
    var listItemEnumerator = collListItem.getEnumerator();

    //Will be used to build object array of ID and priorityNumber
    //var projItemArray = new Array();    	

    //1st call to retrieve the level. 2nd call below while loop
    var levels = determineGroup();
    // alert("onQuery: "+levels);

    var i = 0;
    while (listItemEnumerator.moveNext()) {
        var oListItem = listItemEnumerator.get_current();

        var itemUid = oListItem.get_item('ID');
        var colVal;
        var valSelect = " ";
        if 

Open in new window

0
Does anyone know of a good tutorial on building a survey system using PHP.

I'm having trouble wrapping my head around how branching on a survey works (where some questions are hidden unless the answer to another equals something), in particular how the concept would work in terms of storing that data in a table and then using it at run time.
0
I have been using VBA for some years and have many, increasingly complex applications. I am at a point now where I am spending large amounts of time trying to debug my applications. Procedures which have worked successfully in the past are not working now. I suspect it is to do with the use of events and turning events on and off. But I also use a lot of code tracking procedures and I protect my worksheets. I think that my solution requires me to choose a method of showing my programme flow more visually and to use a diagramming methodology for doing this. I wonder whether I should invest my time in converting my applications to object-based methodologies using classes, and move to UML diagramming. I would greatly value advice on this matter. I attach an application that is confounding me at present. Many thanks for any assistance you can provide.
2017-03-24_SEBIS-Cash-Book_Developm.xlsm
0
Hi All,
Would you recommend a website(s) where it will show me the condensed basics of college level statistics in laymen’s terms – so that quickly I can understand the core and key concepts? and apply those conceptas in real life  
Thank you
0
Hi,
what are differences, advantages, disadvantages between

dao vs facade design patterns used i java and j2ee applications?
please advise
0
I did my main Part but i m unable to put the input/ output code.  I want to add one file and output file using array of structure and file I/O.  So i need help if any one can help me out with that codes. this my main part of code in this i want to add the file I/O part . with reading a file from the data and output to the console window. I have attached one .pdf file to the program i want to to that thing in this program. So i need your help.

#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

struct Weather
{
    double Temperature;
    double windSpeed;
    double dewPoint;
    double windChill;
    double cloudBase;
};

void get_input(double& tempF, double& windSpeed, double& dewPoint);
float get_windChill(double tempF, double windSpeed);
float get_cloudBase(double tempF, double dewPoint);
void show_output(double tempF, double dewPoint, double windSpeed, double windChill, double cloudBase);


int main()
{
   

    cout << "-----------------------------------------------------" << endl;
    cout << "This program determines wind chill using temperature" << endl;
    cout << "in Fahrenheit and wind speed in mph, and computes" << endl;
    cout << "the cloud base using the dew point in Fahrenheit" << endl;
    cout << "-----------------------------------------------------" << endl;


    double degreesFahrenheit, mph,dewPoint;
    float cloudBase, wc;

    get_input(degreesFahrenheit, mph, dewPoint);
    wc = get_windChill(degreesFahrenheit,

Open in new window

0
Hi All, I am creating a simple module using API.AI where API will ask set of 10 questions and retrieve answers.I In between of these question set i.e. after question 3, i want to handle in between user queries using other intent also but after handling those queries, I want to return back to the original question set i.e. question 4. Can we do this ? if not what is the suitable way of handling such scenario?
0
[Webinar] How Hackers Steal Your Credentials
LVL 8
[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

In API.AI, @system.given-name can recognize English names. I want to create a module for india. Do we have any method by which we can use such kind of concept for indian names?
0
When an application is started, what are the steps it goes through until data is saved and the application is closed? What are the interactions with the registry and .ini files etc.

Ex. - 1. Executable is left mouse clicked. 2. The application takes the credentials and authenticate. 3. Assigns privileges etc.

Where does the security token fit in this sequence?
Where does the registry/ini files fit is this sequence?

I want to put the answer in a diagram to assist with troubleshooting
0
Hi All,

I'm looking for some best practices and lessons learned real world experience.  This is more of a high-level programming architecture for how our programming patterns are going to be laid out.

The one thing I'm sure of is that I want everything to go thru our classes.  I don't want multiple definitions of the same code on multiple pages where we're trying to find out everywhere we need to update them.  The page (we're currently still using webforms) calls the class, the class calls EF, and all custom logic is done inside the class.

The issues we're coming across are when dealing with joins, anonymous types, and the like.  Our developers are worried about select all columns every time for all queries as we've seen that can hamper performance.  If we do dynamic types then we lose intellisense and open ourselves up to runtime errors.  

We've seen a bunch of other sites recommend using custom classes for each result set, but I can picture that getting messy with the amount of tables / joins / applications we have that cross reference each other.  

We can return IQuerables, select the columns with intellisense, but then we're limited to a single object and aren't sure if that'll work if we need to update the data we're retrieving.  

So I'm asking the community what patterns they use and what they wish they knew when designing the way they were going to use EF from the ground up.  Any and all help greatly appreciated.
0
What is counting semaphore?
0
My teacher told me to write a digest paper. What is a digest paper?
0
How would you construct Excel formulas to accomplish the following?

I received a call from my son yesterday who informed me that he and his siblings (including spouses) would like to do a holiday gift exchange and asked if I would randomly come up with a name for each person using the following rules:

• each person is to give one and only one gift
• each person must receive one and only one gift
• no one can be assigned their own name
• no one can be assigned the name of their spouse (if applicable)

I have four children and all but one are married. So if each person is represented by a letter, it would appear as follows (with my biological children in the left column and their spouses on the right):

A — B
C — D
E
G — H

Thanks
0
public class TestRecurse {

	

	private static void recurse(int count) {
		// TODO Auto-generated method stub
		System.out.println("recs");
		if(count<=0){
			System.out.println("finsiheds");
		}else {
			//count--;
			recurse(count--);
		}
		
	}
	
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int count=1;
		recurse(count);
	}

}

Open in new window


i am running above example and got stackoutofbound exception. please advise why i got below error and what it means by stack and why it became out of bound?

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs

...

recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
recs
Exception in thread "main" java.lang.StackOverflowError
	at 

Open in new window

0
Hi,

I am looking for
given out Input: 43790
i need below pyramid of output
Output:
    0
   33
  444
7777
99999

i wrote as below
import java.util.Scanner;
 
public class TestClass
{
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
 
      
 
        System.out.println("rows");
 
        int noOfRows = sc.nextInt();
 
        
 
        int rowCount = 1;
 
        System.out.println("output");
 
        
 
        for (int i = noOfRows; i > 0; i--)
        {
            
 
            for (int j = 1; j <= i; j++)
            {
                System.out.print(" ");
            }
 
          
            for (int j = 1; j <= rowCount; j++)
            {
                System.out.print(rowCount+" ");
            }
 
            System.out.println(); 
           
 
            rowCount++;
        }
    }
}

Open in new window

i got below output

rows
10
output
          1
         2 2
        3 3 3
       4 4 4 4
      5 5 5 5 5
     6 6 6 6 6 6
    7 7 7 7 7 7 7
   8 8 8 8 8 8 8 8
  9 9 9 9 9 9 9 9 9
 10 10 10 10 10 10 10 10 10 10


i need for given number not passing rows?
please advise
0
Hi,

I was going through below link

http://www.cis.upenn.edu/~matuszek/cit594-2012/Pages/backtracking.html

what is difference between
Non-recursive backtracking, using a stack and
Non-recursive backtracking without using a stack

what is difference between
Non-recursive backtracking and recursive backtracking
please advise
0
Free Tool: IP Lookup
LVL 8
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

A clinic offers you a free test for a very rare, but hideous disease. The test they offer is very reliable. If you have the disease it has a 98% chance of giving a positive result, and if you don’t have the disease, it has only a 1% chance of giving a positive result. You decide to take the test, and find that you test positive. What is the probability that you have the disease?
0
Can you explain it in a different way. I copied it in the class but don't understand it how exactly the calculations are performed.

screenshot2.PNG
0
Can you please tell me in question 6 how it calculate the values of 33 and -5
screenshot2.PNG
0
Hi,

I am going through below site.
https://www.base64decode.org/

when we encode and decode. What are advantages and disadvantages of base64 and what are other alternatives for this? please advise
0
Homework Question:
I am not sure if I did it right. If its wrong can you tell me which direction I should be going to?

q7.PNG
a) p=310/1000 =0.31
odds for 31/100
b) p=600/1000 =0.6
odds for 3/5
0
How to solve this equation?

c(8, 3) * c(8, 2) / c(16, 5) = 14/39 ≈ 0.36
0

Programming Theory

3K

Solutions

24

Articles & Videos

4K

Contributors

Programming theory deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features, along with introductory programming concepts like program structure, variable declaration and conditional and looping constructs. Sub-disciplines include the formal semantics of programming languages, type theory, program analysis and transformation, comparative programming language analysis, metaprogramming, domain-specific languages, compiler construction and run-time systems.