[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Programming Languages-Other

19K

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've been looking into other languages and was wondering which one is the best for locking down and protecting your source code.

Is it even possible to encrypt/lock your source code in any language?

I don't want to learn a language, invest years of time developing something, then have someone immediately copy my source and sell a derivative before I can turn a profit on it.
0
Amazon Web Services
LVL 12
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

0
lets say i have method called
 testSum(){
c=a+b;
}

i clicked on testSum
i did CONTROL+ALT+H i see call hierarchy results
if I clicked testSum did CONTROL+H  then i get search option with my method and its class, package selected automatically and i click SEARCH without changing anything(it says java search)

how above call hierarchy different from java search is different from previous one?

please advise
0
Hi, I'm documenting a change in a web page (not written by my company)and encountered the following snippet. What language is it? JavaScript? Thanks.

(function() { function forEach(responses, cb) { Object.keys(responses).forEach(function(adUnitCode) { var response = responses[adUnitCode]; response.bids.forEach(function(bid) { cb(adUnitCode, bid); }); }); } var winners = pbjs.getAllWinningBids(); var output = []; forEach(pbjs.getBidResponses(), function(code, bid) { output.push({ bid: bid, adunit: code, adId: bid.adId, bidder: bid.bidder, time: bid.timeToRespond, cpm: bid.cpm, msg: bid.statusMessage, rendered: !!winners.find(function(winner) { return winner.adId==bid.adId; }) }); }); forEach(pbjs.getNoBids && pbjs.getNoBids() || {}, function(code, bid) { output.push({ msg: "no bid", adunit: code, adId: bid.bidId, bidder: bid.bidder }); }); if (output.length) { if (console.table) { console.table(output); } else { for (var j = 0; j < output.length; j++) { console.log(output[j]); } } } else { console.warn('NO prebid responses'); } })(); 

Open in new window

1
I've inherited some 10+ year old code without benefit of the original programmer... can anyone explain the usefulness of this code segment, or at least reduce to something more sensible?

                                                       Display Module Source                                                        
                                                                                                                                   
C  N31USERN         CABNE     *ALL' '                            3131--                                  

Thanks in advance ;)
0
I writing python program which read specific text from text file.

The program is working fine if it is static line index.

if it is dynamic search in the whole document, i am unable to read..

particularly, i want to get "Join Date","Relieve Date",etc. along with 3 main parameter(EmpNo,Name,Salary).

How to change the below code..?

Code attached in the below link

Sample TXT File https://1drv.ms/t/s!AiSRcgO5FUmNeTflVF53ZBkuv8Y
TEST_StackOverflow.txt
0
How do i read particular text (like empno, name, salary,etc) from text file and store those values in SQL table using python.

I am new for python and i want sample code this ASAP.
0
Hi Experts

Could you point what must to be done to make a PowerBuilder 6.5 project to be used on PowerBuilder 7.0?

I saw that "workspace"  must to be used but how to make the old  libraries to enter on it...


Thanks in advance!
0
Avoid Empty Catch Blocks
It’s a very bad habit to leave catch blocks empty, as when the exception is caught by the empty catch block, the program fails in silence, which makes debugging harder. Consider the following program which calculates sum of two numbers from command-line arguments:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public class Sum {
    public static void main(String[] args) {
        int a = 0;
        int b = 0;
 
        try {
            a = Integer.parseInt(args[0]);
            b = Integer.parseInt(args[1]);
 
        } catch (NumberFormatException ex) {
        }
 
        int sum = a + b;
 
        System.out.println("Sum = " + sum);
    }
}
Note that the catch block is empty. If we run this program by the following command line:
1
java Sum 123 456y
It will fail silently:
1
Sum = 123

Open in new window


when i tried above example i am getting different error as below istead of getting 123


public class Sum {
    public static void main(String[] args) {
        int a = 0;
        int b = 0;
 
        try {
            a = Integer.parseInt(args[0]);
            b = Integer.parseInt(args[1]);
 
        } catch (NumberFormatException ex) {
        }
 
        int sum = a + b;
 
        System.out.println("Sum = " + sum);
    }
}

Open in new window


Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
      at Sum.main(Sum.java:7)

https://www.codejava.net/coding/10-java-core-best-practices-every-java-programmer-should-know

even below good catch block example also gives same error
public class SumFixed {
    public static void main(String[] args) {
        int a = 0;
        int b = 0;
 
        try {
            a = Integer.parseInt(args[0]);
            b = Integer.parseInt(args[1]);
 
        } catch (NumberFormatException ex) {
            System.out.println("One of the arguments are not number." +
                               "Program exits.");
            return;
        }
 
        int sum = a + b;
 
        System.out.println("Sum = " + sum);
    }
}

Open in new window

Please advise
0
I have had a few people tell me that when trying to visit a site using safari on their iPhones, they get an error that says:

Safari cannot open the page because the server cannot be found.

I asked other people to test on their iPhones and they said it works fine. After asking Google about this it seems that the answer is always something to do with the phone itself. But, it is not realistic to ask everyone with an iPhone to check this setting, and check that setting in order to try use the website.

Does anyone have any suggestions regarding this?
0
C++ 11 Fundamentals
LVL 12
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Does anyone know of resources either in books or on the web, or does anyone have experience of using SCSI Pass Through / Direct using (ideally VB6).
I am interested in how to set up the IOCTL_SCSI_PASS_THROUGH / DIRECT without using .net I have tried some sample .net code and it is clunky and very slow.
0
Hi,
How to resolve the attached problem below?

31k.png
0
I am working with matcher and pattern in Java. I think this test code should work to add and print my desired search but it is not. If anyone can take a look and fix this it would be much appreciated. Note the if I just use the while loop it works fine. It is when I add in the for loop to iterate through the array list is when it prints out blank.

Screen-Shot-2018-08-29-at-11.51.28-A.png
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class test {


    public static void main(String[] args) {

        ArrayList<String> linet = new ArrayList<>();
        ArrayList<String> lines = new ArrayList<>();

        lines.add("O#833452-14943408 PO#Subject: Re: gg  - Oops. Your O#purchase order is missing key payment information.PPO O#769117789:C11134 [ ref:_00D30dWxY._5001311TVgB:ref ]");
        lines.add("SO#833452-14943408 PO#Subject: Re: gg  - Oops. Your O#purchase order is missing key payment information.PPO O#769165189:C11134 [ ref:_00D30dWxY._5001311TVgB:ref ]");
        lines.add("O#833452-14943408 PO#Subject: Re: gg  - Oops. Your O#purchase order is missing key payment information.PPO SO#7696561189:C11134 [ ref:_00D30dWxY._5001311TVgB:ref ]");
        lines.add("CASE-1443453931800\tPN#109684324201-2 qty1EA\t\"");

        for (int i = 0; i < lines.size(); i++) {

            String line = lines.get(i);

            String so1 = "SO#";
            Pattern p = Pattern.compile(so1);
            Matcher m = …
0
Dear,
Any help to this problem?
31h.png
0
Dear,
I get overflow error, due to the below line
                    RowID2 = c.Row

Open in new window

                   
in Macro (as attached). Why?
Gold-Star-ACER-BKSI-20082018-d.xlsm
0
what are differences between eclipse short cuts F3 and Control +Shift+G
when to use which one?

Please advise
0
Update Word Document with Data entered in Excel
sp
I have Excel sheet displayed on the screenshot above.
I also have word documents with the name that matches exactly the name of each Comp-Name.

BATH.docx
MONR.docx
STAR.docx
JUSGB.docx




Each word document has a table with the same column names as the Excel sheet

I would like to have the respective word document table updates automatically  its data to match the new entered data in Excel .
for instance If I have a new purchase, I can manually add it to a new Excel row, and the program should add that new row automatically to the corresponding word document.

Example:
I have new purchase for a company MONR
On Excel , I will add new entry:
MONR      TX      3/3/2018      3/8/2018

on a corresponding word document MONR.doc, I should have the new entry added automatically to the table in word.

Any help will be very much appreciated.

Thanks
0
I've been using the Azure ML Studio and it is great.

I get the basics of what ML is and what it does. But now I'd like to learn it in more detail - understand the deeper issues, the math behind it, what the different algorithms do and so on.

But I don't know where to go for this. Most of the introductions to ML use Python and TensorFlow. Ideally I'd like to stick to Azure ML Studio but I just can't find anything that tells me about the theory of ML rather than how to use Azure ML Studio.

I'm talking about books or courses - I think ideally a book but either would be fine.

This book might be promising:

Predictive Analytics with Microsoft Azure Machine Learning 2nd Edition Paperback – 19 Aug 2015
by Valentine Fontama (Author), Roger Barga (Contributor), Wee Hyong Tok (Contributor)

But I'm concerned it doesn't give the background - the reviews seem to indicate this.

Let me know if you have read a good book or completed a good course that explains the math of ML and would be something I could use with the Azure ML Studio.

Thanks!
0
exception java.net.MalformedURLException is never thrown in body of corresponding try statement
exception java.io.IOException is never thrown in body of corresponding try statement

i am getting above compilaion error in one of my facade manager class.

i wonder what that means

if i do not throw it but still catch that should be ok right right?
why i get compilation error

Please advise
0
Learn SQL Server Core 2016
LVL 12
Learn SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Hello EE,

Can someone please help me with how to convert date and times to 30 minutes interval in Microsoft Power BI.

Thanks
0
FlightsDestination.valueOf("price")


i was wondering how valueOf() method there on a custom objet
i thought it is just method on String class
https://study.com/academy/lesson/how-to-convert-int-to-string-in-java-valueof-method.html

does take string as input parameter like below
FlightsDestination.valueOf("price")

or
FlightsDestination.valueOf(price)

or

FlightsDestination.valueOf("400")

or
FlightsDestination.valueOf(400)



please advise
0
How to compare a String in scala against a constant value?

def desks(sorted:Boolean, includeNtf:Boolean) = {

    val output = for {
        desk <- TableQuery[Desks] if(includeNtf && desk.test === Some("Y"))
    }

I want to set "desk" to only the records in TableQuery[Desks] that have test="Y"

test is type String

This does not work with various errors... desk.test === Some("Y")

I have never touched scala code before.

Thanks
0
restfu get and post example


https://www.mkyong.com/webservices/jax-rs/restfull-java-client-with-java-net-url/
i am trying above example in eclipse.

I am not sure what all jars needed and what set up is needed to see that outputs

Please advise
0
Return Keyword in Javascript function.
I have the code below that runs and gets the results as expected:
var person = function(name,age,state){
var temp={};
	temp.name = name;
	temp.age = age;
	temp.state = state;

temp.printperson=function(){
	document.write(this.name);
};
[b]return[/b] temp;
};

var person1=person('Omar','25','CS');

person1.printperson();

Open in new window


I would like to know what the keyword "return" does in the code above.

Thank you
0
Desktop Vs Web Application

I would like to know if Nowadays there is any difference between Desktop Application and Web Application, seeing that you can make web application do what classic Desktop application does. I mean you can create forms on the Browser, validate data, connect to the database and  modify/ add  /fetch data, and present it to end user. The good thing about it, you do not need to install the client application on the end user's desktop, user can just open the browser and go to the link you provided them.

I could be wrong though.
Any insights will be considered

Thanks
1

Programming Languages-Other

19K

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.