Programming Languages-Other

20K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.

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

Sign up to Post

I want to create a program in Prolog that reads in a user input and finds a synonym for the words that the enter.

For example, if they entered
?- : [i,like,walking] 

Open in new window

, the program would change it to
[i,love,walking].

Open in new window


I want to do this with an input predicate like...

input:-
    read(X),
    synonym(X),
    output(X).

synonym(likes,[loves,adores]).

output(X):-
    write(X).

Open in new window


I know what I want to do, but I don't know how I would go about doing it.
Any help would be much appreciated.
0
I have a table of data  The table contains data that I need to calculate the distance between two points,. I have the  Latitude, and Longitude of each location  I have a formula that works  well in excel but it is  time consuming as there are  thousands of records to check.   the data looks like the following

table: tbldata
fields  used:  ID(datatype autonumber/integer), LS (datatype text) , Lat(datatype long), Log(datatype Long), status(datatype text),

What is needed is a  way to create a new table,  in the original table are three types of records.
active, pending , and closed  records.

I need  to know the distance between each active record and all other active, pending, and closed records.

the final table  that would be created would look like this.

tblnewdata:  TargetID, TargetLS, TargetLat, TargetLog, CheckID, CheckLS, CheckLat, CheckLog, Distance

the formula I used in excel was as follows.

=6371*ACOS(COS(RADIANS(90-D7))*COS(RADIANS(90-D8))+SIN(RADIANS(90-D7))*SIN(RADIANS(90-D8))*COS(RADIANS(E7-E8)))/1.609

D7 is the Target Latitude
D8 is the Check Latitude
E7 is the Target Longitude
E8 is the CheckLongitude

I had problems running that equation in VBA  it seemed to have trouble with Radians, the other trig elements seem to be fine ie. Acos, Cos, Sin but I did not get it to work yet.

I tried to place the  lats and log in the formula and created a button to run the equation but, it didn't work.

from what I researched it is a nested…
0
Hi, I have one data frame (df1) with 20 observations (one for each year) and 597 variables (each one is one stock). The values are a ratio called book-to-market ratio. I need to build two portfolios for each year which consists of the stocks with values lower than the median and stocks with values above the median. The names of the stocks are the columns from df1. So I need to check if each value from each row (each year) is below or above the median and identify each stock name (columns in df1). Then I need to match it with the columns from another data frame (df2) which has data from the return of each stock in each year (20x597). The end result would be a vector with 20 entries, which are the differences of average returns between the two portfolios. I hope it was clear enough, thanks for the answer and I`m here for any explanation.
0
I have searched online and have been unable to find a recent example as to how the eBay API can be called from a recent version of Delphi XE using Indy.

If anyone can post here such a piece of code, I am sure it would save many people a lot of time trying to figure it out.

Many thanks!
0
Hi,
To the prompt, after having pressed Password button below. I expect the password strength to be shown, exactly after having input two password (but before Submit button is pressed). What to adjust?
http://my-friend.co/UserMaintenance2/Default.aspx?userid=mc23&readonly=n
0
I was able to retrieve the attached file thru a soap call to a web service, now i need to convert this xml file to a .csv file, is there an easy method of walking thru the xml file to extrtact the fields i need?
Tempxml3.xml
0
Hi,
I want to adjust the following codes
            $(".btnDelete").click(function () { 
                var houseIdToDelete = $(this).data("house-id");
                $.confirm({
                    title: 'Confirm!',
                    content: 'Are you sure you want to delete current record?',
                    buttons: {
                        Yes: {
                            text: 'Yes',
                            btnClass: 'btn-red',
                            keys: ['enter'],
                            action: function () {
                                DeleteHouseRecord(houseIdToDelete);
                                //-- do ajax call here to delete the record
                            }
                        },
                        No: {
                            text: 'No',
                            btnClass: 'btn-green',
                            keys: ['esc'],
                            action: function () {
                                //$.alert('You clicked No!');
                            }
                        },

                    }
                });
                return false;
            });

Open in new window

to instead show with the details to input the password 2 times (one time to re-confirm it). How?
0
Hello, I am a daytrader in the futures market.  I have four strategies I had a developer create for me using the NinjaTrader version 7 platform.  I plan on marketing these as a bundle product.   I would like to know if any of your products can help me protect the further copying of the product once it is purchased.   The previous products I have purchased in the past from other day trading companies use the Machine ID validation.  Once the product is downloaded, before you can use it, you must have your Machine ID sent to them and it can only be used on that particular computer.   I am looking for that same effect.
0
Hello,

My customer wants a software which recognizes registration plate number of the cars and store them in database.
I use Delphi Seattle.

How can I do that?

Thank you very much.
0
Dear,
I want to have the effect to disable further update (like to show gray background color), to whole page, when it's being idle for a while, by these

        .overlay {
            background: #e9e9e9;
            display: none;
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
            opacity: 0.5;
        }
$(function () {
    // 1000ms=1s, here test use 10s, you could modify. 
    var time = 5000;
    var set = setInterval(function () {
        $(".overlay").show();
        $("#dialog").dialog();
    }, time);
});
    <div class="overlay">
        <div id="loading-img">
        </div>
    </div>

Open in new window

but I cannot get what I want, below
http://my-friend.co/RegRec2?id=18&user_abbr=mc2&readonly=n

what to adjust?
0
My background is in server virtualization so unfortunately this topic is a bit foreign to me. What I'm trying to accomplish, is to essentially aggregate news articles from various websites such as foxnews, cnn, bizjournals.com, etc, and then email the text of those articles to an email address.

I just want to grab new articles from sites like the ones I listed above, Get the text of the article, then email it.

I've done some googling but I'm not sure exactly which technology I should be looking at here. Preferably something that has examples I can base my code off of. This isn't for any business, but just for a personal project of mine. If there is already a program out there that can do this, I don't mind paying for it.

It looks like I may be able to use API calls to accommodate this, but again this is all new to me. Just looking for some pointers in the right directions in programming languages to look at to handle this.
0
hi,

i have a massive python project without Readme file. what is the best way to understand how to run that project?

many thanks.
0
Hi,
I sent a data through Hyperterminal and I am able to see the data in TMC420 Display Screen.
But When I send data through Labview I am not able to see the data in display screen.
Is there any hints?



Thanks,
Mohanraj
0
Hi,
How to adjust to list below, to have also one picture file included, that is retrieved from database?

            using (SqlConnection sqlConn = new SqlConnection(ConfigurationManager.ConnectionStrings["Mssqlconn3"].ConnectionString))
            {
                using (SqlCommand sqlCmd = new SqlCommand("SELECT house_name, address1, address2, price, price_curr FROM house_tab", sqlConn))
                {
                    sqlConn.Open();
                    sqlCmd.CommandType = CommandType.Text;
                    SqlDataAdapter sqlAd = new SqlDataAdapter(sqlCmd);
                    DataTable sqlDt = new DataTable();
                    sqlAd.Fill(sqlDt);
                    sqlConn.Close();
                    if (null != sqlDt)
                    {
                        houseList = sqlDt
                                        .AsEnumerable()
                                        .Select(dataRow => new HouseData
                                        {
                                            house_name = dataRow.Field<string>("house_name"),
                                            address1 = dataRow.Field<string>("address1"),
                                            address2 = dataRow.Field<string>("address2"),
                                            price = dataRow.Field<decimal>("price"),
                                            price_curr = dataRow.Field<string>("price_curr"),
                                        })
         

Open in new window

0
Hello
I need to know what would you advise as responsive website language to de develop a website having this features :
- Community having their own space
- Google map and geolocalisation
Thanks for your help,
Johana
0
Hello

Let's say i narrow the language in github search. I further want to specify a string to search for in all the repos available. Possible? How?

thanks
0
Do you have the source code for Metro Board Game in Prolog. Here is the description : http://www.bluering.nl/sieuwert/games/metro/  Thank you.
0
I have created a copy of a built-in report in SCCM (1702) and created my own custom copy. Everything is fine except I cannot figure out how to update the displayed title and description. They're not matching the actual custom report title and description defined when I "Manage" the report in SSRS b/c the fields are defined expressions that point back to some other data source.

Title:
=SrsResources.Localization.GetString("Report234_Name", User!Language) + "  "

Description:
=SrsResources.Localization.GetString("Report234_Description", User!Language)

I don't see where the "Report234" or "Report234_Description" values are defined in the report. They're not fields, variables, or parameters. I can't find them defined in any of the datasets created for the report. Where do I find these (I don't even know what to call them)?

I tried changing the description for the original report in SSRS (select report in SSRS > Manage > change description > Apply), and then rerunning the report, and the change in description is NOT displayed.  So where are these descriptions being defined?!?

I "need" to figure this out. Our service desk relies on several custom reports and it will create a lot of confusion if the wrong title and description is displayed.
0
I'm just trying to find the right syntax to use to set the background color of a node in json with google charts.

This is the code I have and of course it's not working because I have no idea what I'm doing.

	
$style = new stdClass;
$style->p = "style: 'background-color:green;'";
$item->p = $style;

Open in new window


There's more to my code of course but this is what I'm using to set the background color of a specific node.
0
I have java text file and I want to find out how many variables are declared and initialized in that file?
I have also done one small program but that only find the how many data types are declared..........


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;



public class Variables
{
    public static void  main(String abc[]) throws FileNotFoundException, IOException
    {
 
     try {
         ArrayList<String> a=new <String>ArrayList();
         a.add("byte");
         a.add("short");
         a.add("int");
         a.add("long");
         a.add("float");
         a.add("double");
         a.add("boolean");
         a.add("char");
         
          ArrayList<KeyWords> k;
        KeyWords kw;
        k=new <KeyWords>ArrayList();
   
       
     for(int i=0;i<a.size();i++)
       {
           System.out.println("i="+i);
              String str=a.get(i);
              System.out.println("Checking for= "+str);
     
            FileReader fileIn = new FileReader("/home/milind/fileVar.txt");
            BufferedReader reader = new BufferedReader(fileIn);
            String line;
            int count = 0;
           // String f="float";
            char chk=',';
            while((line = reader.readLine()) != null)
            {
               System.out.println(line);
               if(line.contains(str))
              …
0
I have two connection factories under Resources ->JMS ->Connection Factories.

1) ConnectionFactory 2) IntegrationConnectionFactory

I want to modify the maximum Connection of connection pool under both the connection factories. Resources ->JMS ->Connection Factories -> ConnectionFactory -> Connection Pool -> Maximum Connection.

Can someone please help me to write Jython script to modify the maximum connection of connection pool under connection Factories.

For creating Conncetion factories  :
import sys

nodeName =sys.argv[0]
serverName =sys.argv[1]
queueManagername =sys.argv[2]
queueHostname =sys.argv[3]
queuePort=sys.argv[4]

def createconnectionFactories(nodeName,serverName,queueManagername,queueHostname,queuePort):

      print "Creating connection factories"

      ds = AdminConfig.getid("/Node:"+nodeName+"/Server:"+serverName+"/" )

      print queuePort

      connection1 = AdminTask.createWMQConnectionFactory(ds,["-name ConnectionFactory -jndiName 'jms/ConnectionFactory' -type CF -wmqTransportType BINDINGS_THEN_CLIENT -qmgrSvrconnChannel SYSTEM.AUTO.SVRCONN -qmgrName " + queueManagername + "   -qmgrHostname " + queueHostname + "  -qmgrPortNumber " + queuePort ])

      AdminTask.createWMQConnectionFactory(ds,["-name IntegrationConnectionFactory -jndiName 'jms/IntegrationConnectionFactory' -type CF  -wmqTransportType BINDINGS_THEN_CLIENT -qmgrSvrconnChannel SYSTEM.AUTO.SVRCONN -qmgrName " + queueManagername + "  -qmgrHostname " + …
0
There are two different teams of pineapples. You get to choose the different colors of the pineapples. For example if you wanted the offence to be blue and the defense green then the goalie red. The pine apples could upgrade to make them faster or better dribbling skills and  more. There also would be power ups. They would give you speed boost and kick power. Once you get to a certain level you level up and get more choices of upgrades and different scenes. You can play pineapple soccer on mobile devices and on xbox360, xbox1 and wii. The game could be connected through blue-tooth to have it so that you would be able to play on different devices.
0
hi experts,

we have existing code in our hand.we run the code using visual studio and it also deployed with login page.when we type username and password,it is not working.given gmail login is also not working.but it worked earlier.
it showing error in ripple.js.
but in console,we don't have any error

when we try to login through google +,we couldn't login.it show the error,i have attached below.
my localhost run using 4400 port but google+ comes from 80

Thank you
error.png
0
Hi,

I am working on the REST API test framework automation.  I looked into REST ASSURED and it looks good in the REST API test automation. REST ASSURED is simple and it is in Java

My requirement is
1) automate the REST API (instead of manual testing).
2) for each rest api test case, test the negative scenario as well. for example, in a POST rest call of a student... if the main parameters are Grade(A,B,C) and Mark(1 to 100).  the following are some of the negative test cases.
test case 1:  Grade:Z, Mark:120
test case 2:  Grade:D, Mark:-1
test case 3:  Grade:A, Mark:145
test case 4:  Grade:4, Mark:40
test case 5:  Grade:#, Mark:99
There can be several possible negative test case combinations (like mentioned above). I am planning to write a Java framework to generate the possible set of negative inputs and feed to the REST assured (using Junit parameterized testing)
3) Need to generate the report to analyze the outputs

Please suggest
0
Dear Experts

I have a simulation program, that can simulate the production of mango at different sites in West Africa. Now I want to be able to select the output for the different sites by clicking markers on a google map that is embedded in the application. Do you have good ideas( tutorials) showing how to embed a google map in the application, add markers, modify the markers, add a zoom slider, and add action listeners to the markers to make clicks on the markers responsive?
I am programming in Java using Netbeans.

Best regards
Jorgen
0

Programming Languages-Other

20K

Solutions

19K

Contributors

A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages (such as Perl) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and extensions taken from the dominant implementation being common.